Wednesday, September 28, 2011

Sql Server Survival Guide

Friday, April 8, 2011

how to recover lost datafile without backup of that datafile

article by Steve

sql>alter database create datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\DEMO\USERS02.DBF';

sql>recover datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\DEMO\USERS02.DBF';

Monday, April 4, 2011

oracle Table Fragmentation

Sunday, April 3, 2011

wait events

Thursday, March 31, 2011

About Bind Variable

Bind variable peeking:

Statistics gathering..

Objects are considered stale when 10% of the total rows have been changed. When you issue GATHER_TABLE_STATS with GATHER STALE, the procedure checks the USER_TAB_MODIFICATIONS view. If a monitored table has been modified more than 10%, then statistics are gathered again. The information about changes of tables, as shown in the USER_TAB_MODIFICATIONS view, can be flushed from the SGA into the data dictionary with the DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO procedure.

Monday, March 28, 2011

OEM Grid Control..

nice presentation

Oracle Grid control componenets:

- Repository database
- OMS, oralce management service
- EM agent

OMS (This is a J2EE application deployed on Oracle Application Server 10g), components of OMS:

- Oracle HTTP Server
- Oracle Application Server Containers for Java (OC4J)
- OracleAS Web Cache.

Therefore, Grid Control is a reduced version of Oracle Application Server itself.

use Oracle Process Management Notification Control , OPMNCTL
or dcmctl (Distributed Configuration Management Control).
This is in addition to the Enterprise Manager Control (emctl) utility

/app/oracle/instancename/oms10g/opmn/bin > ./opmnctl status

Processes in Instance: EnterpriseManager0.hostname
ias-component | process-type | pid | status
HTTP_Server | HTTP_Server | 23058 | Alive
LogLoader | logloaderd | N/A | Down
dcm-daemon | dcm-daemon | N/A | Down
OC4J | home | 23059 | Alive
OC4J | OC4J_EMPROV | 23060 | Alive
OC4J | OC4J_EM | 23061 | Alive
OC4J | OCMRepeater | 23064 | Alive
WebCache | WebCache | 23071 | Alive
WebCache | WebCacheAdmin | 23070 | Alive
DSA | DSA | N/A | Down

here OC4J_EM is only a single Unix process with its own PID


Configuring the management agent:

•The file in the sysman/ directory

This file contains the global variables for the Management Agent. For most installations, the following two parameters need to be modified:


This is the location of the Oracle Management Service where you want the Management Agent to register.


This is the location and port where you want the Management Agent to listen for communications from clients.

•The targets.xml file in the sysman/directory

This file contains the information about the local system and its database instances. It is in XML format and needs to be customized. Although the Management Agent attempts to configure this file, z/OS differences may not permit it to do so.

emctl start agent

emctl upload

emctl stop agent

Number of Files to Upload:
This metric shows the number of XML files that are in the $ORACLE_HOME/sysman/emd/upload directory waiting to be uploaded to the repository

Friday, March 25, 2011