Accessing SQL Server from Oracle

I found an article:
http:www.databasejournal.com/features/oracle/article.php/3442661
It shows how to setup a connection from Oracle to SQL Server.
I am new to Oracle Using SQL Loader and PL/SQL.
I would like to use the SQL Loader in Oracle to load a table in SQL Server. It is my understanding that a ctl file is used and is called by an Oracle application.
I would not have an Oracle application. I would like to use the ctl file to load the SQL Server table. Can someone point me on how to use the ctl file for SQL Server?
Also, in PL/SQL would there be a connection string to connect to SQL Server when accessing a table.
Is there a book or some documentation that would address the above?
Thanks in Advance.

that article shows you how to access SQL Server database through Oracle, therefore you have no need to use SQL Loader to load data from SQL Server bcos it can be queried directly by using simple select statement.
If you want to load the data into Oracle just use CREATE TABLE ... AS SELECT ...
in PL/SQL, what you need is the database link.
Cheers,
NH

Similar Messages

  • 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

  • Entity Framework - Code First - Migration - How to access SQL Server and Oracle using the same context?

    Hello,
    I use Entity Framework code first approach.
    My project is working fine with SQL Server. But, I want to access Oracle too. I want to switch SQL Server and Oracle in run time.
    I am able to access Oracle using "Oracle.ManagedDataAccess.EntityFramework.dl" in a new project.
    But, Is this possible to access SQL Server and Oracle in the same project.
    Thanks,
    Murugan

    This should be possible with a Code-First workflow.  In Code-First the database mapping layer is generated at runtime.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • 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

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

  • Accessing Sql Server from AS400 Java program

    Hi everybody,
    I am trying to access Sql Server from an AS400 Java program. I have tried various Sql Server JDBC drivers including the Microsoft one but no luck yet. When i try to compile my Java program (with driver file in the classpath) it gives some errors on the driver jar file and also it throws out lots of unreadable text characters. This gave me a feeling that probably its a character coding issue with the jar file, so i tried ftp the file in binary mode as well as copying through the Operations Navigator. But still compilation is giving the same kind of errors.
    Do I need to have some special JDBC Drivers compiled for AS400 specifically. My understanding was that Java is platform independent so any JDBC Type 4 driver will work.
    We are running Java 1.3 on the AS400. Any help on this issue would be great.
    Thanks
    Inder

    Thanks for the help. I am writing a Java program after a long time that's why was making that mistake. Now the program gets compiled correctly but on running the program i am getting the following error message:
    java 001-0070: Exception JVAB544 not expected
    /myjava/test/msbase.jar: 001-0050 Syntax error on Line 1: token ')' not expected
    /myjava/test/msutil.jar: 001-0050 Syntax error on Line 1: token ')' not expected
    /myjava/test/mssqlserver.jar: 001-0050 Syntax error on Line 1: token ')' not expected
    I have no idea what is this error about. Though the same driver files don't give any error when running on a Windows machine.
    Thanks

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

  • Connect to MS SQL SERVER FROM ORACLE 10G(OS- WIN XP)

    HI
    I NEED TO ACCESS MS SQL SERVER DATABASE FROM ORALCE 10G(OS -WIN XP)
    SOLUTION PLZ?
    Edited by: X7C7 on Nov 26, 2008 11:47 AM

    http://download.oracle.com/docs/cd/B19306_01/gateways.102/b14270/ch2.htm#sthref35
    HTH...

  • Query in sql server  from Oracle  9.2

    Hi
    How can I to connect and execute query from Oracle without to use others products ( DG4MSQL ....etc) ?
    using 9.2.08

    mkirtley wrote:
    Hi,
    I say it is 'free' because Dg4ODBC is included in your RDBMS license and you just need to supply a third party ODBC driver.
    See this note -
    Gateway and Generic Connectivity Licensing Considerations (Doc ID 232482.1)
    You need to install and configure it in an ORACLE_HOME on a machine somewhere then you can use database links from to connect to it and select from non-Oracle databases.
    Have a look at these notes depending on the platfrom you plan to use -
    How to Setup DG4ODBC on Linux x86 32bit (Doc ID 466228.1)
    How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle Databases Post Install (Doc ID 561033.1)
    How to Setup DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit (Doc ID 466225.1)
    How to Setup DG4ODBC (Oracle Database Gateway for ODBC) on 64bit Windows Operating Systems (Doc ID 1266572.1)
    As I said in my earlier update if SQL*Server is your non-Oracle database then an standalone install on Windows is the best option to be able to use the Microsoft ODBC driver, although there is now a MS ODBC available on Linux x86-64 bit.
    Please read through the notes I have referred to because they should have the information you need.
    Regards,
    MikeThank you for informations, I search, because My client is 9.2.08, but I am a DBA and do not have access to UNIX server where is Database

  • How to access SQL server in oracle running in aix unix?

    Hi all,
    I have oracle database running in IBM AIX OS, and I need to query data in
    SQL SERVER 2000.
    How to do that?
    Is there free Sqlserver ODBC drivers for unix?
    Thanks

    Hi,
    I prefer heterogenous services over ODBC for this!
    I have my notes here, which may help.
    http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm
    1. Install Oracle ODBC drivers on the server (your local Oracle database) that will access the remote SQL Server database using the database link.
    2. Setup the ODBC connection on the local Oracle database using the Windows ODBC Data Source Administrator
    3. Test the ODBC drivers to ensure that connectivity is made to the SQL Server database.
    4. Ensure that your global_names parameter is set to False.
    5. Configure the Oracle Heterogeneous services by creating an initodbc.ora file within the Oracle database.
    7. Modify the Listener.ora file.
    SID_NAME is the DSN for the remote database.
    ORACLE_HOME is the actual Oracle home file path.
    PROGRAM tells Oracle to use heterogeneous services.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME=Cas30C) -- Enter the DSN on this line
    (ORACLE_HOME = c:\oracle10gdb) -- Enter your Oracle home on this line
    (PROGRAM = hsodbc) ) )
    8. Modify the Tnsnames.ora file. This is the Oracle database installation accessed by the users to connect to the ODBC drivers
    (DESCRIPTION=
    (ADDRESS_LIST=
    (Address=(PROTOCOL=TCP)
    (HOST=
    -- (Server x)
    (PORT=1521))) -- Enter the port on which the server x Oracle installation
    -- is listening
    (CONNECT_DATA=(SID=Cas30c)) - Enter the DSN name
    (HS=OK) -- Enter this value. It tells Oracle to use hetergeneous services
    9. Reload the listener on local Oracle database
    10. Create a database link on the local Oracle installation that accesses the heterogeneous connection, which, in turn, connect to SQL Server.
    11. Run a SQL Server Select statement from the Oracle installation using the database link.
    Hope this helps. . .
    Don Burleson
    Oracle Press author
    Author of “Oracle Tuning: The Definitive Reference”
    http://www.dba-oracle.com/bp/s_oracle_tuning_book.htm

  • 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

  • Connect SQL Server From Oracle

    Hi Experts,
    I want's to made connection from Oracle 10g to Ms SQL Server 2000. I made necessary entries in receptive file, but still getting an error...
    Setting info .....
    */hs/initMYSQLSERVERDSN.ora*
    HS_FDS_CONNECT_INFO = MYSQLSERVERDSN
    HS_FDS_TRACE_LEVEL = OFF
    LISTENER.ORA
    LISTENERMYSQLSERVERDSN =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
    (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)(queuesize=80)))
    SID_LIST_LISTENERMYSQLSERVERDSN=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=MYSQLSERVERDSN)
    (ORACLE_HOME = E:\oracle\product\10.1.0\db_1)
    (PROGRAM=hsodbc)
    TNSNAME.ORA
    MYSQLSERVERDSN =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
    (CONNECT_DATA=(SID=MYSQLSERVERDSN))
    (HS=OK)
    LISTENER start successfully, and tnsping working fine.
    But after createing db link , when i execute query desc spt_datatype_info@mysqlserverdsn;
    I am geting an error message in listenermysqlserverdsn.log file
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
    Please help me out from this issue.
    Thanks in Advance
    Mani

    You OS ?
    I have also done the same.
    I did install SQL Server & Oracle on another machine with Windows.
    For more pls visit.
    http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm
    Aqeel Nawaz

  • Linking to SQL Server from Oracle 10g on 64bit Linux

    I have this working, so I thought I would post my steps.
    In versions 8 to 10 of Oracle, the software for making these connections was known as Heterogeneous Services. It was 32bit only software and the actual binary file that was executed when querying a non oracle database was $ORACLE_HOME/bin/hsodbc. When a query was made to the linked database, a process was started on the machine with the name of hsodbcXXX (where XXX is the name of the DSN).
    In version 11g of Oracle this software is now referred to as Database Gateways and there is a 64bit version as well as a 32bit version. The binary file that is executed in this case is $ORACLE_HOME/bin/dg4odbc.
    Fortunately the 64bit Database Gateway software can also be used with Oracle 10g databases as long as it is up to version 10.2.03 and has the odbc compatibility patch installed. (5965763).
    To make use of this, we need to install the 11g ODBC Gateway into a separate ORACLE_HOME and start a listener from that environment. We can then make use of that listener from the 10g environment.
    So here is what I did to get this working: (Note: DSN = MyDSN)
    1.     Download and install 64bit ODBC driver with support for 64-bit ULEN from Easysoft. The file is named odbc-sqlserver-1.1.4-linux-x86-64-ul64.tar. You'll need to email Easysoft support for the URL. Create the DSN entry as part of the install. At the end of the process it can test the DSN. The query should come back with info about the SQL Server. Test the connection using isql from the /opt/easysoft/unixODBC/bin directory to verify that it works as well (/opt/easysoft/unixODBC/bin/isql –v MyDSN). Note, I installed easysoft driver under /opt rather than the /usr/local which is the default. /usr/local/easysoft is a symlink to /opt/easysoft.
    2.     Install ODBC gateway via the 11g Gateways installer. You can do a custom install and deselect all but the ODBC Gateway component. (http://download.oracle.com/otn/linux/oracle11g/linux.x64_11gR1_gateways.zip)
    3.     Create a /home/oracle/11g_environment.sh script that sets 11g ORACLE_HOME, PATH, and LD_LIBRARY_PATH variables. It should look something like this:
    #set ORACLE ENV vars for 11g
    ORACLE_HOME=/u01/app/oracle/product/11.1.0/tg_1 # (assuming that is where ODBC Gateway was installed)
    PATH=/bin:/usr/bin:/u01/app/oracle/product/11.1.0/tg_1/bin:/opt/easysoft/bin:/opt/easysoft/unixODBC/bin
    LD_LIBRARY_PATH=/opt/easysoft/lib:/opt/easysoft/unixODBC/lib:/u01/app/oracle/product/11.1.0/tg_1/lib
    export ORACLE_HOME
    export PATH
    export LD_LIBRARY_PATH
    4.     Create $ORACLE_HOME/hs/admin/initMyDSN.ora, $ORACLE_HOME/network/admin/listener.ora, and $ORACLE_HOME/network/admin/tnsnames.ora under 11g structure. They are as follows:
    initMyDSN.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=MyDSN
    HS_FDS_TRACE_LEVEL=0
    HS_FDS_TRACE_FILE_NAME=MyDSN.trc
    HS_FDS_SHAREABLE_NAME=/opt/easysoft/unixODBC/lib/libodbc.so
    HS_FDS_SUPPORT_STATISTICS=FALSE
    # ODBC specific environment variables
    #set ODBCINI=/etc/odbc.ini
    #set ODBCINSTINI=/etc/odbcinst.ini
    #set LD_LIBRARY_PATH=/opt/easysoft/lib:/opt/easysoft/unixODBC/lib:/u01/app/oracle/product/11.1.0/lib
    #set PATH=$PATH:/opt/easysoft/unixODBC/bin:/opt/easysoft/bin/
    # Environment variables required for the non-Oracle system
    #set <envvar>=<value>
    listener.ora
    MyDSN =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
    SID_LIST_MyDSN =
    (SID_LIST =
    (SID_DESC=
    (SID_NAME=MyDSN)
    (ORACLE_HOME = /u01/app/oracle/product/11.1.0/tg_1)
    (PROGRAM=dg4odbc)
    (ENVS=LD_LIBRARY_PATH=/opt/easysoft/lib:/opt/easysoft/unixODBC/lib:/u01/app/oracle/product/11.1.0/tg_1/lib)
    tnsnames.ora
    # tnsnames.ora Network Configuration File:
    # Generated by Oracle configuration tools.
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    MyDSN =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST=localhost)(PORT=1522))
    (CONNECT_DATA=(SID=MyDSN))
    (HS=OK)
    5.     Add another entry for MyDSN in /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora so tnsping works in 10g environment as well.
    MyDSN =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST=localhost)(PORT=1522))
    (CONNECT_DATA=(SID=MyDSN))
    (HS=OK)
    *** Notice that the MyDSN listener runs on a different port (1522) as it is a separate listener.
    6.     Login to machine as user oracle and source the 11g environment script. “source ~/11g_environment.sh”. Now start the listener. “cd $ORACLE_HOME/bin”. “./lsnrctl start MyDSN”.
    7.     Login to a new shell as user oracle with a 10g environment.
    8.     Run sqlplus and create the database link. “CREATE PUBLIC DATABASE LINK SQLSERVER connect to “<someuser>” IDENTIFIED BY “<somepass>” USING ‘MyDSN’;”
    9.     test the link. “select * from information_schema.tables@SQLSERVER;”
    If it is successfull, you should see a system process named "dg4odbcMyDSN".

    So what have you found out for yourself so far (considering the solution to this is easily found on the web)?
    Have you looked up Heterogeneous Services?

  • Outer join query for SQL server from Oracle

    Hi All,
    My question is regarding making queries from Oracle to SQL Server database thorugh DBLink.
    In my oracle database I have a DBLink emp.world for SQL Server database.
    I need to query SQL Server data from oracle (so that this query can be combined with other oracle tables).
    Query is given below:
    SELECT
            a."EmpID" as "Employee ID",
            a."EmpStatus" "Employee Status"
            b."EmpSub" as "Employee Subjects"
    FROM
            [email protected] a
            left outer join [email protected] b on a."EmpID" = b."suEmpID"
    ORDER BY  a."EmpID";My problem is when I run the same query from oracle, it does not show the EmpID that does not exist in Subjects table, but when run from actual SQL Server database, it shows all the records.
    Samples are given below:
    Run from Oracle
    Employee ID      Employee Status     Employee Subjects
    101                     Active                     Maths
    102                     Active                     Maths
    102                     Active                     Physics
    104                   Inactive                  Chemistry
    Run form SQL Server
    Employee ID      Employee Status     Employee Subjects
    101                     Active                     Maths
    102                     Active                     Maths
    102                     Active                     Physics
    103                 Active                       NULL
    104             Inactive            ChemistryI am not sure why in oracle outer join for SQL server tables is not working. What is the right way for outer join in this case.
    I am using oracle database 10gR2 and SQL Server 2005.
    Please Help.
    Thanks.

    SELECT
    a."EmpID" as "Employee ID",
    a."EmpStatus" "Employee Status"
    b."EmpSub" as "Employee Subjects"
    FROM
    [email protected] a
    left outer join [email protected] b on a."EmpID" = b."suEmpID"
    ORDER BY a."EmpID";
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm#sthref3175
    From your description, it appears you may need a right outer join. You want to get back all the rows from 'B', not from 'A'. Try a right join and let us know.

  • 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

Maybe you are looking for

  • New to flash and fireworks

    I've worked with frontpage and dreamweaver on simple websites. Now I want to publish pictures to my site. My problem is tht I want to install a picture a a hair style. I want to display the front and bsvk of the style. Which do I use(Flash of Firewor

  • ABAP WD: access to context

    Hello, I need to access context nodes of my application and see if they contain any values. I want to do it in WDDOINIT method. How can this be done? Is there such an expression wdContext->get_nodes or something similar? Thank you.

  • Help with Apple Mail

    Okay, I have my Apple Mail linked to my Yahoo account, and it's been that way since April with no problems until recently. I moved into my college dorm on Saturday, and last night I realized that I've only been getting emails on my iPhone from Yahoo.

  • Message Interface : Outbound, Inbound, Abstract  ?

    Hi all, does anyone have tips to use an Outbound, an Inbound or an Abstract Message Interface ? When data is sent from XI, should we use an outbound one ? Thx to all.

  • HT3965 How do you change the name of an ipod nano (6th gen.) in iTunes 11?

    How do you change the name of an ipod nano (6th gen.) in iTunes 11? Note there was an explanation for iTunes 10, but the software does not work the same way in iTunes 11.