log_archive (Different points of view)

--if u wants to run ur database in archive mode. then u have to add the following parameter in init.ora file..

log_archive_start = true 
log_archive_dest = 'E:\BackuporacleAppdb'--specify ur archived location
log_archive_format = 'arch%s.txt'
LOG_ARCHIVE_MAX_PROCESSES=3(how many archiver u wants to run)

stutdown database 
--take a backup
create a spfile from pfile
startup mount
alter database open.

SQL>alter system set log_archive_dest='g:\archive' scope=spfile; 
SQL> select status from v$instance;

SQL> alter system set log_archive_dest='G:\archive' scope=spfile;
SQL> alter system set log_archive_start=TRUE scope=spfile;
SQL> shutdown immediate
SQL> startup
SQL> archive log list
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 32
Next log sequence to archive 34
Current log sequence 34

SQL> show parameter log_archive
conn / as sysdba
CREATE pfile='/home/oracle/initorcl.ora' FROM spfile='SPFILEORCL.ORA';
col name format a30
col value format a30
SELECT name, value
FROM gv$parameter
WHERE name LIKE '%arch%';
-- alter the SPFILE as required.
shutdown immediate;
CREATE spfile FROM pfile='/home/oracle/initorcl.ora';
startup mount --exclusive;
alter database archivelog;
alter database open;
alter system switch logfile;
archive log list

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: