cancel
Showing results for 
Search instead for 
Did you mean: 

Backup

Former Member
0 Kudos

Hello community,

I´m using Sybase Central to backup my ASA databases but I can´t find an option to truncate the log after backup is done. I´m running a complete backup every day. Someone knows how?

Thanks in advance,

SAP Legend

Accepted Solutions (1)

Accepted Solutions (1)

chris_keating
Advisor
Advisor
0 Kudos

Try a "Create Backup Images...". You are likely creating an archive backup which is described in Sybase Central as "Backup database...". That type of archive creates a single file containing all of the files related to the database and is intended for storage to tape.

There will be a page in the Create Backup Image wizard that will include the option to truncate the log.

Former Member
0 Kudos

Hello Chris,

Thanks for your reply. I tried this and works. The only problem is I can´t schedule this Backup Images for a daily basis for example.

Do you know how can I do it for a daily basis backup? At the "Create a maintenance plan" I could not found int.

Regards,

SAP Legend

chris_keating
Advisor
Advisor
0 Kudos

There is not a specific mechanism currently in the maintenance plan to truncate logs. You can however add a statement that does this work "after the database is backed up". Alternatively, you can use database events to implement this.

You can use a statement like to rename the log

BACKUP DATABASE DIRECTORY ''

TRANSACTION LOG ONLY

TRANSACTION LOG TRUNCATE;

Former Member
0 Kudos

Hello Chris,

Can I user the option bellow to truncate the log after finishing the database backup?

If yes. Do you know the command line that should be used for this?

Regards,

SAP Legend

chris_keating
Advisor
Advisor
0 Kudos

The statement that I recommended previously would work - that is the SQL that would be executed to truncate the log.As a reminder, that statement was:

BACKUP DATABASE DIRECTORY ''

TRANSACTION LOG ONLY

TRANSACTION LOG TRUNCATE;

Of course, you could create a database EVENT and do the backup and truncate in a single step. For example:

CREATE EVENT ScheduledBackupEvent

SCHEDULE "daily_backup" BETWEEN '02:00' AND '02:59' ON ( 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' )

HANDLER

BEGIN

    BACKUP DATABASE DIRECTORY 'c:\\temp' TRANSACTION LOG TRUNCATE;

END;

Answers (0)