tag:blogger.com,1999:blog-55733275059790374982024-03-08T05:06:12.657-08:00Paarthasarathy -Paartha's Official BlogspotUnknownnoreply@blogger.comBlogger5125tag:blogger.com,1999:blog-5573327505979037498.post-32303127507721910682010-07-19T09:25:00.000-07:002010-07-19T09:29:41.250-07:00SQL Server 2008 Editions<span style="font-size:85%;"><span style="font-weight: bold;font-family:verdana;" >SQL Server 2008 Editions</span><br /><br /><span style="font-family:verdana;">SQL Server 2008 is available in the following editions:</span><br /><br /><span style="font-weight: bold;font-family:verdana;" >Enterprise</span><br /><span style="font-family:verdana;">Designed for the largest organizations and those needing to leverage the full power of the SQL Server 2008 platform.</span><br /><span style="font-family:verdana;">Standard Designed for small and midsized organizations that do not need all the capabilities available in SQL Server 2008 Enterprise.</span><br /><br /><span style="font-weight: bold;font-family:verdana;" >Workgroup</span><br /><span style="font-family:verdana;">Suitable for small departmental projects with a limited set of features.</span><br /><br /><span style="font-weight: bold;font-family:verdana;" >Express</span><br /><span style="font-family:verdana;">A freely redistributable version of SQL Server that is designed to handle</span><br /><span style="font-family:verdana;">the needs of embedded applications as well as the basic data storage needs for server-based applications, such as Web applications with a small number of users.</span><br /><br /><span style="font-weight: bold;font-family:verdana;" >Compact</span><br /><span style="font-family:verdana;"> Designed as an embedded database.</span><br /><br /><span style="font-weight: bold;font-family:verdana;" >Developer</span><br /><span style="font-family:verdana;"> Designed for use by developers in creating SQL Server applications.</span><br /><span style="font-family:verdana;">SQL Server 2008 Developer has all the features and capabilities as SQL Server 2008 Enterprise, except that it is not allowed to be used in a production environment.</span><br /><br /><span style="font-weight: bold;font-family:verdana;" >Evaluation </span><br /><span style="font-family:verdana;"> Designed to allow organizations to evaluate SQL Server 2008. SQL Server 2008 Evaluation has all the features and capabilities as SQL Server 2008 Enterprise,except that it is not allowed to be used in a production environment and it expires after 180 days.</span><br /></span><input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden"><div style="font-family: verdana;" id="refHTML"></div><input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden"><div id="refHTML"></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5573327505979037498.post-22968034425154366182009-04-25T08:19:00.001-07:002009-04-25T08:19:34.643-07:00"With append" - The thing that you have to note in 65 compatibility<div style="font-family: verdana,sans-serif;" class="gmail_quote"><b><br>If you have your database in 65 compatibility mode, you need to be extra careful, if you add an additional trigger to a table.<br> Let us take this example,<br><br>you have a database named test.<br>First move the database to 65 compatibility mode with the help of following statement.<br><br><span style="color: rgb(51, 51, 255);">sp_dbcmptlevel test,65</span><br> <br>Then create a table and name it as working_table.Now create a trigger for insert action on the table with name as working_table_insert_trigger1.<br><br>If you check now the number of triggers on the table with <span style="color: rgb(51, 51, 255);">sp_helptrigger working_table</span>, the sql server will show the newly created trigger working_table_insert_trigger1.<br> <br>And here is the twist, if you wish to add an additional trigger on the table working_Table for the same insert activity, you need to be careful.<br><br>let us assume, you proceed normally and create a trigger in the following way,<br> <br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">Create trigger working_table_insert_trigger2</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">on working_table </span><br style="color: rgb(51, 51, 255);"> <span style="color: rgb(51, 51, 255);">for insert</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">as</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">begin </span><br style="color: rgb(51, 51, 255);"> <span style="color: rgb(51, 51, 255);"> select 1</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">end</span><br><br>If you check the sqlserver, you first trigger will be lost.<br><br> sp_helptrigger working_table will return only the latest trigger.The embarrassing thing is you wont get any warning message when you create the second trigger. <br><br>You have to use the append clause if you want to create multiple triggers on a table that is in a database with 65 compatibility mode.<br> <br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">Create trigger working_table_insert_trigger2</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">on working_table </span><br style="color: rgb(51, 51, 255);"> <span style="color: rgb(51, 51, 255);">for insert</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">with append</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">as</span><br style="color: rgb(51, 51, 255);"> <span style="color: rgb(51, 51, 255);">begin </span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);"> select 1</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">end</span><br> <br>If you missed the "with append" option it means you are going to lose all your code in the previous triggers.<br><br>Another thing that Microsoft disappoints is, when We modify the triggers that we added later with "with append" option.<br> You should not use this "with append" option when you alter the trigger. This article may be on an outdate topic but still worth reading and useful.<br></b> </div><b style="font-family: verdana,sans-serif;"><br></b> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5573327505979037498.post-15536239848361148662009-02-28T13:35:00.001-08:002009-04-25T08:27:33.756-07:00SP_WHAT - A New attempt to find the Blocks<span style="color: rgb(51, 102, 255);font-family:verdana;font-size:85%;" ><strong>Hi buddies,</strong></span><span style="font-size:85%;"><br /></span><span style="color: rgb(51, 102, 255);font-family:verdana;font-size:85%;" ><strong></strong></span><span style="font-size:85%;"><br /></span><span style="color: rgb(51, 102, 255);font-family:verdana;font-size:85%;" ><strong>The following procedure can be used to find whether there are any blocks </strong></span><span style="color: rgb(51, 102, 255);font-family:verdana;font-size:85%;" ><strong>in the sql server.</strong></span><span style="font-size:85%;"><br /></span><span style="color: rgb(51, 102, 255);font-family:verdana;font-size:85%;" ><strong>The procedure if run in Master database , can be used like any other </strong></span><span style="font-size:85%;"><br /></span><span style="color: rgb(51, 102, 255);font-family:verdana;font-size:85%;" ><strong>system stored procedure from any database.</strong></span><span style="font-size:85%;"><br /></span><span style="color: rgb(51, 102, 255);font-family:verdana;font-size:85%;" ><strong>The output of the proc will contain the following</strong></span><span style="font-size:85%;"><br /></span><span style="color: rgb(51, 102, 255);font-family:verdana;font-size:85%;" ><strong></strong></span><span style="font-size:85%;"><br /></span><span style="color: rgb(51, 102, 255);font-family:verdana;font-size:85%;" ><strong><span style="color: rgb(0, 0, 0);">SPID OF RUNNING APPLICATION<br />APPLICATION NAME<br />EXECUTING DATA<br />BLOCKED (Y/N)<br />BLOCKING SPID<br />BLOCKING APPLICATION<br />EXECUTING DATA (BLOCKING APPLICATION) </span></strong></span><span style="font-size:85%;"><br /></span><span style="color: rgb(51, 102, 255);font-family:verdana;font-size:85%;" ><strong><span style="color: rgb(0, 0, 0);"><br /></span>The Procedure's target version is SQL SERVER 2000.Stay tuned for more details and enhancements.</strong></span><span style="font-size:85%;"><br /></span><span style="color: rgb(51, 102, 255);font-family:verdana;font-size:85%;" ><strong></strong></span><span style="font-size:85%;"><br /></span><span style="color: rgb(51, 102, 255);font-family:verdana;font-size:85%;" ><strong></strong></span><span style="font-size:85%;"><br /><br /></span><span style="color: rgb(51, 102, 255);font-family:verdana;font-size:85%;" ><strong>CREATE PROC SP_WHAT<br />AS<br />BEGIN<br />/*CODE WRITTEN BY<br />PAARTHASARATHY K<br /><span style="color: rgb(255, 0, 0);">http://InayathilEnthanGeetham.blogspot.com/<br />http://PaarthasarathyK.blogspot.com/</span><br />*/<br />/*TO FIND THE SPID'S THAT ARE ACTIVE AND WHAT THEY ARE EXECUTING*/<br />CREATE TABLE #T1<br />(<br />A SYSNAME,<br />B SYSNAME,<br />[INPUT_BUFFER] NVARCHAR(1200),[SPID] INT NULL<br />);<br />DECLARE @A NVARCHAR(400),@B INT<br /><br />DECLARE SP_IDS CURSOR<br />FOR SELECT SPID FROM SYSPROCESSES<br />WHERE STATUS ='RUNNABLE'<br />--STATUS <> 'SLEEPING'AND<br />--STATUS <> 'BACKGROUND'<br />AND SPID <> @@SPID<br />AND PROGRAM_NAME <> 'SQL PROFILER'<br />UNION ALL<br />SELECT SPID FROM SYSPROCESSES<br />WHERE BLOCKED <>0<br /><br /><br />OPEN SP_IDS<br />FETCH NEXT FROM SP_IDS INTO @B<br /><br />WHILE @@FETCH_STATUS =0<br />BEGIN<br /><br />SET @A = 'DBCC INPUTBUFFER('+RTRIM(@B)+')WITH NO_INFOMSGS;';<br /><br /><br />INSERT #T1(A,B,[INPUT_BUFFER]) EXEC SP_EXECUTESQL @A<br /><br />UPDATE #T1 SET [SPID] = @B WHERE [SPID] IS NULL<br />FETCH NEXT FROM SP_IDS INTO @B<br />END<br /><br /><br />CLOSE SP_IDS<br />DEALLOCATE SP_IDS<br /><br />CREATE TABLE #T2<br />(<br />SPID INT,<br />PROGRAM_NAME SYSNAME,<br />INPUT_BUFFER NVARCHAR(1200),<br />BLOCKED VARCHAR(2),<br />BLOCKING_PROCESS VARCHAR(10),<br />PROGRAM_NAME1 SYSNAME,<br />INPUT_BUFFER1 NVARCHAR(1200)<br />)<br /><br /><br />INSERT INTO #T2<br />SELECT A.SPID,B.PROGRAM_NAME, A.INPUT_BUFFER ,<br />CASE B.BLOCKED WHEN 0 THEN 'N' ELSE 'Y' END ,<br />CASE WHEN B.BLOCKED <>0 THEN CONVERT(VARCHAR(10),B.BLOCKED) ELSE 'NO BLOCK' END ,<br />'',''<br />FROM #T1 A,<br />MASTER..SYSPROCESSES B<br />WHERE A.SPID = B.SPID<br /><br /><br />UPDATE A<br />SET A.PROGRAM_NAME1 = B.PROGRAM_NAME<br />FROM #T2 A ,<br />SYSPROCESSES B<br />WHERE A.BLOCKING_PROCESS = B.SPID<br />AND A.BLOCKED = 'Y'<br /><br /><br /><br />CREATE TABLE #T3<br />(<br />A SYSNAME,<br />B SYSNAME,<br />[INPUT_BUFFER] NVARCHAR(1200),[SPID] INT NULL<br />);<br /><br />DECLARE CURSOR_2 CURSOR<br />FOR SELECT BLOCKING_PROCESS FROM #T2<br />WHERE BLOCKED ='Y'<br /><br /><br />OPEN CURSOR_2<br />FETCH NEXT FROM CURSOR_2 INTO @B<br /><br />WHILE @@FETCH_STATUS =0<br />BEGIN<br /><br />SET @A = 'DBCC INPUTBUFFER('+RTRIM(@B)+')WITH NO_INFOMSGS;';<br /><br /><br />INSERT #T3(A,B,[INPUT_BUFFER]) EXEC SP_EXECUTESQL @A<br /><br />UPDATE #T3 SET [SPID] = @B WHERE [SPID] IS NULL<br />FETCH NEXT FROM CURSOR_2 INTO @B<br />END<br /><br />CLOSE CURSOR_2<br />DEALLOCATE CURSOR_2<br />/*<br />--DEBUGG<br /><br />SELECT * FROM #T2 A<br />SELECT * FROM #T3 B<br />--DEBUGG<br />*/<br />UPDATE A<br />SET A.INPUT_BUFFER1 = B.INPUT_BUFFER<br />FROM #T2 A, #T3 B<br />WHERE A.BLOCKING_PROCESS <> 'NO BLOCK' AND<br />A.BLOCKING_PROCESS = CONVERT (VARCHAR(10),B.SPID)<br /><br />SELECT DISTINCT LTRIM(RTRIM(SPID)) 'SPID'<br />,LTRIM(RTRIM(PROGRAM_NAME)) 'APPLICATION NAME',<br />LTRIM(RTRIM(INPUT_BUFFER)) 'EXECUTING DATA',<br />LTRIM(RTRIM(BLOCKED)) 'BLOCKED (Y/N)',<br />LTRIM(RTRIM(BLOCKING_PROCESS)) 'BLOCKING SPID' ,<br />LTRIM(RTRIM(PROGRAM_NAME1)) 'BLOCKING APPLICATION',<br />LTRIM(RTRIM(INPUT_BUFFER1)) 'EXECUTING DATA (BLOCKING APPLICATION)' FROM #T2<br /><br /><br />DROP TABLE #T1<br />DROP TABLE #T2<br />DROP TABLE #T3<br /><br />END</strong></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5573327505979037498.post-8157875151782797602009-02-01T02:05:00.001-08:002009-02-01T02:05:57.195-08:00Life is Beautiful – A Good Movie worth watching<p class="MsoNormal"><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);">Life is Beautiful – A Good Movie worth watching</span></span></span></p> <p class="MsoNormal"><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);">Cast:</span></span></span></p> <p class="MsoNormal"><span style="mso-tab-count:1"><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);"> </span></span></span></span><span style="mso-spacerun:yes"><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);"> </span></span></span></span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);">Roberto Benigni, Nicoletta Braschi, Giorgio Cantarini</span></span></span><span style="mso-spacerun:yes"><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);"> </span></span></span></span></p> <p class="MsoNormal"><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);">Awards:</span></span></span></p> <p class="MsoNormal"><span style="mso-tab-count:1"><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);"> </span></span></span></span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);">Grand Prix, Cannes</span></span></span></p> <p class="MsoNormal"><span style="mso-tab-count:1"><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);"> </span></span></span></span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);">Academy Award for Best Foreign Language Film</span></span></span></p> <p class="MsoNormal"><span style="mso-tab-count:1"><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);"> </span></span></span></span><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);">European Film Award for Best European Film</span></span></span></p> <p class="MsoNormal"><o:p><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);"> </span></span></span></o:p></p> <p class="MsoNormal"><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);">Story</span></span></span></p> <p class="MsoNormal"><span class="Apple-style-span" style="font-family: verdana;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);">The movie was the story of a Jewish Italian, who spends his days with his son in a Nazi concentration camp. Roberto makes us laugh out loud in the first half and leave us with sad tears in eyes in the end. The first half of the movie is a whimsical, romantic comedy. He steals her Lover (Dora, she is not a Jew), at her engagement function from her rude and loud fiancé. Then they marry and have a son called Joshua. The story takes a turning point at Joshua's 5th birthday. Roberto and his son were taken to the Nazi Concentration camp. Dora too joins them at the camp, but stays separately. To keep up Joshua's spirits, Roberto convinces him that the camp is just a game in which the first person to get thousand points will win a tank. Roberto tells Joshua if he cries, or complains that he is hungry or want his mother, he lose points, while quiet boys who hide from the camp guards earn points. Roberto ables to manage the story to his son until the chaos caused by the American troops. At this juncture he asks his son to hide in a box but Roberto was caught in to the trap while trying to find Dora. Roberto was shot dead, but succeed in making his son laugh by imitating the Nazi guard. At last the American troop enters the camp and liberates everyone. Joshua was reunited with his mother and manages a ride in a Tank.</span></span></span></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5573327505979037498.post-25881058445369272722009-02-01T01:24:00.000-08:002009-02-01T01:25:46.869-08:00Satyam Saga<p class="MsoNormal"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);"><span class="Apple-style-span" style="font-size:small;">January 7 2009 was a shocking day not only in India, but also across the world, when </span><span class="Apple-style-span" style="font-size:small;">Ramalinga</span><span class="Apple-style-span" style="font-size:small;"> </span><span class="Apple-style-span" style="font-size:small;">Raju</span><span class="Apple-style-span" style="font-size:small;"> admitted cooking account books and a fraud of 8000 </span><span class="Apple-style-span" style="font-size:small;">crore</span><span class="Apple-style-span" style="font-size:small;"> Indian rupees. It was the country's biggest corporate fraud involving about Rs 8,000 </span><span class="Apple-style-span" style="font-size:small;">crore</span><span class="Apple-style-span" style="font-size:small;">, </span><span class="Apple-style-span" style="font-size:small;">Satyam</span><span class="Apple-style-span" style="font-size:small;"> was hurtling towards disaster, following the shocking disclosure of accounts fudging by its founder </span><span class="Apple-style-span" style="font-size:small;">Ramalinga</span><span class="Apple-style-span" style="font-size:small;"> </span><span class="Apple-style-span" style="font-size:small;">Raju</span><span class="Apple-style-span" style="font-size:small;">, who then quit as chairman - leaving an uncertain future for the company and its 53,000 employees.</span></span></span></p> <p class="MsoNormal"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);"><span class="Apple-style-span" style="font-size:small;">Certain questions rise on reading his letter to </span><span class="Apple-style-span" style="font-size:small;">SEBI</span><span class="Apple-style-span" style="font-size:small;"> and the board of directors. He had said "That neither myself, nor the Managing Director (including our spouses) sold any shares in the last eight years -- excepting for a small proportion declared and sold for philanthropic purpose" and "hat neither me, nor the Managing Director took even one rupee/dollar from the company and have not </span><span class="Apple-style-span" style="font-size:small;">benefitted</span><span class="Apple-style-span" style="font-size:small;"> in financial terms on account of the inflated results". If this is what actually happened, then why to fudge the books and show profits in the market. But reports show that </span><span class="Apple-style-span" style="font-size:small;">Raju</span><span class="Apple-style-span" style="font-size:small;"> created 300 companies to divert funds. </span></span></span><span style="mso-spacerun:yes"><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);"><span class="Apple-style-span" style="font-size:small;"> </span></span></span></span><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="color: rgb(0, 0, 153);"><span class="Apple-style-span" style="font-size:small;">According to the government, </span><span class="Apple-style-span" style="font-size:small;">Satyam</span><span class="Apple-style-span" style="font-size:small;"> Computer Services’ founder </span><span class="Apple-style-span" style="font-size:small;">Ramalinga</span><span class="Apple-style-span" style="font-size:small;"> </span><span class="Apple-style-span" style="font-size:small;">Raju</span><span class="Apple-style-span" style="font-size:small;"> created a network of about 300 companies and diverted funds from one company to another in a complex but carefully planned process. There has been an issue of siphoning of funds. The investors money where siphoned and they where cheated. Investigation showed that the company really employed only 44000 employees and the employee’s salary account were used to siphon the funds. </span></span></span></p>Unknownnoreply@blogger.com