17 Haziran 2012 Pazar

Exhausted space of FRA


I  had recovered my database prior article.  First job  will do after   especially Database have been recovered through Point In Time Recovery (PITR)  take clean a full backup.
Ok I’m connecting to RMAN  now. And I’m trying  take a  the Whole backup.

RMAN> backup  incremental  level 0 database plus archivelog ;
Starting backup at 13-JUN-12
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=75 device type=DISK
archived log +XFRA/xdb/archivelog/2012_01_31/thread_1_seq_20.260.774009069 not found or out of sync with catalog
trying alternate file for archived log of thread 1 with sequence 20
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=19 RECID=23 STAMP=774385020
input archived log thread=1 sequence=20 RECID=24 STAMP=774385020
input archived log thread=1 sequence=21 RECID=25 STAMP=774385026
channel ORA_DISK_1: starting piece 1 at 13-JUN-12
channel ORA_DISK_1: finished piece 1 at 13-JUN-12
piece handle=+XFRA/xdb/backupset/2012_06_13/annnf0_tag20120613t172937_0.270.785870979 tag=TAG20120613T172937 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=1 RECID=26 STAMP=774402257
input archived log thread=1 sequence=2 RECID=27 STAMP=774402273
input archived log thread=1 sequence=3 RECID=28 STAMP=774402285
input archived log thread=1 sequence=4 RECID=29 STAMP=774485129
input archived log thread=1 sequence=5 RECID=30 STAMP=774986496
input archived log thread=1 sequence=6 RECID=31 STAMP=774986847
input archived log thread=1 sequence=7 RECID=32 STAMP=775694209
input archived log thread=1 sequence=8 RECID=33 STAMP=776307636
input archived log thread=1 sequence=9 RECID=34 STAMP=777764646
input archived log thread=1 sequence=10 RECID=35 STAMP=777766030
input archived log thread=1 sequence=11 RECID=36 STAMP=778189286
input archived log thread=1 sequence=12 RECID=37 STAMP=778194862
input archived log thread=1 sequence=13 RECID=38 STAMP=778195606
input archived log thread=1 sequence=14 RECID=39 STAMP=778196078
input archived log thread=1 sequence=15 RECID=40 STAMP=778788265
input archived log thread=1 sequence=16 RECID=41 STAMP=778810018
input archived log thread=1 sequence=17 RECID=42 STAMP=779829506
input archived log thread=1 sequence=18 RECID=43 STAMP=780101654
input archived log thread=1 sequence=19 RECID=44 STAMP=780105657
input archived log thread=1 sequence=20 RECID=45 STAMP=782004447
channel ORA_DISK_1: starting piece 1 at 13-JUN-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 06/13/2012 17:29:55
ORA-19504: "+XFRA" dosyas? yarat?lamad?
ORA-17502: ksfdcre:4 Dosya +XFRA yarat?lam?yor
ORA-15041: diskgroup "XFRA" space exhausted

Problem solving:
DELETE OBSOLETE:
Our FRA space exausted due to old backups . We’ll  connect to RMAN to regain the space available .
 To destruction of old backups using command.
RMAN> delete  obsolete ;
using target database control file instead of recovery catalog
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=12 device type=DISK
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set           7      31-JAN-12
  Backup Piece       7      31-JAN-12          /u01/app/oracle/product/11.2.0/dbhome_1/dbs/08n24r8b_1_1
Archive Log          19     31-JAN-12          +XFRA/xdb/archivelog/2012_01_31/thread_1_seq_20.260.774009069
Backup Set           8      31-JAN-12
  Backup Piece       8      31-JAN-12          +XFRA/xdb/autobackup/2012_01_31/s_774008306.265.774008309
Datafile Copy        1      04-FEB-12          /u01/app/oracle/oradata/*.dbf
Backup Set           9      31-JAN-12
  Backup Piece       9      31-JAN-12          +XFRA/xdb/backupset/2012_01_31/annnf0_tag20120131t103219_0.259.779141
Datafile Copy        2      04-FEB-12          /u01/app/oracle/oradata/XDB/datafiles
Datafile Copy        17     04-FEB-12          +XDATA/xdb/datafile/undotbs1.258.751571183
Datafile Copy        18     04-FEB-12          +XDATA/xdb/datafile/users.259.751571183
Datafile Copy        16     04-FEB-12          +XDATA/xdb/datafile/sysaux.257.751571183
Datafile Copy        15     04-FEB-12          +XDATA/xdb/datafile/system.256.751571183
Archive Log          23     04-FEB-12          +XFRA/xdb/archivelog/2012_02_04/thread_1_seq_19.267.774385021
Archive Log          24     04-FEB-12          +XFRA/xdb/archivelog/2012_02_04/thread_1_seq_20.268.774385021
Archive Log          25     04-FEB-12          +XFRA/xdb/archivelog/2012_02_04/thread_1_seq_21.269.774385021
Backup Set           10     04-FEB-12
  Backup Piece       10     04-FEB-12          +XFRA/xdb/autobackup/2012_02_04/s_774385090.273.774385099
Backup Set           11     04-FEB-12
  Backup Piece       11     04-FEB-12          +XFRA/xdb/autobackup/2012_02_04/s_774387232.274.774387255
Backup Set           13     04-FEB-12
  Backup Piece       13     04-FEB-12          +XFRA/xdb/autobackup/2012_02_04/s_774401567.276.774401569
Backup Set           14     05-FEB-12
  Backup Piece       14     05-FEB-12          +XFRA/xdb/autobackup/2012_02_05/s_774403732.280.774403735
Backup Set           15     19-FEB-12
  Backup Piece       15     19-FEB-12          +XFRA/xdb/autobackup/2012_02_19/s_775695397.285.775695399
Backup Set           16     20-FEB-12
  Backup Piece       16     20-FEB-12          +XFRA/xdb/autobackup/2012_02_20/s_775701108.286.775701109
Backup Set           17     23-FEB-12
  Backup Piece       17     23-FEB-12          +XFRA/xdb/autobackup/2012_02_23/s_776024388.287.776024391
Backup Set           18     24-MAR-12
  Backup Piece       18     24-MAR-12          +XFRA/xdb/autobackup/2012_03_24/s_778803339.266.778803349
Backup Set           19     05-APR-12
  Backup Piece       19     05-APR-12          +XFRA/xdb/autobackup/2012_04_05/s_779828662.264.779828679
Backup Set           20     05-APR-12
  Backup Piece       20     05-APR-12          +XFRA/xdb/autobackup/2012_04_05/s_779836493.263.779836499
Backup Set           21     30-APR-12
  Backup Piece       21     30-APR-12          +XFRA/xdb/autobackup/2012_04_30/s_782005304.262.782005307
Backup Set           22     01-MAY-12
  Backup Piece       22     01-MAY-12          +XFRA/xdb/autobackup/2012_05_01/s_782093507.299.782093509
Backup Set           24     13-JUN-12
  Backup Piece       24     13-JUN-12          +XFRA/xdb/backupset/2012_06_13/annnf0_tag20120613t172937_0.270.780979

Do you really want to delete the above objects (enter YES or NO)? Y
deleted backup piece
backup piece handle=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/08n24r8b_1_1 RECID=7 STAMP=774008076
deleted backup piece
backup piece handle=+XFRA/xdb/autobackup/2012_01_31/s_774008306.265.774008309 RECID=8 STAMP=774008308
deleted backup piece
backup piece handle=+XFRA/xdb/backupset/2012_01_31/annnf0_tag20120131t103219_0.259.774009141 RECID=9 STAMP=774000
deleted datafile copy
datafile copy file name=+XDATA/xdb/datafile/undotbs1.258.751571183 RECID=17 STAMP=774384337
deleted datafile copy
datafile copy file name=+XDATA/xdb/datafile/users.259.751571183 RECID=18 STAMP=774384337
deleted datafile copy
datafile copy file name=+XDATA/xdb/datafile/sysaux.257.751571183 RECID=16 STAMP=774384337
deleted datafile copy
datafile copy file name=+XDATA/xdb/datafile/system.256.751571183 RECID=15 STAMP=774384337
deleted archived log
archived log file name=+XFRA/xdb/archivelog/2012_02_04/thread_1_seq_19.267.774385021 RECID=23 STAMP=774385020
deleted archived log
archived log file name=+XFRA/xdb/archivelog/2012_02_04/thread_1_seq_20.268.774385021 RECID=24 STAMP=774385020
deleted archived log
archived log file name=+XFRA/xdb/archivelog/2012_02_04/thread_1_seq_21.269.774385021 RECID=25 STAMP=774385026
deleted backup piece
backup piece handle=+XFRA/xdb/autobackup/2012_02_04/s_774385090.273.774385099 RECID=10 STAMP=774385097
deleted backup piece
backup piece handle=+XFRA/xdb/autobackup/2012_02_04/s_774387232.274.774387255 RECID=11 STAMP=774387254
deleted backup piece
backup piece handle=+XFRA/xdb/autobackup/2012_02_04/s_774401567.276.774401569 RECID=13 STAMP=774401569
deleted backup piece
backup piece handle=+XFRA/xdb/autobackup/2012_02_05/s_774403732.280.774403735 RECID=14 STAMP=774403734
deleted backup piece
backup piece handle=+XFRA/xdb/autobackup/2012_02_19/s_775695397.285.775695399 RECID=15 STAMP=775695399
deleted backup piece
backup piece handle=+XFRA/xdb/autobackup/2012_02_20/s_775701108.286.775701109 RECID=16 STAMP=775701109
deleted backup piece
backup piece handle=+XFRA/xdb/autobackup/2012_02_23/s_776024388.287.776024391 RECID=17 STAMP=776024390
deleted backup piece
backup piece handle=+XFRA/xdb/autobackup/2012_03_24/s_778803339.266.778803349 RECID=18 STAMP=778803348
deleted backup piece
backup piece handle=+XFRA/xdb/autobackup/2012_04_05/s_779828662.264.779828679 RECID=19 STAMP=779828679
deleted backup piece
backup piece handle=+XFRA/xdb/autobackup/2012_04_05/s_779836493.263.779836499 RECID=20 STAMP=779836499
deleted backup piece
backup piece handle=+XFRA/xdb/autobackup/2012_04_30/s_782005304.262.782005307 RECID=21 STAMP=782005306
deleted backup piece
backup piece handle=+XFRA/xdb/autobackup/2012_05_01/s_782093507.299.782093509 RECID=22 STAMP=782093509
deleted backup piece
backup piece handle=+XFRA/xdb/backupset/2012_06_13/annnf0_tag20120613t172937_0.270.785870979 RECID=24 STAMP=785878
Deleted 23 objects
RMAN-06207: WARNING: 3 objects could not be deleted for DISK channel(s) due
RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212:   Object Type   Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Archivelog      +XFRA/xdb/archivelog/2012_01_31/thread_1_seq_20.260.774009069
RMAN-06214: Datafile Copy   /u01/app/oracle/oradata/*.dbf
RMAN-06214: Datafile Copy   /u01/app/oracle/oradata/XDB/datafiles

RMAN> crosscheck backup
using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=+XFRA/xdb/backupset/2012_02_04/nnndn0_tag20120204t232950_0.275.774401393 RECID=12 STAMP=774492
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=+XFRA/xdb/autobackup/2012_06_13/s_785870392.272.785870397 RECID=23 STAMP=785870397
Crosschecked 2 objects 
2. If you have got  more space capacity  then you try increment   size of the FRA.
SQL> show parameter db_recover_
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      +XFRA
db_recovery_file_dest_size           big integer 5G
SQL> alter system set db_recovery_file_dest_size=7G scope=both;
System altered.
SQL>exit
Oracle@mhm~>RMAN TARGET /
you can  simply take full backup of a database following below command.
RMAN>backup database;
Starting backup at 13-JUN-12
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=75 device type=DISK
archived log +XFRA/xdb/archivelog/2012_01_31/thread_1_seq_20.260.774009069 not found or out of sync with catalog
trying alternate file for archived log of thread 1 with sequence 20
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=19 RECID=23 STAMP=774385020
input archived log thread=1 sequence=20 RECID=24 STAMP=774385020
input archived log thread=1 sequence=21 RECID=25 STAMP=774385026
channel ORA_DISK_1: starting piece 1 at 13-JUN-12
channel ORA_DISK_1: finished piece 1 at 13-JUN-12
piece handle=+XFRA/xdb/backupset/2012_06_13/annnf0_tag20120613t172937_0.270.785870979 tag=TAG20120613T172937 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=1 RECID=26 STAMP=774402257
input archived log thread=1 sequence=2 RECID=27 STAMP=774402273
input archived log thread=1 sequence=3 RECID=28 STAMP=774402285
input archived log thread=1 sequence=4 RECID=29 STAMP=774485129
input archived log thread=1 sequence=5 RECID=30 STAMP=774986496
input archived log thread=1 sequence=6 RECID=31 STAMP=774986847
input archived log thread=1 sequence=7 RECID=32 STAMP=775694209
input archived log thread=1 sequence=8 RECID=33 STAMP=776307636
input archived log thread=1 sequence=9 RECID=34 STAMP=777764646
input archived log thread=1 sequence=10 RECID=35 STAMP=777766030
input archived log thread=1 sequence=11 RECID=36 STAMP=778189286
input archived log thread=1 sequence=12 RECID=37 STAMP=778194862
input archived log thread=1 sequence=13 RECID=38 STAMP=778195606
input archived log thread=1 sequence=14 RECID=39 STAMP=778196078
input archived log thread=1 sequence=15 RECID=40 STAMP=778788265
input archived log thread=1 sequence=16 RECID=41 STAMP=778810018
input archived log thread=1 sequence=17 RECID=42 STAMP=779829506
input archived log thread=1 sequence=18 RECID=43 STAMP=780101654
input archived log thread=1 sequence=19 RECID=44 STAMP=780105657
input archived log thread=1 sequence=20 RECID=45 STAMP=782004447
channel ORA_DISK_1: starting piece 1 at 13-JUN-12
finished.

13 Haziran 2012 Çarşamba

ORA- 03113 End of file during database startup


 ORA- 03113 End of file during startup 
This error can occur due to different  problems.  Therefore check alert log file.
  


Hello, I will mention my problem.And we will try solve  this problem together.


i have oracle 11 gR2 standalone database in Oracle linux OS. After I have rebooted the OS i can' t access my database .

Oracle database is starting in mount mode but it cant start open mode.

  The following error message below in this mode:

ORA-03113: end-of-file on communication channel

 I checked my alert log  Through OS  text editor program.  Online redo log files and  their mirrors  in differ paths.   The Database is  in archive mode  and   online log file 3  can’ t archieved.





For solve this problem we will use PITR( Point in time recovery) method via RMAN.  I m not use Catalog database.
Ok. We are connecting to RMAN below:
rman target /
RMAN>

We are checking  valid  the recoverable backups.

RMAN> list backup recoverable;

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
22      Full    9.36M      DISK        00:00:04     01-MAY-12
        BP Key: 22   Status: AVAILABLE  Compressed: NO  Tag: TAG20120501T001147
        Piece Name: +XFRA/xdb/autobackup/2012_05_01/s_782093507.299.782093509
  SPFILE Included: Modification time: 30-APR-12
  SPFILE db_unique_name: XDB
  Control File Included: Ckp SCN: 1222523      Ckp time: 01-MAY-12

I signed  that SCN  is 1222523 when backup have been taken. I will use this scn number.
 I will Run command in RMAN tool. You can execute  more lines at one time between Run {} command .
Finally, the folowing below:
If you want  set until time  <date> inside of  until scn .  I prefer  Scn number.

RMAN> run {
2> set until scn 1222523;
3> restore database;
4> recover database;
5> }

channel ORA_DISK_1: restoring datafile 00001 to u01/app/oracle/oradata/XDB/datafile/system01.                                                                          dbf
channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/XDB/datafile/sysaux01.                                                                          dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/XDB/datafile/undotbs01                                                                          .dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/XDB/datafile/users01.d                                                                          bf
channel ORA_DISK_1: reading from backup piece +XFRA/xdb/backupset/2012_02_04/nnndn0_tag2012020                                                                          4t232950_0.275.774401393
channel ORA_DISK_1: piece handle=+XFRA/xdb/backupset/2012_02_04/nnndn0_tag20120204t232950_0.27                                                                          5.774401393 tag=TAG20120204T232950
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:03:04
Finished restore at 13-JUN-12

Starting recover at 13-JUN-12
using channel ORA_DISK_1
starting media recovery

archived log for thread 1 with sequence 1 is already on disk as file +XFRA/xdb/archivelog/2012                                                                          _02_04/thread_1_seq_1.277.774402255
archived log for thread 1 with sequence 2 is already on disk as file +XFRA/xdb/archivelog/2012                                                                          _02_04/thread_1_seq_2.278.774402273
archived log for thread 1 with sequence 3 is already on disk as file +XFRA/xdb/archivelog/2012                                                                          _02_04/thread_1_seq_3.279.774402285
archived log for thread 1 with sequence 4 is already on disk as file +XFRA/xdb/archivelog/2012                                                                          _02_05/thread_1_seq_4.281.774485121
archived log for thread 1 with sequence 5 is already on disk as file +XFRA/xdb/archivelog/2012                                                                          _02_11/thread_1_seq_5.282.774986479
archived log for thread 1 with sequence 6 is already on disk as file +XFRA/xdb/archivelog/2012                                                                          _02_11/thread_1_seq_6.283.774986847
archived log for thread 1 with sequence 7 is already on disk as file +XFRA/xdb/archivelog/2012                                                                          _02_19/thread_1_seq_7.284.775694209
archived log for thread 1 with sequence 8 is already on disk as file +XFRA/xdb/archivelog/2012                                                                          _02_27/thread_1_seq_8.288.776307623
archived log for thread 1 with sequence 9 is already on disk as file +XFRA/xdb/archivelog/2012                                                                          _03_12/thread_1_seq_9.289.777764633
archived log for thread 1 with sequence 10 is already on disk as file +XFRA/xdb/archivelog/201                                                                          2_03_12/thread_1_seq_10.290.777766019
archived log for thread 1 with sequence 11 is already on disk as file +XFRA/xdb/archivelog/201                                                                          2_03_17/thread_1_seq_11.291.778189273
archived log for thread 1 with sequence 12 is already on disk as file +XFRA/xdb/archivelog/201                                                                          2_03_17/thread_1_seq_12.292.778194849
archived log for thread 1 with sequence 13 is already on disk as file +XFRA/xdb/archivelog/201                                                                          2_03_17/thread_1_seq_13.293.778195573
archived log for thread 1 with sequence 14 is already on disk as file +XFRA/xdb/archivelog/201                                                                          2_03_17/thread_1_seq_14.294.778196007
archived log for thread 1 with sequence 15 is already on disk as file +XFRA/xdb/archivelog/201                                                                          2_03_24/thread_1_seq_15.295.778788259
archived log for thread 1 with sequence 16 is already on disk as file +XFRA/xdb/archivelog/201                                                                          2_03_25/thread_1_seq_16.296.778810005
archived log for thread 1 with sequence 17 is already on disk as file +XFRA/xdb/archivelog/201                                                                          2_04_05/thread_1_seq_17.297.779829497
archived log for thread 1 with sequence 18 is already on disk as file +XFRA/xdb/archivelog/201                                                                          2_04_08/thread_1_seq_18.298.780101645
archived log for thread 1 with sequence 19 is already on disk as file +XFRA/xdb/archivelog/201                                                                          2_04_09/thread_1_seq_19.257.780105631
archived log for thread 1 with sequence 20 is already on disk as file +XFRA/xdb/archivelog/201                                                                          2_04_30/thread_1_seq_20.256.782004437
archived log file name=+XFRA/xdb/archivelog/2012_02_04/thread_1_seq_1.277.774402255 thread=1 s                                                                          equence=1
archived log file name=+XFRA/xdb/archivelog/2012_02_04/thread_1_seq_2.278.774402273 thread=1 s                                                                          equence=2
archived log file name=+XFRA/xdb/archivelog/2012_02_04/thread_1_seq_3.279.774402285 thread=1 s                                                                          equence=3
archived log file name=+XFRA/xdb/archivelog/2012_02_05/thread_1_seq_4.281.774485121 thread=1 s                                                                          equence=4
archived log file name=+XFRA/xdb/archivelog/2012_02_11/thread_1_seq_5.282.774986479 thread=1 sequence=5
archived log file name=+XFRA/xdb/archivelog/2012_02_11/thread_1_seq_6.283.774986847 thread=1 sequence=6
archived log file name=+XFRA/xdb/archivelog/2012_02_19/thread_1_seq_7.284.775694209 thread=1 sequence=7
archived log file name=+XFRA/xdb/archivelog/2012_02_27/thread_1_seq_8.288.776307623 thread=1 sequence=8
archived log file name=+XFRA/xdb/archivelog/2012_03_12/thread_1_seq_9.289.777764633 thread=1 sequence=9
archived log file name=+XFRA/xdb/archivelog/2012_03_12/thread_1_seq_10.290.777766019 thread=1 sequence=10
archived log file name=+XFRA/xdb/archivelog/2012_03_17/thread_1_seq_11.291.778189273 thread=1 sequence=11
archived log file name=+XFRA/xdb/archivelog/2012_03_17/thread_1_seq_12.292.778194849 thread=1 sequence=12
archived log file name=+XFRA/xdb/archivelog/2012_03_17/thread_1_seq_13.293.778195573 thread=1 sequence=13
archived log file name=+XFRA/xdb/archivelog/2012_03_17/thread_1_seq_14.294.778196007 thread=1 sequence=14
archived log file name=+XFRA/xdb/archivelog/2012_03_24/thread_1_seq_15.295.778788259 thread=1 sequence=15
archived log file name=+XFRA/xdb/archivelog/2012_03_25/thread_1_seq_16.296.778810005 thread=1 sequence=16
archived log file name=+XFRA/xdb/archivelog/2012_04_05/thread_1_seq_17.297.779829497 thread=1 sequence=17
archived log file name=+XFRA/xdb/archivelog/2012_04_08/thread_1_seq_18.298.780101645 thread=1 sequence=18
archived log file name=+XFRA/xdb/archivelog/2012_04_09/thread_1_seq_19.257.780105631 thread=1 sequence=19
archived log file name=+XFRA/xdb/archivelog/2012_04_30/thread_1_seq_20.256.782004437 thread=1 sequence=20
media recovery complete, elapsed time: 00:04:33
Finished recover at 13-JUN-12

As  without problem finished recover process  We are opening database open with resetlogs  Because  using resetlogs parameter,   log number  reset and starting 1 number.

RMAN> alter database open resetlogs;
database opened

31 Mayıs 2012 Perşembe

Unix komutları -7


Log Files

Solaris
Red Hat
Ubuntu/Debian
HP
AIX
messages
/var/adm/messages
/var/log/messages
/var/log/messages
/var/adm/syslog/syslog.log
/var/adm/ras
syslog
/var/log/syslog
/var/log/syslog
/var/log/syslog
/var/adm/syslog/syslog.log
/var/adm/ras
mail

/var/log/mail
/var/log/mail.*
/var/adm/syslog/mail.log
/usr/spool/mqueue/syslog
cron
/var/cron/log
/var/log/cron
/var/log/cron.log
/var/adm/cron/log
/var/adm/cron/log
boot
/var/adm/messages
dmesg
/var/log/boot
dmesg
/var/log/boot
dmesg
/var/adm/syslog/syslog.log
dmesg
/var/adm/ras

alog -o -t boot
alog -o -t console
alog -L  (list all the logs available)
Error logging
logger
logger
logger
logger
/usr/lib/errdemon -l (display attributes) 
/usr/lib/errdemon (start error logging)
 
/usr/lib/errstop (stop error logging)
# use with above errorlog file 
errpt (summary errorlog report)
errpt -a (detailed errorlog report)
errpt -j <identifier> (single errorlog report)

errclear (clears errorlog)
errclear -d <class><days> (clears class errors)

errlogger "message upto 230 chars"
 
Security

Solaris
Red Hat
Ubuntu/Debian
HP
AIX
Checking the passwd file
pwck
pwck
pwck
pwck
pwdck -t ALL 
usrck -t ALL
checking the group file
grpck
grpck
grpck
grpck
grpck
console login (allow/deny)
# No reboot required 
/etc/default/login
# No reboot required 
/etc/securetty
# No reboot required 
/etc/securetty
# No reboot required 
/etc/securetty

Note: you may need to create this file if it does not exist
# No reboot required
/etc/security/user

chsec -f /etc/security/user -s root
Misc

Solaris
Red Hat
Ubuntu/Debian
HP
AIX
startup
eeprom
setenv boot-device
grub (GUI)
lilo (text based)
grub (GUI)
setboot -p <primary path>
setboot -a <alternate path>

# autoboot sequnce
 
setboot -b [on|off]
bootlist -m normal hdisk0 hdisk1
shutdown
shutdown -i5 -g0 -y (power down)
shutdown -i6 -g0 -y (reboot)
shutdown -i0 -g0 -y (OK prompt)
reboot -- -r (reboot/reconfigure)

touch /reconfigure
shutdown -h (halt)
shutdown -r (reboot)
shutdown -f (fast reboot no fsck)
shutdown -F (force fsck)
shutdown -h (halt)
shutdown -r (reboot)
shutdown -P (power off)
touch /forcefsck
# edit /etc/default/rcS change below so 
# you dont have to hang around
 
FSCKFIX=yes
shutdown -h now (halt)
shutdown -r now(reboot)
shutdown -F (fast shutdown) 
shutdown -Fr (fast shutdown and reboot)
Change run level
halt
init
poweroff
reboot
shutdown
telinit
uadmin
halt
init
poweroff
reboot
shutdown
telinit
halt
init
poweroff
reboot
shutdown
telinit
init
reboot
shutdown
init
shutdown
reboot
 
telinit
halt
init status
0
1
2
3
4
5
6

0 - shutdown
1 - single user
2 - n/a
3 - Multi-user
4 - n/a
5 - power off
6 - reboot

# change default
vi /etc/inittab

0 - halt
1 - single user
2 - multiuser (no networking)
3 - multiuser (networking)
4 - unused
5 - GUI
6 - reboot

# change default
vi /etc/inittab

0 - halt
1 - single user
2 - multiuser (default)
3 - same as 2
 
4 - same as 2
 
5 - same as 2
 
6 - reboot
 



# change default - change all the telinit
 
vi /etc/event.d/rc-default

0 - halt
1 - single users
2 - multiuser (networking)
3 - multiuser (networking, NFS, and CDE GUI) (default)
 
4 - multiuser (netwrking, NFS, and VUE GUI)
5 - n/a
6 - n/a

# change default - change the initdefault line 
vi /etc/inittab

0 - reserved
 
1 - reserved
 
2 - multiuser mode with NFS
 
3 - user defined
 
4 - user defined
 
5 - user defined
 
6 - user defined
 
7-9 - user defined
# change default - change the initdefault line 
vi /etc/inittab
Startup options
-s single user
-a interactive
-x no device drivers (used in clustering)
 
-r reconfigure devices
-m milestone
single  - use grub to edit kernel line 
emergency - use grub to edit kernel line
 
linux rescue - use at the boot prompt
single: runlevel1, local fs mounted, no network
emergency: root fs read-only, no init files run
 
rescue: use cd-rom/network, root mounted as /mnt/sysimage
single  - use grub to edit kernel line 
emergency - use grub to edit kernel line
 
linux rescue - use at the boot prompt
single: runlevel1, local fs mounted, no network
emergency: root fs read-only, no init files run
 
rescue: use cd-rom/network, root mounted as /mnt/sysimage
interact with IPL? Y

# single user
 
ISL> hpux -is
# Logical volume maintanence mode 
ISL> hpux -lm

# No quroum check
ISL> hpux -lq
Based on 9114-275 workstation
1. switch off the machine

2. power on and enter the SMS menu

Note: to enter the SMS menu press numeric 1 after the word keyboard but before the word speaker
 


startup scripts
/etc/init.d

/etc/rc0.d - /etc/rc6.d
/etc/init.d

/etc/rc0.d - /etc/rc6.d
/etc/init.d

/etc/rc0.d - /etc/rc6.d
/sbin/init.d
/etc/rc.config.d (startup config files)
 

/sbin/rc0.d - /sbin/rc6.d
/etc/rc.d
/etc/rc.d/init.d

/etc/rc.d/rc2.d - rc9.d

/etc/rc.* (config files for auto-starting)
also uses the System Resource Controller
boot prompt commands
boot
printenv
setenv
banner
devalias
show-devs
show-pci-devs-all
 
probe-scsi-all
probe-fcal-all
probe-pci
 
watch-net-all
reset-all
F10 or F12
F10 or F12
interact with IPL? Y
Based on a 9114-275 workstation
1. switch off the machine

2. power on and enter the SMS menu

Note: to enter the SMS menu press numeric 1 after the word keyboard but before the word speaker
Boot process
Phases:
  • Boot PROM: displays system information, run POST, load bootblk, locate ufsboot
  • Boot Programs: bootblk loads and executes the ufsboot
  • Kernel Initialization: ufsboot loads and executes the core kernel, initializes core kernel data structures, loads other kernel modules based on the/etc/system file, starts/sbin/init program
  • init: starts other processes based on the /etc/inittab file
Boot sequence
1.     BIOS
2.     POST
3.     Master Boot Record (MBR) - point to the bootloader GRUB or LILO
4.     GRUB (stage 1) - point to GRUB stage 1_5
5.     GRUB (stage 1_5) - deals with specific filesystem types look at /boot/grub/*1_5 files
6.     GRUB (stage 2) – reads /etc/grub.conf and displays the grub menu, it specifies the kernel and the initrd files
7.     KERNEL - control given to the kernel
8.     INIT - reads /etc/inittab and runs /etc/rc.d/rc.sysinit script
Boot sequence
1.     BIOS
2.     POST
3.     Master Boot Record (MBR) - point to the bootloader GRUB or LILO
4.     GRUB (stage 1) - point to GRUB stage 1_5
5.     GRUB (stage 1_5) - deals with specific filesystem types look at /boot/grub/*1_5 files
6.     GRUB (stage 2) – reads /boot/grub/menu.lst and displays the grub menu, it specifies the kernel and the initrd files
7.     KERNEL - control given to the kernel
8.     INIT - runs the /etc/event.d/rc-default script
Phases:
1.     PDC - processor-dependent code; executes and performs self-tests
2.     ISL - initial system loader; loads the secondary system loader hpux
3.     HPUX - is the secondary system loader and loads the kernel /stand/vmunix, then hands over to the kernel
4.     KERNEL - swapper processes are started by the kernel then starts the init process
5.     INIT - reads /etc/inittab
Phases:
  • Read Only Storage (ROS): check the system board, perform POST, locate and load boot image, begin system initialization and execute phase 1 of the /etc/rc.boot script
  • Base Device Configuration: start configuration manager to configue base devices
  • System Boot: start init process phase 2, switch to hard-disk root filesystem, start other processes defined by /etc/inittab and execute phase 3 of the /etc/rc.boot script
determine the run level
who -r
runlevel
who -r
runlevel
who -r
who -r
who -r
obtain default run level
cat /etc/inittab
cat /etc/inittab
/etc/event.d/rc-default
/etc/inittab
/etc/inittab
list locale
locale -a
locale -a
locale -a
locale -a
locale -a
start xwindows
n/a
startx (shorthand of below)
initx (lots of parms)

n/a
n/a
initialize system
sys-unconfig


set_parms [initial|hostname|ip_address|timezone]

Note: set_parms is in /sbin
install_assist
Timezone
/etc/TIMEZONE
/etc/default/init
/etc/sysconfig/clock
/usr/share/zoneinfo/zone.tab
/etc/timezone
/usr/share/zoneinfo/zone.tab
/etc/TIMEZONE
/etc/environment
/etc/profile