Background: Backup A SQL Server library today, the native space is not enough; I just want to back up to the shared disk. Record the memo.
Environment: sqlserver2008r2_x64
The steps are as follows:
1. Enable xp_cmdshell
If xp_cmdshell is not enabled, perform the following enable: EXEC sp_configure ' show advanced options ', 1; RECONFIGURE; EXEC sp_configure ' xp_cmdshell ', 1; RECONFIGURE;
2. Create a map
EXEC master. xp_cmdshell ' net use Z: \\10.139.101.181\D$\Backup 123456/user:10.139.101.181\administrator ' NOTE: server password 123456 The user name is administrator.
3. Backing Up the database
You can select a command backup
Backup database test to disk= ' \\10.139.101.181\D$\Backup\test.bak ' with init
Can also be directly operated on the interface, the backup interface can directly see the shared directory Z disk
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/86/C1/wKioL1fJSy6BXsFuAABgdURA_Rs808.png-wh_500x0-wm_3 -wmp_4-s_53461000.png "title=" B1c3ca65-07a7-454d-8e56-6d8e4904aa75.png "alt=" Wkiol1fjsy6bxsfuaabgdura_ Rs808.png-wh_50 "/>
This article is from the "Technical Achievement Dream" blog, please be sure to keep this source http://pizibaidu.blog.51cto.com/1361909/1845684
SQL Server 2008R2 Backup to shared disk