Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Location
    Bangalore
    Posts
    44

    Unanswered: Problem with accessing data from remote database through DBLINK

    Hi All,

    I am facing strange issue with Database Link. The issue is Database Link is
    successfully created but when I select the data from the tables it returns
    no rows.

    To give you complete details. I have two databases in different servers.

    First Database SALESDB in Server1 and MANDB in Server2. I have created tns
    entry in Server2 pointing to SALESDB that is in Server1.

    I have created database Link by connecting SYSTEM/MANAGER@MANDB in Server2.
    The command was:

    CREATE DATABASE LINK SALESDBLINK CONNECT TO SALES_OWNER IDENTIFIED BY
    SALES_OWNER USING 'SALESDB';

    I tried to Select records in several ways:

    1. SELECT COUNT(1) FROM SALES@SALESDBLINK;

    It returns the Zero where as the records are present in the actual table.

    2. CREATE SYNONYM SALESSYN FOR SALES@SALESDBLINK;

    SELECT COUNT(1) FROM SALESSYN;

    It returns the Zero where as the records are present in the actual table.

    3. CREATE OR REPLACE VIEW SALESVIEW AS SELECT COUNT(1) COUNT_SALES FROM
    SALES@SALESDBLINK;

    SELECT * FROM SALESVIEW;

    It returns the Zero where as the records are present in the actual table.

    I am wondering why the records are not retrieved by this DBLINK. Is there
    anything I am missing out in setup.

    For your information I have also tried same steps with PUBLIC DATABASE LINK
    too.

    Could you please give me suggestions or clues so that I can overcome this
    issue.

    Thanks in Advance,
    Thanks and Regards,
    Mahesh

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Try the following command

    desc SALES@SALESDBLINK

    This will test to see if the table can really be accessed. If it can
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Jan 2003
    Location
    Bangalore
    Posts
    44
    I can able to view the table structure, just that I can't view any records.
    Last edited by mahesh_bk1; 12-06-04 at 04:29.
    Thanks and Regards,
    Mahesh

Posting Permissions

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