Import a txt-file form a network drive by a dts-package

  • Hi all,

    I have to import a txt-file into an sql-server db that resides on a network drive. This all is be done by a dts-package.

    The dts package is startet on a client and will be excecuted on the server. I guess the dts package then uses the job agent user to connect to the network drive. As this user do not have access to that drive, the import fails.

    How can I build up a dts-connection to that network file that uses a specific user and password that would have access to that file. Or could it be possible to map a network drive in the dts-package before it tries to import the file?

    Help is very appreciated.

     

  • You will need to give the appropriate permissions to the SQL Server Agent service account. You can determine this by going to Enterprise Manager, open the 'Management' folder, right click on 'SQL Server Agent' node and select 'Properties'.

    Using Windows Explorer, navigate to the network folder where the file is located, right-click the folder and select 'Sharing and Security'. Normally it is only necessary to select the 'Share this folder' option. You can give specific permissions to the service account by clicking the 'Permissions' button. Then click the 'Add' button and type the service account name, grant 'Read' access to the folder or as appropriate.

  • Thanks for your reply.

    The agent runs under the system account. So I cannot't grant a share permissions for that system account.

    That's the reason why I would like to get access to that file with a specific user that I specify within the dts-package.

    Would this be feasible?

  • You should change SQL Server Agent to run as a domain user account - then give this account access only to the resources needed (eg, your network share).

Viewing 4 posts - 1 through 4 (of 4 total)

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