Link to home
Start Free TrialLog in
Avatar of nkjohnson
nkjohnsonFlag for United States of America

asked on

Bulk Insert Error

Hello,

I am currently trying to run a Bulk insert and I keep getting the following error.

Bulk_main: The opentable system function on BULK INSERT table failed. Database ID 1, name 'impPRODUCT_SUBS'.

The command is

BULK INSERT [dbo].impPRODUCT_SUBS FROM '\\SQLSERVER\PumpData$\impFile.csv' WITH  ( FIELDTERMINATOR = '|' ,ROWTERMINATOR = '\n' ,FIRSTROW = 1 )

any Ideas.

Thanks for the help
ASKER CERTIFIED SOLUTION
Avatar of SjoerdVerweij
SjoerdVerweij

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
CORRECTION:

BOL says to use ALTER DATABASE, but I don't see that as a valid option.

Use sp_dbOption instead:


EXEC sp_dbOption 'yourDbNameHere', 'SELECT INTO/BULKCOPY', 'TRUE'
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nkjohnson

ASKER

You are right kselvia access was denied.  How do I go about getting access to the file?
Thank you all for your assistance.  I am going to divy up the points because all of you were actually correct.  

I was able to use the bulk insert if I referred to a local drive.  I have had problems with this before when creating Linked servers.  Does MSSQL 7.0 have problems refering to locations with network addresses?  Any last thoughs on this?  

Again thank you for your help!
Change the SQL Server service to login as a domain account (My computer+Manage+Services+MSSQL Server) and grant that account rights to the share.