cancel
Showing results for 
Search instead for 
Did you mean: 

manually switch log

former_member217468
Participant
0 Kudos

hi, Just wanted to ask if it was possible to manually switch log file on HANA .

regards
Jonu

lbreddemann
Active Contributor
0 Kudos

This question had been asked and answered a couple of times before. Please do your part of the know-how game and research before posting a question.

- Lars (Moderator)

Accepted Solutions (1)

Accepted Solutions (1)

dvankempen
Product and Topic Expert
Product and Topic Expert

Hi Jonu,

As in ... Oracle?

ALTER SYSTEM SWITCH LOGFILE

https://docs.oracle.com/cd/B28359_01/server.111/b28310/onlineredo006.htm

==

A log switch occurs when LGWR stops writing to one redo log group and starts writing to another. By default, a log switch occurs automatically when the current redo log file group fills.

You can force a log switch to make the currently active group inactive and available for redo log maintenance operations. For example, you want to drop the currently active group, but are not able to do so until the group is inactive. You may also wish to force a log switch if the currently active group needs to be archived at a specific time before the members of the group are completely filled. This option is useful in configurations with large redo log files that take a long time to fill.

==

SAP HANA implements logging differently; there are no redo log groups, there is no LGWR, and you do not do any redo maintenance operations.

All you need to do after installation is to make an initial backup of the system. This will trigger SAP HANA to switch from log mode overwrite to log mode normal.

Read: Log Modes

In log mode normal, logging is a completely automatic operation that requires no manual maintenance.

Read: Savepoints and Redo Logs and Persistent Data Storage in the SAP HANA Database.

But if you insist, there is one thing you can do

ALTER SYSTEM RECLAIM LOG

ALTER SYSTEM RECLAIM LOG Statement

==

Log segment accumulation can be caused in several ways. For example, when automatic log backup is not operational for a long period or a log savepoint is blocked for an extended time. When such issues occur, use the ALTER SYSTEM RECLAIM LOG command, but only after the root cause of the log accumulation has been fixed.

==

If you want to learn more, there is a full playlist at the SAP HANA Academy about Database Backup and Recovery: http://bit.ly/2eNfXJf

For an update about what's new for the latest release on this topic, see

https://blogs.sap.com/2016/05/27/sap-hana-sps-12-whats-new-backup-and-recovery-by-the-sap-hana-acade...

Regards,

Denys

Answers (2)

Answers (2)

former_member182967
Active Contributor
0 Kudos

Refer to note 2222218 - FAQ: SAP HANA Database Server Management Console (hdbcons), use log backup command.

former_member217468
Participant
0 Kudos

thx much Denys