Connecting ms sql server from oracle using db link

Hi,
Source : Oracle 11g on linux
destination : ms sql server 2005
i need to create the db link from oracle to ms sql server to view the tables , is it posibble without configuring the gateways( as looks like it is licenced product)
Please let me know any alternative to achive this
Thanks
PGR

There are 2 gateway - the commercial Database Gateway for Ms SQl Server which requires a license and the Database Gateway for ODBC which is for free. The license for DG4ODBC is included in your database license. You only need to install a suitable ODBC driver on your Linux box (for example use the MS SQl Server ODBC driver for Linux - details can be found here: http://www.microsoft.com/en-gb/download/details.aspx?id=36437 ). and then configure the gateway using the My Oracle Support Note:
How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle Databases Post Install  
[Article ID 561033.1]
- Klaus

Similar Messages

  • How to connect to a Sql server from Oracle using db link

    Hi All,
    Does anybody have any idea about how to connect to a sql server from oracle database using db link to syncronize the data? I need to pull the data from Sql server table to Oracle tables and relay messages back to the sql server.
    Thank you,
    Praveen.

    we have 2 products - DG4MSQL and DG4ODBC.
    DG4ODBC is for free and requires a 3rd party ODBC driver and it can connect to any 3rd party database as long as you use a suitable ODBC driver
    DG4MSQL is more powerfull as it is designed for MS SQL Server databases and it supports many functions it can directly map to SQL Server equivalents - it can also call remote procedures or participtae in distributed transactions. Please be aware DG4MSQL requires a license - it is not for free.
    Check out Metalink and you'll find notes how to configure both products.
    For a generic overview:
    Note.233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases
    And the setup notes:
    DG4ODBC
    Note.561033.1 How to Setup DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX) :
    Note.466225.1 How to Setup DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit RDBMS.HS-3-2 :
    Note.109730.1 How to setup generic connectivity (HSODBC) for 32 bit Windows (Windows NT, Windows 2000, Windows XP, Windows 2003) V817:
    Note.466228.1 How to Setup DG4ODBC on Linux x86 32bit
    DG4MSQL
    Note.466267.1 How to Setup DG4MSQL (Database Gateway for MS SQL Server) on Windows 32bit
    Note.562509.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX)
    Note.437374.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) Release 11 on Linux

  • Connecting to SQL Server from Solaris using Perl & Oracle.

    Hey All,
    Using the DBI.pm provided by the default Perl package that comes integrated with Oracle server, I am being able to connect to the Oracle database through Perl.
    But is there a way I can connect to SQL Server through Perl using any package provided by Oracle like ODBC or something else (on Solaris)
    I am using following version of Oracle server on Solaris 10
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    TIA
    Parag

    The problem is I cannot install any third party package but I found something. Have a look at this:
    bash-3.00$ pwd
    /opt/oracle/product/10.2.0.4.0/perl/lib/site_perl/5.8.3/sun4-solaris-thread-multi/Win32
    bash-3.00$ ls -l
    total 10
    -rwxr-xr-x 1 oracle dba 4532 Jul 7 2004 DBIODBC.pm
    bash-3.00$
    Will explore more and keep you all posted.
    Cheers,
    Parag

  • Regarding the tns-12541 error in connecting to sql server from oracle

    i need to create a database link from oracle on windows box to sql server.I configured everything but when i am trying to tnsping the sqlserver
    it throws me an TNS12541 no listener error.
    The listner status is up and the listener works

    little confusion here, are you trying to tnsping sql server? tnsping is an Oracle utulity.
    To acces sql server from Oracle you may use Transparent Gateway for Microsoft SQL - http://download.oracle.com/docs/cd/B19306_01/gateways.102/b14270/ch3.htm#sthref66 and Heterogeneous Connectivity - http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/intro.htm#sthref33
    Best regards.

  • Connect to SQL Server from Oracle

    Does Oracle offer any connectivity to NON-Oracle databases such as SQL Server from within the Oracle database itself, similar to a database link ?

    Yes, it's called Heterogeneous Connectivity. Basically how it works is you set up an ODBC data source on the Oracle server
    and need to modify the tnsnames.ora and listener.ora files. Once you get it set up it works exactly like a dblink. You should be
    able to find information on it in the Oracle manuals or from Metalink. There's also a Heterogenous Connectivity forum on OTN. If
    you can't find anything let me know and I can send you some documents on how to set it up. I think the hardest part for you might
    be finding a SQL Server ODBC driver for HP-UX.

  • Accessing SQL Server from ORACLE using Transparent Gateway

    So I had downloaded the gateway installer and was following the guide here to set up the Transparent Gateway for SQL Server: http://www.orafusion.com/art_orahs.htm
    After I had created the database link, I was prompted the following error when trying to do a simple select statement from the SQL Server DB:
    >
    ORA-12154: TNS:could not resolve service name
    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.
    *Action:  
    - If you are using local naming (TNSNAMES.ORA file):
    - Make sure that "TNSNAMES" is listed as one of the values of the
    NAMES.DIRECTORY_PATH parameter in the Oracle Net profile
    (SQLNET.ORA)
    - Verify that a TNSNAMES.ORA file exists and is in the proper
    directory and is accessible.
    - Check that the net service name used as the connect identifier
    exists in the TNSNAMES.ORA file.
    - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA
    file. Look for unmatched parentheses or stray characters. Errors
    in a TNSNAMES.ORA file may make it unusable.
    - If you are using directory naming:
    - Verify that "LDAP" is listed as one of the values of the
    NAMES.DIRETORY_PATH parameter in the Oracle Net profile
    (SQLNET.ORA).
    - Verify that the LDAP directory server is up and that it is
    accessible.
    - Verify that the net service name or database name used as the
    connect identifier is configured in the directory.
    - 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
    - If you are using easy connect naming:
    - Verify that "EZCONNECT" is listed as one of the values of the
    NAMES.DIRETORY_PATH parameter in the Oracle Net profile
    (SQLNET.ORA).
    - Make sure the host, port and service name specified
    are correct.
    - Try enclosing the connect identifier in quote marks.
    Error at Line: 3 Column: 27
    >
    Here are my configuration files:
    initMSQL.ora
    >
    HS_FDS_CONNECT_INFO=webdatasvr:1433.InfoWeb
    HS_FDS_TRACE_LEVEL=OFF
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    >
    listener.ora
    >
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC=
    (GLOBAL_DBNAME=UGCMAC)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
    (SID_NAME=UGCMAC)
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = MSQL)
    (ORACLE_HOME = C:\oracle\product\11.2.0\tg_1)
    (PROGRAM = dg4msql)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (ADDRESS LIST=
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1524))
    >
    tnsname.ora
    >
    UGCMAC =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = UGCMAC)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    MSQL=
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1524))
    (CONNECT_DATA =
    (SID = MSQL)
    (HS=OK)
    >
    Can anyone assist me? thanks!

    Hi kgronau,
    >
    After changing a listener.ora file you need to STOP and START the listener to get the changes loaded. It looks like your listener is not serving the 1524 port which could be related to the fact that you didn't stop/start the listener after you've edited the listener.ora file.
    ... But as stated earlier - please do not use a 10.2 listener to start an 11g gateway. Instead configure the listener of the gateway home.
    >
    I did restart my listener under services.msc whenever I make the changes but there are no effect. Please also note that I can only find "OracleOraDb10g_home1TNSListener" under my services.msc. There is no 11.2 Listener. I did install the gateway and the installation was successful as far as I can tell. But perhaps because there's no 11.2 Listerner under my services.msc, could that mean it was a bad installation?
    >
    Next point is the tnsping you've used is 11.2. You need to make sure that you use the tnsping of the Oracle Database home as the database initiates the gateway connection so the database home tnsnames,ora needs the tns entry for the gateway.
    >
    My current PATH environment variables setting is as follow: C:\oracle\product\11.2.0\tg_1\bin;C:\oracle\product\10.2.0\db_1\bin; So perhaps, I just need to ensure the 10.2 ORACE home is the first?
    >
    As a final tip: There are so many web sites explaining how to configure DG4ODBC - many of them are faulty. If you need a reliable configuration, please have a look at "My Oracle Support" => How to Configure DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit to Connect to Non-Oracle Databases Post Install     [Document 466225.1]     )
    >
    Is there a link?
    Edited by: omnri on 21-Jul-2011 23:59

  • Error while inserting into MS-SQL Server from Oracle using HS

    Hi,
    I am using hetrogeneous connection.
    I want to insert into MS-SQL Server Table by selecting from Oracle Tables.
    insert into tableone@mssql select * from table2;
    Table2 is in oracle database.
    while executing i'm getting
    ORA-02025: all tables in the SQL statement must be at the remote database
    Please guide me.
    Regards
    Salih KM

    some guy come up a solution by himself before. go ahead and try it
    ORA-02025 error while insert into emp@custard select ....

  • No suitable driver when connect MS SQL server from Oracle 10g using JTDS

    Hi,
    I have developed a java servlet application connection to MS SQL using jtds-1.2.jar. I have try to deploy this application to Oracle 9ias and it works fine.
    However, when I deploy the same application to Oracle 10g (10.1.2.0.2), I encounter this error - java.sql.SQLException: No suitable driver.
    I have copy the jtds-1.2.jar to Ora10g/jdbc/lib, Ora10g/j2ee/home/lib and also the Ora10g/j233/OC$J_GENERAL/applications/sampleApp/sampleApp/WEB-INF/lib folder, and also setup the data source via the EM interface. The data-source.xml entry is as follows:
    <data-source location="jdbc/ess" class="com.evermind.sql.DriverManagerDataSource" xa-location="jdbc/xa/essS" ejb-location="jdbc/ess" connection-driver="net.sourceforge.jtds.jdbc.Driver" username="scott" url="jdbc:jtds:sqlserver://202.xx.xx.xx:1433/sampleDB" inactivity-timeout="30" name="ess"/>
    </data-sources>
    Is there any configuration that I've forgotten to set?

    >
    I have developed a java servlet application
    connection to MS SQL using jtds-1.2.jar. I have try
    to deploy this application to Oracle 9ias and it
    works fine.
    However, when I deploy the same application to Oracle
    10g (10.1.2.0.2), I encounter this error -
    java.sql.SQLException: No suitable driver.
    I have copy the jtds-1.2.jar to Ora10g/jdbc/lib,
    Ora10g/j2ee/home/lib and also the
    Ora10g/j233/OC$J_GENERAL/applications/sampleApp/sample
    App/WEB-INF/lib folder, and also setup the data
    source via the EM interface.
    Is there any configuration that I've forgotten to set?The JAR file needs to be in a place the container can locate it correctly. This is the applib directory for your OC4J instance.
    Which I believe from what you have entered is:
    Ora10g/j2ee/OC4J_GENERAL/applib
    There's a general JDBC 3rd party driver set of documentation here:
    http://download.oracle.com/docs/cd/B14099_11/web.1012/b14012/datasrc.htm#sthref592
    This is not using jtds-1.2.jar but it shows how another set of 3rd party jdbc libs are used with the server.
    -steve-

  • How to connect to SQL Server from Forms 10g?

    Hello all,
    How do we connect to SQL Server database from Forms 10g?
    In Oracle Metalink site they have suggested using Transparent Gateway for SQL Server as a solution.
    But is there a way we can connect directly to SQL Server from Forms using an ODBC connection
    without installing anything on the database server?
    Pls help!
    Regards,
    Sam

    Hello all,
    I was able to connect to SQL Server from Oracle using Generic Connectivity (HSODBC).
    Transparent gateway was not required.
    Followed metalink note 109730.1
    So, after I created a dblink to SQL Server, I created a synonym for the dblinked SQL Server table.
    When I used the synonym as the table source in Oracle Forms, I got the following error while querying.
    "ORA-02070 - ROWID is not supported in this context."
    This is because Forms has an invisible ROWID field and when data is fetched from SQL Server table
    no Rowid is fetched since SQL Server table doesn't have one.
    Is there a way to overcome this issue or do we have populate the block manually using a SQL query ?
    Pls suggest.
    Regards,
    Sam

  • Failure when connecting MS SQL SERVER from ODI ! could not load JDBS driver

    i have some trouble with connecting MS SQL SERVER from ODI.
    I have already downland jdbs driver 3.0 (and 2.0 ) and copy the sqljdbc4.jar to D:\oracle\product\11.1.1\Oracle_ODI_1\oracledi\agent\drivers( where the oracle jdbs driver is already exitst )....but i have this error :
    could not load JDBS driver class..
    thanks

    After more investigation and even more chocolate, we've identified the problem and it's now working. For anyone else who strikes this problem in future, here's something to check/consider/try:
    Even though Squirrel SQL Client was connecting and working ok using the MS JDBC driver (v 3.0), it recorded this in its logs:
    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the INTERSECT operation.
    We've found that the open source jTDS driver does not have the same issue as the Microsoft one.
    We've installed the current jTDS driver, recorded the driver name (net.sourceforge.jtds.jdbc.Driver) and the JDBC URL (jdbc:jtds:sqlserver://<hostname>:1433/<database>) and the connection is now working fine.
    Hope this helps other people...
    Thanks to those of you who offered suggestions and things to check...much appreciated.
    Robyn

  • Error while connecting to SQL SERVER from OWB

    HI All,
    I got the following error while connecting to SQL SERVER from OWB(10gR2).
    1). Created DSN with (GMSCADA)
    2). tnsnames file is updated with the following information
    GMSCADA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.60.29)(PORT = 1433))
    (CONNECT_DATA =
    (SERVICE_NAME = SA)
    3). Tried to connect to SQL SERVER frm OWB
    Username: sa
    password: sa
    host: 172.16.60.29
    port: 1433
    service name: GMSCADA
    schema: sa
    I got the following error, when I click Test Connection:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from OWB_3095
    Regards,
    Kumar.

    Hi David,
    What is Gateway, How I have to setup, Please let me know.
    I tried according to the Demo, But still I am facing the same problem. Which system IP I have to put in the host details.
    Can u please let me know.
    Regards,
    Kumar.

  • DSNless connection to SQL Server and Oracle

    hi,
    how can i connect to SQl Server and Oracle without specifying the DSN.
    zulfgi

    My favorite reply again:
    Someone wrote in a newsgroup about configuring some kind of "temporary DSN".
    His example was for Excel, but it will maybe work the same way for other drivers:
    db = DriverManager.getConnection(
    "jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=c:/temp/test2.xls;DriverID=22;READONLY=false","","");
    Also someone else suggested for SQLServer:
    db = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=MyServerName;Database=MyDataBase","","");
    Find out the right driver clause for Oracle; look at the names the control panel ODBC manager shows.
    Regards,
    Hartmut

  • Connect to sql server from 10g webforms using exec sql

    Hi
    We are embarking on a project to upgrade our 6i client server forms to 10g web
    based. One of our forms uses the exec_sql package to open a connection to an MS
    SQL Server database and execute queries on that database.
    Oracle open client adapter and an odbc driver for SQL Server is installed on
    every client to achieve this. I have read that open client adapter is no longer
    available on 10g.
    I also read that there a feature of the Oracle database called Generic
    Connectivity which would allow us to install an odbc driver on the database
    server and allow us to connect to sql server. However I discovered that this
    feature is not supported on TRU64 - the operating system our database runs on.
    I have read about Oracle Transparent gateways but I have been informed that they are not supported from forms.
    Is there any alternative? How can our webform connect to sql server and execute
    queries against it? The sql we need to execute is already sql server compliant so no translation is required - just a simple pass through
    thanks
    paul schweiger

    I used in the past Forms 6i against DB2 on a mainframe through Transparent Gateway for DB2. So I'm wondering who did you tell such a configuration does not work. And the migration guide states:
    /* Open Client Adapters (OCA)
    In order to provide platform-independent access to a wider range of non-Oracle data sources, use the Oracle Transparent Gateway and Generic Connectivity solutions in place of OCA. */
    At least gateway is mentioned.
    Werner

  • Problem connecting to SQL Server from JDeveloper 10g using jdbc third party

    I am using Oracle 10g Jdeveloper and I tried to setup a database
    connection to SQL Server using various Drivers for JDBC as Merlin, jtds, inet.tds, etc.
    (I had no problem to set up a connection to an Oracle Database using the
    Oracle JDBC driver).
    When I am testing the connection throughout the wizard, I do receive
    this error message: "Unable to find driver:
    com.microsoft.jdbc.sqlserver.SQLServerDriver".
    I m not understanding from last 3 days where to place the corresponding JAR files so thaI may not get the Error.
    When I hit n trialed at various directories of the JDeveloper as </rootDir/jdbc/lib>
    </rootDir/lib>
    </root/jdev/my Work/Application1/Project1/public_html>
    </root/jdev/my Work/Application1/Project1/public_html/web-inf/>
    when I tested the connection I do received:
    "Unable to find driver:
    xxx.xxx.xxx.xxxxxxx Unable to find driver:
    Obviously it can't locate the Micrososft JDBC driver but I can't
    figure out why.
    I tried all kind of things without any success. Is somebody can help
    me and took me beyond this.
    I m trying to build DataSource connection from JavaBeans.
    Please make me out of this cave. I m not finding any of the way to do this.
    The last code I tried is
    try {
    Class.forName("com.inet.pool.PoolDriver");
    com.inet.tds.TdsDataSource tds = new com.inet.tds.TdsDataSource();
    tds.setServerName( "local" );
    tds.setDatabaseName( "bluff" );
    tds.setUser( dbUserName );
    tds.setPassword( dbPassword );
    DataSource ds = tds;
    Connection con = ds.getConnection(dbUserName,dbPassword);
    Statement stmt;
    ResultSet rs = null;
    Thanks,

    you are confusing me at least as your error is discussing the microsoft driver yet you are configuring the inet datasource.
    I do not use JDeveloper, but you need to make sure that whatever is servicing your web app/JavaBean has access to the driver. Not sure why you are not doing a JNDI look up of the resoure, but because you are not you can stick the driver jar in the lib directory within the WAR bundle. I would suggest that you add the driver to the lib/ext or the lib directory which is loaded at boot time for your web container and then use JNDI to look up your DataSource to reduce your coding maintenance headaches.

  • Connect Sql Server From Oracle Both on Windows

    I want to connect my SQL Server running on Windows2003 with my oracle database 10g which is also on windows through some odbc which i have also created on my machine running oracle 10g. Can some one guide me with simple steps.

    Generally most folks use OLEDB rather than ODBC for that.
    If you have Metalink access, check out the following note:
    Note.191368.1 Ext/Pub How to Create a Sql Server Linked Server With The Oracle Provider for OLE DB:
    Hope it helps,
    Greg

Maybe you are looking for