Thursday, May 5, 2011

How To Set Your Oracle Database to ARCHIVELOG Mode

1) Connect to Database as SYSDBA

 bash$ sqlplus "/as sysdba"

2) Shutdown the Database

SQL> shutdown immediate;

3) Mount the Database.

SQL> startup mount;

4) Set the Database to ARCHIVELOG mode.

SQL> alter database archivelog;

5) Open your Database.

SQL> alter database open;

6) Check the setting areOK

SQL> archive log list;

You will get a output like following.

Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /archive/arc
Oldest online log sequence     2
Next log sequence to archive   4
Current log sequence           4

Wednesday, April 27, 2011

Create a file with Back dated time stamp in solaris

To ceate a file with back dated time stamp, use thefollowing command.

touch -t 201001011030 timestamp-test

This will create a file name as "timestamp-test " with the last modified date as
 2010-01(January)-01 10.30 AM.