DOS Subst and XP

  • Not sure of which forum to use for this so I apologize if it is in the wrong place.

    The client machines I am implementing on use the D: drive for app storage. So, I point to directories on that drive when necessary - for example they download from their host into D:\app\downloads\.

    If I run EXEC xp_commandshell 'dir d:\app\downloads' to get all of the file names downloaded today, everything works fine.

    I don't have a D: drive on the new XP Media Edition based Toshiba my company gave me - so I use SUBST D: C:\product to fake a D drive. Shows up in Explorer and I can move through the directories fine.

    However, the xp_cmdshell (and all other references in DTS packages) will not find the drive.

    If I convert the script in the sql task to:

    EXEC xp_cmdshell 'dir c:\product\app\downloads'

    it all works fine.

    I bought Partition Magic thinking I would have to partion the drive into a real D: drive. So far this package will not install on this machine. Playing with those folks on that part.

    Suggestions on why the subst drive is not found by DTS?

     

     

     

     

     

     

     

     

     

     

  • I tried to look at any network drives via xp_

    Francis

  • Try share the folder, then put the share on network (make it D drive) using net use.

  • Laptop not normally connected to network.

    Managed to get Partition Commander to split drive 0 into c: and d: - packages all work with references to D:.

    Thanks for the look-see. Would still be interested in knowing if there is a way around the issue.

    Thanks to all

  • From what I recall SUBST only is visible to the logged in user. SQL doesn't run under the same user context as the logged in user so SQL depednign on how setup may be able to do SUBST itself and then see it but no guarantees it can even make the call.

  • Worked fine in W2K. Just won't work in XP, but your logic is sound. Something I will look into later. Deadlines looming

  • Grasshopper,  

     I am interested in purchasing Partition Commander to partition my hard drives on a Dell 1400SC with Windows 2003 Server. How did this product work for you?  Partition Magic for SERVERS is pricey and I am looking for other software. I'd appreciate any comments pro or con.  Thanks in advance.

     

  • I have been using this product for a number of years and have been very pleased with it.

    However, I have XP Pro on this box and the latest version (v8) hiccuped a couple of times before it split the drive.

    Might have been me, or possibly XP, but this is the first time I've ever had to do the install more than once before the product did its thing.

    http://www.softpedia.com/public/cat/13/8/13-8-2.shtml listed a few others I considered but went back to what I knew.

    I have not used VolumeManager so cannot comment on it.

     

     

     

     

     

  • Try this three together

    EXEC master..xp_cmdshell 'SUBST D: /d ' , NO_OUTPUT  -- REMOVE EXISTING SUBST (IF ANY)

    EXEC master..xp_cmdshell 'SUBST D: c:\product\app\downloads' , NO_OUTPUT -- ADD NEW SUBST

    EXEC master..xp_cmdshell 'DIR D:\ ' -- START USING IT


    -- Amit



    "There is no 'patch' for stupidity."



    Download the Updated SQL Server 2005 Books Online.

Viewing 9 posts - 1 through 8 (of 8 total)

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