Oracle & ProC

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tellezd
    New Member
    • May 2007
    • 2

    Oracle & ProC

    Hi,
    I have ProC programs connecting to an Oracle 8.1.7.4 and 9.2.0.5 databases in a Solaris 8 OS

    The Database is in the same server as the programs.

    The connection to the DB within each program is made with this instruction: [EXEC SQL CONNECT :username IDENTIFIED BY : password;]

    My intention is to move the databases to a different server, an AIX 5.2

    My problem / question is: Is there a way to configure the Oracle Client so it knows that the database is in another server.

    I know that one solution is to change the connection instruction to: [EXEC SQL CONNECT :username IDENTIFIED BY : password AT :db_name USING :db_string;] but the problem is that I don't want to re-compile all my programs.

    Do you know if there's a way to solve this?
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Originally posted by tellezd
    Hi,
    I have ProC programs connecting to an Oracle 8.1.7.4 and 9.2.0.5 databases in a Solaris 8 OS

    The Database is in the same server as the programs.

    The connection to the DB within each program is made with this instruction: [EXEC SQL CONNECT :username IDENTIFIED BY : password;]

    My intention is to move the databases to a different server, an AIX 5.2

    My problem / question is: Is there a way to configure the Oracle Client so it knows that the database is in another server.

    I know that one solution is to change the connection instruction to: [EXEC SQL CONNECT :username IDENTIFIED BY : password AT :db_name USING :db_string;] but the problem is that I don't want to re-compile all my programs.

    Do you know if there's a way to solve this?
    I'm no expert but couldn't you just change the server in the TNSNames.ora file.

    Comment

    • tellezd
      New Member
      • May 2007
      • 2

      #3
      In this case this won't work.

      The problem is that the programs don't use the tnsnames.ora, they are connecting to the default database (the same server) and that is why they don't have de [Using] or the [AT] clauses.

      Comment

      • MMcCarthy
        Recognized Expert MVP
        • Aug 2006
        • 14387

        #4
        Originally posted by tellezd
        In this case this won't work.

        The problem is that the programs don't use the tnsnames.ora, they are connecting to the default database (the same server) and that is why they don't have de [Using] or the [AT] clauses.
        Sorry that is the extent of my knowledge on the subject. This is not my area of expertise. I will see what I can do to direct some of the Oracle experts in this direction.

        Comment

        • chandu031
          Recognized Expert New Member
          • Mar 2007
          • 77

          #5
          Originally posted by tellezd
          Hi,
          I have ProC programs connecting to an Oracle 8.1.7.4 and 9.2.0.5 databases in a Solaris 8 OS

          The Database is in the same server as the programs.

          The connection to the DB within each program is made with this instruction: [EXEC SQL CONNECT :username IDENTIFIED BY : password;]

          My intention is to move the databases to a different server, an AIX 5.2

          My problem / question is: Is there a way to configure the Oracle Client so it knows that the database is in another server.

          I know that one solution is to change the connection instruction to: [EXEC SQL CONNECT :username IDENTIFIED BY : password AT :db_name USING :db_string;] but the problem is that I don't want to re-compile all my programs.

          Do you know if there's a way to solve this?
          Hi ,

          I am no expert on this, but based on the documentation I went through, I can say that since you are not using tnsnames.ora for the connection , there is no way of letting the Oracle client know that there is a different server to connect to,other than registering that instance in the tnsnames.ora. Either you will have to connect via tnsnames.ora or you will have to use AT clause in your code(in which case you will have to recompile your code)

          Again , this is just based on my understanding.

          Hope your problem gets solved!!

          Comment

          Working...