Posts

Showing posts from May, 2007

restoring a complete database via ASM in RAC environment

stop all cluster resources Linux> sudo crsctl stop crs create a temporary init.ora file init.ora ====== db_name=nplprd1  <== in RAC use instance name!!!! Linux> export ORACLE_SID=nplprd1 RMAN> startup nomount pfile=/tmp/init.ora; RMAN> run { allocate channel a DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=nplprd,OB2BARLIST=nplprd_weekly)' FORMAT 'nplprd_weekly<nplprd_%s:%t:%p>.dbf'; # we are using Data Protector restore spfile; shutdown immediate; startup nomount; # starting up using the restored spfile restore controlfile; alter database mount; # mounting with the restored controlfile configure channel 1 device type disk clear; # Clear service information configure channel 2 device type disk clear restore database; recover database; alter database open RESETLOGS; configure channel 1 device type sbt_tape connect 'sys/<password>@nplprd1'; # returning the definitions were cleared configure

Changing archive location intergrating of OMF on ASM & RMAN

While I checked the file location of the archives, I discovered unneeded aliases   ASMCMD [+] > cd +DATA/nplprd ASMCMD [+DATA/nplprd] > ls -l Type           Redund  Striped  Time             Sys  Name                                                       1_12_621591104.dbf => +DATA/nplprd/archivelog/2007_05_10/thread_1_seq_12.295.622220233                                                  Y    ARCHIVELOG/                                                  Y    CHANGETRACKING/                                                  Y    CONTROLFILE/                                                  Y    DATAFILE/                                                  Y    ONLINELOG/                                                  Y    PARAMETERFILE/                                                  Y    TEMPFILE/                                                  N    spfilenplprd.ora => +DATA/NPLPRD/PARAMETERFILE/spfile.272.621591209   Looking at the initializatio

RMAN in RAC environment

Configuring parameters in RMAN ========================== RMAN> CONFIGURE BACKUP OPTIMIZATION ON; RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON; RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE SBT_TAPE CONNECT 'SYS/ <password> @nplprd1'; # for RAC RMAN> CONFIGURE CHANNEL 2 DEVICE TYPE SBT_TAPE CONNECT 'SYS/ <password> @nplprd2'; # for RAC RMAN> CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE'; RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2; RMAN> CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2; RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 84 DAYS;   T he configuration are written into the control file and then synced to the catalog. Y ou can view the configured parameters via the command SHOW ALL   RMAN> show all;   RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION ON; CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE'; CONFIGURE C

Datapump NOT RUNNING & master table

Monitoring  the progress of data pump jobs, we discovered some old jobs that is no longer relevant.   SQL > set lines 100 SQL > col OWNER_NAME for a10 SQL > col JOB_NAME  for a21 SQL > col  OPERATION for a10 SQL > col JOB_MODE for a10  SQL > SELECT   2       owner_name   3      ,job_name   4      ,operation   5      ,job_mode   6      ,state   7    FROM dba_datapump_jobs;   OWNER_NAME JOB_NAME              OPERATION  JOB_MODE   STATE ---------- --------------------- ---------- ---------- ----------- YOAV_B     SYS_EXPORT_FULL_01    EXPORT     FULL       NOT RUNNING SYSTEM     FULL_EXPORT           EXPORT     FULL       NOT RUNNING SYSTEM     SYS_EXPORT_SCHEMA_01  EXPORT     SCHEMA     NOT RUNNING 3 rows selected.   since the datapump job is stopped or killed and not needed any more, we decided to drop the master table   SQL > drop table YOAV_B.SYS_EXPORT_FULL_01 PURGE;   Table dropped.   SQL  > SELECT   2       owner_nam