473,394 Members | 1,932 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 Read-Only databases

Hello,

Can anyone tell me how to backup read-only databases? I want to backup
the secondary databases in my log shipping pairs.

Thanks,

TGru

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #1
6 17685
tgru (tg**@devdex.com) writes:
Can anyone tell me how to backup read-only databases? I want to backup
the secondary databases in my log shipping pairs.


It may that I don't work with log-shipping that I have to ask this
stupid question: can't you backup it like you would back up any
other database?
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2
Not a stupid question... a very valid question, for the MS folks... I
wish, but when I try to do a backup, it fails with references to the db
being a warm standby database.

It's funny that no-one has come across this... I've asked a few people
and have gotten similar responses from all.

TGru

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3
I'm tempted to ask why you would want to do this, since you're
constantly restoring the database anyway. Any backup you take will
quickly be out-of-date, and all the files you need to restore the
database will be in the copy folder on your DR node in any case.

Jul 23 '05 #4
tgru (tg**@devdex.com) writes:
Not a stupid question... a very valid question, for the MS folks... I
wish, but when I try to do a backup, it fails with references to the db
being a warm standby database.

It's funny that no-one has come across this... I've asked a few people
and have gotten similar responses from all.


I broswed a little in Books Online, and could not find anything. But when I
read about standby servers, I made the same reflection as Phil.

I can guess that because of the undo file and that, it may not be possible
to back up a standby server.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #5
I agree with you guys in theory, but in our case, our tape backup system
resides at the secondary location (lame, I knw, but I just started
here...) I need to be able to get full backups to the tape backup
system, and copying them from the primary location saturates our T1...

I know the answer now, you cannot backup read-only databases since
backups update the tlog with "backup history", and in read-only mode
that is not possible...

I am going to use DTS to copy the objects and data to a server that I
can do backups from...

Thanks,

TGru

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #6
tgru (tg**@devdex.com) writes:
I know the answer now, you cannot backup read-only databases since
backups update the tlog with "backup history", and in read-only mode
that is not possible...
No, that is not the case. You can backup a plain read-only database;
I just tried it.

ALTER DATABASE nisse SET READ_ONLY
ALTER DATABSE nisse SET RECOVERY FULL
backup database nisse to disk = 'c:\temp\nisse.back' -- OK

restore database nisse from disk = 'c:\temp\nisse.back'
with standby = 'c:\temp\nisse.standy'

-- This fails:
backup database nisse to disk = 'c:\temp\nisse2.back'

Server: Msg 3036, Level 16, State 1, Line 1
Database 'nisse' is in warm-standby state (set by executing RESTORE WITH
STANDBY) and cannot be backed up until the entire load sequence is
completed.
Server: Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.

I guess that's mean, that I would apply the last transaction log. I
suppose that in a log-shipping scenario, that I would have to turn off
log shipping, before I do my backup.
I agree with you guys in theory, but in our case, our tape backup system
resides at the secondary location (lame, I knw, but I just started
here...) I need to be able to get full backups to the tape backup
system, and copying them from the primary location saturates our T1...


Now, is that a kludge or what? But I would still puruse the log shipping
thing - or maybe even better replication. Your idea of using DTS does
not at all sound good to me.

If there is to be any point with this arrangement, the data moved should
only be increments. I know about zero about DTS, but it sounds to me
that you are copying everything everytime. If that backup saturated
the network, guess what your DTS copying will do. And there are big
risks that what you get is not an exact copy of the database. And
it's definitely not a transactional backup.

Here is what I can think of:

1) Get a removable USB 2.0 disk and connect it to the server. Then walk to
to the machine with the tape station. (You should probably backup to
local hard disk, then copy the back up to the USB disk.)
2) Write some routines to turn log shipping off and on, so that standy
by server can be backed up.
3) Investigate transactional replication.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #7

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

Similar topics

4
by: Neil | last post by:
Hi, I hope this question isn't too far off topic....I'm almost at my wits end trying to figure this out. I have a Mysql database and I wish to automate the backup of the database because I...
4
by: deprins | last post by:
Hello, I have run into some problems with logfiles and backup logfiles (MS SQL server). I have read much about them but uptil now I dont seem to grasp how it works. Specially the part of working...
0
by: tgru | last post by:
TGru *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
4
by: Erik Hendrix | last post by:
Hi, I have a quick question, when one sets the prefetch size = extent size, then when doing a backup we will have 1 agent (db2bm) doing the reads. If we have prefetch size a multiple of extent...
1
by: alex | last post by:
Hi ! I couldn't make backups with our new system using db2 8.2. Every time I trigger a backup I get this error message: BACKUP DATABASE EBUERO2 ONLINE TO "/raid/backup/ebuero2/part1",...
5
by: Zenek | last post by:
Hello, I have: - server MS SQL MSDE (2000) - database 'COLLBASE' - table 'MAIN' - row: column 'NAME' value 'version' and column 'VALUE' value '003' I make backup files by SQL query.
10
by: Konstantin Andreev | last post by:
Hello. Some time ago I asked in this conference, - How to use an ONLINE BACKUP to restore database onto another system? - but got no answers. Therefore I can conclude it is not possible. But......
5
by: Konstantin Andreev | last post by:
Hello, all. I can't figure out <subjectfrom documentation. I had configured LOGARCHMETH1 = DISK:/bak/logs so all full log files are copied *out* of the active log path. Let I issue | #...
2
by: Neil | last post by:
Is there a way to read a backup file to see if it contains a file without restoring the backup file? We are missing a record from a table, and I need to find out when it was deleted. We have...
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.