Archive for April, 2012

IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = N’WebPublish’)
 Exec(‘CREATE SCHEMA WebPublish’)

It’s a best practice to have the above statement before creating any sql object in the WebPublish schema.

Advertisements

To check the current identify value – DBCC CHECKIDENT (RetailForm, NORESEED)

If above statement returns 44 as value that means the table has a record with current highest identity value – 44 .

If you want to skip next 10 identity ids and want to start the new record’s identity from 55 then you can run following command

DBCC CHECKIDENT (RetailForm, RESEED, 54)

http://social.msdn.microsoft.com/forums/en-US/sqlsetupandupgrade/thread/50164862-ef20-4758-9c7a-0d6ae8f1b3f9/

Open cmd with Run as administrator and run following command …

sc.exe delete ReportServer
sc.exe delete ReportServer$MSSQLSERVER