Posts

Showing posts from 2011

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.log

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

Data Pump parameter

Keyword Description (Default) ------------------------------------------------------------------------------ ATTACH Attach to existing job, e.g. ATTACH [=job name]. CONTENT Specifies data to unload where the valid keywords are: (ALL), DATA_ONLY, and METADATA_ONLY. DIRECTORY Directory object to be used for dumpfiles and logfiles. DUMPFILE List of destination dump files (expdat.dmp), e.g. DUMPFILE=scott1.dmp, scott2.dmp, dmpdir:scott3.dmp. ESTIMATE Calculate job estimates where the valid keywords are: (BLOCKS) and STATISTICS. ESTIMATE_ONLY Calculate job estimates without performing the export. EXCLUDE Exclude specific object types, e.g. EXCLUDE=TABLE:EMP. FILESIZE Specify the size of each dumpfile in units of bytes. FLASHBACK_SCN SCN used to set session snapshot back to. FLASHBACK_TIME

Patch - Oracle Patch by Opatch Utility

In this Doc I am appliyimg a patch which is provided by Oracle Support through opatch utility. $ unzip -d . p10319478_10205_HPUX-IA64*.zip -----this is a example of patch Archive:   p10319478_10205_HPUX-IA64[1].zip ----Unzip the pacth    creating: ./10319478/    creating: ./10319478/files/    creating: ./10319478/files/lib/    creating: ./10319478/files/lib/libserver10.a/   inflating: ./10319478/files/lib/libserver10.a/kzul.o   inflating: ./10319478/files/lib/libserver10.a/kss.o   inflating: ./10319478/files/lib/libserver10.a/kstt.o    creating: ./10319478/etc/    creating: ./10319478/etc/config/   inflating: ./10319478/etc/config/inventory.xml   inflating: ./10319478/etc/config/actions.xml   inflating: ./10319478/etc/config/deploy.xml    creating: ./10319478/etc/xml/   inflating: ./10319478/etc/xml/GenericActions.xml   inflating: ./10319478/etc/xml/ShiphomeDirectoryStructure.xml   inflating: ./10319478/README.txt $ pwd    --- To see the path of patch /u01/home/oracle/product/

Recovery Steps for OCR using physical backups

Use the following procedure to restore OCR on UNIX-based systems: Identify the OCR backups by using the ocrconfig -showbackup command. You can execute this command from any node as user oracle. The output tells you on which node and which path to retrieve automatically generated backups. Review the contents of the backup by using ocrdump -backupfile file_name , where file_name is the name of the backup file. Stop Oracle Clusterware on all the nodes of your cluster by executing the crsctl stop crs command on all the nodes as the root user. Perform the restore by applying an OCR backup file that you identified in step one using the following command as the root user, where file_name is the name of the OCR file that you want to restore. Make sure that the OCR devices that you specify in the OCR configuration file (/etc/oracle/ocr.loc) exist and that these OCR devices are valid before

Re-Create ASM Diskgroups (Metalink)

In this Document Purpose Scope and Application Steps to Re-Create ASM Diskgroups Step 1: Ensure that you have a prior RMAN backup of all databases using ASM Step 2: Shutdown your ASM instance(s) Step3: Use DD to clear the metadata from ASM disks Step 4: Re-create your ASM disk group(s) Step 5: Restore database References Applies to: Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.1.0.7 - Release: 10.1 to 11.1 Information in this document applies to any platform. Purpose To provide a method of re-creating ASM diskgroups. Scope and Application This document is intended for DBAs and Support Engineers who need to re-create ASM diskgroups. Steps to Re-Create ASM Diskgroups In the event you cannot mount your ASM disk groups, you will be unable to start any databases using those disk groups. Here is a possible error reported when mounting ASM disk groups: SQL> startup mount ORA-15032: not all alterations performed ORA-15063: diskgroup "<

Stop Oracle Clusterware or Cluster Ready Services Processes

               Stop Oracle Clusterware or Cluster Ready Services Processes If you are modifying an Oracle Clusterware or Oracle Cluster Ready Services (CRS) installation, then shut down the following Oracle Database 10g services. Step to Stop RAC System. 1.        Shut down any processes in the Oracle home on each node that might be accessing a database; for example, shut down Oracle Enterprise Manager Database Control. 2.        Shut down all Oracle RAC instances on all nodes. To shut down all Oracle RAC instances for a database, enter the following command, where db_name is the name of the database: ORACLE_HOME \BIN\srvctl stop database -d <Database Name> 3.        Shut down all ASM instances on all nodes. To shut down an ASM instance, enter the following command, where node is the name of the node where the ASM instance is running: ORCALE_HOME \bin\srvctl stop asm -n node 4.        Stop all node applications on all nodes. To stop node applications running on a node, enter

Oracle 10G Silent Installation

Step to Install - Oracle 10G Silent Installation Step :- Pre-requisites Kernel Paramters settings and Creation of Oracle user and groups. Step :- Mount CD or allocate Oracle software as per requirment. Step :- To create a response file, start the OUI with the following command and perform an installation as normal. ./runInstaller -record -destinationFile /tmp/10gR2.rsp Description :- The "-record" parameter tells the installer to write to the response file and the "-destinationFile" parameter defines the name and location of the response file.The response files are quite large, containing a large number of parameters and comments. The 10gR2.rsp file is an example of a response file from an Oracle Database 10g installation generated by the previous command. Step :- A silent installation is initiated using the following command. ./runInstaller -silent -responseFile /tmp/10gR2.rsp Description :- The "-silent" parameter indicates that this is a silent in