Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 xp_cmdshell and bcp

Author  Topic 

gknierim
Starting Member

2 Posts

Posted - 2006-03-06 : 13:10:22
I am currently using bcp to write a csv file. My goal is to write the file on another server (not the same one as the database). However, when I specify the network location (i.e. \\servername\temp\test.csv), the file does not get created and the bcp fails due to security permissions.

What I would like to know: Is this the best way to have a database create the file on another server or what other options do I have? I don't have much experience with alternative methods and this appeared to be the most common way to write a csv file. I just need to create the file on another server or find a way to copy it over.

Thanks,
Greg

JoeNak
Constraint Violating Yak Guru

292 Posts

Posted - 2006-03-06 : 13:21:42
bcp or a DTS are probably the best methods, but you still have to address your security issue on the target server.
Go to Top of Page

gknierim
Starting Member

2 Posts

Posted - 2006-03-06 : 13:38:08
Any thoughts or ideas on how to resolve them?
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-03-06 : 13:50:09
Make sure the command shell account you are using has access to the share and folder on the remote server.

The command shell account will be the SQL Server service account if you are running xp_cmdshell under a server admin login.

The command shell account will be the SQL Server proxy account if you are running xp_cmdshell under a non-admin login.






CODO ERGO SUM
Go to Top of Page
   

- Advertisement -