Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    3

    Unanswered: JDBC connection to Oracle 9i RAC

    We are migrating from Ora 8.1.7 to 9i RAC. Our Java app currently connects to the 8.1.7 db via the oracle JDBC thin driver. In the process of migrating to 9i, I installed the Oracle client for 9i on my WinNT machine. Having done that, I cannot get SQL Plus for 9i to connect to the DB. SQL Plus fails with an illegal instruction (0xc000001d), address 0x0069662d. This is my first problem. Needless to say, any attempt to connect to the DB using an OCI connection from any of my Java apps also fails. If I could get this to work, I guess I would be happy.

    The other thing is that there does not seem to be a clean way to connect to the 9i RAC (clustered) database using the thin driver. The database URL used for the thin connection (as delivered to me by the DBAs) is a long list of nodes and ports. This means that when a new node is added (or subtracted), my database URL needs to be changed.

    Two questions: (1) Any help with the OCI connection and its failure?
    (2) A JDBC thin connection that abstracts the code from hostort knowledge of the cluster?

    Thanks much.
    JLS0

  2. #2
    Join Date
    Jan 2003
    Location
    Vienna, Austria
    Posts
    102

    Re: JDBC connection to Oracle 9i RAC

    I cannot give you a good advice according the SQL*PLUS problem.
    Have you tried to reinstall it?

    I don't know what kind of 'abstraction' you want to archive, but a valid jdbc-thin url for RAC looks like:
    jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(load_balan ce=on)(ADDRESS=(PROTOCOL=TCP)(HOST=NODE1)(PORT=152 1))(ADDRESS=(PROTOCOL=TCP)(HOST=NODE2)(PORT=1521)) )(CONNECT_DATA=(SERVICE_NAME=MY_DATABASE))))
    just make sure all your instances have set the same SERVICE_NAME in their spfile.
    ^/\x

  3. #3
    Join Date
    Nov 2003
    Posts
    3

    Re: JDBC connection to Oracle 9i RAC

    Thanks much for the information. I realize the SQL Plus problem is a unusual. And, yes, I have tried re-installing several times.

    As far as the JDBC URL is concerned, maybe my use of the term "abstraction" was not correct. Here is an example of what I was looking for.

    If I use an OCI connection to the 9i RAC database, the URL is simply "jdbcracleci:@service_name". In this example, I do not need to know anything about host or port. If host names or port numbers change, my URL stays the same. Using the JDBC thin URL, I must know (or find out) host/port information and the URL becomes sensitive to changes in the cluster (for example, a node is added or subtracted). I will admit that changes to the cluster in a production application do not occur that often, but they occur none the less. I was hoping that there was a version of the JDBC thin URL that was a generic as the OCI URL.

    Regardless, the information that you provided served as a good "sanity check" for me.

    Thanks again.
    JLS

  4. #4
    Join Date
    Jan 2003
    Location
    Vienna, Austria
    Posts
    102

    Re: JDBC connection to Oracle 9i RAC

    JDBC THIN is explicite designed to create a lightwight design of your configuration: just a couple of files (e.g. classes12.jar), NO seperate ORACLE_HOME, etc. So you have to give all low level network information within the connection-string. (the JDBC-THIN driver doesn't know where he should seek for external connection-infromation)
    If you want that kind of managebility, you have to use OCI8.
    But this changes only the point where you have to modify the configuration. I do not see a big difference between the jdbc-URL itself and a tnsnames.ora?
    Last edited by berxh3g; 11-20-03 at 10:06.
    ^/\x

  5. #5
    Join Date
    Nov 2003
    Posts
    3
    Yes. I see. And I agree. Since the JDBC thin connection is designed to be lightweight, you must provide all the details in the URL. And I also agree that there is not much difference between having to manage this information in the TNSNAMES file vs some other source of information that feeds the JDBC thin URL. The difference for MY organization is that the TNSNAMES file is centrally located and centrally administered. When the DB changes, the TNSNAMES file changes with it and the changes are "transparent" to the rest of us.

    We are getting a liitle off the topic, but it brings up an interesting thought. That is, I wonder how beneficial it would to have a centrally located and adminstered "file" of some sort, say, an XML file or some other type of properties file that contains all the critical information for the JDBC thin URL. That way, the thin connections would have the same benefits as the OCI connections without the need to install the Ora client.

    Interesting.

    Thanks,
    JLS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •