| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: starting auto arch without an init file
Michael J. Moore wrote:
> Using Oracle 9.2, after installing it I noticed there is no init<SID>.ora
> file in \database. There is an spfile of course, and \admin\mysid\pfile
> has "init.ora.77200219445" in it. (What's that long number bit all about?)
> I have turned on archiving, no problem but I would like to make archiving
> automatic rather than manual. So, here is the question. Is there a way I
> can do this without creating an init.ora file? Don't get me wrong, I have
> no objection to creating an init.ora file, I just want to know if there is
> a way to do it without an init.ora file.
>
> ALTER SYSTEM SET LOG_ARCHIVE_START=TRUE; as you know does not work because
> it is not dynamic.
>
> TIA,
> Mike
So, learn how to edit the spfile. If you choose to use one, it helps to know how to maintain it, no?
alter system set log_archive_start=true SCOPE=SPFILE;
The scope clause means 'don't try and change this setting for the currently running instance' -because, as you know, it won't work. 'Just edit my spfile'.
There is also a scope=memory which means 'forget trying to change the spfile, I just want something temporarily altered for the currently-running instance'.
And there is also a scope=both, which means change it now, and alter my spfile so its changed for future instance bounces too.
The default is scope=both, which is why your command fails, because by missing out the scope clause, you've implicitly asked Oracle to change the value of that parameter for the currently-running instance.
By the way, however: ARCH is actually dynamically startable and stoppable. You're just using the wrong command. Alter system archive log start; will work. As will alter system archive log all, archive log current, archive log stop and so on.
But the general advice is still: if you have to use an spfile, then you need to know how to work with it.
Regards
HJR
-- -------------------------------------------- See my brand new website, soon to be full of new articles: www.dizwell.com. Nothing much there yet, but give it time!! --------------------------------------------Received on Wed Oct 08 2003 - 20:57:13 CDT
![]() |
![]() |