bulk insert fails when used with unc path

  • hi

    bulk insert statement fails when used with unc paths for the format file and the delimited text file. the statement is as follows

    BULK INSERT ITEM_TEMP FROM

    '\\BISMILLAH\bulk\item.txt'

    WITH

    (

    FORMATFILE='\\BISMILLAH\bulk\format.txt'

    )

    using the same unc paths i'm able to access the files using internet explorer from the same machine from which i'm executing the script.

    is there any additional settings in sqlserver to get this task done.

    can anybody help.

    thanks in advance.

  • Please let us know what error message says.

    Are the database and the format file both on BISMALLAH?   

    If no, then can you access \\BISMILLAH\bulk\format.txt from another computer?  You may not have shared the "bulk" directory, or you may have permissions problems.

  • both the format file and delimited files are in BISMILLAH

    database is on another machine (BISMILLAHSERVER)

    bulk directory is shared and full control for everyone

    i can access (using windows explorer or start->run)the '\\BISMILLAH\bulk\format.txt' file from all other machines on the network.

    when i access the file using windows explorer or start->run, windows 2000 audting on BISMILLAH shows success.

    but when when i run the script auditing is not showing either success or failure. i think that means sqlserver is not even requesting for the file.

    the error message i got is like follows:

    Server: Msg 4861, Level 16, State 1, Line 41

    Could not bulk insert because file '\\BISMILLAH\bulk\format.txt' could not be opened.

    Operating system error code 5(Access is denied.).

    even when i run the script with a non existing file on BISMILLAH the same error message comes.

    think u got an idea about the situation.

    waiting for ur reply.

    regards

    renjith

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply