473,394 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to backup a database into a number of smaller files ?

To all,

How to backup a database into a number of smaller files ?
For example, can I can fully backup a DB of 10 MB into 10 files (each 1
MB)???

The problem I've met is that the DB backup file is too large, over 4
GB, and even Winzip can't compress it (after compressing, around 80 %
of compression rate is possible)

Thanks!
From Jason (Kusanagihk)


Jul 23 '05 #1
11 1868
See BACKUP in Books Online - you can backup to multiple devices or
files:

backup database MyDB to disk = 'c:\bak\MyDB.bak1', disk =
'c:\bak\MyDB.bak2'

But you can't control exactly what goes into each file, so you may find
they're not all the same size.

Simon

Jul 23 '05 #2
To Simon,

Thanks for your reply; I've tried the command and it worked. But I
think 1 of the file is the Data file, while the other is the
transaction log file (since this command only accepts 2 "disk =
'c:\XXX\01.bak' " parameter.....)

And so the first file must be much bigger in size; while the other is
smaller .....

Maybe due to the OS design, I don't really expect I could pack a DB
like the way it should be under Unix based systems.....

I can't find even 3rd party tools on splitting the backup file
From Jason (Kusanagihk)


Jul 23 '05 #3

<ku********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
To Simon,

Thanks for your reply; I've tried the command and it worked. But I
think 1 of the file is the Data file, while the other is the
transaction log file (since this command only accepts 2 "disk =
'c:\XXX\01.bak' " parameter.....)

That's inaccurate. It accepts up to 64 filenames.

backup database northwind to disk='\\FOO\share1\nw_1.bak',
disk='\\FOO\share1\nw_2.bak', disk='\\FOO\share1\nw_3.bak'

Will back up the northwind database to the three files named and attempt to
do so in equal parts.

You could do this up to 64 files...

And so the first file must be much bigger in size; while the other is
smaller .....

Maybe due to the OS design, I don't really expect I could pack a DB
like the way it should be under Unix based systems.....

I can't find even 3rd party tools on splitting the backup file
From Jason (Kusanagihk)

Jul 23 '05 #4
To Greg.

But when I try to key the command above; it just throw out an error
stating "it needs 2 arguments but you have provided 3 arguments....."

It is the same when I give it only 1 argument (ie. only 1 disk = XXX)
From Jason (Kusanagihk)


Jul 23 '05 #5
Can you post the exact command you executed and the full error message?
There's no error in sysmessages which has the format that you describe
(although some are similar), so I'm not sure exactly what you're
seeing.

Simon

Jul 23 '05 #6

<ku********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
To Greg.

But when I try to key the command above; it just throw out an error
stating "it needs 2 arguments but you have provided 3 arguments....."

You must be doing something wrong since I cut and pasted that from a test I
performed that worked.

(only thing I did was change the name of the server I backed up to.)

It is the same when I give it only 1 argument (ie. only 1 disk = XXX)
From Jason (Kusanagihk)

Jul 23 '05 #7
I have used Winzip 9.0 to compress 20 GB files (the zip compression that
comes with windows has a much lower limit)
<ku********@gmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
To all,

How to backup a database into a number of smaller files ?
For example, can I can fully backup a DB of 10 MB into 10 files (each 1
MB)???

The problem I've met is that the DB backup file is too large, over 4
GB, and even Winzip can't compress it (after compressing, around 80 %
of compression rate is possible)

Thanks!
From Jason (Kusanagihk)

Jul 23 '05 #8
To Julian

Oh, my winzip is only version 7.X, maybe that's why I can't zip a db
file over 4 GB...
From Jason (Kusanagihk)


Jul 23 '05 #9
To all,

I don't know what I've done earlier, but now I could use the command
"backup database to disk = 'xxx.bak', disk='yyy.bak' ...."

but the matter is, I could not find the backuped file in my PC; eg.
I've quoted it to backup the db to c:\temp\001.bak and 002.bak; but I
can't find these 2 files throughout the PC.....

nothing was wrong as I've been given a message stating it is working
fine
Processed 320 pages for database 'northwind', file 'Northwind' on file
3.
Processed 1 pages for database 'northwind', file 'Northwind_log' on
file 3.
BACKUP DATABASE successfully processed 321 pages in 0.283 seconds
(9.266 MB/sec).
The command I've used is :
backup database northwind
to disk='c:\temp\nw01.bak', disk='c:\temp\nw02.bak',
disk='c:\temp\nw03.bak'
Anything wrong again ?
From Jason (Kusanagihk)


Jul 23 '05 #10
To all,

Got the problem solved, well, the 'c:\temp\nw01.bak' actually refers to
the c:\ of the Server (holding the SQL Server and not my local PC); so
I can find the backup files on that Server instead!

And the error earlier I've quoted
"Server: Msg 3132, Level 16, State 1, Line 1
The media set for database 'northwind' has 3 family members but only 2
are provided. All members must be provided.
"
can be explained when I'm issuing the database backup command under the
enterprise manager (select the db, right-click --> all tasks, backup
db);

for example, if I've issue the backup database (initially) with 3 "to
disk = 'XXX.bak'" parameters, then all the backup later on must have
the 3 files.....

Though I can reset them under the enterprise manager; I wonder how
could I issue the command in resetting the "Media Set" options?

PS. simply I can see the 3 required backup files in the Enterprise
Manager
From Jason (Kusanagihk)


Jul 23 '05 #11

<ku********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
To all,

Got the problem solved, well, the 'c:\temp\nw01.bak' actually refers to
the c:\ of the Server (holding the SQL Server and not my local PC); so
I can find the backup files on that Server instead!
Common mistake. Just have to remember, this is a client/server
architecture, so the client issues commands which occur ON the server.


And the error earlier I've quoted
"Server: Msg 3132, Level 16, State 1, Line 1
The media set for database 'northwind' has 3 family members but only 2
are provided. All members must be provided.
"
can be explained when I'm issuing the database backup command under the
enterprise manager (select the db, right-click --> all tasks, backup
db);

A good reason for learning to use T-SQL and doing it "by hand". :-)

for example, if I've issue the backup database (initially) with 3 "to
disk = 'XXX.bak'" parameters, then all the backup later on must have
the 3 files.....

Though I can reset them under the enterprise manager; I wonder how
could I issue the command in resetting the "Media Set" options?

No idea, I avoid using SQLEM for stuff like this.

PS. simply I can see the 3 required backup files in the Enterprise
Manager
From Jason (Kusanagihk)

Jul 23 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: A.M. de Jong | last post by:
Hi, Every day we perform a full database backup. (during the night). Since we need no "additional" backups we had the problem that the transaction log file grows and grows. Therefore now just...
5
by: TThai | last post by:
Hi, Appreciated anyone who can help us with our problem. Our backup job for ROUTT database has been failing for the last 4 days. It was working fine for almost a year now. The only thing...
2
by: acko bogicevic | last post by:
Hi everyone I have the folowing situations with my backups. With Database Maintenance Plan is created backup strategy. Full Backup is performing every day at 1.00 am. And Romove files older than:...
1
by: muzamil | last post by:
Hi We have developed and deployed a database which contanis very sensitive information. Our client is now concerned about the security of the back ups. In essense, if someone in the organization...
6
by: Eric Herber | last post by:
I've a question regarding db2 (V8.1) and database backups going to a storage manager like TSM for example. As I can see in the storage manager if I backup the complete database over the TSM API...
6
by: Uthuras | last post by:
Greetings, We have DB2 V 8.1 with FP 4 on AIX 5.2. Our database backup is done using TSM v 4.1.2. However, we notice TSM make use of only one session even though we defined 4 sessions for...
4
by: uthuras | last post by:
Hi all, I have DB2ESE version 8.1 with FP 4 on AIX 5.2. My database used to be 1.1TB. When the DB size is 1.1TB, it takes approximately 7 hours to backup the entire database (online backup). The...
6
by: Steven | last post by:
I have a problem with moving the backup of my database from machine to machine. The size is 17 Gig and my network keeps timing out when I try to ftp it from machine to machine. I have had the...
4
by: David Greenberg | last post by:
Hi I have a backup device file ... ".bck" whick has grown pretty large. Is there any way I can reduce its size ? Thanks David Greenberg
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.