Create a database link to access SqlServer 2005 view from oracle 11gr2

Hi All,
Greetings for the day.
Though I have seen quite a few posts but just wanted to cross-verfiy and double check hence posting.
Oracle Database : 11gr2
OS :SOLARIS SPARC 64 Bit
SQL Server Database : Sql Server 2005
OS : Windows 2003 32 Bit
The requirement is to access a view residing in the SQL Server 2005 Database using the Oracle Database. This involves creation of a Database link in the Oracle Database to access the SQL Server.
Can you suggest which approach should i follow ( I am able to understand that both do the same job ):
How to Configure DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX) post install [ID 562509.1]or
How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle Databases Post Install [ID 561033.1]Will they do the same job ? And can they be used on any OS and version of the SQL Server Database as version information for SQL Server is not specified anywhere?
Please let me know so that I can it forward with Business for approvals and budgetting.
Regards
KK

Your question is similar to the post: Oracle 11gr2 connection to Sql Server using dg4msql problem
Please visit: http://stackoverflow.com/questions/4658942/oracle-11gr2-connection-to-sql-server-using-dg4msql-problem
Answer on the website:
You seem to be using the Gateway for MySQL set-up rather than the Heterogeneous Gateway (for ODBC connections). Here is an overview of the process
On SQL Server create a database user and give it read access to the database/tables you want to read via the Oracle database link.
In the gateway home each SQL Server database you want to access should have an init.ora located in $OH/dg4msql/admin in the form initsid.ora where sid is the name of the database to be used in the link (e.g. initbob.ora), so create one
HS_FDS_CONNECT_INFO=msserver1:1234//Example_Database
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
HS_TRANSACTION_MODEL=READ_ONLY
You must now add the new sid to the listener.ora in the gateway home using an additional SID_DESC section inside the existing SID_LIST, for example
(SID_DESC =
(SID_NAME=bob)
(ORACLE_HOME=/oracle/gateway/product/11.2.0)
(ENVS=LD_LIBRARY_PATH=/oracle/gateway/product/11.2.0/dg4msql/driver/lib;/oracle/gateway/product/11.2.0/lib)
(PROGRAM=dg4msql)
You should now stop and restart the gateway listener so that the new sid becomes active. NB a reload is not enough.
You must now add the new sid in the tnsnames.ora file for the listener of each database in which you will create a link. You don't need to do this in the gateway home unless it is also a database home in which you will create a database link.
bob =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = severname.example.com)(PORT = 1690))
(CONNECT_DATA = (SID = bob))
(HS = OK)
NB: The host and port are for the gateway not for the SQL Server database
In each database that requires a link to the MS-SQL database you should create a database link to your new gateway sid.
CREATE PUBLIC DATABASE LINK bob
CONNECT TO "ms_user" IDENTIFIED BY "ms-passwd" USING 'bob';
where ms-user and ms-password are the SQL Server user you created right at the start.
Now you can test the new database link
SELECT COUNT(*) FROM "Table_Name"@bob;
Once you have this working you can alter the initsid.ora file to add parameters to suit your connection. If you do it this way you can easily add and manage many different databases via the gateway.
Hip
Edited by: 1000595 on 04:58 17-04-2013

Similar Messages

  • 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

  • Creation of Database link and access the same plus Snapshot creation

    i want talk between two oracle server. i decided to go for snapshot creation with periodical refresh. For which i am having two oracle server's with different ip address located inside our office setup.
    I have created a database link between two servers.
    first server name global
    userid scott
    password tiger
    second server name asil
    userid scott
    password tiger
    both the user have been given dba rights.
    in both the server the services and listners are all started. i gave the following command to create database link.
    from asil server
    create public database link global connect by scott identified by tiger using 'global'
    the command was successful and the link was created. Now i tried to access a table of the scott user of the global server.
    select * from emp@global;
    now it is giving error. I want to know how the link can be created and how it can be accessed. i refered the 8i online documentation and done the things based on that. i expect valuble solution from all possible persons
    null

    A reason for this problem could be that your database is configured that a database link has to have exactly the same name like the global name of the database instance it should connect to.
    Can you please provide the oracle error code / message ? With this information there might be more hints I can give you.

  • How to Create Public database link in oracle 9i?

    Friends,
    OS: RHEL AS 3
    DB: 9iR2
    database name 1 = nubul
    database name 2 = test
    in the 'nubul' database server using system user.
    i created a database link to connect the 'test' database
    sql> create public database link test using 'test';
    database link created.
    then i logged in as normal user....
    sql> select count(*) from employee@test
    Error at line 1:
    ORA-12154: TNS: could not resolve service name
    where i am making mistake?
    i gave the linkname as my remote database name.
    am i have to make any entry in the tnsnames.ora?
    thanks & regards

    You have to remember that when you access a dblink, the database where the link is defined is acting as a client to the database to which the link points ... exactly the same as if you you were using sqlplus on the machine hosting the db where the link is defined. In other words, given:
    Host 'Host-src', with database 'db-src', with a dblink 'lk_target'
    Host 'host-trgt', with database 'db-trgt'
    When you connect to db-src and access lk-target, db-src is now acting as a client to db-trgt. Exactly as if you had opened sqlplus on host-src and connected directly to db-trgt. So, given the above scenario
    host-src$> sqlplus scott/tiger@db-src
    sql> select * from emp@lk_target;when you execute that SELECT to the link, the same tns considerations are in effect as if you had
    host-src$> sqlplus scott/tiger@db-trgtThe same tnsnames.ora entry, on the source machine, is required for both.

  • How to create a database link on an ms acces data source

    Hello every body
    Is it possible to create a database link on an MS access data source under
    oracle 10 g and Apex ?
    If yes how to do it ?
    Thanks in advace

    I don't know what Apex is!!! But try to follow these instructions.
    It works for Oracle 9i.
    As far as I know, you are supposed to have installed other than ORACLE Client to complete these instructions.
    1. Control Panel / Administrative Tools / Data Sources (ODBC)
    Folder: System DSN /
    click add
    Choose : Microsoft Access Driver
    Data Source Name : my_test
    Description : any_description_you_want
    click Database/Select... : full pathname for <your_file.mdb>
    click OK
    Click OK
    2. Goto OH\hs\admin:
    2.1) Create a copy of "inithsodbc.ora" file giving it this name:
    initmy_test.ora
    2.2) Edit "initmy_test.ora" and change as below.
    # HS init parameters
    HS_FDS_CONNECT_INFO = my_test
    HS_FDS_TRACE_LEVEL = OFF
    3. Add this entry to listener ( Don't forget to stop/start the listener )
    (SID_DESC =
    (SID_NAME = my_teste)
    (ORACLE_HOME = <Path to OH> ) ### Ex: D:\ORANT901
    (PROGRAM = hsolesql)
    4. Now you need to add entries to point to the HS in the tnsnames.ora :
    access =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=<your_host>)(PORT=1521))
    (CONNECT_DATA=(SID=my_test))
    (HS=my_test)
    5. Now you need to go into the database and create the database link:
    CREATE PUBLIC DATABASE LINK "ACCESS_DB" USING 'access';
    6. select * from your_table@ACCESS_DB;
    HTH
    RK
    Message was edited by:
    RKravcenko

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

  • How do you create a database link in Forms9i

    I am writting and application that is to connect to multiple databases and do given task, but the triggers I assign to items only work in the database that you connect to for forms to run.
    How do you create a database link in Forms9i?
    Thank you in advance for your reply.
    Travis

    It seems like you will have to have database links set up in all your databases to point to all other remote databases and have a common global naming scheme for all your objects so that no matter what database you log into you will have access to all objects in the universe.

  • How to create a database link between an 8i (apps) database and APEX

    Want to link my Oracle APPS databse on 8i with Oracle XE and APEX. Any idea how to achieve this ?

    I don't know what Apex is!!! But try to follow these instructions.
    It works for Oracle 9i.
    As far as I know, you are supposed to have installed other than ORACLE Client to complete these instructions.
    1. Control Panel / Administrative Tools / Data Sources (ODBC)
    Folder: System DSN /
    click add
    Choose : Microsoft Access Driver
    Data Source Name : my_test
    Description : any_description_you_want
    click Database/Select... : full pathname for <your_file.mdb>
    click OK
    Click OK
    2. Goto OH\hs\admin:
    2.1) Create a copy of "inithsodbc.ora" file giving it this name:
    initmy_test.ora
    2.2) Edit "initmy_test.ora" and change as below.
    # HS init parameters
    HS_FDS_CONNECT_INFO = my_test
    HS_FDS_TRACE_LEVEL = OFF
    3. Add this entry to listener ( Don't forget to stop/start the listener )
    (SID_DESC =
    (SID_NAME = my_teste)
    (ORACLE_HOME = <Path to OH> ) ### Ex: D:\ORANT901
    (PROGRAM = hsolesql)
    4. Now you need to add entries to point to the HS in the tnsnames.ora :
    access =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=<your_host>)(PORT=1521))
    (CONNECT_DATA=(SID=my_test))
    (HS=my_test)
    5. Now you need to go into the database and create the database link:
    CREATE PUBLIC DATABASE LINK "ACCESS_DB" USING 'access';
    6. select * from your_table@ACCESS_DB;
    HTH
    RK
    Message was edited by:
    RKravcenko

  • ERROR WHILE CREATING A DATABASE LINK USING HETEROGENEOUS SERVICES

    I'm creating a database link with the Oracle Dataware Builder, and i get the following error:
    Probando...
    Fallo.
    SQL Exception
    Error del repositorio: Excepción SQL.
    Nombre de la Clase: CacheMediator.
    Nombre del Método: getDDEntryFromDB.
    Mensaje de Error del Repositorio: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Informix][Informix ODBC Driver][Informix]Incorrect password or user [email protected] is not known on the database server. (SQL State: 28000; SQL Code: -951)
    ORA-02063: preceding 2 lines from PRUEBA_SEH
    As you can see i'm using heterogeneus services to connect to a informix database. ALTIADM is a valid user for that database, i don't send my ip address 192.168.0.62, but the error says "[email protected] is not known in the database server". how can i solve it?????

    Right places to ask this question are
    Heterogeneous Connectivity
    Warehouse Builder

  • ERROR WHILE CREATING A DATABASE LINK TO INFORMIX

    I'm creating a database link with the Oracle Dataware Builder, and i get the following error:
    Probando...
    Fallo.
    SQL Exception
    Error del repositorio: Excepción SQL.
    Nombre de la Clase: CacheMediator.
    Nombre del Método: getDDEntryFromDB.
    Mensaje de Error del Repositorio: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Informix][Informix ODBC Driver][Informix]Incorrect password or user [email protected] is not known on the database server. (SQL State: 28000; SQL Code: -951)
    ORA-02063: preceding 2 lines from PRUEBA_SEH
    As you can see i'm using heterogeneus services to connect to a informix database. ALTIADM is a valid user for that database, i don't send my ip address 192.168.0.62, but the error says "[email protected] is not known in the database server". how can i solve it?????

    Right places to ask this question are
    Heterogeneous Connectivity
    Warehouse Builder

  • Not able to create a database link using the database gateway of oracle 11g

    HI,
    While trying to create a database link to SQL server from Oracle ,using the database gateway provided with 11g, i am getting the following error while making use of it in selecting columns from tables :
    Error starting at line 1 in command:
    select * from test1@dblink
    Error at Command Line:1 Column:20
    Error report:
    SQL Error: ORA-28513: internal error in heterogeneous remote agent
    ORA-02063: preceding line from DBLINK
    These are the steps i have followed for setting up:
    1.Ran the set up for the Database gateway.and mentioned the SQL server name and database .ALos set up a listener.
    2. Added the following in the Listener.ora of Oraclehome 11/NETWORK/ADMIN:
    LISTENER_SQL_FCD =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST =localhost) (PORT = 1541)
    SID_LIST_LISTENER_SQL_FCD =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME=dg4msql)
    (ORACLE_HOME= D:\app\20537\product\11.1.0\db_3)
    (PROGRAM=dg4msql)
    3.Added the following in tnsnames.ora inOracle home/NETWORK/ADMIN:
    dg4msql=
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1541))
    (CONNECT_DATA=(SID=dg4msql))
    (HS=OK)
    4. Following is the entry in initdg4msql.ora in C:\product\11.1.0\tg_5\dg4msql\admin:
    HS_FDS_CONNECT_INFO=10.148.45.242:1433//SalesDemo
    HS_FDS_TRACE_LEVEL=DEBUG
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    5. Created the database link :
    create database link dblink
    connect to "sa" identified by "<pswd>"
    using 'dg4msql'
    On running :select * from test1@dblink i get the following error:
    Error starting at line 1 in command:
    select * from test1@dblink
    Error at Command Line:1 Column:20
    Error report:
    SQL Error: ORA-28513: internal error in heterogeneous remote agent
    ORA-02063: preceding line from DBLINK
    Is there any issue with the set or definition that I get the above error?

    What is the version of the Oracle database in which you have specified/and use the database link?
    If it is for example 10.2.0.3.0 you need to apply the mandatory patch for RDBMS bug 5965763 first before being able to use an 11g gateway. Have a look at MetaLink note 457808.1 for details about this patch.
    Regards,
    Ed

  • APP-RG-09518: An error occurred while creating a database link

    Hi All,
    While creating a database link in Oracle EBS from one instance to another instance for transferring FSG reports
    Go to Any GL Setup responsibility...Setup>System>Database links > Create new database link
    Prior to the above...below steps should be done on the server.
    1.grant create database link to <apps.user>; (on db server)
    2.source tns entry should be in destination tns file and destination tns entry in source tns file. (check tnsping after entry)
    3.*make sure destination tns entry of 8.0.6 oracle home should be in source tns file* (Because we are creating db link for the application)
    4.Run the Program FSG Report.
    Regards,
    Harish Muramshetty.

    Hi,
    I have solved the issue as below:
    This error was started when I install a software which I have made myself and it uses sql server compact edition 3.5.  
    I saw when I manually replaced the sql related files from "C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v3.5" with the files which  my software setup had "version 3.5.5386.0" then the error started. And if copy back the latest version 3.5.8080.0
    then it disappear. So use latest sql files in your software too.
    My software was replacing the the latest files with older version. 
    Muhammad Arshad Awan

  • Creating a Database link for a user

    Hello All,
    I am trying to create a database link for one of my users.
    When I create it as sysdba the link gets created in the SYS schema which tells me that my syntax is working/fine.
    But when I ALTER my SESSION and set my CURRENT_SCHEMA = <USER_NAME> I get ORA-00990: missing or invalid privilege
    So I tried granting the user CREATE DATABASE LINK, CREATE PUBLIC DATABASE LINK, and DROP PUBLIC DATABASE LINK.
    Same error.
    Any ideas what I am missing?
    Thanks,
    Craig

    CraigBoyd wrote:
    Hello All,
    I am trying to create a database link for one of my users.
    When I create it as sysdba the link gets created in the SYS schema which tells me that my syntax is working/fine.
    But when I ALTER my SESSION and set my CURRENT_SCHEMA = <USER_NAME> I get ORA-00990: missing or invalid privilege
    So I tried granting the user CREATE DATABASE LINK, CREATE PUBLIC DATABASE LINK, and DROP PUBLIC DATABASE LINK.
    Same error.
    Any ideas what I am missing?
    Thanks,
    Craigyou need to create a new session after the GRANT was issued.

  • Error in Creating a Database Link

    I am trying to create a database link in SQL Workshop but unavailbe to create one because of the error below:
    Create Database Link Failed.
    ORA-00933: SQL command not properly ended
    Hope you can help me with this. Thanks!

    788818 wrote:
    I am trying to create a database link in SQL Workshop but unavailbe to create one because of the error below:
    Create Database Link Failed.
    ORA-00933: SQL command not properly ended
    Hope you can help me with this. Thanks!Not really, because the error message you have posted generally relates to a syntax or typing error and you haven't posted any other information. We need version of the DB and the text of what you are trying to do. But before you post that, have you tried the documentation?
    Regards
    Andre

  • Creating a database link to SQL server

    Hi All,
    How can I create a database link from Oracle9i Enterprise Edition Release 9.2.0.1.0 DB to MS SQL Server database.
    Thanking You
    Regards Lakmal

    It depends on your requirements.
    You can use either Generic Connectivity or Transparent Gateways.
    More information can be found here:
    http://www.oracle.com/technology/products/gateways/index.html

Maybe you are looking for

  • Sony Wide Screen Projection TV

    I had my Dish Satellite system upgraded to HDTV. All HD channels work on Encore Movies work good, along with locals. Dish is having free weekend with HBO and Cinamax. When I try to access them, I get a message that says my receiver doesn't have HDCP.

  • Request to SAP LE/WM certification Materials

    Dear SAP friends, Can you please help me to get this below SAP certification materials? Thanks. SCM631 u2013 WM interface SCM633 u2013 Radio Frequency SCM636 - Radio Frequency SRF001 - Radio Frequency SCM634 u2013 Yard Management SCM612 u2013 Vehicle

  • Problem going to fullscreen after loading AS2 movie into AS3

    I've got a loader movie that is written in AS3, and fullscreen is enabled. I have a context-menu fullscreen trigger and a keypress fullscreen trigger built into the loader movie. When I load an AS3 movie or an AS1 movie through the loader movie, I ca

  • Current groupwise on a volume not on the new system

    Another general question. On my current groupwise server I have the _admin 'volume', SYS and one called VOL1 which is where all of my groupwise data is (as far as DB, etc...). To copy this over do I need to create another voume called VOL1 (or someth

  • Macbook Pro Retina compatibility problem?

    I have just receive the new Macbook Pro with Retina display. When i tried to use the new macbook with MS office software like excel and words and even PDF readers and adobe photoshop, i find the "type" are blurred and not sharp at all. Is it because