D365/AX7 - Can not rename database - The database could not be exclusively locked to perform the operation
Some times after refreshing Devbox with VAL/PPD machine we need to rename new DB to AXDB but will get following error
Solution : please make sure that following 3 services are stopped
Still you are getting error message then run the following scripts to make single user
Set the database to single mode:
ALTER DATABASE dbName
SET SINGLE_USER WITH ROLLBACK IMMEDIATE Try to rename the database:
ALTER DATABASE dbName MODIFY NAME = NewName
Set the database to Multiuser mode:
ALTER DATABASE NewName
SET MULTI_USER WITH ROLLBACK IMMEDIATE
Start the services

Comments
Post a Comment