SQLServer back up and compress the files after the backup

xiaoxiao2021-03-06  53

SQLServer2000 backup

Example 1: (Backup)

1 Use master2 declare @ path = 'c: /aa/zy.bak'3 backup database zy to 4 disk = @ path with noinit

Note: 1 Use the system library 2 to set the path and file name of the backup, note that use single quotes references. 3 Requires the backup database 4 to set the backup driver, set the path to the drive, set the backup method (rewriting or overwriting )

Example 2: (Compressed Backup Database File) Use master exec Xp_makecab 'c: /m.cab', mszip ,1 ,'c: /aa/zy.bak' exec Xp_cmdshell 'Copy C: /123.cab', ' D: /123.cab '

Description: 'c: /m.cab' Compressed Name MSZip compression mode 'c: /aa/zy.bak' The path of the compressed file COPY to another directory save

转载请注明原文地址:https://www.9cbs.com/read-113720.html

New Post(0)