Home > Oracle DBA > UMASK with archive log file.

UMASK with archive log file.

November 25, 2013

Recently we have done upgrade, during the upgrade, one of  my co-dba, for got to set umask and started the DB, after that he set the umask and noticed that DB is not considering new umask value, hence we were forced to restart the DB. FYI, i am here with giving same to you.

For easiness i am here with pasting the entire exercise.

$ umask u=rwx,g=r,o=
$ umask
0037
$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Mon Nov 25 10:53:39 2013

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 839282688 bytes
Fixed Size 2231128 bytes
Variable Size 629146792 bytes
Database Buffers 205520896 bytes
Redo Buffers 2383872 bytes
Database mounted.
Database opened.
SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> exit
$
$ cd /u01/app/oracle/fast_recovery_area/ORCL/a*/*25
$ ls -ltr
total 64816
-rw-r—– 1 oracle oinstall 43124224 Nov 25 02:00 o1_mf_1_78_995xf1p2_.arc
-rw-r—– 1 oracle oinstall 23157248 Nov 25 10:54 o1_mf_1_79_996wopqy_.arc
-rw-r—– 1 oracle oinstall 1024 Nov 25 10:54 o1_mf_1_80_996woxcv_.arc
-rw-r—– 1 oracle oinstall 1024 Nov 25 10:54 o1_mf_1_81_996woylb_.arc
$ umask u=rwx,g=rw,o=
$ umask
0017
$ touch sample.txt
$ ls -ltr sample*
-rw-rw—- 1 oracle oinstall 0 Nov 25 10:56 sample.txt
$ $ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Mon Nov 25 11:37:41 2013

Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> exit
$ cd /u01/app/oracle/fast_recovery_area/O*/a*/*25
$ pwd
/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2013_11_25
$ ls -ltr
total 64840
-rw-r—– 1 oracle oinstall 43124224 Nov 25 02:00 o1_mf_1_78_995xf1p2_.arc
-rw-r—– 1 oracle oinstall 23157248 Nov 25 10:54 o1_mf_1_79_996wopqy_.arc
-rw-r—– 1 oracle oinstall 1024 Nov 25 10:54 o1_mf_1_80_996woxcv_.arc
-rw-r—– 1 oracle oinstall 1024 Nov 25 10:54 o1_mf_1_81_996woylb_.arc
-rw-rw—- 1 oracle oinstall 0 Nov 25 10:56 sample.txt
-rw-r—– 1 oracle oinstall 15360 Nov 25 10:56 o1_mf_1_82_996wsnd3_.arc
-rw-r—– 1 oracle oinstall 1024 Nov 25 10:56 o1_mf_1_83_996wsoh7_.arc
-rw-r—– 1 oracle oinstall 1024 Nov 25 10:56 o1_mf_1_84_996wsplg_.arc
$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Mon Nov 25 11:37:41 2013

Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
$ umask u=rwx,g=rw,o=
$ umask
0017
$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Mon Nov 25 11:00:16 2013

Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Mon Nov 25 11:00:39 2013

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 839282688 bytes
Fixed Size 2231128 bytes
Variable Size 629146792 bytes
Database Buffers 205520896 bytes
Redo Buffers 2383872 bytes
Database mounted.
Database opened.
SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> exit
$ cd /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2013_11_25
$ ls -ltr
total 65596
-rw-r—– 1 oracle oinstall 43124224 Nov 25 02:00 o1_mf_1_78_995xf1p2_.arc
-rw-r—– 1 oracle oinstall 23157248 Nov 25 10:54 o1_mf_1_79_996wopqy_.arc
-rw-r—– 1 oracle oinstall 1024 Nov 25 10:54 o1_mf_1_80_996woxcv_.arc
-rw-r—– 1 oracle oinstall 1024 Nov 25 10:54 o1_mf_1_81_996woylb_.arc
-rw-rw—- 1 oracle oinstall 0 Nov 25 10:56 sample.txt
-rw-r—– 1 oracle oinstall 15360 Nov 25 10:56 o1_mf_1_82_996wsnd3_.arc
-rw-r—– 1 oracle oinstall 1024 Nov 25 10:56 o1_mf_1_83_996wsoh7_.arc
-rw-r—– 1 oracle oinstall 1024 Nov 25 10:56 o1_mf_1_84_996wsplg_.arc
-rw-r—– 1 oracle oinstall 209408 Nov 25 10:58 o1_mf_1_85_996wxyrs_.arc
-rw-r—– 1 oracle oinstall 1024 Nov 25 10:58 o1_mf_1_86_996wxzyc_.arc
-rw-r—– 1 oracle oinstall 1024 Nov 25 10:58 o1_mf_1_87_996wy114_.arc
-rw-r—– 1 oracle oinstall 2048 Nov 25 10:58 o1_mf_1_88_996wy2lz_.arc
-rw-rw—- 1 oracle oinstall 525312 Nov 25 11:01 o1_mf_1_89_996x1yvp_.arc
-rw-rw—- 1 oracle oinstall 1024 Nov 25 11:01 o1_mf_1_90_996x22hd_.arc
-rw-rw—- 1 oracle oinstall 1024 Nov 25 11:01 o1_mf_1_91_996x2481_.arc
-rw-rw—- 1 oracle oinstall 4096 Nov 25 11:01 o1_mf_1_92_996x26tq_.arc
$

Advertisements
Categories: Oracle DBA
%d bloggers like this: