Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Take a Cold Backup without shutting down SQL. Expand / Collapse
Author
Message
Posted Thursday, October 11, 2007 1:06 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, July 17, 2014 2:17 PM
Points: 16, Visits: 151
Comments posted to this topic are about the item Take a Cold Backup without shutting down SQL.


Post #409359
Posted Thursday, July 30, 2009 6:15 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 22, 2011 1:07 PM
Points: 1, Visits: 13
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

Post #762339
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse