Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
chris_cs
Posting Yak Master
223 Posts |
Posted - 2011-11-14 : 06:53:58
|
If a database with an ID of 107 is deleted, would a new database created at some point be given the same ID now it's no longer being used?----------------------------Junior DBA learning the ropes |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-11-14 : 07:02:26
|
database id will be unique within an instance of SQL Server so I dont think it will get reassigned to a new db------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-11-14 : 07:07:58
|
Sorry I was wrong. just tried dropping an unwanted db and creating a new db and it reclaimed the id of the dropped databse. So as it stands it will give the same id to another db------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
chris_cs
Posting Yak Master
223 Posts |
Posted - 2011-11-14 : 07:09:51
|
Ok thanks for that.I wouldn't have expected that to be the case so I'll have to edit my scripts.----------------------------Junior DBA learning the ropes |
 |
|
|
|
|