Oracle DB Link from Oracle to SQL Server

Dear buddies,
I am trying to create a dblink from Oracle to SQL Server.
This is my tnsnames.ora
sq =
(DESCRIPTION=
   (ADDRESS=(PROTOCOL=tcp)(HOST=LOCALHOST)(PORT=1521)
   (CONNECT_DATA=(SID=sq))
   (HS=OK)
)This is my listener
SID_LIST_LISTENER =
  (SID_LIST =
      (SID_DESC =
      (SID_NAME = sq)
      (ORACLE_HOME = D:\oracle\product\10.2.0\db_2)
      (PROGRAM = hsodbc)
LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  )initsq.ora
# This is a sample agent init file that contains the HS parameters that are
# needed for an ODBC Agent.
# HS init parameters
HS_FDS_CONNECT_INFO = sq
HS_FDS_TRACE_LEVEL  = OFF
# Environment variables required for the non-Oracle system
#set <envvar>=<value>I have created my System DSN for sq with the appropriate values which works fine when I tested the connection.
These 2 databases are in different servers.
This is how I created the db link in Oracle
create public database link sq
CONNECT TO XXX IDENTIFIED BY "XXX"
using 'sq'
select "Column1"
from "Table1"@'sq';The error I receive is: ORA-01729: database link name expected
When I try to recreate the database link it tells me that: ORA-02011: duplicate database link name
I hope someone could guide me.
Thanks.

C:\Documents and Settings\Administrator>tnsping sq
TNS Ping Utility for 32-bit Windows: Version 10.2.0.4.0 - Production on 16-AUG-2011 14:48:40
Copyright (c) 1997,  2007, Oracle.  All rights reserved.
Used parameter files:
D:\oracle\product\10.2.0\db_2\network\admin\sqlnet.ora
TNS-03505: Failed to resolve name
C:\Documents and Settings\Administrator>

Similar Messages

  • Creating Database link from Oracle9i to SQL server 2000

    Pls how do I create connectivity from Oracle9i database to query a table in an SQL server 2000 database.
    Pls I need the necessary steps to take.
    Thanx

    There are 2 solutions that you can use:
    1) Transparent Gateway for SQL Server
    2) Generic Connectivity
    Generic Connectivity is free with the database but has less features than the Gateway. For Generic Connectivity you will need to obtain an ODBC driver.
    The steps for using the gateway are available in the gateway manual and the steps for using Generic Connectivity is available in Chap 7 of the Heterogeneous Connectivity Administrator's Guide.

  • 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.

  • How to create database link from oracle to sql server

    Please help with how to create database link from oracle to sql server
    Best regards,
    Vishal

    Please help with how to create database link from oracle to sql server
    Best regards,
    Vishal
    Hi Vishal,
    I found a lof of information regarding how to create a database link from Oracle to SQL Server, please see:
    https://www.google.co.in/?gws_rd=cr&ei=vd3XUvGFO8TgkAXqlYCADg#q=how+to+create+database+link+from+oracle+to+sql+server
    We discuss SQL Server related issue in this forum. If you have any more question regarding Oracle, please post it in Oracle communities forum for better support.
    Regards,
    Elvis Long
    TechNet Community Support

  • Database link from Oracle DBMS 1g to MS SQL Server

    Hi,
    I would need to know, if there is some out of the box functionality from the Oracle DBMS 11g where I can connect to MS SQL Server (2005/2008)? If there is good tutorial on how to do it, I would very much appreciate it.
    Thanks!
    Dejan

    Hi,
    I have created following:
    1. Oracle DBMS 11g Enterprise installe (guessing that also the ODBC drivers for Oracle should)
    2. Using MS SQL 2009 Native Client for ODBC connectivity
    3. global_names set to false by
    alter system set global_names=false;
    4. Configures Oracle Heterogeneous services in initHS_ORCL.ora under \hs\admin to
    HS_FDS_CONNECT_INFO = HS_ORCL
    HS_FDS_TRACE_LEVEL = off
    5. Modified listerner.ora to
    SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ORCL) (ORACLE_HOME = C:\oracle\product\11.1.0\db_1) (SID_NAME = ORCL) ) )
    LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = nt-topobase)(PORT = 1521)) )
    # Connecting to MS SQL Server via ODBC
    SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = HS_ORCL) (ORACLE_HOME = C:\oracle\product\11.1.0\db_1) (PROGRAM = hsodbc) ) )
    6. Modified TNSnames.ora to
    ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = nt-topobase.cgs-lj.si)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCL) ) )
    # Connecting to MS SQL Server via ODBC (added newly)
    HS_ORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS= (PROTOCOL = TCP) (HOST = nt-topobase) (PORT = 1521)) (CONNECT_DATA = (SID=HS_ORCL)) (HS=OK))
    7.Restarted Oracle service
    8. Created Database link for an existing user sz that is sysdba in the ORCL instance:
    create database link hs_orcl connect to sz identified by admin using 'HS_ORCL';
    Database link created.
    9. Tried logging:
    C:\>sqlplus sz/admin@hs_orcl
    SQL*Plus: Release 11.1.0.7.0 - Production on Pon Mar 1 14:58:40 2010
    Copyright (c) 1982, 2008, Oracle. All rights reserved.
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    11. Tried logging (successful)
    C:\>sqlplus sz/admin@orcl
    SQL*Plus: Release 11.1.0.7.0 - Production on Pon Mar 1 14:58:52 2010
    Copyright (c) 1982, 2008, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select * from ges@hs_orcl;
    select * from ges@hs_orcl
    ERROR at line 1:
    ORA-02019: connection description for remote database not found
    SQL> select * from ges@hs_orcl;
    select * from ges@hs_orcl
    ERROR at line 1:
    ORA-02019: connection description for remote database not found
    Cannot get the select from the MS SQL Server 2005 on the table 'GES'.

  • How to make data base link from oracle 11g r2 to microsoft sql 2008 express

    I need to make data base link from oracle 11g r2 to microsoft sql 2008 express to make replication between then
    please help me !
    I didn't know what is the user and password in the command which create database link

    To replicate data you can ude Database Gateway for ODBC or Database Gatewy for MS SQl Server. Please use the search engine of this forum if you ant to get more details about each product.
    Some SQl Servers are set up to use Windows authentication only. In this case you won't be able to connect to the SQL Server as Windows authentication isn't supported with the gateways. You have to make sure your SQL server is supporting username and password authentication - a common user is the "sa" user. Regarding the username/password, please get in touch with your SQL Server Admin.

  • 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

  • Does Oracle have Extended Stored Procedure like SQL Server and Sybase?

    Hi, i am new to Oracle. I want to know if...
    Does Oracle have Extended Stored Procedure like SQL Server and Sybase?
    If it does not have, then how can i call outside program written in C or JAVA from the Database stored procedure or trigger?

    refer to this link on external procedures
    http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76956/manproc.htm#11064

  • 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.

  • 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

  • Fetch data from another mirosoft sql server to sap

    Dear all,
                   I want to fetch data from another mirosoft sql server
                    to SAP(my sap server IN unix, oracle 10g).
    Thanks
    Shashi
    Moderator Message: Try to do you own research before posting your question. Get back to the forums in case you are stuck with any issue
    Edited by: Suhas Saha on Jul 26, 2011 3:21 PM

    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

  • Migrating SAP products from a non-SQL Server platform to a SQL Server 2005

    Hi,
    I have another question too.
    Can someone pls provide me the Considerations for Migrating SAP products from a non-SQL Server platform to a SQL Server 2005 platform?
    More specifically from Oracle to SQL 2005.
    Regards
    Abhi

    Hello
    You need to perform an OSDB migration.
    This will involve exporting your SAP system into a DB neutral format and then reloading this into an SQL 2005 SAP system.
    Please review http://service.sap.com/osdbmigration
    I recommend you review the homo/heterogeneous system copy guide for your SAP release.
    Thanks
    N.P.C

  • RH server 8 - upscaling from Access to SQL Server 2008?

    Hi gang-
    We are currently running RoboHelp Server 8 on the default Access database and Tomcat. We would like to increase the number of help projects that are tracked by the RH Server, and have concerns that Access will handle the increased load, so we are considering upsizing to SQL Server 2008.
    Our IT people think this should be fairly straightforward, but want to know if Adobe provides any tool or has any recommendations when upsizing from Access to SQL Server.They are concerned about retaining things like primary and secondary keys, as well as any indexes that are currently in Access.
    If anyone has experience with such a migration, please share!
    Thanks,
    -=Ed.

    We are also currently on an Access DB and considering (have been for some time but that's a different story) upgrading to SQL Server. There is no migration tool from Access to SQL Server provided so you'd have to allow some additional effort if you want to retain the data. I am not an expert on DBs but I'm sure there are ways to migrate the data. I have found a few links when searching on Google. For example:
    http://support.microsoft.com/kb/237980
    Adobe does provide a cheat sheet at the link below which may be useful to you.
    http://blogs.adobe.com/techcomm/2009/05/advanced_database_setup_for_robohelp_server_8.html
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

Maybe you are looking for

  • Did the iTunes update & now it won't work at all!

    I downloaded the iTunes update 2 days ago, and now iTunes won't work because it needs 10.4.9+ & all I have is 10.4.8 I tried to download the 'Combo' 10.4.11 but it crashed my system (the 'Restart' hung with turning wheel for over 2 hours) & I had to

  • Sending Mail with an Attachment

    Hi I'm trying to send mail with a PDF attached. I've been set up on exchange server 2007... Sending mail without an attachment works fine. Was wondering if anyone knows if this is a known issue or if I'm simply doing something wrong. The attachment h

  • Bookmarks menu subfolders drop down and block permanently lower bookmarks unless I click away from the menu entirely.

    I'm using a MacBook Pro running OS 10.5.8, and I just recently upgraded from Firefox 4 to 5. Since then my Bookmarks menu has been a nightmare. I have a lot of long bookmark names, but that's never ever been a problem for me - Firefox used to cut the

  • Create images with dynamic width from 3 images each (left/center/right-part)

    Hello, i want to employ a script to create images of dynamic width for me. The whole process shall base on different sized sets of images, which contain a left-image, a right-image and a center-image. The desired width for the different cases shall b

  • Packaging  jar  file with classes

    Hi experts, I want to clarify a problem in relation with packaging .class files in jar file making it jar executable.I was able to achieve this when number of classes are limited and confined to only a single program.However recently i developed a so