Exec sp_configure 'show advanced options', 1; reconfigure; Exec sp_configure 'xp _ Your shell', 1; reconfigure;
Enable 'xp _ external shell'
Note: to create a new user, the startup account of the MSSQLServer service must have the same name and password as the valid access to the shared directory, in this way, you can pass the verification (so you can use another valid user instead, only the user name and password must be the same and have sufficient permissions)
Step 1 share the folder E: \ AA with the name Test
NET Share test = E: \ AA
Step 2: Execute the SQL statement to create an image Z on the database server:
Exec master.. xp_mongoshell 'net use Z: \ hyserver \ test MMD/User: admin'
Step 3: perform backup
Backup database cs01 to disk = 'z: \ cs01_05-12-26.bak'
Step 4: Delete the image Z on the database server:
Exec master.. xp_mongoshell 'net use Z:/delete'
Step 5 cancel the Local Shared Folder Test
NET Share test/delete