Solved

Query Analyzer Copy File

Posted on 2009-05-11
3
247 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
ID: 24358436
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
ID: 24358442
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 24358589
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL HELP 2 94
Help with SQL joins 9 54
display data in text field from data base for updating 6 65
Parse this column 6 25
This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

840 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