January 8, 2007 at 4:40 am
How to extract data from table to a remote(shared) path rather than to the database server path?
I tried with the following command :
bcp "select * from tblemp" queryout "\\server\folder\test.txt" -c -t , -S "DBserver -o "1.TXT" -U "Sa" -P "password"
and get the error msg as
bcp: Unable to open output file \\server\folder\test.txt: Permission denied.
can anyone help me out on this?
January 8, 2007 at 7:20 am
Sounds like a permissions issue with the directory or the share.
January 8, 2007 at 8:28 pm
The SQL Server "Service" must be logged in as a user that can "see" those remote paths. As Lynn said, that also means that user must have permissions to see those remote paths.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 9, 2007 at 12:15 am
I had tried providing "Everyone" access rights to the share. But doesn't resolve
January 9, 2007 at 7:51 am
Check the sql server service.
If it's using local system account, it won't work.
You need to start the service using a 'normal' windows account.
Then grant this account permissions on the remote share, and try again.
/Kenneth
January 10, 2007 at 1:44 am
sqlserver service was running in windows account only and access rights had been provided to the share for this account.Actually in BCP i am connecting to the SQLSERVER through an account that is different from the SQLserver service account. Does this matters? Also the account i was using for BCP has access to the share
January 10, 2007 at 5:13 am
People talking not about acounts conecting to SQL Server, but about the account started SQL Server
_____________
Code for TallyGenerator
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply