question

niall5098 avatar image
niall5098 asked

MIgrate databases and keep database_id

HI All, just a quick one, is it possible to migrate a number of databases to a new server while keeping the same database_id as the original? Thanks in advance
databasesql server 2012migration
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Tim avatar image
Tim answered
An easy way would be to restore them in such an order that they are assigned the proper database_id. If you have gaps in database_id's, you can create empty databases to occupy that ID and then progress forward. The only other thing would be a system table hack that I wouldn't recommend.
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks, creating multiple dummy db's then overwriting them appears to be the way to go.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.