473,397 Members | 1,969 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,397 software developers and data experts.

Hot backup in SIMPLE mode

JB
We have a SQL Server 7.0 database running with trunc. log on chkpt and
select into/bulkcopy checked and need to develop a backup strategy.

One of our DBAs insists that since the transaction log is being
truncated, we can't do a hot backup (a FULL backup in multiuser mode)
because if a transaction comes through during the backup it will leave
the backup in an inconsistent state. I'm skeptical, but I don't know
how SQL Server 7 avoids this problem.

If SQL 7 is not truncating the transaction log, it uses the
transaction log to roll forward changes that occurred during the
backup. Obviously if it's truncating the log it must have some way to
apply these transactions anyway (such as not doing a checkpoint during
the backup, backing up the log at each checkpoint, etc.).

Can anyone confirm that a hot backup will be valid when trunc. log on
chkpt is checked? Does anyone know how SQL 7 accomplishes this?

Thanks!
James
Jul 20 '05 #1
3 8158
br******@ohsu.edu (JB) wrote in message news:<53**************************@posting.google. com>...
We have a SQL Server 7.0 database running with trunc. log on chkpt and
select into/bulkcopy checked and need to develop a backup strategy.

One of our DBAs insists that since the transaction log is being
truncated, we can't do a hot backup (a FULL backup in multiuser mode)
because if a transaction comes through during the backup it will leave
the backup in an inconsistent state. I'm skeptical, but I don't know
how SQL Server 7 avoids this problem.
This is not correct - a full backup (BACKUP DATABASE ...) is always
consistent, and database settings will not affect that.
If SQL 7 is not truncating the transaction log, it uses the
transaction log to roll forward changes that occurred during the
backup. Obviously if it's truncating the log it must have some way to
apply these transactions anyway (such as not doing a checkpoint during
the backup, backing up the log at each checkpoint, etc.).
SQL Server records the log sequence number (LSN) when the backup
starts, then again when it ends, and uses the LSNs to include part of
the log in the backup set. That part of the log can then be applied
when the backup is restored, to ensure the data is consistent.
Can anyone confirm that a hot backup will be valid when trunc. log on
chkpt is checked? Does anyone know how SQL 7 accomplishes this?

Thanks!
James


All backups in SQL Server are 'hot', in the sense that you never need
to take the database offline, stop the MSSQL service etc.

Simon
Jul 20 '05 #2
<snip>

I don't have SQL7 BOL, but according to SQL2000 BOL "The exception is that
the log is not truncated if the checkpoint occurs when a BACKUP statement is
still active." This is in the section called "Truncating the Transaction
Log". I would guess if you check the equivalent section in SQL7 BOL you'll
find the same statement.

Simon
Jul 20 '05 #3
Perfect! The relevant section, as shown below, suggests that the database will come out of log truncation mode for the duration of the backup:

From SQL Server 7.0 Books Online:
http://download.microsoft.com/downlo...-US/SQLBOL.exe

"The trunc. log on chkpt. database option must be set to TRUE for a database to be eligible for log truncate mode. Whether the database is actually in log truncate mode also depends on the state of the database:

- The database comes out of log truncate mode when a BACKUP DATABASE statement is executed. This is because a BACKUP DATABASE statement is the starting point of a log backup sequence.

...."

Thanks Simon!
James
Simon Hayes<sq*@hayes.ch> 07/18/03 09:19AM >>>

<snip>

I don't have SQL7 BOL, but according to SQL2000 BOL "The exception is that
the log is not truncated if the checkpoint occurs when a BACKUP statement is
still active." This is in the section called "Truncating the Transaction
Log". I would guess if you check the equivalent section in SQL7 BOL you'll
find the same statement.

Simon


Jul 20 '05 #4

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

Similar topics

3
by: Tim Gahnstrom | last post by:
rdiff-backup is aperently written in Python and when I run it in a special way I get some funy Python errors. Does anyone know if linux python have some issues with working with fat32 or usb...
5
by: copernicus | last post by:
Hi, I have a 2 Tb data warehouse.I need a backup strategy as the current backup strategy(cold backup) is taking too long.Is it possible to do a incremental backups using RMAN ? I guess I have to...
3
by: Cristina | last post by:
Hallo i am a beginner into Oracle Technologies.I would like to make backup of my database,but i dont know how.Is there tools?Can i schedule the backup plan? thanks Cristina
9
by: tech_guru | last post by:
Hello!! I am relatively new to SQL and am having a problem. I have taken over a SQL 2000 db that did not have any backup plans scheduled for it. I created a maintenance plan that backs up the...
1
by: Louis | last post by:
This is maybe a dumb question but I couldn't find a definitive answer on BOL. Looking at my backup script. If I issue a CHECKPOINT, does this truly force all transaction log entries to the data...
2
by: Matt | last post by:
I run SQL Server 2000 and use thier database maintenance plans to backup my databases. My questions is what happens if a change is being made to a database table while a backup is running? Should I...
2
by: scott s | last post by:
Hello all, I was just awarded the job of maintaing the database server for our company. I have basically ZERO experience using MS SQL Server 2000. Can anyone point me in the direction of a good...
5
by: Roger | last post by:
backup log testdb with truncate_only DBCC SHRINKFILE (testdb_log, 100) WITH NO_INFOMSGS backup database testdb to disk = '\\DC01\Backups\DB01\testdb.bak' with init and does the shrinkfile...
2
by: heyzulu59 | last post by:
I thought that an online backup could always be run while other processes with the database went about their business. However today I noticed that certain processes in my production database were...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.