Take a Cold Backup without shutting down SQL.

  • Comments posted to this topic are about the item Take a Cold Backup without shutting down SQL.

  • I tried your method and it does not work - for example:

    USE ENTERPRISE_SERVERS

    GO

    EXEC master.dbo.sp_dboption 'ENTERPRISE_SERVERS','autoclose',true

    GO

    DECLARE @cmd VARCHAR(255)

    SET @cmd = 'copy C:\SQLDATA\ENTERPRISE_SERVERS.mdf "C:\BACKUPS\"'

    EXEC master.dbo.xp_cmdshell @cmd

    EXEC master.dbo.sp_dboption 'ENTERPRISE_SERVERS','autoclose',false

    GO

    ..................returns the folllowing error:

    The process cannot access the file because it is being used by another process.

    ...........which defeats the purpose

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

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