question

Joshlabtech-6194 avatar image
0 Votes"
Joshlabtech-6194 asked Joshlabtech-6194 answered

May I ask how do I replicate a database on to another database in SQL server managament 2016?

Hi,

I have server A and I want to replicate another Server A for testing purpose.

How do I do this?

I have tried to do a back up of Database A
Create a new Database and call it Database B
Then try to restore Database A in Database B.

78517-restoring-to-new-test-database.jpg

However, SQL gives me an error that said "the back up consist of contents belonging to another server"

Instead of restoring, should I be importing and exporting?

Thank you!
78524-error.jpg


sql-server-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Do you have two SQL servers or one SQL server?

0 Votes 0 ·
Joshlabtech-6194 avatar image
0 Votes"
Joshlabtech-6194 answered

I have got it! I should not create a new database first, instead should create a database name at the destination name.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AmeliaGu-msft avatar image
0 Votes"
AmeliaGu-msft answered Joshlabtech-6194 commented

Hi @Joshlabtech-6194,

The backup set holds a backup of a database other than the existing database

Does the database you want to restore already exist on Server B?
You can select the “Overwrite the existing database (WITH REPLACE)” on the Options tab of the Restore database page when restoring the database on server B.
78654-01.jpg

Best Regards,
Amelia


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread



01.jpg (88.2 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

I wrote wrongly, it is database A and B, not server.

I don't seems to find the options which you have given.

I have created a new server and was intending to restore the database to one which I have backed up.

Please advise the steps.

0 Votes 0 ·