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: initialize archive-log modus

Re: initialize archive-log modus

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Tue, 14 Jan 2003 06:56:36 +1100
Message-ID: <eIEU9.23379$jM5.62261@newsfeeds.bigpond.com>


You need to learn a bit more about working with an spfile, I think.

The spfile can be edited at any time by using an 'alter system' command. The trick is, of course, that many parameters are not dynamic and would error big time if you tried to modify them with just a bare 'alter system' command.

For example:

SQL> alter system set processes=200;
alter system set processes=200

                 *

ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified

And quite right too. That's not a dynamic parameter. So you need something to tell Oracle that you are not attempting to modify the currently-running Instance, but just trying to edit the SPFILE for the next startup. And Oracle thoughtfully provided the "SCOPE" keyword to do just that:

SQL> alter system set processes=200 SCOPE=spfile; System altered.

Therefore, to answer your specific query, the parameter to switch on automatic archiving is LOG_ARCHIVE_START=TRUE, but it's not dynamic. You therefore need:

SQL> alter system set log_archive_start=TRUE scope=spfile; System altered.

(Incidentally, there are three possible values for the SCOPE keyword: "memory", "spfile" and "both". "SCOPE=memory" means you are only wanting to modify the value for the lifetime of the currently-running instance, not edit the spfile at all. "SCOPE=SPFILE" means 'don't change the current value (probably because you can't as it's not a dynamic parameter), just edit the spfile'. And "SCOPE=BOTH" means change the current value AND get it right in the SPFILE for future startups. BOTH is the default.)

Bear in mind, too, that a simple ALTER SYSTEM LOG ARCHIVE START will start the archiving process dynamically, but only for the lifetime of the instance, so that next time you re-start, it will revert to being switched off unless you ALSO edit your spfile.

Therefore, you need to do both, probably:

SQL> alter system archive log start;
System altered.

SQL> alter system set log_archive_start=TRUE scope=spfile; System altered.

Regards
HJR "anja weiss" <anja-weiss_at_web.de> wrote in message news:724db49.0301130651.2643c891_at_posting.google.com...
> On my oracle 9i-System I want to initialize the automatic archive log
> modus. Unfortunately there is no init<sid>.ora. The database-instance
> is mounted by the spfile. Has anyone an idea how i can initialize the
> automatic archive-log modus without editing the init<sid>.ora?
>
> Thanks a lot!
> Anja
Received on Mon Jan 13 2003 - 13:56:36 CST

Original text of this message

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