Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Spawn10
Starting Member
2 Posts |
Posted - 2010-11-12 : 11:06:02
|
I keep getting an error that states..."Cannot bulk load because the file "\\myPath\...\logger.txt" could not be opened."I am getting this while trying to do a bulk insert in my procedure...here is what my code looks like...any help is much needed as I have been looking at this for a while now. I used the PRINT to look at the parameter being passed in, and it looks right.I have checked to make sure that I have admin permissions on the file, I am also pointing to a location that is on the server and not on my local machine.I am out of ideas...please help...ThanksUSE [myDB]GO/****** Object: StoredProcedure [myStoredProc] Script Date: 11/11/2010 11:15:59 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER PROCEDURE [myStoredProc] @SourcePath varchar(100),--@FormatFilePath varchar(100)ASSET ANSI_WARNINGS OFFDECLARE @str_command nvarchar (150)SET @str_command = 'BULK INSERT [histTable] FROM ''' + @SourcePath + ''' WITH (FIELDTERMINATOR = '','') 'PRINT @str_command EXEC SP_EXECUTESQL @str_command |
|
X002548
Not Just a Number
15586 Posts |
|
Spawn10
Starting Member
2 Posts |
Posted - 2010-11-12 : 12:28:04
|
I get the error if the log file is either on my machine or the server. For trouble shooting sake, i have been working with the file that is on the server.So I tried that to eliminate the location of the file option. |
|
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2010-11-15 : 06:04:24
|
Does another process have the file open?-----------I used to think I wasn't a morning person but it never got better in the afternoon |
|
|
|
|
|