Tuesday, January 13, 2009

Error Logging in MS SQL server

Tips and Tricks :

   you can find all the error log of MSSQL server by executing this.

use master;
EXEC   xp_readerrorlog;








MSSQL Get Week number of Date : DATEPART


Try this, you will get the weeknumber for any date.

      SELECT  ( DATEPART(wk, '02-02-2008') )