How To
How To - Take Database Backup on Network Drive
Please find the step by step guide to take the TM Master database backup on the network drive.
Step 1: To make a network share visible to sql server it should be mapped as a network drive.
Step 2: To identify that network drive in sql server you will use the ‘xp_cmdshell’ command. Before that you need to make sure that the ‘xp_cmdshell’ command is configured and enabled in your sql instance as per below.
EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'xp_cmdshell' ,1
GO
RECONFIGURE
GO
Step 3: Define the share drive for sql with ‘XP_CMDSHELL’ command in sql server.
EXEC XP_CMDSHELL 'net use Z: \\192.168.43.238\tmbackup [password] /USER:[user name]'
EXEC XP_CMDSHELL 'net use Z: \\192.168.43.238\tmbackup'
Steps 4: To verify the new drive, you can use the below command that will show you all files in that newly mapped drive.
EXEC XP_CMDSHELL 'net use Z:'
Steps 5: Select the mapped network drive path to store the backup file.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article