Home » RDBMS Server » Server Administration » Variable file size for archive log files (Oracle 11gR2,11.2.0.1.0,RHEL 5)
Variable file size for archive log files [message #486499] Thu, 16 December 2010 01:30 Go to next message
jimit_shaili
Messages: 237
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Dear Friends

I'm facing problem with archive log file size, Archive logs are generated with only of 90m or 92m or 94m(Variable sizes of less than 100m), Although i had set 100m for each of my redo log file. Here i'm providing my create db script for your reference. I want to know why the log switches before it reaches 100m.Is there any connection of intial 10m for my .dbf files.
create database mydev
maxlogmembers 3
maxloghistory 100
maxdatafiles 50
maxinstances 1
logfile
group 1 
('/ora11gdb/odb/oh1/oradata/mydev/redo01a.log','/multiplex/mydev/redolog/redo01b.log') size 100m,
group 2 
('/ora11gdb/odb/oh1/oradata/mydev/redo02a.log','/multiplex/mydev/redolog/redo02b.log') size 100m,
group 3 
('/ora11gdb/odb/oh1/oradata/mydev/redo03a.log','/multiplex/mydev/redolog/redo03b.log') size 100m
datafile '/ora11gdb/odb/oh1/oradata/mydev/system01.dbf' size 10m autoextend on next 1m maxsize 2g
sysaux datafile 
'/ora11gdb/odb/oh1/oradata/mydev/sysaux01.dbf' size 10m autoextend on next 1m  maxsize 2g
default temporary tablespace wbtemp tempfile 
'/ora11gdb/odb/oh1/oradata/mydev/temp01.dbf' size 10m autoextend on next 1m  maxsize 1g
undo tablespace undotbs1 datafile 
'/ora11gdb/odb/oh1/oradata/mydev/undotbs01.dbf' size 10m autoextend on next 1m  maxsize 2g;


Regards

Jimit

[Updated on: Thu, 16 December 2010 02:41] by Moderator

Report message to a moderator

Re: Variable file size for archive log files [message #486503 is a reply to message #486499] Thu, 16 December 2010 01:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Maybe archive_lag_target parameters is set.

Regards
Michel
Re: Variable file size for archive log files [message #486510 is a reply to message #486503] Thu, 16 December 2010 02:23 Go to previous messageGo to next message
jimit_shaili
Messages: 237
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Dear Michel

Here i'm showing my archive log files information from server and also output of parameter which you suggest.

[oracle1@WBH-DB1 archivedata]$ ll -h
total 12G
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:31 ARCH_1_737117634_100.ARC
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:32 ARCH_1_737117634_101.ARC
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:32 ARCH_1_737117634_102.ARC
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:33 ARCH_1_737117634_103.ARC
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:34 ARCH_1_737117634_104.ARC
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:35 ARCH_1_737117634_105.ARC
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:35 ARCH_1_737117634_106.ARC
-rw-r----- 1 oracle1 oinstall 86M Dec 15 16:36 ARCH_1_737117634_107.ARC
-rw-r----- 1 oracle1 oinstall 95M Dec 15 16:37 ARCH_1_737117634_108.ARC
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:37 ARCH_1_737117634_109.ARC
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:38 ARCH_1_737117634_110.ARC
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:38 ARCH_1_737117634_111.ARC
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:39 ARCH_1_737117634_112.ARC
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:40 ARCH_1_737117634_113.ARC
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:40 ARCH_1_737117634_114.ARC
-rw-r----- 1 oracle1 oinstall 91M Dec 15 16:41 ARCH_1_737117634_115.ARC
-rw-r----- 1 oracle1 oinstall 94M Dec 15 16:41 ARCH_1_737117634_116.ARC

Output of parameter archive_lag_target
SQL> show parameter archive_lag_target

NAME                                 TYPE        VALUE
------------------------------------ ----------- -----------------------------
archive_lag_target                   integer     0


Regards

Jimit
Re: Variable file size for archive log files [message #486513 is a reply to message #486510] Thu, 16 December 2010 02:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
No one is processing "switch log" or "archivelog current"? Maybe implicitly with backup script.
What is the size of your log buffer? If Oracle can't write the content of the log buffer inside the current log file then it switches.

Anyway, what is the problem to have different sizes?

Regards
Michel

[Updated on: Thu, 16 December 2010 02:41]

Report message to a moderator

Re: Variable file size for archive log files [message #486514 is a reply to message #486513] Thu, 16 December 2010 02:40 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
In addition, what I see is that you are switching too often, your logs should be at least 5 times larger.

Regards
Michel
Re: Variable file size for archive log files [message #486518 is a reply to message #486514] Thu, 16 December 2010 03:50 Go to previous messageGo to next message
jimit_shaili
Messages: 237
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Dear Michel

Here i'm posting results of log_buffer parameter and answer to your dought why this much faster and frequent generation of archive files,it is because of i'm importing the data from previously taken export file. I don't have any problem with archive files less than 100m, but i prefer it should be at exact size which i set.

SQL> show parameter log_buffer

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_buffer                           integer     10584064


Regards

Jimit
Re: Variable file size for archive log files [message #486523 is a reply to message #486518] Thu, 16 December 2010 04:31 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
i prefer it should be at exact size which i set.

You cannot ensure that, Oracle switches if it feels it needs it.

Regards
Michel
Re: Variable file size for archive log files [message #486536 is a reply to message #486523] Thu, 16 December 2010 05:16 Go to previous messageGo to next message
jimit_shaili
Messages: 237
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Dear Micheal

Not arguing with you, but if oracle switches if it needed then why it is parameter based and why we should have to specify size of redo log files? let oracle itself to handle it. Personally i'm not satisfied with oracle technique of handling redo files this way in 11gR2. (Assume you are right as always). I have been using Oracle 9i for last 5 years and never face such a silly problem.No regrets to you.Revert if i can provide you more information, to solve/understand above problem.

Regards

Jimit
Re: Variable file size for archive log files [message #486540 is a reply to message #486536] Thu, 16 December 2010 05:35 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
if it needed then why it is parameter based

It gives the maximum size and target for Oracle. Also you saw that it does not switch at 10M (for instance) but close to the maximum of 100M.
In 10g many things change in redo logs management to greatly enhance the performances including prevent from stopping session at the end of the log file to switch (note that log buffer has always worked like this, most of the time flushing before the end was reached and I bet this has never offended you).

Regards
Michel
Re: Variable file size for archive log files [message #486713 is a reply to message #486540] Sun, 19 December 2010 07:52 Go to previous messageGo to next message
ashokanjj
Messages: 6
Registered: December 2007
Location: India
Junior Member
Hai, FRom 10g onwards, the archive log file is compressed automatically.
Re: Variable file size for archive log files [message #486715 is a reply to message #486713] Sun, 19 December 2010 08:13 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Explain what you mean. Where? When? How?

Regards
Michel

[Updated on: Sun, 19 December 2010 08:14]

Report message to a moderator

Re: Variable file size for archive log files [message #486717 is a reply to message #486713] Sun, 19 December 2010 08:16 Go to previous messageGo to next message
John Watson
Messages: 8960
Registered: January 2010
Location: Global Village
Senior Member
ashokanjj wrote on Sun, 19 December 2010 07:52
Hai, FRom 10g onwards, the archive log file is compressed automatically.

What makes you believe this? Are you thinking of the syntax
BACKUP AS COMPRESSEDD BACKUP SET ?
Re: Variable file size for archive log files [message #486809 is a reply to message #486499] Mon, 20 December 2010 06:27 Go to previous messageGo to next message
ashokanjj
Messages: 6
Registered: December 2007
Location: India
Junior Member
Hai,
I have raised similar questions after migration of my db from 9i to 10g during 2008 and then I raised a SR with oracle corpn. They have replied that the archive log files will be compressed automatically.This feature is available from 10g onwards.

By
AShokan
Re: Variable file size for archive log files [message #486811 is a reply to message #486809] Mon, 20 December 2010 06:34 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
They have replied that the archive log files will be compressed automatically.

Which does not explain anything.
What does mean "compressed"?
When are they "compressed"? Is this the online redo log that is "compressed" during archiving?
Are you sure you are not talking about backup of archived logs (as John said)?

Regards
Michel
Re: Variable file size for archive log files [message #486814 is a reply to message #486809] Mon, 20 December 2010 06:56 Go to previous message
John Watson
Messages: 8960
Registered: January 2010
Location: Global Village
Senior Member
Hi there - why not do the test, instead of relying on something from support? Those guys are just ordinary people like you and me (heck, they were me) and can easily misunderstand your question. See this:
C:\Users\john\home>rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Mon Dec 20 12:39:12 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1264746920)

RMAN> backup archivelog all tag compresstest;

Starting backup at 20-DEC-10
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=147 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=27 RECID=1 STAMP=738246768
input archived log thread=1 sequence=28 RECID=2 STAMP=738246786
input archived log thread=1 sequence=29 RECID=3 STAMP=738246827
input archived log thread=1 sequence=30 RECID=4 STAMP=738247029
input archived log thread=1 sequence=31 RECID=5 STAMP=738247174
channel ORA_DISK_1: starting piece 1 at 20-DEC-10
channel ORA_DISK_1: finished piece 1 at 20-DEC-10
piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2010_12_20\O1_MF_ANNNN_COMPRESSTEST_6JYMN8QP_.BKP tag=COMPRESS
TEST comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 20-DEC-10

RMAN> list backupset tag compresstest;


List of Backup Sets
===================


BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
5       141.29M    DISK        00:00:09     20-DEC-10
        BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: COMPRESSTEST
        Piece Name: C:\ORACLE\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2010_12_20\O1_MF_ANNNN_COMPRESSTEST_6JYMN8QP_.BKP

  List of Archived Logs in backup set 5
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    27      1576159    20-DEC-10 1600573    20-DEC-10
  1    28      1600573    20-DEC-10 1601463    20-DEC-10
  1    29      1601463    20-DEC-10 1602063    20-DEC-10
  1    30      1602063    20-DEC-10 1602329    20-DEC-10
  1    31      1602329    20-DEC-10 1602451    20-DEC-10

RMAN>

This says that RMAN did NOT compress.
Then check again, with a different tool:
SQL> select sum(blocks * block_size) from v$archived_log
  2  where sequence# between 27 and 31;

SUM(BLOCKS*BLOCK_SIZE)
----------------------
             148153856

SQL> select BYTES from v$backup_piece where tag='COMPRESSTEST';

     BYTES
----------
 148155392

SQL>

The backupset is slightly bigger than the original archives! And, of course, the final check is to look at the files with operating system utilities. It looks as though when you raised the SR, they didn't understand what you were asking.

This is why I love Oracle: whenever you aren't sure of something, it is so easy to construct a test.

[update: all of this is, of course, if you are talking about backup comprtession. I can't think of any other.]

[Updated on: Mon, 20 December 2010 07:00]

Report message to a moderator

Previous Topic: How to get the tables in Oracle 10g
Next Topic: What will be the impact if OS version change .
Goto Forum:
  


Current Time: Fri Nov 29 08:53:29 CST 2024