Pages

Saturday, December 15, 2012

RMAN Catalog Backup Report

WITH bkp AS ( SELECT db_name, input_type, max(end_time) end_time FROM rman.rc_rman_backup_job_details WHERE end_time > sysdate - 1 GROUP BY input_type, db_name) SELECT b.db_name database, b.input_type, b.status, to_char(b.start_time,'DD-MON-YYYY HH24:MI') start_time, to_char(b.end_time,'DD-MON-YYYY HH24:MI') end_time, b.time_taken_display time_taken, b.output_device_type output_device, b.output_bytes_display bkp_size, b.output_bytes_per_sec_display "BKP_RATE/s" FROM rman.rc_rman_backup_job_details b, bkp a WHERE b.db_name = a.db_name and b.input_type = a.input_type and b.end_time = a.end_time ORDER BY b.input_type desc, b.db_name

Sunday, April 8, 2012

Centralized TNS Management

Oracle Internet Directory (OID) can be used to configure Oracle Net Services at no cost. It is now part of Oracle Identity Management Suite. This procedure simplifies the DBA life to manage service names centrally without installing the full suite.

Install Oracle Database with AL32UTF8 character set encoding.
Download Oracle Identity Management 11gR1 (11.1.1.6.0).
Start the installer.
$ ./runInstaller
In Welcome screen, click Next
In Install Software Updates screen, Select Skip software updates.
In Select Installation Type screen, Select Install and Configure option.
In Prerequisite Checks screen, Ensure that all prerequisites are met.
In Select Domain screen, Select Configure Without A Domain.

In Specify Installation Location screen, Specify the Oracle Middleware Home Location as /home/oracle/Middleware, Oracle Home Directory as Oracle_IDM1, Oracle Instance Location as /home/oracle/Middleware/asinst_1, and Oracle Instance Name as asinst_1.

In Configure Components screen, make sure only Oracle Internet Directory option is selected.

In Configure Ports screen, Select Auto Port Configuration. It uses ports 3060 and 3131 for OID server.
Select Create Schema, enter the database connection information in the Connect String field, enter SYS in the User Name field and enter password for SYS in Password field to create ODS schema.

In OID Passwords screen, provide password in ODS Schema Password field for other operations. Also provide password in ODSSM Schema Password field for system management tools (not for OID usage).

In Specify OID Adminstrator Password screen, Enter the location for Realm as dc=example,dc=com and provide the password for OID Administrator.

In Installation Summary screen, Click Install to begin the installation.


Next, Import TNS entries into OID (LDAP) via Oracle Net Manager after configuring the client.
Expand Service Naming
In Directory Server Authentication, enter user as cn=orcladmin and the password you
Command->Directory->Export Net Service Names

Select one or more of the net services names to migrate into the directory server.
Choose a directory naming context as <Directory Root>
Choose the Oracle Context as cn=OracleContext,dc=example,dc=com

To search the entries in LDAP
$ ldapsearch -h localhost -p 3060 -D cn=orcladmin -w password -b "cn=OracleContext,dc=example,dc=com" -s one "objectclass=orclNetService" orclnetdescstring

To start OID
$ /home/oracle/Middleware/asinst_1/bin/opmnctl startall
To stop OID
$ /home/oracle/Middleware/asinst_1/bin/opmnctl stopall

Client Configuration

ldap.ora tells to your Oracle client what OID server is called and which port it is listening on. If more than one OID server is running, simply comma separate the host names.

DIRECTORY_SERVERS=(oidserv1:3060:3131,oidserv2:3060:3131)
DEFAULT_ADMIN_CONTEXT="dc=example,dc=com"
DIRECTORY_SERVER_TYPE=OID

Configure sqlnet.ora to use ldap for TNS name resolution.

NAMES.DIRECTORY_PATH=(LDAP,TNSNAMES)


Sunday, January 15, 2012

Oracle Direct NFS Client

Direct NFS client includes two fundamental I/O optimizations to increase the performance.
1. It performs concurrent direct I/O that bypasses any OS cache.
2. It performs asynchronous I/O that allows processing to continue.

Make sure that the NFS file systems should be mounted and available over regular NFS mounts.

1. Create oranfstab file in $ORACLE_HOME/dbs.
Server - NFS Server name
Path - upto four network paths to NFS server, specified either by IP address or by name. The dNFS client performs load balancing across all specified paths. If one network path fails, dNFS client reissues commands over any remaining paths.
Export - Exported path from the NFS server
Mount - Local mount point for the NFS server

Typical file should be :
server: MyNFSserver
path: 10.72.3.1
path: 10.72.3.2
export: /vol/oradata mount:/u03/oradata

2. Enable dNFS
$ cd $ORACLE_HOME/lib
$ mv libodm11.so libodm11.so_stub
$ ln -s libnfsodm11.so libodm11.so