cancel
Showing results for 
Search instead for 
Did you mean: 

Switching logmode to "overwrite" when log full

Former Member
0 Kudos

Is there any specific reason, why, in case the log is full, one can't switch to "overwrite"?

If you copy HUGE systems (1.5+ TB) and your "forget" to switch to overwrite after the copy, it's very very time consuming to get the system back to work again (full database backup + log backup). This has almost killed us often in the past and in fact, I don't understand the (technical) reason, why I can switch any time before, but not if the log ran actually full.

Could someone please elaborate?

Thanx!

--

Markus

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Markus,

overwrite Log is not recommended for produktive Systems.

Why dont you use Autolog?

If the Logspace is running full (LOG_SEGMENT_SIZE) it automatically

runs a full backup.

If the Log is full, the Database stops, this doesnt mean it is offline. You only need to perform an log backup, then the database become available again and everything will be fine.

If you put the Logmode in Overwrite Mode, it is not longer possible to recover the Database to a specific time. Only a recovery of a full backup can be performed!

How big is your Logspace?

Did i understand your question correct?

Regards

Manuel

markus_doehr2
Active Contributor
0 Kudos

I know about the log area - I was talking about test/sandbox systems.

If you get a "log full" situation, there's no way out of that but taking a full backup and then a log backup, on big (test-/sandbox-)systems, this takes a LOT of time.

What I am asking is:

It's possible to change the log mode ANY TIME, why can't we change it when the log is actually full?

--

Markus

former_member204746
Active Contributor
0 Kudos

maybe you could consider disabling logs on sandbox.

markus_doehr2
Active Contributor
0 Kudos

Yes - that's what I'm asking -it's not possible to switch a logmode if the situation already arose - and I don't understand why.

--

Markus

0 Kudos

Don't know as of which MaxDB version, but I've good experiences with a db_execute force savepoint after the db_execute set log auto overwrite on

markus_doehr2
Active Contributor
0 Kudos

Hi Rocco,

the problem is, if the log is full, a savepoint won't get through. And I can't change the logmode.

My question is (again), why can I change it ANYTIME, just not THEN, when the log is full?

--

Markus

Former Member
0 Kudos

Hi Markus,

you can always change your logmode, if the db is in state admin or online.

But you can't if it is full.

Before you can activate autolog you must perform an logbackup to empty the Logspace.

If your log space is full. You <b>don't</b> have to create an full backup.

You only need to do an logbackup, which is only as big as your logspace (10/20GB?).

(<i>Hope i dont break the Forum Rules</i>)

Have a look at SAP Hint 869267 (Point 18. 20.)

18. How does a LOG FULL situation occur?

A Log Full situation only arises if the log area is not regularly saved. The log area can only be released for overwriting if it has been previously saved and then a SAVEPOINT was written.

In a LOGFULL situation, the system can only write COMMITS/ROLLBACKS and SAVEPOINTS in the log.

20. How do I resolve a LOG FULL situation?

If the log has become full, any further on-line operation is only possible if a log backup is created. Log backup can be created in ADMIN or ONLINE status. A log backup can also be created by switching on automatic log backup.

If no database backup has been created on the affected database before the log backup, or if the log area has been switched off once in the meantime, a data backup is still necessary before the log backup.

Regards

Manuel

markus_doehr2
Active Contributor
0 Kudos

> Hi Markus,

> you can always change your logmode, if the db is in

> state admin or online.

> But you can't if it is full.

That is my question - WHY is that so?

I know what the LOG is, what is is for etc.

> Before you can activate autolog you must perform an

> logbackup to empty the Logspace.

>

> If your log space is full. You <b>don't</b> have to

> create an full backup.

> You only need to do an logbackup, which is only as

> big as your logspace (10/20GB?).

This is not true. If no full backup ever made (after a system copy), you MUST create a full backup as "starting point" for the log backup.

[..]

--

Markus

Former Member
0 Kudos

> > Hi Markus,

> > you can always change your logmode, if the db is

> in

> > state admin or online.

> > But you can't if it is full.

>

> That is my question - WHY is that so?

>

> I know what the LOG is, what is is for etc.

>

Ok i'm out. 😃

Thats a question for a Developer..

> > Before you can activate autolog you must perform

> an

> > logbackup to empty the Logspace.

> >

> > If your log space is full. You <b>don't</b> have

> to

> > create an full backup.

> > You only need to do an logbackup, which is only as

> > big as your logspace (10/20GB?).

>

> This is not true. If no full backup ever made (after

> a system copy), you MUST create a full backup as

> "starting point" for the log backup.

>

Hm yep you're right.

> [..]

>

> --

> Markus

I have not enough knowledge to answer this question, sry 😃

Regards.

Manuel

0 Kudos

Hi Markus,

in my test environment the savepoint has been written triggered by the force savepoint command during a log full situation. Ok I'm using the current 7.7.04. I'm sure that it also works in 7.7.02.

I assume that you use 7.6. I'm with you that there is no cause to allow to switch in overwrite mode except in log full situations. So in my point of view it's a bug fixed in 7.7.

Regards,

Rocco

markus_doehr2
Active Contributor
0 Kudos

Hi Rocco,

thanx for pointing out. Should I create an OSS call? I couldn´t find a PTS for this...

--

Markus

0 Kudos

Hi Markus,

I've checked the behaviour in 7.6.03.08 and it also worked fine like in 7.7. So you will get it in the forseeable future.

Regards,

Rocco

markus_doehr2
Active Contributor
0 Kudos

Hi Rocco,

I have had 7.6.03.08 on that specific box I was talking about - and it did NOT work.

Neverless, I´ll try with a new build once it´s released.

--

Markus

0 Kudos

Hi Markus,

to exclude a missunderstanding. In the log full situation you have to execute additionally the "force savepoint" command after the "set log auto overwrite". Without that it won't work. Did you trigger the savepoint manually?

Regards,

Rocco

markus_doehr2
Active Contributor
0 Kudos

Hi Rocco,

no - I was not able to.

I was using DBMGUI, if you reach a LOG FULL situation, the option to switch to overwrite is "grey" - but I didn't try on command line... I will - next time

--

Markus

Answers (0)