Issues using NET USE on W2K3 Servers

Discussion in 'Server Networking' started by douglas martin, Aug 8, 2006.

  1. I submit jobs via SQL Scheduler on a W2K3 server.

    SQL Job is submitted.

    Job consists of program that dynamically builds a batch script which
    includes issuing DOS NET USE d: \\remoteserver\sharename [my credentials]
    and /persistent:no. At the end the batch script issues a NET USE d: /delete
    command. Output shows all commands working fine.

    Logging on to the remote server and issuing a NET USE to list the mapped
    drives shows only local drives, no mapped drives.

    In the past, if the job was run multiple times (but non-concurrent) it would
    simply reuse the I: drive as that is the first one available. Running 2
    jobs concurrently has been shown to use I: and J: drive letters and drive I:
    used subsequently. So far so good.

    Symptoms I'm seeing now, is I added a feature such that when the batch
    script is built, it adds a NET USE to map a drive at the beginning, runs the
    scripts it needs to run, all invoking CALL sub-batch.cmd, then issuing a NET
    USE to delete mapping at the end. This all seems to be working. Logging on
    to remote server shows no remotely mapped drives. With each subsequent run,
    the next available drive letter is used, as if it thinks the server still
    has the prior drives mapped.

    I have looked at task manager thinking each CMD task started is hung and
    retaining its' drive letter, but nothing. Task Manager looks fine. I feel
    pretty confidewnt I am executing paired NET USE to map drive and NET USE to
    disconnect drive. All my testing and troubleshooting is in support of that.

    I can only see C:, D:, E:, F:, G:, H: as locally mapped, but last invocation
    of my process showed drive Q: was selected. Again, drives I: thru P: are
    NOT showing up as mapped drives opn that remote server.

    Any thoughts?


    douglas martin, Aug 8, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.