Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bcp - does file need to be local to the database

Status
Not open for further replies.

mingus

Programmer
May 8, 2001
59
US
Does the file for bcp need to local to the database?

When I place it on a shared drive I get an error saying I don't have permissions to read the file.

Since I copy the same file into 3 different database and it is quite large moving it around is a bit of a pain, but that is what I currently do.
 
1. No, the bcp file does not to be local to the database:
exec master..xp_cmdshell 'bcp db..table in \\REMOTE_NAME\d$\folder\filename.dat -n -T'

2. You have to be sure that there is a trusted connection from local machine to REMOTE_NAME machine's share drive (drive d$ for example). If they are in the same domain, you shouldn't have a problem. If not, you can establish a connection by mapping this \\REMOTE_NAME\d$ drive to the local machine in Windows Explorer.

good luck!
 

Also remember that Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top