August 2, 2013 at 12:40 pm
I have to replace XX database from backup in production. The third party tool and reporting services have been configure to database id so I want to restore database without breaking database id. Can I know simple overwrite restores database with same database id? or any other method is there to restore keeping same database id.
August 2, 2013 at 12:45 pm
Ashwin M N (8/2/2013)
I have to replace XX database from backup in production. The third party tool and reporting services have been configure to database id so I want to restore database without breaking database id. Can I know simple overwrite restores database with same database id? or any other method is there to restore keeping same database id.
wow never heard of an app locking down the database id.
say for example, you have a server with 14 databases, but you need database id 7 for your special application.
you'll need to
1.find the current database that has id 7, and either backup + drop, or detach the database.
2.restore or attach the database that needs to be #7,
3. restore or reattach the original #7, so it becomes #15.
Lowell
August 2, 2013 at 2:13 pm
Yeah, that's crazy.
Is there any way you can "spoof" the database id so it can be something else in the real server but report back to the software what it expects.
Heaven help you when you have to disaster-recover that db!
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
August 3, 2013 at 1:24 pm
ScottPletcher (8/2/2013)
Yeah, that's crazy.
indeed :w00t: never heard of this too.
I would never rely on the dabase ids beeing the same after restore.
Kick this third party tool and find another one or try to change the reports so that they are using the database name. Maybe you can use the system table master.sys.databases as kind of mapping table when changing the selects of the reporting tool.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply