Mapping network drive using script task in SSIS
Hello, I need to create a script task that checks if a network drive has been mapped. If it has not been mapped then I need to map the network drive. Is this possible in .NET? Any help would be appreciated DaveDave SQL Developer
October 26th, 2010 3:03pm

Probably. But let me ask this: "WHY do you need to map a network drive?" If the answer is so that you can access some folder or file on it, then really, you should try to use the URL instead, in the format of \\Servername\Sharename. What's the overall purpose of your package? Load some data into a database? From some file somewhere? And you're afraid the server may not have the mapped drive available?Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
October 26th, 2010 3:36pm

Hi Todd, Yes you are correct, my SSIS packages grab some csv files from a shared drive and load them into temp tables, and are the massaged through SQL procs. My issue is that we run a clustered environment. The IT team recently failed over to another cluster, and none of my drives were mapped on that node, so as a consequense the majority of my SSIS packages failed, as the files that I was loading were on the mapped drives. I was told that mapping the drives was my responsibility as a developer and not the IT teams. How can I overcome this obstacle... ThanksDave SQL Developer
October 26th, 2010 3:52pm

If I use the \\Servername\Sharename, would the drive need to be mapped on the server?Dave SQL Developer
Free Windows Admin Tool Kit Click here and download it now
October 26th, 2010 3:56pm

No, not at all. simply replace the "X:\" in your package with the propert \\Servername\sharename\foldername that points to the same place.Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
October 26th, 2010 4:35pm

Thanks ToddDave SQL Developer
Free Windows Admin Tool Kit Click here and download it now
October 26th, 2010 4:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics