funny tnsnames.ora entry story-SID or service_name?

Really funny
I simply waste few hours.. My tnsnames.ora entry not able to connect to requested DB ..shoots ORA-12154 error that is TNS:could not resolve service name .. On all the blogs they generally say the same old explanation.

Solution :
Just change from SID to SERVICE_NAME (Thanks to my colleague for his past experience).
I changed from
(SID = cwsapp_dev) to (SERVICE_NAME = cwsapp_dev) ..thats it.

–Manzoor A.Mirza.

Posted in Administration | Tagged , , , | Leave a comment

Peer not authenticated for RAC- Grid Control Agent Installation Bug.

I just want to Re Install  Grid Control Agent as to upgrade  to (FYI- No patch available to upgrade agent from to ).

Error: peer not authenticated for RAC on HPUX.  (Its a bug in Grid Control agent Installer..)

Cause:During the installation of Agent software we entered wrong password for Grid repository Database (Management server for sysman). Expected behavior,  installer should complain for wrong password, but its take that password and complain after all the installation completed as mention error.
Solution :
step 1    :     first check whether agent is secure or unsecure.
# emctl secure(or unsecure) agent;
#emctl secure agent [registration password];
– When you try to secure agent as mention above
It will ask for sysman password (Please enter correct password here..).

Step 2    :    Open Oracle Enterprise Manager (Grid Control) > select Databases tab
> select Name of the effected Database name  > click on Configure > follow  the                      steps as guided by GUI. (Note: GUI ask for DBSNMP password during configuration.)  Wait for few minutes Grid discovered your DB again..

–Thanks and Regards

Manzoor A. Mirza.

Posted in GRID Control | Tagged , , | Leave a comment

Points to Ponder

Points to ponder

:) Don’t compare yourself with any one in this world. If you compare, you are insulting yourself.
:) Don’t complain about others; change yourself if you want peace.
:) It is easier to protect your feet with slippers than to cover the earth with carpet.
:) No one can go back and change a bad beginning, but anyone can start now and create a successful ending.
:) Easy is to judge the mistakes of others. Difficult is to recognize our own mistakes.
:) If a problem can be solved, no need to worry about it. If a problem cannot be solved what is the use of worrying?
:) “Changing The Face” can change nothing. But “Facing the Change” Can change everything.
:) Be bold when you loose and be calm when you win.
:) No one will manufacture a lock without a key. Similarly ALLAH won’t give problems without solutions.
:) Every successful person has a painful story. Every painful story has a successful ending. Accept the pain and get ready for success.
:) Heated gold becomes ornament. Beaten copper becomes wires. So the more pain your get in life you become more valuable.
:) Mistakes are painful when they happen. But year’s later collection of mistakes is called experience, which leads to success.
:) Life laughs at you when you are unhappy.
:) Life smiles at you when you are happy.
:) Life salutes you when you make others happy.
:) If you miss an opportunity don’t fill the eyes with tears. It will hide another better opportunity in front of you.


–Manzoor A.Mirza

Posted in Uncategorized | Tagged , , , | Leave a comment

killing expdp/impdp job.

killing expdb/impdb job.

some time it was really necessary  to terminate  a expdb/impdp jobs because of any valid reason which impact database.

here are the steps for quick references, how can we terminate the expdp/impdp job,which you really wants to terminate.

step 1:  take the job_name from below views
select * from USER_DATAPUMP_JOBS;

step 2: try to attach to that job_name which you find out in step1.

oracle@aa: /u02/backups # impdp system/***** attach=test_DUMP11(job_name)

step 3:  stop job immediate


–Manzoor A.Mirza.

Posted in Administration | Tagged | Leave a comment



In Oracle/PLSQL, the instr function returns the location of a substring in a string.

The syntax for the instr Oracle function is:

instr( string1, string2 [, start_position [, nth_appearance ] ] )

string1 is the string to search AND string2 is the substring to search for in string1.

start_position is the position in string1 where the search will start. This argument is optional. If omitted, it defaults to 1.
The first position in the string is 1. If the start_position is negative, the function counts back start_position number of characters from the end of string1 and then searches towards the beginning of string1.

nth_appearance is the nth appearance of string2. This is optional. If omitted, it defaults to 1.

In Oracle/PLSQL, the substr functions allows you to extract a substring from a string.

The syntax for the substr function is:

substr( string, start_position, [ length ] )

string is the source string.

start_position is the position for extraction. The first position in the string is always 1.

length is optional. It is the number of characters to extract. If this parameter is omitted, substr will return the entire string.

–Manzoor A.Mirza.

Posted in SQL-PL/SQL | Tagged , , | Leave a comment

create new oraInst.loc file for client on existing DB machine.

–Create new oraInst.loc file..

Issue : when we try to install client on HP-UX machine where a database is already installed. Installer try to check for oraInventory file to overwrite its registry, which is not accepted.

Solution : we need to create separate oracleInst. inventory file as metnion below for client.

step 1: create the new file oraInst.loc under <client_home_location>/oraInventory,     which contain
bobject@ebizwily: <client_home_location>/oraInventory # more oraInst.loc


step 2: execute the installer by assigning the path as below

./runInstaller -invPtrLoc <client_home_location>/oraInventory/oraInst.loc ORACLE_HOSTNAME=ebizwily

–Manzoor A.Mirza

Posted in Installation | Tagged | Leave a comment

Issue while configuring OracleText component

–while configure oracleText component on oracle 10g R2, as requested by the developer -.IP and host name of some of mahcine on grid control is changes to default or something else(It look like a bug in grid control for oracle 10g R2 ).


We need to check and update the IPs or Hostname or port for specific down listener, and restart to it.

–what is Oracle Text:

Oracle Text enables text queries through SQL and PL/SQL from most Oracle interfaces. By installing Oracle Text with an Oracle Database server, client tools such as SQL*Plus, Oracle Forms, and Pro*C/C++ are able to retrieve and manipulate text in Oracle Database.

Oracle Text manages textual data in concert with traditional data types in Oracle Database. When text is inserted, updated, or deleted, Oracle Text automatically manages the change.

Configure ORACLE TEXT using GUI(dbca)

OPEN Xmanager window
> open terminal >>check for xclock >
(set oracle_sid where you want to work );
>run dbca utility >
>then follow GUI utility and select Oracle text.>


Configuring Oracle Text Using Command-Line Tools

–Manually configuring Oracle Database for use with Oracle Text consists of creating a tablespace for Oracle Text data dictionary tables and then creating username ctxsys and Oracle Text data dictionary tables.
1.Start SQL*Plus:
oracle@eippd : sqlplus /NOLOG

2.Connect to Oracle Database with account SYSDBA:

3.Create a tablespace for Oracle Text data dictionary tables:
SQL> CREATE TABLESPACE tablespace_name DATAFILE ‘ORACLE_BASE\oradata\db_name\drsys01.dbf’ SIZE 80m;

4.Connect AS SYSDBA:

5.Run script dr0csys.sql to create username ctxsys:
SQL> @ORACLE_BASE\ORACLE_HOME\ctx\admin \dr0csys.sql password default_tablespace_name temporary_tablespace_name;

*password is the password that you intend to use for username ctxsys.
* default_tablespace_name is the default tablespace for Oracle Text data dictionary tables. Set the default tablespace to the value of tablespace_name in step 3.
*temporary_tablespace_name is the temporary tablespace for Oracle Text data dictionary tables. Set the temporary tablespace to the value of tablespace_name in step 3.
6.Connect as ctxsys:
SQL> CONNECT ctxsys/password
7. Run script dr0inst.sql to create and populate Oracle Text data dictionary tables:
SQL> @ORACLE_BASE\ORACLE_HOME\bin\dr0inst.sql;

8.Run the language-specific default script, where xx is the language code (for example, us):
SQL> @ORACLE_BASE\ORACLE_HOME\ctx\admin\defaults\drdefxx.sql;

9.Exit SQL*Plus:

–Manzoor A.Mirza

Posted in Administration | Tagged , , , | 7 Comments