Solved

Invalid object name when doing a bulk insert.

Posted on 2014-04-03
7
1,218 Views
Last Modified: 2014-04-03
When I run the code below, I get the error seen below the code. As far as I can tell _gpg_filenames is a valid object. I could be wrong. COuld some please help with this.
Thanks in advance.

code...
use Direxxis

BULK
INSERT _gpg_filesnames_test
FROM 'C:\Documents and Settings\sritsick\My Documents\jsr\Erie_Master\ErieTest\filelist_test.txt'
WITH
(
FIELDTERMINATOR = '|',
ROWTERMINATOR = '\n'
)
GO

messages...
Msg 208, Level 16, State 82, Line 3
Invalid object name '_gpg_filesnames_test'.
0
Comment
Question by:tesla764
  • 4
  • 3
7 Comments
 
LVL 11

Expert Comment

by:Simone B
ID: 39975393
Is the name _gpg_filesnames or _gpg_filesnames_test ? You are using _gpg_filesnames_test
0
 

Author Comment

by:tesla764
ID: 39975439
I am using _gpg_filenames_test
I just noticed the "s" in filesnames. I changed that to filenames and get the following error...
Msg 4861, Level 16, State 1, Line 3
Cannot bulk load because the file "C:\Documents and Settings\sritsick\My Documents\jsr\Erie_Master\ErieTest\filelist_test.txt" could not be opened. Operating system error code 3(The system cannot find the path specified.).

This path does exist.
0
 
LVL 11

Accepted Solution

by:
Simone B earned 500 total points
ID: 39975502
Hmmm ... could it be an access issue? How are you running this, in mgmt studio using Windows authentication? Are you sritsick, running this on your local machine, or is it run from a job or procedure? The only other thing I can think of is perhaps a typo.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:tesla764
ID: 39975557
yes I am running management studio using windows authentication, no I am mbergman which should have all privs needed. I am testing this from the studio management query (New Query). I have looked thoroughly for typos. I can't find any.
0
 
LVL 11

Expert Comment

by:Simone B
ID: 39975608
I'm running out of ideas, yet it still somehow seems an access or path issue. The machine you're using is a Windows OS version that uses "Documents and Settings?"
0
 

Author Comment

by:tesla764
ID: 39975761
I think this is a permissions issue. Thanks for your help.
0
 

Author Closing Comment

by:tesla764
ID: 39975762
Thanks.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now