Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jon2371ph
Starting Member
1 Post |
Posted - 2011-04-16 : 01:23:54
|
Hi Experts,I have a NAS on our Network, i need to use this Network Attached Storage for our backup on SQL Database. I mapped this NAS to our SQL Server... First i enable the xp_cmdshell then i net use that NAS drive (Z Drive)...but i have some error after i Net Use this Network Drive.Below are the Error and Query i have made..Please check my query...--------------------------------------------------------------------Error: The password or user name is invalid for \\SYNOLOGY\NETBACKUP.NULLEnter the user name for 'SYNOLOGY': NULLThe operation was canceled by the user.NULLNULLQuery i have made to enable the xp_cmdshell at sp_configure:--------------------------------------------------------------- EXEC sp_configure 'show advanced options', 1GORECONFIGUREGOEXEC sp_configure 'xp_cmdshell', 1GORECONFIGUREGOquery for net use the map drive z:--------------------------------------------------EXEC XP_CMDSHELL 'NET USE Z: \\SYNOLOGY\NETBACKUP'I think i must include the username and password of my NAS...Hope you can help on this..thanks,JO |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
|
Jahanzaib
Posting Yak Master
115 Posts |
Posted - 2011-04-17 : 08:06:08
|
First check the nework drive accessable with the user you have login on the WindowsIF NOT then check the rights of the userIF YES then check this windows user is available in the SQL Server and it have db_backupoperator rights on a required databaseand then login in sql server with this userRegards,Syed Jahanzaib Bin HassanMCTS,MCITP,OCA,OCP,OCE,SCJP,IBMCDBAMy Blogwww.aureus-salah.com |
|
|
neomancipator
Starting Member
1 Post |
Posted - 2013-09-30 : 14:50:55
|
you will need to use credentials to access the network share. by default sql will use the account that is running the sql service.try the following:EXEC XP_CMDSHELL 'net use Z: \\server.domain.com\sharename password /user:domain\username' |
|
|
|
|
|
|
|