cancel
Showing results for 
Search instead for 
Did you mean: 

Remove log volumes in 7.7 version

Former Member
0 Kudos

Hi experts!

I need to remove log volumes. I have 7.7 version MaxDB. Is there any improvement in this version in comparasion to the previous process (backup and restore in a different configured db) of removing log volumes?

Thanks in advance...

Rob

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

> I need to remove log volumes. I have 7.7 version MaxDB. Is there any improvement in this version in comparasion to the previous process (backup and restore in a different configured db) of removing log volumes?

Hi there,

with 7.7 you can try to use the "clear log" command to recreate the volumes if they are missing.

This should work like this:

1. take a full data backup

2. bring the DB to offline mode

3. modify/delete the parameters for the LOG volumes so that they fit your needs

4. bring the db to admin mode

5. run clear log - now the log volume(s) should be created again

6. bring the DB to online mode.

ATTENTION: this is of course a hack and in no way the intended or supported way to change the log volume setup.

Usually there is no need to change the log volume setup, therefore the backup and recovery approach is still the official way to do it.

If you aren't clear about any of the above steps, then you really shouldn't try this.

regards,

Lars

Former Member
0 Kudos

Hi Lars!

Cannot find any way to complete step 3. Nor with DB studio, nor in an OS config file , nor with dbmcli.

What exacly you mean in this step?

Thx Rob

lbreddemann
Active Contributor
0 Kudos

Hi Robert,

let's see... step 3 -6

3. modify/delete the parameters for the LOG volumes so that they fit your needs

4. bring the db to admin mode

5. run clear log - now the log volume(s) should be created again

6. bring the DB to online mode.

ATTENTION: this is of course a hack and in no way the intended or supported way to change the log volume setup.

Usually there is no need to change the log volume setup, therefore the backup and recovery approach is still the official way to do it.

We need to figure out what paramters are to be changed:

dbmcli on db770>param_getvolsall LOG
OK
UseMirroredLog                   NO
MaxLogVolumes                    2
LogVolumeName001                 1280       F  C:\sapdb\db770\devspaces\LOG_001  1
MirroredLogVolumeName001                    F  C:\sapdb\db770\devspaces\LOG_M_001

dbmcli on db770>param_directgetall
OK
[...]
LogVolumeName001                        C:\sapdb\db770\devspaces\LOG_001
LogVolumeType001                        F
LogVolumeSize001                        1280
LogVolumePartition001                   1
MirroredLogVolumeName001                C:\sapdb\db770\devspaces\LOG_M_001
[...]

In my case I have just one log volume.

To reduce the size of it, we need to change the parameter LogVolumeSize001:

db_offline
param_startsession
param_put  LogVolumeSize001 800
param_put LOG_IO_QUEUE 50
param_checkall
param_commitsession

The parameterchange for LOG_IO_QUEUE is necessary to prevent some calculation underrun for dependent parameters (AutoLogBackupSize).

If all these commands worked without error, we can continue:

db_admin
util_connect
util_execute clear log
util_release
db_online

If you get any errors during the modification of the parameters, you won't be able to start the database afterwards.

Once again I want to stress: THIS IS ONLY FOR EDUCATIONAL PURPOSES AND SHOULD NEVER BE USED IN A PRODUCTIVE ENVIRONMENT.

regards,

Lars

Former Member
0 Kudos

Hi Lars!

Thank you very much.

Rob

P.s.: I'm happy with the fact that I could contact such a generous person like you.

...and I promise I won't use this method in productive environment...

former_member188065
Participant
0 Kudos

During sapinst process with system copy option the installation routine failed to create the datafile for the logvolume.

XCMDOUT.LOG showed

E:\sapdb\programs\pgm\dbmcli.exe -n myhost -d DBS -u CONTROL,******** param_addvolume 1 LOG L:\sapdb\DBS\saplog\DISKL001 F 256000

(sapinst won't let me choose a file size smaller then 256000 pages which shouldn't matter for the restore, does it?)

Anyway no logfile on filesystem level was created. I wasn't aware of this circumstance until I tried to restore from tape.

Repeating the command manually on the command line wasn't successfull either.

So I copied the original log file over from the source system (same SID).

The log from the source was smaller, so I tried using the described hack and adjust LogVolumeSize001 to the original 128001 pages to match the DB Inventory with the file size on OS level.

Unfortunately I receive this error here as soon as I try to clear the log area (all other commands ran fine):

dbmcli on DBS>util_execute clear log

ERR

-24994,ERR_RTE: Runtime environment error

4,connection broken

Any option to get that fixed without re-installing and run through the whole installation process over again?

Former Member
0 Kudos

After installation the database first needs Initialization.

This can be done with maxdb Database Studio / Database Manager or using dbmcli.

Answers (0)