Connecting to a remote Oracle database

Hi everybody,

I'm using DOA 3.4 in Delphi 5 and I need to connect to a remote database via Internet. For that I need the Username, Password, Databasename and OracleSID (a IP address). In TOracleSession I have fields for the 3 first items, but the IP address I don't know where to insert it.

Can you help me please in this question ?

Best regards

Jo
 
The LogonDatabase should match an alias that is specified in the tnsnames.ora file. You can configure the tnsnames.ora file through the "Oracle Net Configuration Assistant". The alias will include the actual database name (Service Name), the protocol (TCP in this case), the host name / IP address, and the port number of the listener.

------------------
Marco Kalter
Allround Automations

[This message has been edited by mkalter (edited 17 July 2003).]
 
Dear Marco,

Thank you for your answer!

How can my remote application reach a remote machine without a IP address / Hostname in the LogonDatabase ? Can you give me an example of a remote LogonDatabase ?

Beste regards

Jo
 
If you check out your \Network\Admin\tnsnames.ora file, you will see entries like this:
Code:
SOMEALIAS =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 148.87.9.44)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = SOMEDB)
    )
  )
In this case the alias SOMEALIAS is defined for database instance SOMEDB on the host with IP address 148.87.9.44. You can connect to this remote database by specifying the alias (SOMEALIAS) in the LogonDatabase property.

I hope this helps.

------------------
Marco Kalter
Allround Automations
 
Back
Top