/ Published in: SQL
This is how you can connect SQL Server to a Share folder for your backups. After running this, you will see the letter T: in the GUI. Each line must be run seperatly.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
EXEC xp_cmdshell 'NET USE'-- to list the mapped drives EXEC xp_cmdshell 'NET USE T: \\10.106.74.20\share /user:10.106.74.20\pollusb password' --to connect EXEC xp_cmdshell 'DIR T:\ /b' EXEC xp_cmdshell 'NET USE T: /D' -- to remove the share -- Note : you can also make the connection permanent by using /PERSISTENT:YES -- More info on NET USE /? on CMD