Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to change size and number of archive log files?

Re: How to change size and number of archive log files?

From: Anton Buijs <remove_aammbuijs_at_xs4all.nl>
Date: Sat, 26 Apr 2003 00:22:39 +0200
Message-ID: <3ea9b526$0$49105$e4fe514c@news.xs4all.nl>


OK. Your questions are becoming more clear now. Comments embedded

Peter <peter_at_nomorenewsspammin.ca> schreef in berichtnieuws kmbjavonpu5vlrivjobjthovcacl7gidc0_at_4ax.com...
| On Fri, 25 Apr 2003 21:58:15 +0200, "Anton Buijs"
| <remove_aammbuijs_at_xs4all.nl> wrote:
|
| >
| >Peter <peter_at_nomorenewsspammin.ca> schreef in berichtnieuws
| >fouiav89mjvfrqfuoddvc85aqrkilci77c_at_4ax.com...
| >| On Fri, 25 Apr 2003 19:40:54 +0200, Sybrand Bakker
| >| <gooiditweg_at_nospam.demon.nl> wrote:
| >|
| >| >On Fri, 25 Apr 2003 09:12:03 GMT, Peter <peter_at_nomorenewsspammin.ca>
| >| >wrote:
| >| >
| >| >>How do you to change size and number of archive log files?
| >| >>I tried to change MAXLOGHISTORY but it didn't work.
| >| >>
| >| >>Thanks
| >| >>
| >| >
| >| >alter database add logfile group
| >| >alter database drop logfile group.
| >| >
| >|
| >| I was referring to archive log creates by the ARCH process, not the
| >| redo log files created by LGWR.
| >| Sorry for any confusion caused.
| >|
| >
| >You can't change the size of an archived redo log file.
| >It are just files on the operating system, no longer part of the
database.
| >You need them to recover a database restored from a backup.
| >Use OS commands to see size and to remove them. It depends on your backup
| >and restore strategy how long you should keep the files on disk.
| >The maxloghistory setting only sets how many redolog switches are
recorded
| >in the controlfile; query view v$log_history to see this info.
| >
|
|
| From the manual I found that the definition of MAXLOGHISTORY:
|
| MAXLOGHISTORY Clause
| This parameter is useful only if you are using Oracle in ARCHIVELOG
| mode with Real Application Clusters. Specify the maximum number of
| archived redo log files for automatic media recovery Real Application
| Clusters. Oracle uses this value to determine how much space in the
| control file to allocate for the names of archived redo log files. The
| minimum value is 0. The default value is a multiple of the
| MAXINSTANCES value and depends on your operating system. The maximum
| value is limited only by the maximum size of the control file.

No experience with RAC and I don't understand what is meant with "..max number of archived redo for media recovery in rac.."

| MAXLOGFILES Clause
| Specify the maximum number of redo log file groups that can ever be
| created for the database. Oracle uses this value to determine how much
| space in the control file to allocate for the names of redo log files.
| The default, minimum, and maximum values depend on your operating
| system.
|
|
| It seems that MAXLOGFILES sets the number of logswitches and redo log
| groups to facilitate Oracle switching from one log group to another.
| Archive log files are totally different. It seems that MAXLOGHISTORY
| controls the number of archive files.

You can't say that MAXLOGFILES set the number of logswitches. A logswitch occurs whenever an online redolog is full. What is says is how many online redolog files can be created at the max. You can't say thet MAXLOGHISTORY controls the number of archive files. It controls for how many files *information* is stored in the controlfile. When maxloghistory=100 information about the last 100 switches is stored.

| I am not trying to change the size of existing archive log files. In
| my case, Oracle creates archive files that are about 10M in size. My
| question is how to change this default size, so that for example,
| Oracle will create 20M archive log file, instead of 10M?

Now it becomes clear what you want.
You have a number of online redo log groups (let's say 3), with let's say 2 members in each group.
So there are 6 redo log files, let's say redo_1a, redo_1b, redo_2a, redo_2b, redo_3a and redo_3b, all 10Mb in size. Redo_1a and redo_1b are in group 1 and written simoultaniously. When full, the logwriter will switch to write to the files in group 2 and redo_1a (or redo_1b) will be archived. Most likely you see switches to occur much to often and want to resize your redos to 20Mb each.
Well: add a new group (redo_4a, redo_4b) and size them 20M and group 5 and 6. Then you can drop groups 1, 2 and 3. To help Oracle to move to the new groups you can use "alter system switch logfile" so you can finish this. Does this answers your real problem?

| >No offense but because you ask the question I wonder if you are familiar
| >enough with the principles of backup and recovery of a database in
| >archivelog mode. If so I surely would recommend looking around for some
good
| >papers about this.
| >
Received on Fri Apr 25 2003 - 17:22:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US