Thursday, 6 June 2013

create database in archivelog mode

   Q:-how create database in archive log mode after Creation of database? 

Ans:- 
        sql> archive log list;
             
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/database
Oldest online log sequence     1
Current log sequence           3

sql>alter system set log_archive_dest_1='LOCATION=/u01/archivelog' scope=spfile;

sql>show parameter log_archive_format;

System altered.

sql> show parameter log_archive_format;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_format                   string      %t_%s_%r.dbf


sql>alter system set log_archive_format='arch_%t_%s_%r_%d.arc' SCOPE=spfile;

System altered.

sql>shut immediate;

sql> startup mount;

ORACLE instance started.

ORACLE instance started.
Total System Global Area  422670336 bytes
Fixed Size                  1336960 bytes
Variable Size             260049280 bytes
Database Buffers          155189248 bytes
Redo Buffers                6094848 bytes
Database mounted.


sql>alter database archivelog;


sql> alter database open;

sql> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/database
Oldest online log sequence     1
Next log sequence to archive   3
Current log sequence           3


sql> alter system switch logfile;

sql> alter system switch logfile;

sql> alter system switch logfile;


sql> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/database
Oldest online log sequence     3
Next log sequence to archive   3
Current log sequence           5


 







 








 






 

No comments:

Post a Comment

work on autovacuum postgreSQL parameter

 In This blog, we are discussing the auto vacuum parameter on a small scale. we will understand the below parameters and will see how to mod...