Two Oracle Connections

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
josimarz
Junior Boarder
Junior Boarder
Posts: 41
Joined: 14.09.2009, 17:29
Location: Brazil

Two Oracle Connections

Post by josimarz »

Hello!

I have an Oracle server with various schemes. Two of them are called:

JOE
FRANK

On the client computer I installed the Oracle Instant Client and TNSNAMES.ORA configured as follows:

Code: Select all

MYORA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = dev.orcl.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ORCL)
    )
  )
In connection component TZConnection I set the property as follows:

Code: Select all

object dbJOE: TZConnection
  Database = MYORA
  HostName = dev.orcl.com
  Password = mypassword
  Port = 1521
  Protocol = oracle
  User = JOE
end
However, I have one more component TZConnection in my application and during implementation want to open a new connection with the scheme FRANK setting the properties as follows:

Code: Select all

object dbFRANK: TZConnection
  Database = MYORA
  HostName = dev.orcl.com
  Password = mypassword
  Port = 1521
  Protocol = oracle
  User = FRANK
end
However, when calling the Connect method, the following error is raised:

Code: Select all

OCI_ERROR: ORA-12154
Opening a connection only works, but two simultaneous connections in different schemas does not work.

How can I do to have two simultaneous connections in ZEOS?

Greetings,
Josimar
josimarz
Junior Boarder
Junior Boarder
Posts: 41
Joined: 14.09.2009, 17:29
Location: Brazil

Post by josimarz »

I have searched on the internet the term "connect to oracle without tnsnames.ora". I noticed that you can connect to Oracle without the need to configure a TNSNAMES.ORA.

However, ZEOS appears necessary to have a TNSNAMES.ORA configured.

There is the possibility of connecting the ZEOS without TNSNAMES.ORA?

Thanks,

Josimar
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

josimarz,

I don't know why 2 simultanious connections are not wordking correctly.

Concerning running without tnsnames : did you try the solution proposed in this link : http://asktom.oracle.com/pls/asktom/f?p ... 3135081903 ?

Seems like putting all information in the dbname might succeed.

Mark
Image
Post Reply