简体   繁体   中英

How to backup Microsoft SQL Server database to create multiple 100MB .bak files

One .bak file:

BACKUP DATABASE dbName TO DISK = C:\dbname.bak   1200 MB

How to backup Microsoft SQL Server database into multiple .bak files, splinting it to multiple files like DBName01.bak , DBName02.bak ,....' DBName0N.bak there N is parameter for number of files.

Where N would be dynamic parameter.

Yes you can take your backups to multiple files, its actually more convenient to have smaller files rather than having one large file.

The syntax for taking backups to multiple files would be:

BACKUP DATABASE [dbName] TO  
  DISK = N'D:\backups\MultipleFiles\MyDB_Backup_File1.bak',  
  DISK = N'D:\backups\MultipleFiles\MyDB_Backup_File2.bak',  
  DISK = N'D:\backups\MultipleFiles\MyDB_Backup_File3.bak' 
WITH NOFORMAT, NOINIT,  NAME = N'dbName-Full Database Backup'
       , SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO 

The data is distributed equally among all the files, so if you want smaller files use more files to take backups.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM