SeTech
asked on
Query Analyzer Copy File
I have successfully copied 39 of 40 databases to a new Server. The one database that does not copy, has a two word name and I am assuming that is why it will not copy. I am using the Query Analyzer and the code I use is listed below. The database name is Kept Appointments the backup .bak file is Kept Appointments.bak.
The error recieved or actually message in Query Analyzer is: The system cannot find the file specified.
Can anyone explain - Thank You
The error recieved or actually message in Query Analyzer is: The system cannot find the file specified.
Can anyone explain - Thank You
xp_cmdshell 'copy \\A0116-DBS0252-S\D$\MSSQL8DataSEP3\MSSQL$SEP3\BACKUP\Kept Appointments.bak K:\Backup\Kept Appointments\Kept Appointments.bak'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://www.experts-exchange.com/questions/21678183/xp-cmdShell-to-copy-file-name-with-embedded-spaces.html
No points please, but jason_woods' solution would then be.
xp_cmdshell 'copy "\\A0116-DBS0252-S\D$\MSSQ L8DataSEP3 \MSSQL$SEP 3\BACKUP\K ept Appointments.bak" "K:\Backup\Kept Appointments\Kept Appointments.bak"'
xp_cmdshell 'copy "\\A0116-DBS0252-S\D$\MSSQ