/ 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.
- 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
You need to login to post a comment.