Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    3

    Unanswered: Using Oracle DBLink in ASP

    Hi all,

    I have 2 databases A and B on Oracle platform. I've created a DBLink called AToBLink from database A to database B.

    The reason why I needed the above is so that I can do cross-database table joins in my ASP scripts via ODBC, as follows

    Dim Conn, RS
    Set Conn = Server.CreateObject("ADODB.Connection")
    Conn.Open "ADSN", "AUser", "APassword"
    Set RS = Conn.Execute("Select * from Table1, Table2@AToBLink Table2 where Table1.objectid=Table2.objectid")

    However when I ran the above simple ASP script for testing, I got a "Database client failed to start the transaction" error.

    I've tried to run the SQL query on both SQL Plus and Toad, and the statement runs fine on both.

    I've read on some bulletin boards that adding "enlist=false" to my connection string might help, but it didn't for my case

    Any other things that I might be able to look into?

    Thanks!

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >I've tried to run the SQL query on both SQL Plus and Toad, and the statement runs fine on both.
    Then I'd conclude that the SQL statement is not part of the problem.
    Why do you connect to database A when you really want data from database B?
    Can you successfully select any data from any Oracle DB?
    Since you neglected to share with us the actual error message(s), You're On Your Own (YOYO)!
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Apr 2004
    Posts
    3
    I'm joining the 2 databases because I needed data from both tables, and they are in 2 different instances.

    The error message I got was the one I got in the first thread: Database client failed to begin transaction.

    I can successfully connect and select from both database, and in particullar select from the 2 tables I'm joining to. In fact, as I mention previously, the SQL query with the DBLink actually runs alright on both SQLPlus and Toad.

    My Oracle database is hosted on a UNIX box, and I'm accessing it via ODBC. Does that affect?

    I'm thinking it's probably some settings related to remote connection to the database. Any clues from anyone?

    Thanks!

Posting Permissions

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