Solved

Query Analyzer Copy File

Posted on 2009-05-11
3
243 Views
Last Modified: 2012-05-06
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
xp_cmdshell 'copy \\A0116-DBS0252-S\D$\MSSQL8DataSEP3\MSSQL$SEP3\BACKUP\Kept Appointments.bak K:\Backup\Kept Appointments\Kept Appointments.bak'

Open in new window

0
Comment
Question by:SeTech
3 Comments
 
LVL 4

Accepted Solution

by:
jason_woods earned 500 total points
Comment Utility
Have you tried using quotes around each file's full path?
Try both single and double quotes
0
 
LVL 15

Expert Comment

by:mohan_sekar
Comment Utility
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
Comment Utility
No points please, but jason_woods' solution would then be.        

xp_cmdshell 'copy "\\A0116-DBS0252-S\D$\MSSQL8DataSEP3\MSSQL$SEP3\BACKUP\Kept Appointments.bak" "K:\Backup\Kept Appointments\Kept Appointments.bak"'
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now