Tuesday, March 22, 2011

ora-12154 error while patchup

a quick glance on the same error i have mentioned in my earlier post
ora-12154: tns could not resolve the connect identifier specifier .
This can also be caused when you are adding a patchset to a earlier version . once the patch is applied( you need to stop all the services before proceding with the patch apply) . you need to upgrade the databases that are present in the previous versions . be cautious to take database backup before you try to upgrade (the database backup can be done while you can upgrade the database by enabling the database backup option) . after upgrade start the DBconsole and listerner and try to login into database using dba privilages to start the database ........ :)

if still the error existing check your listener.ora and tnsnames.ora files . please follow the requried documents from OTN for upgrading a database

Friday, March 18, 2011

tricky error ora-12154

Oracle Database installation looks pretty simple but we feel frustrated when we have this error popping up while we connect to the DB

ora-12154: tns could not resolve the connect identifier specified

in some versions this can also be in this way ora-12154 : tns could not resolve the service name

the only way you will get this error is because of our great TNSNAMES.ORA and Listener.ORA files

four reasons behind this
  • The entry is missing from tnsnames.ora
  • The entry in tnsnames.ora is malformed
  • The program is using tnsnames.ora from the wrong ORACLE_HOME
  • The program is not using a fully-qualified service name, but no default domain is enabled in sqlnet.ora.
i have a simple solution for this . i will give you the sample contents ( major content of ORCL database) for windows platform

Check sqlnet.ora file

must look like this :

# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES = (NTS)

___________________________________________________________________

check tnsnames.ora file

must look like this:

ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Your_PC_NAME)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORCL)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = ORCL)
(PRESENTATION = RO)
)
)

ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = ORCL)
(PRESENTATION = RO)
)
)


________________________________________________________________

check listener.ora file

Must look like this:

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = F:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = F:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = YOUR_PC_NAME)(PORT = 1521))
)
)

DEFAULT_SERVICE_LISTENER = (ORCL)


____________________________________________________________________________

if any of your file doesn't match the criteria . please edit it carefully and then save it as .ora file

if you don't find any of these files after installation :) . please create three files using notepad and save it as .ora files with the same names as above .

then login into sqlplus or sql developer . try your luck . believe me you will succeed this time

Regards,

Naga

Saturday, January 22, 2011

7 sites for Oracle

  1. Oracle Tech Net - Oracle Tech Net (OTN) is the starting place fo all thing Oracle. Sing up here and get your Oracle SSO account. You can also sign up for news letters and the forums.
  2. Speaking of the forums, Oracle Technical Forums - There are plenty of forums out on the net, some better than others. I have yet to find one as comprehensive or as full of quality information as the OTN forums.
  3. Oracle Blogs - I get plenty of information from blogs these days. If you work for an unenlightened company (like I do), most of your favorite blogs are probably blocked. However, the oracle.com domain usually isn't blocked so you can get to the oracle blogs whenever you want.
  4. Oracle Learning Library - Can't get training? Get some online. Not as good as a class maybe but a blessing if you're just getting started.
  5. Oracle Documentation - Take a trip to tahiti. This is the Oracle site for all the documentation you might need for the database, application server and collaboration site, by version number. If you need a version not shown here you can get it from the product site on oracle.com but you might want to think about upgrading.
  6. Oracle News Aggregator - Finally getting off the oracle.com domain, we hit ORANA, the Oracle News Aggregator. This is a blog aggregator for all things Oracle. Unfortuantely, it also includes a lot of non-database stuff but it's pretty easy to filter. You can sign up for RSS or, as I do, follow it on twitter and catch things on the fly.
  7. Oracle-Base - There are a lot of blogs out there, just like there are a lot of discussion forums. Browse around, visit OraNA and you'll find them. Oracle-Base is a little different as it's sort of a blog, document repository and forum all in one. Spend some time here and you might be surprised about the topics you'll learn.

*** Finally dont ever miss to bookmark asktom.oracle.com . I rely in Tom Kyte more than Tim Hall, but they both have the amazing ability to distill issues into simple essentials