Re: BCP, Bulk Insert
From: oj (nospam_ojngo_at_home.com)
Date: 03/25/04
- Next message: Prasad Koukuntla: "Re: Group By Earliest Date"
- Previous message: Anith Sen: "Re: String Manipulation"
- In reply to: Anand: "BCP, Bulk Insert"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 25 Mar 2004 10:30:45 -0800
nytime you specify \\servername\shared through xp_cmdshell, NT permission is
check. If the user is a sql admin then the account used to start sqlserver
service will be used for authentication. If the user is not a sql admin, sql
proxy account is used.
http://msdn.microsoft.com/library/en-us/tsqlref/ts_xp_aa-sz_4jxo.asp
Since you're specifying c$, an NT admin account is needed to access the
data. That means the sqlserver service account or the proxy account must be
an NT admin on the \\server you're trying to access.
-- -oj http://www.rac4sql.net "Anand" <anonymous@discussions.microsoft.com> wrote in message news:1a6101c41276$f0421500$7d02280a@phx.gbl... > Hi, > > Problem in importing the data from .dast file to sql > server by osql, bcp and bulk insert using the sql server > client. > > I am working in my machine, call it as testuser (machine > name). > > And sql server is located in the machince, call it as > testserver (machine name). > > OSQL Query: > > OSQL -S myserver -U sa -P sa -d mydatabase -b -n -l60 - > Q "EXEC master..xp_cmdshell 'BCP "mydatabase..table_temp" > in "c:\ServicesOffice.dat" -c'" > > BCP Query: > > BCP mydatabase..table_temp in 'c:\ServicesOffice.dat' -c - > S myserver -U sa -P sa > > Bulk Insert: > > BULK INSERT table_services_office_scrub_temp > FROM 'c:\ServicesOffice.dat' > > > All the above query are working fine if the > ServicesOffice.dat file is located in the server > (testserver). > > But it is not accessable if i specify my machine path. > > ie, > > OSQL Query: > > OSQL -S myserver -U sa -P sa -d mydatabase -b -n -l60 - > Q "EXEC master..xp_cmdshell 'BCP "mydatabase..table_temp" > in "\\testuser\c$\ServicesOffice.dat" -c'" > > BCP Query: > > BCP database..table_temp > in '\\testuser\c$\ServicesOffice.dat' -c -S myserver -U > sa -P sa > > Bulk Insert: > > BULK INSERT table_services_office_scrub_temp > FROM '\\testuser\c$\ServicesOffice.dat' > > how can i import file ? > > With Thanks and Regards, > Anand >
- Next message: Prasad Koukuntla: "Re: Group By Earliest Date"
- Previous message: Anith Sen: "Re: String Manipulation"
- In reply to: Anand: "BCP, Bulk Insert"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|