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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to check the file status before processing it

Author  Topic 

vgr.raju
Yak Posting Veteran

95 Posts

Posted - 2010-07-24 : 13:41:09
Hello,
I have a sql job which drops the tab delimted file in the share.
I have to grab the tab file from share and then process it.

I encouter this problem once in a while when I try to access the file while it being using by another process.

Msg 4861, Level 16, State 1, Line 3
Cannot bulk load because the file "\\RAJU-PC\Databases\Address.txt" could not be opened. Operating system error code 32(The process cannot access the file because it is being used by another process.).

How can check the status of the file before trying to access it ?.


Thanks!
Raju
http://rajusqlblog.blogspot.com/
   

- Advertisement -