To Connect and Disconnect a mapped drive using SQL

Madhu.b.rokkam
Posted by Madhu.b.rokkam under Sql Server category on | Points: 40 | Views : 9822
To Connect

Exec master.dbo.xp_cmdshell 'net use x: \\123.456.78.90\Shared Password /User:Domain\UID /Persistent:yes'


To Disconnect

Exec master.dbo.xp_cmdshell 'net use x: /delete'

Comments or Responses

Login to post response