DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: get data from remote database??

Hybrid View

  1. #1
    Join Date
    Oct 2000
    Posts
    144
    NT: database A (local) Version: 8.1.7
    UNIX: database B (remote) Version: 7.3.4
    Problem description:
    I went svrmgrl in NT to create a database link to database B. Then, I create
    a table in order to insert data from v$license in remote database. When I run
    the script to insert the data, it gives me an error message.

    SQL> @sample.sql
    FROM v$database@B.world, v$license@B.world
    *
    ERROR at line 3:
    ORA-02019: connection description for remote database not found

    =======
    I don't know how to fix error 02019. I need your help. Below is my sample script:

    SPOOL sample.log
    INSERT INTO lic_info (db_name, count_date, user_count)
    SELECT name, sysdate, sessions_highwater
    FROM v$database@B.world, v$license@B.world;
    SPOOL off

  2. #2
    Join Date
    Nov 2000
    Posts
    205
    I might be missing something, but I understood that to create links to database you needed to set up tnsnames.ora file to see the other database (on the server that you are connecting from), then you test to see if you can connect using the '@'. The next step would be 'CREATE DATABASE LINK...' statement, to be able to directly access tables etc from the remote database.

    Am I wrong? This was how I did it, but have things changed?

    Nirasha
    Nirasha Jaganath

  3. #3
    Join Date
    Oct 2000
    Posts
    144
    I didn't go to the tnsnames.ora. I went straight svrmgrl and create database link.
    From then on, I can connect to the remote database using sql*plus from my local database.

  4. #4
    Join Date
    Nov 2000
    Posts
    205
    What was the name of the database link you created?
    Nirasha Jaganath

  5. #5
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Check your remote databas's paramenter of global database name. If it had been set to true, then you have to use that database instance name on your link not any thing else.

    If it had been set to false then you can use any name as your link for that instance.

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  6. #6
    Join Date
    Oct 2000
    Posts
    144
    I check out the global_name and it shows true. It matches with my local NT machine.
    I drop the database link and recreate to see what happen. I think you're right Nirasha.
    It gives an error message:
    ORA-12154: TNS:could not resolve service name

    I'm not familiar with tnsname.ora on the server. Name of the database is A.
    The tnsname.ora should be on the server 7.3.4 (please correct me if I'm wrong.)

    A.world =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS =
    (COMMUNITY = TCPCOM.world)
    (PROTOCOL = TCP)
    (Host = "my_host_name")
    (Port = 1521)
    )
    )
    )






  7. #7
    Join Date
    Oct 2000
    Location
    Charlotte, USA
    Posts
    330

    get data from remote...

    Hi Trina,
    This has continuation of your lines.....
    )
    )
    (CONNECT_DATA = (SID = your SID)
    (GLOBAL_NAME = A.world)
    )
    )
    ##
    Repeat for another instance name..which you want to connect say in your case B.save it.
    Then it will work.
    Thanks.
    Thanigaivasan

Posting Permissions

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


Click Here to Expand Forum to Full Width