How to shutdown a database cleanly before stopping the service in order to copy mdf files

  • Hello Guys

    I am looking for a way to copy a replicated database files, if the SQL service is stopped and the files copied, there could be problems with ongoing transactions in the database, this will mean that when the database is about to be attached, it fails with an error.

    Is there a standard way to shutdown the database before stopping the service so that the files can be copied.

  • 1. Script your replication

    2. Disable replication

    3. Detach database

    4.Copy database files

    5. Attach your database

    6. Run your replication scripts from SSMS - your replication will be recreated.

    7. Go to the Replication agents properties and run your replication snapshot.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply