Thursday, 24 February 2011

Script to attach MDF without LDF under SQL2000

USE MASTER
GO
SP_CONFIGURE 'ALLOW UPDATES',1 RECONFIGURE WITH OVERRIDE
GO
UPDATE SYSDATABASES SET STATUS =32768 WHERE NAME='db_NAME'
Go
sp_dboption 'db_NAME', 'single user', 'true'
Go
DBCC CHECKDB('db_NAME')
Go
update sysdatabases set status =28 where name='db_NAME'
Go
sp_configure 'allow updates', 0 reconfigure with override
Go
sp_dboption 'db_NAME', 'single user', 'false'
Go

3 comments:

  1. That was very informative post. Thanks for sharing the above post.

    Flash Game Development

    ReplyDelete
  2. Great!!! This post has helped me to have another perspective. I am researching this topic for a paper I am writing. Keep up the right job.
    external hard drive recovery

    ReplyDelete