Home » RDBMS Server » Server Administration » Please help - FORMS not connecting to Oracle DB,
Please help - FORMS not connecting to Oracle DB, [message #60936] Mon, 15 March 2004 08:50 Go to next message
Gayatri
Messages: 19
Registered: January 2003
Junior Member
I keep getting a variety of TNS errors and ORACLE errors when I attempt to connect to the database from the SQL PLUS connect dialog box, the main ones being:

ORA-12545 Connect failed because target host or object does not exist

and

ORA-12154: "TNS:could not resolve service name"

(1) My first query is could the source of the problem be the fact that  I have Forms 6i for Windows NT and Oracle 8i for WINDOWS 2000. Are the 2 products compatible? My OS is Windows 2000.

(2) The second blunder is that I am not at all sure which directory listener.ora and sqlnet.ora and tnsnames.ora are supposed to be in. The tnsnames.ora and the sqlnet.ora files in my case are available in the c:orantnet80admin folder, whereas the listener.ora file is available in the c:orantnet80tnsapi folder. Is this OK? Or should listener.ora be in the same folder as tnsnames.ora and sqlnet.ora?

---------------------------------------------------------------------------------------

The contents of my files are as follows:

tnsnames.ora: PRAHLAD.GAYATRI is the Global Database name, whereas the SID is only PRAHLAD. KRISHNA is the name of my PC. Is this entry right?:

PRAHLAD.GAYATRI = 



(DESCRIPTION =  



 (ADDRESS_LIST =



  (ADDRESS = (PROTOCOL = TCP)(HOST = KRISHNA)(PORT = 1521))



)



    (CONNECT_DATA = (SERVICE_NAME = PRAHLAD)



)



)



 

Beq-local.world =



  (DESCRIPTION =



    (ADDRESS_LIST =



        (ADDRESS =



          (COMMUNITY = beq.world)



          (PROTOCOL = BEQ)



          (PROGRAM = oracle73)



          (ARGV0 = oracle73ORCL)



          (ARGS = '(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')



        )



    )



    (CONNECT_DATA = (SID = ORCL)



    )



  )



Tcp-loopback.world =



  (DESCRIPTION =



    (ADDRESS_LIST =



        (ADDRESS =



          (COMMUNITY = tcp.world)



          (PROTOCOL = TCP)



          (Host = 127.0.0.1)



          (Port = 1521)



        )



    )



    (CONNECT_DATA = (SID = ORCL)



    )



  )



Example1.world =



  (DESCRIPTION =



    (ADDRESS_LIST =



        (ADDRESS =



          (COMMUNITY = tcp.world)



          (PROTOCOL = TCP)



          (Host = Production1)



          (Port = 1521)



        )



    )



    (CONNECT_DATA = (SID = SID1)



    )



  )



Example2.world =



  (DESCRIPTION =



    (ADDRESS_LIST =



        (ADDRESS =



          (COMMUNITY = spx.world)



          (PROTOCOL = SPX)



          (Service = Server_lsnr)



        )



    )



    (CONNECT_DATA = (SID = ORCL)



    )



  )



Example3.world =



  (DESCRIPTION =



    (ADDRESS_LIST =



        (ADDRESS =



          (COMMUNITY = nmp.world)



          (PROTOCOL = NMP)



          (Server = FinanceServer1)



          (Pipe = ORAPIPE)



        )



    )



    (CONNECT_DATA = (SID = ORCL)



    )



  )

-------------------------------------------------------------------------------------

SQLNET.ora:

# SQLNET.ORA Network Configuration File: C:orantnet80adminsqlnet.ora



# Generated by Oracle configuration tools.



 

SQLNET.AUTHENTICATION_SERVICES= (NTS)



 

NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)



I have tried connecting to the database after commenting out all the lines in this file, following a response in the archives. It doesn't work.

-----------------------------------------------------------------------------------

LISTENER.ora:

################



# Filename......: listener.ora



# Node..........: local.world



# Date..........: 24-MAY-94 13:23:20



################



LISTENER =



  (ADDRESS_LIST =



       



      (ADDRESS=



          (PROTOCOL= IPC)



          (KEY= oracle.world)



        )



        (ADDRESS=



          (PROTOCOL= IPC)



          (KEY= ORCL)



        )



        (ADDRESS=



          (COMMUNITY= TCP.world)



          (PROTOCOL= TCP)



          (Host= KRISHNA)



          (Port= 1521)



        )



  )



STARTUP_WAIT_TIME_LISTENER = 0



CONNECT_TIMEOUT_LISTENER = 10



TRACE_LEVEL_LISTENER = OFF



SID_LIST_LISTENER =



  (SID_LIST =



    (SID_DESC =



      (SID_NAME =PRAHLAD)



          )



    (SID_DESC =



      (SID_NAME =PRAHLAD)



          )



  )



PASSWORDS_LISTENER = (oracle)

I believe that this is the file (listener.ora) that is creating the problem, but I'm clueless about how to fix this.

--------------------------------------------------------------------------------------
names:

# C:ORANTNET80ADMINNAMES.ORA Configuration File:c:orantnet80adminnames.ora



# Generated by Oracle Net8 Assistant



 

NAMES.SERVER_NAME = PRAHLAD

 

NAMES.ADDRESSES =



  (ADDRESS = (PROTOCOL = TCP)(HOST = KRISHNA)(PORT = 1521))



 

 

NAMES.ADMIN_REGION =



  (REGION =



    (DESCRIPTION =



      (ADDRESS = (PROTOCOL = TCP)(HOST = KRISHNA)(PORT = 1521))



      (CONNECT_DATA = (SID = PRAHLAD)(Server = Dedicated))



    )



    (USERID = SYS)



    (PASSWORD = change_on_install)



    (NAME = LOCAL_REGION)



    (REFRESH = 86400)



    (RETRY = 60)



    (EXPIRE = 600)



    (VERSION = 134230016)



  )



---------------------------------------------------------------------------------------

Please help me fix this thing. I am a newbie and this is getting to be too much for me. Thanks in advance.

 

 

 

 

 
Re: Please help - FORMS not connecting to Oracle DB, [message #60938 is a reply to message #60936] Mon, 15 March 2004 14:56 Go to previous messageGo to next message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
Gayatri,
Are the client(Forms) and Server(Database) on the same node ? in two different ORACLE_HOMEs ?

Local connections shouldnt need a listener or tnsnames,although it should work OK,as long as your configuration is correct.

First,make sure your database service is up[[Check Start-->Programs-->Control Panel-->Admnistrative tools-->Services-->OracleHome81Prahalad or wherever the Services is]]. If not bring it up and make sure you are able to connect to the database using sqlplus. Do not use tns connect string at this time,just the username and password.

Listener is needed only on the Server and hence you shouldnt start it from the client's ORACLE_HOME. It should be in C:orantnet80adminlistener.ora, if thats your Server ORACLE_HOME.

Use the following syntax for listener entry in listener.ora
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = Krishna)(PORT = 1521))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = prahlad))
      )
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (ORACLE_HOME = c:orant)
      (SID_NAME = prahlad)
    )
  )


Once you have configured as above,start the listener services from the ControlPanel. The service name will be named like OracleHome81TNSListener. After starting the listener process,you are ready to connect to the database via Net 8.

Couple of config files on the client come into play when connecting through sqlnet(Net8). tnsnames.ora and sqlnet.ora

USe the following in your tnsnames.ora


PRAHLAD = 
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = Krishna)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = prahlad)
    )
  )



and the following in your sqlnet.ora

#SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)

Once you are able to connect through sqlplus and Net8, you can then start troubleshooting Forms connection. IF they are installed on separate ORACLE_HOME's, first connect to the database using Server's Oracle_home sqlplus and then the Forms's Oracle_home sqlplus and finally Forms itself.

Hope this helps
Thiru
Re: Please help - FORMS not connecting to Oracle DB, [message #60939 is a reply to message #60938] Mon, 15 March 2004 18:46 Go to previous messageGo to next message
Gayatri
Messages: 19
Registered: January 2003
Junior Member
Thiru,

Thanks a tonne for your help. Can you give me a little more advice?

Forms 60 and Personal Oracle 8i DB are on different homes. Forms is installed in C:ORANT, and Oracle DB on D:ORANT (named ORANT although it is DB for Win 2000 OS).

I am able to connect to database from the command prompt in the D:ORANT (ORACLE 8i's home directory) and also from the Database's SQL PLUS icon. I am successfully able to connect to the database from the command prompt in the C:ORANTFORMS60 (Forms 6i home directory).

However, when I attempt to connect to the database from FORMS's SQLPLUS icon (Programs-Start-Oracle for Windows NT - SQLPLUS 8, installed in C:ORANT or Forms home), it gives me 2 errors,

(1) First attempt to connect to db using SQLPLUS icon gives:

ERROR:
ORA-12154: TNS:could not resolve service name

(2) Second attempt to connect to db using the SQLPLUS icon gives:

ERROR:
ORA-12203: TNS:unable to connect to destination

(3) and the third attempt crashes the SQLPLUS icon!

And of course, using connect dialog in forms 60 Object Navigator gives the same error

(1) ERROR:
ORA-12154: TNS:could not resolve service name

My doubt is, how am I able to connect to database from FORMS 6i home directory from the command prompt, but not from SQLPLUS icon in the same directory? Should I have a copy of tnsnames.ora, listener.ora and sqlnet.ora for the FORMS60 home, C:ORANTNET8ADMIN directory, also? If yes, can they be a copy of my existing files in the D:ORANTNETWORKADMIN? If not, could you please give me a copy of sample tnsnames.ora, listener.ora and sqlnet.ora to be installed in FORMS home?

Please advice. Thanks a lot for spending your time and energy in helping me resolve this issue.
Re: Please help - FORMS not connecting to Oracle DB, [message #60940 is a reply to message #60939] Mon, 15 March 2004 19:40 Go to previous messageGo to next message
Anatol Ciolac
Messages: 113
Registered: December 2003
Senior Member
You can simply copy you tnsnames.ora from <db_orahome>networkadmin to FORM TAG REMOVED s_orahome>networkadmin and this will work. Connect as you are connecting to db.
Re: Please help - FORMS not connecting to Oracle DB, [message #61770 is a reply to message #60938] Wed, 26 May 2004 06:37 Go to previous message
Maish
Messages: 1
Registered: May 2004
Junior Member
I am using oracle 8i and I have just installed Oracle Forms developer 6i into my stand alone PC.

How do I go about configuring the forms to connect to my databse in the satnd alone PC?

Thanks
Previous Topic: IDENTIFIED GLOBALLY AS external_name - CREATE USER statment.
Next Topic: How to monitor query in Oracle
Goto Forum:
  


Current Time: Fri Sep 27 12:17:19 CDT 2024