SQL Server restore database which is part if alwayson

1zmg4dgp  于 2023-06-28  发布在  其他
关注(0)|答案(2)|浏览(139)

I have DR activity where I will have to install sql server 2016 and resotore all databases including system databases. From the backup of production. Prod server is configured with always on.

So if I restore master Database before user database I believe I will not able to restore user database which might through an error like "cannot restore database as it is participating in alwayson".

Can anyone provide solutions for it?

2skhul33

2skhul331#

If you need to restore an availability group database, you need to first evict that database from availability group and then restore that database and finally you can re-add it to the always on availability group. So, there are three steps involved in restoring an AOAG database.

1. Remove identified database from Availability Group.
2. Restore that database.
3. Add database to Availability Group post restore operation.
k5ifujac

k5ifujac2#

It only shows following error when we do not enable always on future in configuration manager. Once we enabled database gets restore as usual.

cannot restore database as it is participating in alwayson".

相关问题