Posts

Configuration of AWR report

AWR Reports (Automatic Workload Repository) For those who were to lazy to install Statspack - available since 8.1.5 - there is good news assuming you are on 10G and assuming you were also to lazy to modify the init parameter statistics_level (I don' t see until now many reasons to alter the default value of typical ). Since 10.1 there is a built in "super statspack". (statspack is still available). In stead of statspack reports we speak about AWR reports , in stead of statspack snapshots we speak about AWR snapshots. By default AWR s snapshot' s are taken every hour (AWR = Automatic Workload Repository ) Statistical information has been gathered and written to disk, towards the new sysaux tablespace by the new backgroundprocess MMON. ( MMON =Manageability Monitor ). Please note you can also take ADDM Reports We can still take a snapshot manually SQL> exec dbms_workload_repository.create_snapshot; PL/SQL procedure successfully completed. As well we can change ...

Data Recovery Advisor - Oracle 11G R2

Backup and Recovery Advice on data recovery, parallel backup of the same file, virtual catalogs for security, duplicate database from backup, undrop a tablespace, and secure backup to the cloud are just a few of the new gems available from RMAN in Oracle Database 11 g . Reference:- www.oracle.com Data Recovery Advisor Consider the error shown below: SQL> conn scott/tiger Connected. SQL> create table t (col1 number); create table t (col1 number) * ERROR at line 1: ORA-01116: error in opening database file 4 ORA-01110: data file 4: '/home/oracle/oradata/PRODB3/users01.dbf' ORA-27041: unable to open file Linux Error: 2: No such file or directory Additional information: 3 Does it look familiar? Regardless of your experience as a DBA, you probably have seen this message more than once. This error occurs because the datafile in question is not available—it could be corrupt or perhaps someone removed the file while the database was running. In any case, you need to...

Creating Physical Standby using RMAN Duplicate Without Shutting down The Primary

Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 10.2.0.4 - Release: 10.1 to 10.2 Information in this document applies to any platform. Oracle Server Enterprise Edition - Version: 10.2.0.1 to 10.2.0.4 Goal  - Ref Metalink ID - 789370.1 The following note describes step-by-step procedure to create physical standby by using RMAN duplicate without shutting down the primary (Production) database. Database Name :- prim Primary db_unique_name :- prim standby db_unique_name :- stdby Primary Hostname :- raca.idc.oracle.com standby Hostname :- core1.idc.oracle.com Solution 1.Enable force logging. 2.Create SRL(standby redo logs). 3.Make proper changes in the parameter file of primary. 4.Backup the database that includes backup of datafiles, archivelogs and controlfile for standby and copy the backups to standby server. 5.Create the parameter file for standby, 6.Establish the connectivity from primary to standby. 7. Move backup to standby. 8 and 9. Start the sta...

How to Configure Logging for EM 12c Management Agent

The goal of this article is to provide instruction on how to enable logging for the Enterprise Manager 12c Management Agent.. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The logging properties for the agent are stored in $EMSTATE/sysman/config/emd.properties file, same as in 11.1. But the properties that control logging follow the log4j configuration syntax instead of the syntax supported by the 11.1 agent. To active changes to the logging parameters, you can use either of the emctl commands: emctl reload agent emctl setproperty agent Overview Agent logging entries look similar to the standard log4j logging, with the only significant difference being the prefix 'Logger.' that you will see on each line. For example: # logging properties Logger.log4j.appender.Rolling=org.apache.log4j.RollingFileAppender Logger.lo...

Steps to HandlingBlock Corruption in Large Partitioned tables using EXCHANGE PARTITION method when no Backups available Metalink Note ID 1324772.1]

Goal of this DOC------- When a corruption is identified in a huge table partition block (e.g. ORA-01578), and we don't have backups (e.g. RMAN, OS level, Export, or any external resource) to recover the corruption, we can still try to salvage the remaining data in the table using 10231 event (with some possible data loss and inconsistency by skipping corrupted data blocks). One method to achieve this is: a) create a salvage table (using 10231 event) and insert data from corrupted partition (using CTAS or INSERT INTO SELECT...) : b) truncate the partition (using alter table truncate partition ) or DELETE the rows in partition c) Insert the data from salvage table to truncated corrupted partition (using INSERT INTO SELECT...) In above method, step c) will take significant amount of time depending on the number of rows in the partition i.e. if the table partition contains large number of rows. We can significantly reduce the time taken in step c) above by using EXCHANG...

How to flashback primary database in standby configuration.

Solution To Flashback primary database execute following steps : 1. Shutdown primary database . SQL> SHUTDOWN IMMEDIATE 2. Start primary database in mount stage SQL> STARTUP MOUNT 3. Flashback primary database to specified scn SQL> FLASHBACK DATABASE TO SCN ; 4. Open primary database with reset logs. SQL> ALTER DATABASE OPEN RESETLOGS; 5. Cancel media recovery on the standby database. SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; 6. Check current_scn on the standby database, If flashback scn is greater then current_scn then skip next step (step 7). SQL> SELECT CURRENT_SCN FROM V$DATABASE; 7. Flashback Standby database SQL> FLASHBACK STANDBY DATABASE TO SCN ; (on standby database) 8. Start managed recovery on the standby database . SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Configuration of AWR report

AWR Reports (Automatic Workload Repository) For those who were to lazy to install Statspack - available since 8.1.5 - there is good news assuming you are on 10G and assuming you were also to lazy to modify the init parameter statistics_level (I don' t see until now many reasons to alter the default value of typical ). Since 10.1 there is a built in "super statspack". (statspack is still available). In stead of statspack reports we speak about AWR reports , in stead of statspack snapshots we speak about AWR snapshots. By default AWR s snapshot' s are taken every hour (AWR = Automatic Workload Repository ) Statistical information has been gathered and written to disk, towards the new sysaux tablespace by the new backgroundprocess MMON. ( MMON =Manageability Monitor ). Please note you can also take ADDM Reports We can still take a snapshot manually SQL> exec dbms_workload_repository.create_snapshot; PL/SQL procedure successfully completed. As well we can change t...