I want to copy the database backup files to another server as a part of logshipping implementation. tried using xcopy it doesn't work.
it says "invalid drive specification"
also tried using a dll, the dll does the copying i just had to call the dll through an sp, while trying this the QA hanged, tried killing the process but the process didn't kill, i had to restart the service.
the network in not a domain its workgroup.
with sql server 2000 on win2k server.
any inputs are welcome.
thanks in advance
regards,
harshal.Did you try running the Copy or the XCOPY command from a DOS prompt on the Destination Server. I use to have the same kind of issue with the Copy /Y command. Sometimes it liked the /Y and Sometimes din't.|||how did you use xcopy
did you map a network drive to the remote shared folder or did you use the unc \\servername\sharename?
i would check that you can connect with the unc from the run box on your start menu.
open run
type \\servername\sharename where servername is the remote pc and sharename is the shared folder you are trying to connect to
if you cannot do this
you may want to open your cmd prompt and check that you can ping the remote host
if you can ping but cannot connect through the run cmd then you are having upper layer issues (osi)
check permissions and the rights on the share.
if the user accounts didnt match it would bring up a user\password dialog box.
good luck..|||yeah tried mapping the folder also tried using unc path. Didn't work
Also tried connecting thru cmd prompt and "run" prompt
it connects well and copies the files too.
even the dll which was created for the same thing worked fine if called from vb, but if the same dll when used
through sql QA hanged the process without any results.|||you may be subject to a permissions problem
i would check that the MSSQLServer and SQL Server Agent services are running under local user accounts and not a local system account
and i would make sure that the same account exists on the destination server. (they should share the same password)
then give read permission to the folder to the user account
this goes against everything that i hold dear, and I feel dirty all over telling you how to do it...|||Originally posted by Ruprect
i would check that the MSSQLServer and SQL Server Agent services are running under local user accounts and not a local system account
and i would make sure that the same account exists on the destination server. (they should share the same password)
then give read permission to the folder to the user account
Been there done that already.
it was the first thing to check the accounts under which the services are running.
that is the reason me posting this here.:(
thanks for the help.
any other issues u can suggest?
thanks in advance..
regards,
Harshal.
Showing posts with label xcopy. Show all posts
Showing posts with label xcopy. Show all posts
Monday, March 19, 2012
copying files over workgroup
Copying files between servers
I'm trying to copy files between 2 servers on a local network from within a
SQL Job (and Query Analyzer) using xp_cmdshell.xcopy but get an access
denied message returned.
SQL Job (and Query Analyzer) using xp_cmdshell.xcopy but get an access
denied message returned.
I'm able to successfully do the copy from within a command window so think
the problem has something to do with using the default SQL Server account
but as yet I don't know how to resolve.
Any help/suggestions would be much appreciated.Am guessng that you are running MS-SQL using the local SYSTEM account.
System does not have access to network devices.
Your two options are to create another account and configure MS-SQL and
agent to use that account. You may beable to get away with just
configuring agent for that but depends on how you are doing the
command.
Or to go into policy editor and allowing the system account to have
netowrk priviledges. This is a major security hole and should not be
done.
Subscribe to:
Posts (Atom)