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: can't alter database archivelog

Re: can't alter database archivelog

From: Howard J. Rogers <howardjr_at_iprimus.com>
Date: Sun, 3 Sep 2000 08:57:07 +1100
Message-ID: <39b17775@news.iprimus.com.au>

"junfan" <fanjun_at_bigfoot.com> wrote in message news:01c011c2$7ddbd360$2dc1790f_at_bj210276...
> Hi all,
>
> I am new to Oracle for NT. I want to change the redo log in archive log,
 so
> I tried to restart instance and mount the db without open it. However, I
> don't know how to do such a simple job under window nt. Alway I start the
> db instance through nt service and the db is alway mounted and opened. I
> tried to "alter database close" in sqlplus but failed.
>
> Any suggestion will be highly appreciated
>

The reason it fails is because terminating the services is effectively the same as doing a shutdown abort. A shutdown abort is a 'dirty' shutdown, in that the database will require Instance Recovery afterwards.

It is considered rather dodgy to start generating redo from a failed base, so Oracle won't let you.

The secret is to ensure that you perform at least a 'shutdown immediate', *then* get to the mount stage, and issue the 'alter database archivelog' command.

To do a clean shutdown like this, you'll need to run Server Manager. You don't say what version of Oracle you are running, which makes a bit of a difference but here goes anyway:

For 8.1.5 and above: Click [Start] [Run] and type in 'cmd' (without the quotes of course).
In the command line window, type 'set ORACLE_SID=xxx' (where xxx is the name of your Instance, and there are no spaces in that command). Now type 'svrmgrl'

For earlier versions, you still need a command line window, and you still need to set your ORACLE_SID, but to fire up Server Manager, you'll need to type in svrmgr30 (or conceivably, svrmgr23) -the version number of *server manager* (not of Oracle itself) is included in the executable name.

Once Server Manager is running, connect as a privileged User (conceivably you'd type 'connect / as sysdba' -but it depends whether you are using a password file or not. Possibly a straightforward 'connect internal' might work). Then issue the command 'shutdown immediate'. Once it's shutdown, you can type 'startup mount' (and you may have to specify 'pfile=yyyyy' if the init.ora for your Instance isn't in the default location. And then you can type 'alter database archivelog'. If that command succeeds, you can type 'alter database open', and you're done.

*Before* you try any of this, you'll need to consider where you want to have your archives being stored (that requires setting archive_log_destination -though again, this depends on what version of Oracle you are running. It could involve setting archive_log_destination_1 through 5). You'll also want to make sure that log_archive_start=true, otherwise ARCH won't start automatically, and you'll be heading for a system hang if everything else goes OK but ARCH is left switched off.

Once everything is running properly, you might just check that all the right settings have taken proper effect. If you're in Server Manager, type 'archive log list' -and hope you see that archiving is 'enabled', and that the database mode is showing as 'archivelog'. If it is, you might consider typing 'alter system switch logfile' to force a log switch and generate your first archive log: pop out to the directory you said you wanted archives sent to, and see if a new file has been created there for you.

Hope that helps
Regards
HJR
>
Received on Sat Sep 02 2000 - 16:57:07 CDT

Original text of this message

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