I have a SQL database and wrote a script to copy the database then zip up that copy every night. The script isn't working. When I manually copy them, I get a message saying "The action can't be completed because the file is open in SQL Server. If I shutdown SQLSERVER service, the copying works. But I can't shutdown that service every time I run this backup script. Here's an example of the script i'm running.
xcopy /s "c:\Test" "C:\Test2"
How would I zip this database up, copy it, and not have to stop the service? Thanks!!