472,143 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Transaction Logging Backup Set

Hi

I take one nightly full database backup at 02:00 and backup the
transaction log to one backup set every 15mins.

The commands to do this are as follows and are set up to run as
database jobs:

-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabase backup', NOSKIP , STATS = 10,
NOFORMAT

-- Transaction Log Backup Every 15mins.

BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLogBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT,
RETAINDAYS = 0

At the moment the transaction log backups every 15mins are simply
being added one by one to the one backup set. I want the backed up
transaction logs in the backup set after 24hrs to be overwritten so
disk space does not add up. I thought RETAINDAYS would do this as an
expirydate is set to expire on the time it is created so i would have
expexted it to be overwritten when that time comes around the next
day. (But is doesent)

I think it is ok to overwrite the transaction log in the backupset
after 24hrs as you only need the transaction logs since the last full
backup (which happens nightly at 02:00) for recovery.

Does anyone have any ideas?

Many thanks.

Thiko!
Jul 20 '05 #1
3 7462
-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabase backup', NOSKIP , STATS = 10,
NOFORMAT

-- After that (once a day)
BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH INIT ...

-- Transaction Log Backup Every 15mins.
BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLogBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT

"Thiko" <bi*****@hotmail.com> wrote in message
news:b8**************************@posting.google.c om...
Hi

I take one nightly full database backup at 02:00 and backup the
transaction log to one backup set every 15mins.

The commands to do this are as follows and are set up to run as
database jobs:

-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabase backup', NOSKIP , STATS = 10,
NOFORMAT

-- Transaction Log Backup Every 15mins.

BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLogBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT,
RETAINDAYS = 0

At the moment the transaction log backups every 15mins are simply
being added one by one to the one backup set. I want the backed up
transaction logs in the backup set after 24hrs to be overwritten so
disk space does not add up. I thought RETAINDAYS would do this as an
expirydate is set to expire on the time it is created so i would have
expexted it to be overwritten when that time comes around the next
day. (But is doesent)

I think it is ok to overwrite the transaction log in the backupset
after 24hrs as you only need the transaction logs since the last full
backup (which happens nightly at 02:00) for recovery.

Does anyone have any ideas?

Many thanks.

Thiko!

Jul 20 '05 #2
Hi!

This is very helpful. Thank you very much.

Could you tell me please why to truncate the transaction log
immediately after the full database backup command? What happens if I
need to recovery some of the transactions that were taking place
during the full database backup, for example? Would it be better to
do the truncate transaction log with the INIT immediately before the
full database backup takes place?

Many Thanks.

Thiko!

"Igor Raytsin" <n&*@cyberus.ca> wrote in message news:<3f********@news.cybersurf.net>...
-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabase backup', NOSKIP , STATS = 10,
NOFORMAT

-- After that (once a day)
BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH INIT ...

-- Transaction Log Backup Every 15mins.
BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLogBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT

"Thiko" <bi*****@hotmail.com> wrote in message
news:b8**************************@posting.google.c om...
Hi

I take one nightly full database backup at 02:00 and backup the
transaction log to one backup set every 15mins.

The commands to do this are as follows and are set up to run as
database jobs:

-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabase backup', NOSKIP , STATS = 10,
NOFORMAT

-- Transaction Log Backup Every 15mins.

BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLogBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT,
RETAINDAYS = 0

At the moment the transaction log backups every 15mins are simply
being added one by one to the one backup set. I want the backed up
transaction logs in the backup set after 24hrs to be overwritten so
disk space does not add up. I thought RETAINDAYS would do this as an
expirydate is set to expire on the time it is created so i would have
expexted it to be overwritten when that time comes around the next
day. (But is doesent)

I think it is ok to overwrite the transaction log in the backupset
after 24hrs as you only need the transaction logs since the last full
backup (which happens nightly at 02:00) for recovery.

Does anyone have any ideas?

Many thanks.

Thiko!

Jul 20 '05 #3
Hi,

There is some misunderstanding here:

1. You do not need to truncate transaction log manually. Full Backup or
Transaction Log Backup will do it for you.
2. INIT option does not truncate log. INIT specifies that all backup sets
should be overwritten.
Regards,
Igor
"Thiko" <bi*****@hotmail.com> wrote in message
news:b8**************************@posting.google.c om...
Hi!

This is very helpful. Thank you very much.

Could you tell me please why to truncate the transaction log
immediately after the full database backup command? What happens if I
need to recovery some of the transactions that were taking place
during the full database backup, for example? Would it be better to
do the truncate transaction log with the INIT immediately before the
full database backup takes place?

Many Thanks.

Thiko!

"Igor Raytsin" <n&*@cyberus.ca> wrote in message

news:<3f********@news.cybersurf.net>...
-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabase backup', NOSKIP , STATS = 10,
NOFORMAT

-- After that (once a day)
BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH INIT ...

-- Transaction Log Backup Every 15mins.
BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLogBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT

"Thiko" <bi*****@hotmail.com> wrote in message
news:b8**************************@posting.google.c om...
Hi

I take one nightly full database backup at 02:00 and backup the
transaction log to one backup set every 15mins.

The commands to do this are as follows and are set up to run as
database jobs:

-- Database Backup
BACKUP DATABASE [ThikosDatabase] TO [DatabaseBackUp] WITH NOINIT ,
NOUNLOAD , NAME = N'ThikosDatabase backup', NOSKIP , STATS = 10,
NOFORMAT

-- Transaction Log Backup Every 15mins.

BACKUP LOG [ThikosDatabase] TO [TransactionLog] WITH NOUNLOAD , NAME
= N'TransactionLogBackUp', NOSKIP , STATS = 10, DESCRIPTION =
N'BackUp the transaction Log every 15 minutes every day.', NOFORMAT,
RETAINDAYS = 0

At the moment the transaction log backups every 15mins are simply
being added one by one to the one backup set. I want the backed up
transaction logs in the backup set after 24hrs to be overwritten so
disk space does not add up. I thought RETAINDAYS would do this as an
expirydate is set to expire on the time it is created so i would have
expexted it to be overwritten when that time comes around the next
day. (But is doesent)

I think it is ok to overwrite the transaction log in the backupset
after 24hrs as you only need the transaction logs since the last full
backup (which happens nightly at 02:00) for recovery.

Does anyone have any ideas?

Many thanks.

Thiko!

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by TZoner | last post: by
6 posts views Thread by Burkhard Schultheis | last post: by
20 posts views Thread by xixi | last post: by
9 posts views Thread by Balaji | last post: by
4 posts views Thread by yashgt | last post: by
reply views Thread by leo001 | last post: by

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.