Link to home
Start Free TrialLog in
Avatar of rl_marton
rl_marton

asked on

Automatic archival...how to configure

Just looking at Backup and recovery. If Automatic archival is set to Disabled, I thought all I did to enable it was issue the command 'alter system archive log start'. That sets it to enabled. When I shut down the database and then startup its back to enabled. This is something in the paraemeter file I presume? I did add archive_log_start=true BUT that doesn't seem to have taken.

Could I have a FULL explanation of what I'm doing wrong and how to correct it. Not 2 lines please.

Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

What version?

10g completely changed things up a bit.

9i and above, you are probably using the SPFILE not the PFILE (this is the default).

If so,
alter system set archive_log_start=true scope=spfile;
shutdown
startup
You have also to set the archval log destinations.
We use this instruction for Linux, but you can use it also for Windows

Check if the DB is in archive log
SQL> archive log list
             Database log mode    No Archive Mode
            Automatic archival   Disabled
            Archive destination  
                  /u01/app/oracle/product/8.1.7/dbs/arch
            Oldest online log sequence     19
            Current log sequence           21       

       SQL> alter database close;  
      
       Database altered.
 
       SQL> alter database archivelog;      
 
       Database altered.
 
       SQL> shutdown immediate  
                   
       ORA-01109: database not open
 
       Database dismounted.

       ORACLE instance shut down.

    At this point create (if not already created) the new mount point
    /u03/oradata/oralin1/arch and give access to the oracle user to this directory.
 
    Modify the Primay database init.ora so that log_archive_start=true and  
    specify a Archivelog Destination (log_archive_dest_1=/u03/oradata/oralin1/arch then
    restart  the instance. Verify that database is in archive log mode and that  automatic
    archivingis enabled.
 
       SQL> archive log list
       Database log mode            Archive Mode
       Automatic archival                   Enabled
       Archive destination            /u03/oradata/oralin1/arch
       Oldest online log sequence      x
       Next log sequence to archive      y
       Current log sequence            y
Avatar of rl_marton

ASKER

hi,

This...alter system set archive_log_start=true scope=spfile ;     ...I get as an illgal alter system command. Have I interpreted what you are saying correctly. Input that into SQL*Plus ?

Anyway, as I understand it Oracle is reading off the SP (binary) file as opposed to the Pfile. So no matter what I alter in the pfile it will refer to the binary version?

How do i get round this?


it's acutally: log_archive_start

>>How do i get round this?

1st:  why do you want to not use spfile?

If you're dead set on not using spfile:
2 ways:
1st remove the spfile. then it will default to pfile
or
startup pfile='<full patch to pfile>'
No I'm not dead set on using anything. I just want to enable Automatic archival (fullstop). I can do this OEM but even if I change that it asks me to amend the Pfile. I do that (this is what i am saying) they change doesn't stic as Oracle is reading off the SPfile (?). So how I change the SPfile?

eg..No matter what i am doing it reads the SPfile...I just don't know how to change this. seemingly any change I make to the PFile gets ignored?
ASKER CERTIFIED SOLUTION
Avatar of schwertner
schwertner
Flag of Antarctica image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
sql>alter database archivelog;
sql>alter system log_archive_start=true;
alter system set log_archive_start=true scope=spfile;
oops....

and slightwv, we don't need to add scope=spfile

alter system set log_archive_start=true;

the default value for scope is "both" ie. memory as well as spfile.
neo:
true..... however.....   this particular parameter cannot be set in memory.