SQL
Attachability check fails with
error:
Replay.Common.Contracts.Sql.AttachabilityCheckFailedException: ExecuteNonQuery
failed for Database 'AA-Quest-99903c84-9de4-4c72-bbb5-75b8807c3811'. --->
Microsoft.SqlServer.Management.Smo.FailedOperationException --->
System.IO.FileNotFoundException: Could not load file or assembly
'Microsoft.SqlServer.BatchParserClient, Version=15.100.0.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot
find the file specified.
The production databases are configure to perform SQL replication. In order to check if you have SQL databases set for replication follow the steps below:
In this case the databases managed by this SQL server are "Marcio" and "Quest", both of them are set fro transnational replication. This will cause the database do no attach successfully and it will create a AA-Zero database on the SQL server you are performing the attachability check:
Microsoft SQL Server do not allow to detach a database that is configured for replication as you can see here.
Note: It is fully recommended to test it our before apply it on production servers. As friendly reminder Rapid Recovery does not provide support to customer scripts and this is a framework workaround.
If you require additional assistance please contact our support team at https://support.quest.com/create-service-request
[Workaround]:
[SQL scripts]:
--Script #1: Disable database replication
use master
exec sp_replicationdboption @dbname = 'your db name here',
@optname = 'publish',
@value = 'false'
Go
--Script #2: Enable the database replication
use master
exec sp_replicationdboption @dbname = 'your db name here',
@optname = 'publish',
@value = 'true'
Go
Example:
osql -S SQL2016-SRV -U sa -P Passw0rd123 -i "Disable_Replication.sql" -o "Disable_Replication-Out.txt"
osql -S SQL2016-SRV -U sa -P Passw0rd123 -i "Enable_Replication.sql" -o "Enable_Replication-Out.txt"
Also you can find a pre-build script templates in the attached file but changes must required in order to work according to the customer environment.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center