Database link from 11g to 10 g

I am trying to create a database link from the 11g database to the 10g database using:
create database link ORCL10R2 connect to <username10g> identified by <password10g> using <db10g>;
It Returns
Database link created.
select sysdate from dual@ORCL10R2 returns error:
ERROR at line 1:
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
Please let me know what changes I need to make to tnsnames and listener at both servers.

i think this question is not related to sql or pl sql.
Please Post here
General Database Discussions
Venkadesh

Similar Messages

  • Database link from 11g to 10g

    I am trying to create a database link from the 11g database to the 10g database using:
    create database link ORCL10R2 connect to <username10g> identified by <password10g> using <db10g>;
    It Returns
    Database link created.
    select sysdate from dual@ORCL10R2 returns error:
    ERROR at line 1:
    ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
    Please let me know what changes I need to make to tnsnames and listener at both servers.

    11g database: 10.1.1.10
    10g database: 10.1.1.12
    TNSNAMES.ORA at 10.1.1.10
    XYZ =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.10)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XYZ)
    LISTENER.ORA at 10.1.1.10
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.10)(PORT = 1521))
    what needs to be modified here?
    Edited by: 944558 on 5 Jul, 2012 12:27 AM

  • How can i get data from another database SQL Server use database link from

    I have a database link from Oracle connect to SQL Server database with user cdit connect default database NorthWind.How can I get data from another database(this database in this SQL Server use this database link)?

    hi,
    u should see following documentation:
    Oracle9i Heterogeneous Connectivity Administrator's Guide
    Release 1 (9.0.1)
    Part Number A88789_01
    in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
    regards
    umar

  • Problem with using database link from oracle 7 to oracle 9i

    Hi To Every One
    I have two oracle database oracle 7.3.4.0.1 and oracle 9i 9.2.0.1.0.
    and the tns alias to connect to oracle 9i database is oracle9i and tns
    alias to oracle 7 database is oracle7.I have no problem in connect to
    these database using these tns aliases from either database.The tns
    alias for oracle 7 is available in tnsnames.ora file of oracle9i and
    tns alias for oracle 9i is available in tnsnames.ora file of oracle 7.
    So there is no connection problem from each other.Connection is
    working fine for each other but the problem with database links is
    like this
    Problem:
    when i create database link from oracle9i user or public database link
    from oracle9i for oracle7 user like this
    SQL ORACLE9I >CREATE DATABASE LINK ORACLE7 CONNECT TO <ORACLE7USER>
    IDENTIFIED BY <PASSWORD> USING 'ORACLE7';
    OR
    SQL ORACLE9I >CREATE PUBLIC DATABASE LINK ORACLE7 CONNECT TO <ORACLE7USER>
    IDENTIFIED BY <PASSWORD> USING 'ORACLE7';
    The links get created sucessfully but when i write command like
    SQL ORACLE9I> DESC <ORACLE7USER_NAME>.<ORACLE7USER_TABLENAME>@ORACLE7
    I RECEIVE A ORACLE ERROR LIKE
    ORA-12663 SERVICE REQUIRED BY CLIENT IS NOT AVAILABLE ON THE SERVER.
    OR IF MY COMMAND IS LIKE
    SQL ORACLE9I> SELECT <FEILD_NAME> FROM
    <ORACLE7USER_NAME>.<ORACLE7USER_TABLENAME>@ORACLE7;
    I RECEIVE AN ORACLE ERROR LIKE
    ORA-01002 FETCH OUT OF SEQUENCE.
    ORA-02063: preceding line from ORACLE7
    BUT IF I CREATE A LINK FROM ORACLE7 USER FOR ORACLE9I USER
    IT WORKS FINE.
    PLZ HELP ME WHAT IS THE PROBLEM THAT THE LINK FOR ORACLE 7 IS NOT WORKING WHEN
    IT IS BEING CREATED FROM ORACLE9I.
    Thank u.

    Oracle 9.2.0 does not support connectivity to Oracle 7. The newest version that will support this is 9.0.1.

  • DATABASE LINK from 92060 to 102030 issue

    Hi All,
    Question on Database link:
    Database A -- 10.2.0.3.0
    Database B -- 9.2.0.6.0
    Created database link from 10g to 9i and it works fine as expected.
    I tried from BOTH server and also a CLIENT (SQLPLUS from my PC).
    Created databas elink from 9i to 10g and it works fine on server
    for example:
    SQL> select sysdate from dual ;
    SYSDATE
    10-APR-07
    SQL> select sysdate from dual@<<DBLINKNAME>> ;
    SYSDATE
    10-APR-07
    However, I'm unable to connect using SQLPLUS.
    for example:
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production
    SQL> select sysdate from dual ;
    SYSDATE
    10-APR-07
    SQL> select sysdate from dual@daspnprd ;
    select sysdate from dual@daspnprd
    ERROR at line 1:
    ORA-12154: TNS:could not resolve service name
    Note;
    =====
    NO change in tnsnames.ora or LDAP.. ALL are identical
    Any known issues???
    Please help!!

    Make sure you are resolving with LDAP, (check the sqlnet.ora contents) and not the local tnsnames. Verify the entry at the OID and verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier.

  • Database link from XE to 8i - Ok for XE, but error ORA-12705 for ApEx

    I have oracle 8.1.7.4 (8i) with these settings:
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    {color:#ff0000}NLS_CHARACTERSET CL8MSWIN1251{color}
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT dd-mon-rr
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZH:TZM
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZH:TZM
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    {color:#ff0000}NLS_NCHAR_CHARACTERSET CL8MSWIN1251{color}
    NLS_RDBMS_VERSION 8.1.7.4.0
    And oracle XE:
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    {color:#ff0000}NLS_CHARACTERSET AL32UTF8{color}
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    {color:#ff0000}NLS_NCHAR_CHARACTERSET AL16UTF16{color}
    NLS_RDBMS_VERSION 10.2.0.1.0
    I create database link from XE to 8i - it works fine:
    I create view in XE based on table from 8i
    and using SQL Developer {color:#0000ff}I can Select/Insert{color} into this view {color:#0000ff}from XE{color}.
    BUT when I login {color:#0000ff}to Application Express{color} and try the same SELECT from the view - {color:#0000ff}I get error:{color}
    ORA-12705: ORA-12705: invalid or unknown NLS parameter value specified
    ORA-02063: preceding line from LINKED8i
    What should I do to make Application Express work with the view based on table in remote database correctly - i.e. allow me to Select/Insert/... ?

    Hi,
    i don't have a solution for your problem but i want to share with you my research in using Database Links with XE/Apex.
    I have done it a in a lot of projects and in most of all cases it shows a strange behavior when using Database Links via Apex. As far as i know SQL-Request in Apex are executed via the DBMS_SQL-Package. And that seems to be source for all errors and strange behaviors you get.
    If you post a SQL-Request directly from your XE, everything's fine. If you do the same from APEX, sometimes it is very slow and sometimes it fails.
    So, my approach to this issue is to work with Materialized Views. Your can create MV's on your XE to reference your remote tables and even schedule refreshes. In Apex, you only work with these MV's instead of the remote tables. And everything's going to be fine!
    Hope this helps!
    Regards, Jens

  • Problem connecting DataBase Link from windows oracle to oracle on Linux

    I'm facing a problem with database links from windows oracle to Oracle hosted on Linux server.
    I'm able to successfully create the Database Link using the following query on oracle database hosted on a windows server
    CREATE DATABASE LINK SampleDB
    CONNECT TO myuser IDENTIFIED BY password
    USING 'sample';
    The tns names entry on windows for database in Linux server is as follows
    DSOFT =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = sample)
    But while executing the query "select count(*) from doctor@SampleDB;" in sql developer on windows, I'm getting the following error
    SQL Error: ORA-12154: TNS:could not resolve the connect identifier specified
    12154. 00000 - "TNS:could not resolve the connect identifier specified"
    *Cause:    A connection to a database or other service was requested using
    a connect identifier, and the connect identifier specified could not
    be resolved into a connect descriptor using one of the naming methods
    configured. For example, if the type of connect identifier used was a
    net service name then the net service name could not be found in a
    naming method repository, or the repository could not be
    located or reached.
    Using the above tns entries, i'm successfully able to connect to the database in Linux server through sql developer installed on the windows machine. Then why i'm getting this error while executing the query on Database Link?. Can any one help me?

    1005745 wrote:
    I'm facing a problem with database links from windows oracle to Oracle hosted on Linux server.
    I'm able to successfully create the Database Link using the following query on oracle database hosted on a windows server
    CREATE DATABASE LINK SampleDB
    CONNECT TO myuser IDENTIFIED BY password
    USING 'sample';
    The tns names entry on windows for database in Linux server is as follows
    DSOFT =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = sample)
    But while executing the query "select count(*) from doctor@SampleDB;" in sql developer on windows, I'm getting the following error
    SQL Error: ORA-12154: TNS:could not resolve the connect identifier specified
    12154. 00000 - "TNS:could not resolve the connect identifier specified"
    *Cause:    A connection to a database or other service was requested using
    a connect identifier, and the connect identifier specified could not
    be resolved into a connect descriptor using one of the naming methods
    configured. For example, if the type of connect identifier used was a
    net service name then the net service name could not be found in a
    naming method repository, or the repository could not be
    located or reached.
    Using the above tns entries, i'm successfully able to connect to the database in Linux server through sql developer installed on the windows machine. Then why i'm getting this error while executing the query on Database Link?. Can any one help me?A database link is acting as a client to the target, remote database in exactly the same fashion and using exactly the same tns infrastructure as any other client trying to connect to that remote database. your ORA-12154 when querying a db link means exactly the same as if you had gotten it trying to connect with sqlplus, from the same server. Check the link SB provided. Keep in mind that the tnsnames file of concern is the one on the source database server.

  • Database link from oracle to db2

    Can any help me to create a database link from oracle to db2. It would be greatful if you can provide me detail steps

    <p>You don't give us much information to go on. What version of Oracle? What platform is DB2 running on? You might want to take a look at <b>this</b>. You might also look <b>here</b> and <b>here</b>.</p>
    Tom

  • Database link from Oracle8i to Oracle9i

    Hi,
    I am trying to create a database link from an oracle 8i database to connect to an oracle 9i database ... When testing the connection , I always receive an error "The Database link is not active"
    Notes
    1- Creating a database link that connects from the same 8i database to another 8i database succeeds. This gave me the impression that it is a compatibility problem but I am not sure.
    2- I changed the initialization parameter
    global_names = falseand restarted the Oracle database
    3- the 2 databases are on the same domain
    Did anyone pass through this problem before ??
    thanks

    Well, I was testing the database link via DBA studio and there was no ora error associated with the message.
    A friend helped me to identify and sove the problem. here is what he did.
    Lets assume that the oracle8i database called Ora8i
    and the oracle9i database called Ora9i
    and that the network domain name is OraTest.com
    When i select * from global_name; on both databases
    Ora8i database return ==> ora8i
    Ora9i database return ==> Ora9i.us.oracle.com
    We then execute the following statement on Ora9i database
    alter database rename global_name to Ora9i.OraTest.com;
    Testing the database link after that went fine.
    Thanks

  • Creation of database link from oracle to sql server 2000

    Hi
    I need to create a database link from oracle to sql server 2000.

    Assuming your Oracle database is running on Windows, you can set up a database link using ODBC using Heterogeneous Services and Generic Connectivity, but there are some functional limitations (i.e. no two-phase commits). If you can live with those limitations but aren't on Windows, you can generally purchase an ODBC driver for your operating system that will connect to SQL Server through someone like DataDirect and still use Generic Connectivity. If you cannot live with those limitations, you can purchase one of Oracle's Transparent Gateway products (though this can get somewhat pricey).
    What version of Oracle are you on?
    What operating system(s) are you using?
    What are you going to use the database link for?
    Justin

  • Creating Database Link from Oracle to SQL Server

    I am trying to create a database link from Oracle to SQL Server, and the documentation is about as clear as mud to me. Can anyone send me clear instructions on exactly what I need to do? What needs to be in tnsnames.ora and listener.ora files? Is there anything other than those two files that needs to be set up? Do I set up an ODBC connection? Anything else? I want to execute queries against a SQL Server database and load data into Oracle database.
    Thanks so much,
    Susan

    These are the instructions from an old document I created. The steps are same for SQL Server and Sybase. Hope it helps.
    The 9i Transparent Gateway Software is in Oracle Software CD -> oracle9i database -> Custom -> Oracle Transparent Gateways
    The gateway can be installed on the same machine as the Oracle database or
    on the Sybase server or on a third machine as a stand-alone.
    We have installed the gateway software in one of oracle database
    servers in a separate oracle home.
    These are the steps involved in configuring a gateway to a Sybase database
    1.     Install Sybase client and Gateway software on the Gateway Server
    2.     Configure <initsidfile> in the Gateway Server's <gatewayhome>
         /u00/app/oracle/product/9.2.0/tg4sybs/admin/init<gatewaysid>.ora
    Sybase server and database information is required for this step.
    eg: HS_FDS_CONNECT_INFO=USTRUD01.uwd
    3.     Add an entry in listener.ora in <listnenerhome>
         (/u00/app/oracle/product/9.0.1/network/admin/listener.ora) for the <gatewaysid>
    4.     Edit the tnsnames file (/u00/app/oracle/product/9.0.1/network/admin/tnsnames.ora)
    to add an entry <tnsalias> for the <gatewaysid>
    5.     Create a database link to the Sybase database in the oracle database.
    The steps for creating the database link are
    a. create a login oracle_tgw in the sybase server
    b. add the user to the sybase database with the necessary privilege on the tables
    c. create the database link in the required oracle database using the command
         "create public database link <dblinkname> connect to oracle_tgw identified by password using 'tnsalias'; "
    6.     Restart the gateway listener.

  • Database link from 10g database to 8i

    Is it possible to create a database link from 10g(10.1.0) to talk to a 8i(8.1.7) database?
    I'm using a database link between a 9i database to 8i database, and would like to upgrade the 9i database to 10g. I created a link in 10g and kept getting the error message: ORA-02019: connection description for remote database not found, but I have an entry for my database in the tnsnames.or on the 10g database server.
    Message was edited by:
    linghleong

    My database version is 8.1.7.0, and I couldn't get to the point to select any data like the situation mentioned in the link.
    I also tried to create a db link to a 9i(9.2.0) database, I got the same error message. I must have some issue other than linking from 10g to 8i. Any advice?
    Thanks!

  • Database Link with 11g R2 and Teradata

    Trying to create a database link from Oracle to a Teradata database using Oracle Database Gateway, and I'm receiving ORA-12154: TNS:could not resolve the connect identifier specified...
    I'm pretty new at this and my head is spinning a bit.  After following the gateway configuration instructions it seems there are 3 sets of tnsnames.ora/listener.ora/sqlnet.ora files
    1) on the database server
    2) on my local computer where oracle is installed
    3) on my local computer where the gateway is installed
    Is this how it should be?  Which set should I be working with to resolve this error?  Any other advice for this newbie would be amazing!  Let me know what other information I can share to help describe the issue.  I've tried so many things at this point, I'm not really sure what's relevant and what's not anymore.

    Ok, got it.  I was not in the command prompt as an administrator for my first couple attempts.  Results are below.  I have been replacing host names with italicized descriptions because this is my first time posting on a forum and I'm not sure that my employer would be okay with me posting those specifics.  Let me know if this is hindering the troubleshooting process.
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Produ
    ction
    Start Date                18-JUN-2014 10:01:08
    Uptime                    0 days 0 hr. 0 min. 5 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   C:\product\11.2.0\tg_1\network\admin\listener.ora
    Listener Log File         c:\product\11.2.0\tg_1\log\diag\tnslsnr\COQC2DPRDMGT00
    1\listener\alert\log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=local computer where gateway is installed)(P
    ORT=1521)))
    Services Summary...
    Service "dg4tera" has 1 instance(s).
      Instance "dg4tera", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    C:\WINDOWS\system32>
    C:\WINDOWS\system32>tnsping dg4tera
    TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 18-JUN-2
    014 10:02:03
    Copyright (c) 1997, 2010, Oracle.  All rights reserved.
    Used parameter files:
    C:\oracle\product\11.2.0\client_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=local computer where gateway is installed) (PORT=1521)) (CONNECT_DATA= (SID=dg4tera)) (HS=OK))
    OK (10 msec)
    C:\WINDOWS\system32>
    C:\WINDOWS\system32>

  • To create a database link from oracle to sqlserver with NT authentication

    Hi ,
    I need to create a database link from oracle 9i to sql server database with windows authentication.I dont have the database username and password instead the access is given to my NT ID and password.So can anyone provide me the information about creating a dblink to sql server with windows authentication.
    Thanks

    Oracle is attempting to log in to SQL Server using NT authentication.
    The Oracle process, however, is running presumably with a local admin account (normal for a Windows service). SQL Server has no idea what this local account is, so it denies the login.
    You could change the Oracle service to run as a known user (presumably not as your Windows ID but some other Windows ID you create explicitly for Oracle) and then grant that Windows ID in SQL Server appropriate privileges. That would mean, though, that when you queried tables over the database link, you'd be using that new Windows ID's privileges on SQL Server, not your Windows ID's privileges.
    As I've said, though, this is a general architectural limitation for a multi-tier architecture. The end system (SQL Server) generally has no idea who the end user (your Windows ID) is when that user is coming through a middle tier (Oracle). So it cannot apply end-user permissions to connections created by the middle tier.
    Justin

  • Create a Database Link from Oracle to MYSQL on windows

    Hi
    I need to create a database link from oracle to mysql database on windows to fetch some records.Can anyone help me on this?

    Search for Transparent Gateways, Heterogeneous Services...
    The Oracle SQL Developer have drivers to Access, MySQL and SQL Server.

Maybe you are looking for