Cloud & SQLSailor

Cloud, Databases & Beyond!

Month: December 2009

  • Tip on INDEX REBUILD

    ALTER INDEX REBUILD you don’t need to update the statistics.Statistics are updated as part of an index rebuild. If you use ALTER INDEX REORGANIZE however, you may want to update…


  • DBCC INPUTBUFFER

    Displays the last statement sent from a client to an instance of Microsoft SQL Server. Arguments  : session_id or request_id Request ID can be retrieved from the below statement :…


  • Using NOLOCK Hint

    When you specify the NOLOCK hint, the query both doesn’t issue shared locks and also doesn’t care about already existing exclusive locks. Thus, you will get the result back very…


  • How to move a TEMP DB

    USE masterGOALTER DATABASE TempDB MODIFY FILE(NAME = tempdev, FILENAME = ‘f:datatempdb.mdf’)GOALTER DATABASE TempDB MODIFY FILE(NAME = templog, FILENAME = ‘e:datatemplog.ldf’)GONo changes are made to TempDB till SQL Server restarts. Please…