The forum will be unavailable for maintenance at some point from Friday, April 13 at 19:00 EDT until Sunday, April 15 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.

In Volker Barth's answer to question "How do I execute a batch file using xp_cmdshell" he suggests to do:

xp_cmdshell("NET USE /USER:.......")  
-- do the desired network access  
xp_cmdshell("NET USE /DELETE ....")

In this case we have mapped network volume to local /letter/: and user with needing rights. I can`t understand one thing, how it influence on server but it steel on local account. And current user of dbeng12.exe is not the same in "NET USE /USER:.......".

Thanks for explanations.

asked 28 Nov '12, 14:15

Serge's gravatar image

accept rate: 0%

edited 29 Nov '12, 06:15

Volker%20Barth's gravatar image

Volker Barth

The mapping for NET USE always requires a Windows User Account to access the resource. This is (generally) not the same as the Database User (which is used to log in to the database). Mapped drives are available to the Windows user that created them.

What I'm assuming about the above description is that you have a database server running as a system service, underneath the LOCAL SYSTEM account and would like access to network resources. By default, the LOCAL SYSTEM account does not have access to network permissions - by using the "NET USE /USER:" command, you are telling Windows which network credentials to use when accessing the network.

Another solution to this issue would be to run the database service underneath the user account that has already set up the mapped network permission (instead of underneath the LOCAL SYSTEM account).

permanent link

answered 28 Nov '12, 17:01

Jeff%20Albion's gravatar image

Jeff Albion
accept rate: 24%

Thanks a lot, now left only try to use this approach.

(29 Nov '12, 06:00) Serge

The best way make dbsrv12 transferring files through network is using


but there is one fault


can't create directories even when all rights given.

permanent link

answered 29 Nov '12, 10:49

Serge's gravatar image

accept rate: 0%

edited 29 Nov '12, 10:51

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 28 Nov '12, 14:15

question was seen: 2,142 times

last updated: 29 Nov '12, 10:51