Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Attach database with the same id Expand / Collapse
Author
Message
Posted Tuesday, November 20, 2012 1:55 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, August 21, 2014 2:00 AM
Points: 522, Visits: 2,012
i detached the database with the dbis as 6 , after i attached the database the db is has changed. How can we attach the database with the same dbid ?
Post #1386733
Posted Tuesday, November 20, 2012 2:04 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 8:53 AM
Points: 5,218, Visits: 5,072
You dont, SQL will always assign the lowest free number from sys.databases to a newly created / attached database, so either another database was created and got DBID 6 so when you attached you got the max+1 DBID or DBID 5 was free so when you attached the database so SQL assigned it DBID 5



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1386738
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse