Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALTER SYSTEM ARCHIVE...

SOLVED
Go to solution
Scott Buckingham
Regular Advisor

ALTER SYSTEM ARCHIVE...

Simple question: Can the ALTER SYSTEM ARCHIVE set of commands be run while the instance is up and running?
Long time dabbler, first time Admin / DBA
4 REPLIES
Kurt Beyers.
Honored Contributor
Solution

Re: ALTER SYSTEM ARCHIVE...

You have 2 options to start archive logging:
1. Enabling Automatic Archiving at Instance Startup:


To enable automatic archiving of filled groups each time an instance is started, include the "LOG_ARCHIVE_START" parameter, set to TRUE, in the database's parameter file:

LOG_ARCHIVE_START=TRUE

The new value takes effect the next time you start the database.

2. Enabling Automatic Archiving After Instance Startup

To enable automatic archiving of filled online redo log groups without shutting down the current instance, use the SQL command ALTER SYSTEM with the ARCHIVE LOG START parameter.

The following statement enables archiving:

SVRMGRL> ALTER SYSTEM ARCHIVE LOG START;

When using this option, the instance does not have to be shut down to enable automatic archiving.

Kurt
Andreas D. Skjervold
Honored Contributor

Re: ALTER SYSTEM ARCHIVE...

Hi

To be able to use archiving in the first place you have to set the database in Archivelog mode. This can only be done with the database mounted (not open), so:
edit init.ora
LOG_ARCHIVE_START=true
(to enable the automatich archiver process)

SVRMGR>shutdown immediate
SVRMGR>startup mount
SVRMGR>alter database archivelog;
(to set the database in archivelog mode)
SVRMGR>alter database open;

Without the parameter LOG_ARCHIVE_START=true you still can set the database in archivelog but then the archiving have to be run manually by running the "alter system archive log all;" command that archives all online redologs, but you wouldn't want to have to do this al day...

rgds
Andreas

Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Volker Borowski
Honored Contributor

Re: ALTER SYSTEM ARCHIVE...

Hello,

do not mix up

archive start / archive stop

...which treats the archiver process

and

archivelog / noarchivelog

... which configures if the database is writing archivelogs at all.

The first ones can be used while the database is running. Normaly, you would start the archiver process via init.ora and never use them interactively. Two reasons to use them:

1) You need to reconfigure the archive destination. In this case, you'd like to stop the archiver process for a while, to have some time to unmount / mount filesystem or so.

2) You have a very active period of time in your database, and want to avoid archiving for performance reasons (very rare case!). You need to provide enough online redolog space (big online logs and several groups), stop the archiver, do your bigjob and restart the archiver afterwards with an additional "switch logfile" and "archivelog all"

The second one is toggled with an "ALTER DATABASE ARCHIVELOG" command and has to be used in mount state, so the database has to be taken down.

Hope this helps
Volker
Alexander M. Ermes
Honored Contributor

Re: ALTER SYSTEM ARCHIVE...

Hi there.
Just something additonal. Take care, that your archive directory ( set in config.ora ) has enough disk space left.
You should compress, backup and delete your offline redo. logs from time to time.
Attached file for compression, which we run every two hours for every database.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"