Monday, May 27, 2013

changing SYSMAN password in OEM12c


#./emctl stop oms
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
Oracle Management Server is Down
#./emctl config oms -change_repos_pwd -use_sys_pwd -sys_pwd sys -new_pwd octco
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.

Changing passwords in backend ...
Passwords changed in backend successfully.
Updating repository password in Credential Store...
Successfully updated Repository password in Credential Store.
Restart all the OMSs using 'emctl stop oms -all' and 'emctl start oms'.
Successfully changed repository password.
#./emctl stop oms -all
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Already Stopped
AdminServer Successfully Stopped
Oracle Management Server is Down
#./emctl start oms
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
Starting Oracle Management Server...
Starting WebTier...
WebTier Successfully Started
Oracle Management Server Successfully Started
Oracle Management Server is Up
#

Tuesday, March 12, 2013

dba_free_space


Static view dba_free_space, mainly used for calculating the free space in any tablespace  (excluding temporary tablespace) will not display any row if tablespace is 100% used. 

Below is the test for undo tablespace, that is 100% utilized.

SQL> select file_id,bytes/1024 from dba_data_files where tablespace_name='UNDOTBS';

   FILE_ID BYTES/1024
---------- ----------
         3    8192000
        61    8192000
        62    8192000
        

SQL> select file_id,bytes/1024 from dba_free_space where tablespace_name='UNDOTBS';

no rows selected

SQL>

Thursday, February 28, 2013

Configuring the Primary database backup from DG database



[oracle@primary u01]$ rman | tee rman_offload_check.log

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Jan 25 08:49:27 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect catalog rman/rman@rman

connected to recovery catalog database

RMAN> connect target sys@JAY

target database Password:
connected to target database: JAY (DBID=2467455158)

RMAN> CONFIGURE DB_UNIQUE_NAME DGJAY CONNECT IDENTIFIER 'DGJAY';

new RMAN configuration parameters:
CONFIGURE DB_UNIQUE_NAME 'DGJAY' CONNECT IDENTIFIER  'DGJAY';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete

RMAN>  LIST DB_UNIQUE_NAME OF DATABASE;


List of Databases
DB Key  DB Name  DB ID            Database Role    Db_unique_name
------- ------- ----------------- ---------------  ------------------
2       JAY     2467455158       PRIMARY            JAY
2       JAY     2467455158       STANDBY           DGJAY

RMAN> list backup of database;

specification does not match any backup in the repository


RMAN>  list backup of database for  Db_unique_name  DGJAY;

specification does not match any backup in the repository

RMAN>

 Backup from DG database.

[oracle@secondary JAY]$ rman target sys@dgJAY catalog rman/rman@rman

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Jan 25 19:00:11 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

target database Password:
connected to target database: JAY (DBID=2467455158)
connected to recovery catalog database

RMAN> RESYNC CATALOG FROM DB_UNIQUE_NAME DGJAY;


RMAN> backup database plus archivelog;


Starting backup at 25-JAN-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=22 device type=DISK
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=291 RECID=322 STAMP=771248790
input archived log thread=1 sequence=292 RECID=323 STAMP=771248853
input archived log thread=1 sequence=293 RECID=324 STAMP=771248855
input archived log thread=1 sequence=294 RECID=325 STAMP=771248927
input archived log thread=1 sequence=295 RECID=326 STAMP=771248928
input archived log thread=1 sequence=296 RECID=327 STAMP=771258396
input archived log thread=1 sequence=297 RECID=328 STAMP=771258609
input archived log thread=1 sequence=298 RECID=329 STAMP=771258905
input archived log thread=1 sequence=299 RECID=330 STAMP=771259204
input archived log thread=1 sequence=300 RECID=331 STAMP=771259505
input archived log thread=1 sequence=301 RECID=332 STAMP=771259811
input archived log thread=1 sequence=302 RECID=333 STAMP=771260105
input archived log thread=1 sequence=303 RECID=334 STAMP=771260390
input archived log thread=1 sequence=304 RECID=335 STAMP=771260592
input archived log thread=1 sequence=305 RECID=336 STAMP=771260710
input archived log thread=1 sequence=306 RECID=337 STAMP=771261005
input archived log thread=1 sequence=307 RECID=338 STAMP=771261225
input archived log thread=1 sequence=308 RECID=339 STAMP=771263270
input archived log thread=1 sequence=309 RECID=340 STAMP=771263405
input archived log thread=1 sequence=310 RECID=341 STAMP=771263707
input archived log thread=1 sequence=311 RECID=342 STAMP=771264005
input archived log thread=1 sequence=312 RECID=343 STAMP=771264305
input archived log thread=1 sequence=313 RECID=344 STAMP=771264605
input archived log thread=1 sequence=314 RECID=345 STAMP=771264904
input archived log thread=1 sequence=315 RECID=346 STAMP=771265122
input archived log thread=1 sequence=316 RECID=347 STAMP=771268049
input archived log thread=1 sequence=317 RECID=348 STAMP=771268206
input archived log thread=1 sequence=318 RECID=349 STAMP=771268506
input archived log thread=1 sequence=319 RECID=350 STAMP=771268807
input archived log thread=1 sequence=320 RECID=351 STAMP=771269105
input archived log thread=1 sequence=321 RECID=352 STAMP=771269404
input archived log thread=1 sequence=322 RECID=353 STAMP=771269705
input archived log thread=1 sequence=323 RECID=354 STAMP=771270004
input archived log thread=1 sequence=324 RECID=355 STAMP=771270304
input archived log thread=1 sequence=325 RECID=356 STAMP=771270605
input archived log thread=1 sequence=326 RECID=357 STAMP=771270906
input archived log thread=1 sequence=327 RECID=358 STAMP=771271205
input archived log thread=1 sequence=328 RECID=359 STAMP=771271506
input archived log thread=1 sequence=329 RECID=360 STAMP=771271805
input archived log thread=1 sequence=330 RECID=361 STAMP=771272106
input archived log thread=1 sequence=331 RECID=362 STAMP=771272404
input archived log thread=1 sequence=332 RECID=363 STAMP=771272705
input archived log thread=1 sequence=333 RECID=364 STAMP=771273005
input archived log thread=1 sequence=334 RECID=365 STAMP=771273304
input archived log thread=1 sequence=335 RECID=366 STAMP=771273563
channel ORA_DISK_1: starting piece 1 at 25-JAN-13
channel ORA_DISK_1: finished piece 1 at 25-JAN-13
piece handle=/u01/bkup/JAY/ora_df771274960_s101_s1 tag=TAG20111230T281237 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
Finished backup at 25-JAN-13

Starting backup at 25-JAN-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/JAY/datafile/users01.dbf
input datafile file number=00001 name=/u01/JAY/datafile/system.dbf
input datafile file number=00002 name=/u01/JAY/datafile/sysaux.dbf
input datafile file number=00003 name=/u01/JAY/datafile/undotbs1.dbf
channel ORA_DISK_1: starting piece 1 at 25-JAN-13
channel ORA_DISK_1: finished piece 1 at 25-JAN-13
piece handle=/u01/bkup/JAY/ora_df771275005_s102_s1 tag=TAG20111230T190325 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:56
Finished backup at 25-JAN-13

Starting backup at 25-JAN-13
using channel ORA_DISK_1
specification does not match any archived log in the repository
backup cancelled because there are no files to backup
Finished backup at 25-JAN-13

Starting Control File and SPFILE Autobackup at 25-JAN-13
piece handle=/u01/bkup/JAY/c-2467455158-20111230-03 comment=NONE
Finished Control File and SPFILE Autobackup at 25-JAN-13

RMAN>

Manually deleting Primary datafile for backup testing

[oracle@primary JAY]$ sqlplus sys@JAY as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Dec 30 19:25:49 2011

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

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application JAYing options

SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
/u01/JAY/datafile/system.dbf
/u01/JAY/datafile/sysaux.dbf
/u01/JAY/datafile/undotbs1.dbf
/u01/JAY/datafile/users01.dbf

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application JAYing options
[oracle@primary JAY]$ mv /u01/JAY/datafile/users01.dbf /u01/JAY/datafile/users01.dbf.bkp
[oracle@primary JAY]$

Copying all the backup piece to primary from standby datatase box.
[oracle@secondary JAY]$ scp * oracle@primary:/u01/bkup/JAY
oracle@primary's password:
c-2467455158-20111230-03                                                                                                              100% 9952KB   9.7MB/s   00:01
ora_df771274960_s101_s1                                                                                                               100%  202MB   8.1MB/s   00:25
ora_df771275005_s102_s1                                                                                                               100%  729MB   9.0MB/s   01:21
[oracle@secondary JAY]$


[oracle@primary JAY]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 25 19:30:53 2011

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 2142679040 bytes
Fixed Size                  1337720 bytes
Variable Size             503318152 bytes
Database Buffers         1627389952 bytes
Redo Buffers               10633216 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: '/u01/JAY/datafile/users01.dbf'


SQL>exit

Recovery from DG backup for primary datafile.

[oracle@primary JAY]$ rman target sys@JAY catalog rman/rman@rman

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Jan 25 19:33:14 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

target database Password:
connected to target database: JAY (DBID=2467455158, not open)
connected to recovery catalog database

RMAN> list backup of database;

specification does not match any backup in the repository
RMAN>  list backup for db_unique_name DGJAY;

List of Backup Set for database with db_unique_name DGJAY
===================


BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
19026   202.44M    DISK        00:00:40     25-JAN-13
        BP Key: 19028   Status: AVAILABLE  Compressed: NO  Tag: TAG20111230T281237
        Piece Name: /u01/bkup/JAY/ora_df771274960_s101_s1

  List of Archived Logs in backup set 19026
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    291     3276590    25-JAN-13 3296594    25-JAN-13
  1    292     3296594    25-JAN-13 3296906    25-JAN-13
  1    293     3296906    25-JAN-13 3296910    25-JAN-13
  1    294     3296910    25-JAN-13 3296967    25-JAN-13
  1    295     3296967    25-JAN-13 3296970    25-JAN-13
  1    296     3296970    25-JAN-13 3319957    25-JAN-13
  1    297     3319957    25-JAN-13 3320270    25-JAN-13
  1    298     3320270    25-JAN-13 3320796    25-JAN-13
  1    299     3320796    25-JAN-13 3321375    25-JAN-13
  1    300     3321375    25-JAN-13 3321819    25-JAN-13
  1    301     3321819    25-JAN-13 3322168    25-JAN-13
  1    302     3322168    25-JAN-13 3322594    25-JAN-13
  1    303     3322594    25-JAN-13 3322952    25-JAN-13
  1    304     3322952    25-JAN-13 3322956    25-JAN-13
  1    305     3322956    25-JAN-13 3323380    25-JAN-13
  1    306     3323380    25-JAN-13 3323762    25-JAN-13
  1    307     3323762    25-JAN-13 3324350    25-JAN-13
  1    308     3324350    25-JAN-13 3324354    25-JAN-13
  1    309     3324354    25-JAN-13 3324693    25-JAN-13
  1    310     3324693    25-JAN-13 3325131    25-JAN-13
  1    311     3325131    25-JAN-13 3325635    25-JAN-13
  1    312     3325635    25-JAN-13 3326576    25-JAN-13
  1    313     3326576    25-JAN-13 3326969    25-JAN-13
  1    314     3326969    25-JAN-13 3327379    25-JAN-13
  1    315     3327379    25-JAN-13 3327679    25-JAN-13
  1    316     3327679    25-JAN-13 3327683    25-JAN-13
  1    317     3327683    25-JAN-13 3328074    25-JAN-13
  1    318     3328074    25-JAN-13 3328423    25-JAN-13
  1    319     3328423    25-JAN-13 3328888    25-JAN-13
  1    320     3328888    25-JAN-13 3329819    25-JAN-13
  1    321     3329819    25-JAN-13 3330168    25-JAN-13
  1    322     3330168    25-JAN-13 3330706    25-JAN-13
  1    323     3330706    25-JAN-13 3331224    25-JAN-13
  1    324     3331224    25-JAN-13 3331632    25-JAN-13
  1    325     3331632    25-JAN-13 3331987    25-JAN-13
  1    326     3331987    25-JAN-13 3332367    25-JAN-13
  1    327     3332367    25-JAN-13 3332768    25-JAN-13
  1    328     3332768    25-JAN-13 3333160    25-JAN-13
  1    329     3333160    25-JAN-13 3333599    25-JAN-13
  1    330     3333599    25-JAN-13 3333961    25-JAN-13
  1    331     3333961    25-JAN-13 3334379    25-JAN-13
  1    332     3334379    25-JAN-13 3334757    25-JAN-13
  1    333     3334757    25-JAN-13 3335100    25-JAN-13
  1    334     3335100    25-JAN-13 3335656    25-JAN-13
  1    335     3335656    25-JAN-13 3336049    25-JAN-13

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19027   Full    729.26M    DISK        00:02:48     25-JAN-13
        BP Key: 19029   Status: AVAILABLE  Compressed: NO  Tag: TAG20111230T190325
        Piece Name: /u01/bkup/JAY/ora_df771275005_s102_s1
  List of Datafiles in backup set 19027
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 3276592    25-JAN-13 /u01/JAY/datafile/system.dbf
  2       Full 3276592    25-JAN-13 /u01/JAY/datafile/sysaux.dbf
  3       Full 3276592    25-JAN-13 /u01/JAY/datafile/undotbs1.dbf
  4       Full 3276592    25-JAN-13 /u01/JAY/datafile/users01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19083   Full    9.70M      DISK        00:00:01     25-JAN-13
        BP Key: 19088   Status: AVAILABLE  Compressed: NO  Tag: TAG20111230T190622
        Piece Name: /u01/bkup/JAY/c-2467455158-20111230-03
  SPFILE Included: Modification time: 25-JAN-13
  SPFILE db_unique_name: DGJAY
  Standby Control File Included: Ckp SCN: 3276592      Ckp time: 25-JAN-13

RMAN> catalog start with '/u01/bkup/JAY';

searching for all files that match the pattern /u01/bkup/JAY

List of Files Unknown to the Database
=====================================
File Name: /u01/bkup/JAY/ora_df771274960_s101_s1
File Name: /u01/bkup/JAY/c-2467455158-20111230-03
File Name: /u01/bkup/JAY/ora_df771275005_s102_s1

Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /u01/bkup/JAY/ora_df771274960_s101_s1
File Name: /u01/bkup/JAY/c-2467455158-20111230-03
File Name: /u01/bkup/JAY/ora_df771275005_s102_s1

RMAN> restore datafile 4 from tag=TAG20111230T190325;

Starting restore at 25-JAN-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=14 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00004 to /u01/JAY/datafile/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/bkup/JAY/ora_df771275005_s102_s1
channel ORA_DISK_1: piece handle=/u01/bkup/JAY/ora_df771275005_s102_s1 tag=TAG20111230T190325
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:03:46
Finished restore at 25-JAN-13
RMAN> recover datafile 4;

Starting recover at 25-JAN-13
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 336 is already on disk as file /u01/archive/1_336_766348429.dbf
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=291
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=292
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=293
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=294
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=295
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=296
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=297
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=298
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=299
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=300
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=301
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=302
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=303
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=304
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=305
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=306
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=307
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=308
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=309
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=310
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=311
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=312
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=313
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=314
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=315
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=316
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=317
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=318
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=319
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=320
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=321
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=322
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=323
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=324
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=325
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=326
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=327
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=328
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=329
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=330
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=331
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=332
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=333
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=334
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=335
channel ORA_DISK_1: reading from backup piece /u01/bkup/JAY/ora_df771274960_s101_s1
channel ORA_DISK_1: piece handle=/u01/bkup/JAY/ora_df771274960_s101_s1 tag=TAG20111230T281237
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
archived log file name=/u01/archive/1_291_766348429.dbf thread=1 sequence=291
archived log file name=/u01/archive/1_292_766348429.dbf thread=1 sequence=292
archived log file name=/u01/archive/1_293_766348429.dbf thread=1 sequence=293
archived log file name=/u01/archive/1_294_766348429.dbf thread=1 sequence=294
archived log file name=/u01/archive/1_295_766348429.dbf thread=1 sequence=295
archived log file name=/u01/archive/1_296_766348429.dbf thread=1 sequence=296
archived log file name=/u01/archive/1_297_766348429.dbf thread=1 sequence=297
archived log file name=/u01/archive/1_298_766348429.dbf thread=1 sequence=298
archived log file name=/u01/archive/1_299_766348429.dbf thread=1 sequence=299
archived log file name=/u01/archive/1_300_766348429.dbf thread=1 sequence=300
archived log file name=/u01/archive/1_301_766348429.dbf thread=1 sequence=301
archived log file name=/u01/archive/1_302_766348429.dbf thread=1 sequence=302
archived log file name=/u01/archive/1_303_766348429.dbf thread=1 sequence=303
archived log file name=/u01/archive/1_304_766348429.dbf thread=1 sequence=304
archived log file name=/u01/archive/1_305_766348429.dbf thread=1 sequence=305
archived log file name=/u01/archive/1_306_766348429.dbf thread=1 sequence=306
archived log file name=/u01/archive/1_307_766348429.dbf thread=1 sequence=307
archived log file name=/u01/archive/1_308_766348429.dbf thread=1 sequence=308
archived log file name=/u01/archive/1_309_766348429.dbf thread=1 sequence=309
archived log file name=/u01/archive/1_310_766348429.dbf thread=1 sequence=310
archived log file name=/u01/archive/1_311_766348429.dbf thread=1 sequence=311
archived log file name=/u01/archive/1_312_766348429.dbf thread=1 sequence=312
archived log file name=/u01/archive/1_313_766348429.dbf thread=1 sequence=313
archived log file name=/u01/archive/1_314_766348429.dbf thread=1 sequence=314
archived log file name=/u01/archive/1_315_766348429.dbf thread=1 sequence=315
archived log file name=/u01/archive/1_316_766348429.dbf thread=1 sequence=316
archived log file name=/u01/archive/1_317_766348429.dbf thread=1 sequence=317
archived log file name=/u01/archive/1_318_766348429.dbf thread=1 sequence=318
archived log file name=/u01/archive/1_319_766348429.dbf thread=1 sequence=319
archived log file name=/u01/archive/1_320_766348429.dbf thread=1 sequence=320
archived log file name=/u01/archive/1_321_766348429.dbf thread=1 sequence=321
archived log file name=/u01/archive/1_322_766348429.dbf thread=1 sequence=322
archived log file name=/u01/archive/1_323_766348429.dbf thread=1 sequence=323
archived log file name=/u01/archive/1_324_766348429.dbf thread=1 sequence=324
archived log file name=/u01/archive/1_325_766348429.dbf thread=1 sequence=325
archived log file name=/u01/archive/1_326_766348429.dbf thread=1 sequence=326
archived log file name=/u01/archive/1_327_766348429.dbf thread=1 sequence=327
archived log file name=/u01/archive/1_328_766348429.dbf thread=1 sequence=328
archived log file name=/u01/archive/1_329_766348429.dbf thread=1 sequence=329
archived log file name=/u01/archive/1_330_766348429.dbf thread=1 sequence=330
archived log file name=/u01/archive/1_331_766348429.dbf thread=1 sequence=331
archived log file name=/u01/archive/1_332_766348429.dbf thread=1 sequence=332
archived log file name=/u01/archive/1_333_766348429.dbf thread=1 sequence=333
archived log file name=/u01/archive/1_334_766348429.dbf thread=1 sequence=334
media recovery complete, elapsed time: 00:00:02
Finished recover at 25-JAN-13

RMAN> alter database open;

database opened

RMAN> exit


Recovery Manager complete.

Recovery completes, checking primary database.

[oracle@primary JAY]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 25 19:47:58 2011

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application JAYing options

SQL> show parameter db_unique

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      JAY
SQL> select file#, status from v$datafile;

     FILE# STATUS
---------- -------
         1 SYSTEM
         2 ONLINE
         3 ONLINE
         4 ONLINE

SQL> select open_mode from v$database;

OPEN_MODE
--------------------
READ WRITE

SQL>

Friday, February 15, 2013

find hidden parameters


Query to check hidden parameters :

select ksppinm Name, ksppstvl Value from x$ksppi pi, x$ksppcv cv where cv.indx=pi.indx and ksppinm like '#_%' escape '#' order by 1;