SQL SERVER – Simple Example of Cursor – Sample Cursor Part 2

I have recently received email that I should update SQL SERVER – Simple Example of Cursor with example of AdventureWorks database. Simple Example of Cursor using AdventureWorks Database is listed here. USE AdventureWorks GO DECLARE @ProductID INT DECLARE @getProductID CURSOR SET @getProductID = CURSOR FOR SELECT ProductID FROM Production.Product OPEN @getProductID FETCH…
Read More

SQL SERVER – 2005 – A Simple Way To Defragment All Indexes In A Database That Is Fragmented Above A Declared Threshold

Just a day ago, I received email from regular reader Rajiv Kayasthy about a script which demonstrates the A Simple Way To Defragment All Indexes In A Database That Is Fragmented Above A Declared Threshold. He found this script on TechNet BOL and was attempting to run on SQL Server…
Read More

SQL SERVER – Sharpen Your Basic SQL Server Skills – Learn the distinctions between unique constraint and primary key constraint and the easiest way to get random rows from a table

Read my article in SQL Server Magazine March 2007 Edition I will be not able to post complete article here due to copyright issues. Please visit the link above to read the article. [Articles are relocated so links are disabled] Reference : Pinal Dave (https://blog.sqlauthority.com)
Read More

SQL SERVER – Transfer The Logins and The Passwords Between Instances of SQL Server 2005

This question was asked to me by one of reader. “I just upgraded my server with better hardware and newer operating system. How can I transfer the logins and the passwords between two of my SQL Server?” I think Microsoft has wonderful documentation for this issue. kb 918992 I will…
Read More