Dears ,
i am trying to make the mapped drive visible to SQL server and as a security requirement, I need to use user name and encrypted password because this will be saved on the logs if it is plain text.
EXEC xp_cmdshell 'NET USE F: \\DefinitelyNotMyLaptop\SQLBackups/ user:SqlUser P@$$w0rd'
i tried to declare a variable and save the .txt password on it but it did not work
any ideas?
- SQL server enterprise edition ,2019
NET USE
command allows for any form of encryption, so the network drive in question should be persistently mounted (from Windows explorer, not from cmd shell) using credentials stored and secured by the Windows OS rather than mounted at runtime.xp_cmdshell
to do this, as opposed to a standard way in Windows?