SQL Server Performance Forum – Threads Archive
Bulk Insert Fails
Trying to load a .csv file with Bulk Insert in QA and consistently get OS error code 5 — Access is denied. I have tried to run this logged in under the sqlagent account as well as a sysadmin account but get the same error. Both accounts used have roles — sysadmin and bulk insert administrator. I verified that I do have permission to open the file under both logins whether providing a mapped drive or a UNC path. Here is a sample of the command which adheres closely to the books online samples: bulk insert dbname..tablename from ‘X: estfile.csv’
with (
fieldterminator = ‘,’,
rowterminator = ‘
‘
) OR bulk insert dbname..tablename from ‘X: estfile.csv’
with (
datafiletype = ‘char’,
fieldterminator = ‘,’,
rowterminator = ‘
‘
)
Can some ancient SQL soul offer some words of wisdom? Thanks
Elizabeth
Try this: http://dbforums.com/arch/66/2002/4/353216 Jon M
Did you try via DTS, just to find if same error happends. Let it be…. Luis Martin …Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.
Bertrand Russell
Yes, I used the DTS and it imports fine. Thanks for the suggestion…
quote:Originally posted by LuisMartin
Did you try via DTS, just to find if same error happends.
Let it be….
Luis Martin
…Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.
Bertrand Russell
Bertrand Russell
Check this: http://support.microsoft.com/default.aspx?scid=kb;en-us;238238 Luis Martin …Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.
Bertrand Russell
This worked. From our test server SQL Server was running from the Local Administrator account. Once it was changed to run from the SQL Service account the BULK INSERT worked. Thanks to everyone for your help!!
quote:Originally posted by Jon M
Try this:
http://dbforums.com/arch/66/2002/4/353216
Jon M
]]>