ODBC from Oracle to an other Database (Postgresql)

Hello,
I heared that it is possible with Oracle to make a "Database Link" so in Oracle I can make a query like
select * from myshema.mytable@myexterndb where ....
Is such a database link allowed with the Express Edition and how will I do this?
Thank you,
Christian

Database links to/from other Oracle databases work. As follows
SQL*Plus: Release 10.2.0.1.0 - Beta on Mon Oct 31 11:56:42 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> connect system
Enter password:
Connected.
SQL> create database link remote connect to hr identified by hr using 'xe';
Database link created.
SQL> select count(*) from employees@remote;
COUNT(*)
107
Note that this is doing a local loopback to the same database. However, you should also be able to access other Oracle databases provided you have the correct tnsnames.ora definition set up in the right directory - on my Windows system for the default XE install that is
C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
Connection from Oracle Database XE to third party databases via the ODBC heterogeneous services should be possible as well, but I will need to download a 3rd party product to test it. Will do so later. In the meantime, here is a link to some doc that may help you test the setup yourself - http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14232/admin.htm#i1007209

Similar Messages

  • Oracle 10gR2 64bit  odbc  from oracle to sql server  Win 2008 EE 64bits

    Hi, I am having trouble with a 10gR2 64bits creation of odbc from oracle to sql server, I have follow several instruction with no luck at all. My OS is windows 2008 EE 64bits on the oracle and sql server server.
    This is what I have done
    1. in the $oracle_home/hs/admin directory
    inithsodbc.ora
    # HS init parameters
    HS_FDS_CONNECT_INFO = hsodbc
    HS_FDS_TRACE_LEVEL = off
    2. in the $oracle_home/network/admin
    # listener.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
    (PROGRAM = extproc)
    (SID_DESC=
    (SID_NAME=hsodbc)
    (ORACLE_HOME=C:\oracle\product\10.2.0\db_1)
    (PROGRAM=C:\oracle\product\10.2.0\db_1\hs\hsodbc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    And the tnsname.ora
    # tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    PRUEBA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = prueba)
    hsodbc =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xx.xx)(PORT=1521))
    (CONNECT_DATA=(SID=hsodbc))
    (HS=OK)
    I create the odbc connection an test it , the result is TEST PASSED
    4. The i create a database link on my database
    CREATE PUBLIC DATABASE LINK XYZ
    CONNECT TO "sysdba" IDENTIFIED BY "masterkey"
    USING 'hsodbc';
    5 execute a select
    SQL> select * from dual@XYZ;
    select * from dual@XYZ
    ERROR at line 1:
    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 XYZ
    6. When I check the listener log i'm getting this error
    25-MAR-2011 11:48:40 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=Administrator))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=169870592)) * status * 0
    25-MAR-2011 11:48:47 * (CONNECT_DATA=(SID=hsodbc)(CID=(PROGRAM=)(HOST=PRO)(USER=PRO\Administrator))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xx.xx)(PORT=49329)) * establish * hsodbc * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
    TNS-00530: Protocol adapter error
    Edited by: user626125 on Mar 26, 2011 11:39 AM
    Edited by: user626125 on Apr 12, 2011 2:49 PM

    Heterogeneous Connectivity

  • Odbc from oracle to postgesql linux

    Hello.
    I have enterprise linux 6, oracle SE 11.2, postgresql 8.4.
    I try to set ODBC by this scenario: http://docs.oracle.com/cd/B28359_01/gateways.111/b31042/configodbc.htm
    In result I have error:
    $ tnsping postgresql
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xxx)(PORT = 5432)) (CONNECT_DATA = (SID = postgresql)) (HS = OK))
    TNS-12537: TNS:connection closed
    When I try to connect by unixODBC, it connects:
    $ isql -v postgresql
    | Connected! |
    | |
    | sql-statement |
    | help [tablename] |
    | quit |
    | |
    Please help where I'm wrong? :(
    odbc.ini_
    [ODBC Data Sources]
    postgresql = PostgreSQL ODBC Driver
    [postgresql]
    Description = Test to Postgres
    Driver = PostgreSQL
    Trace = Yes
    TraceFile = /tmp/sql.log
    Database = postgres
    Servername = xxx
    UserName = postgres
    Password = xxx
    Port = 5432
    Protocol = 6.4
    ReadOnly = Yes
    RowVersioning = No
    ShowSystemTables = No
    ShowOidColumn = No
    FakeOidIndex = No
    DSN=postgresql
    [Default]
    Driver = PostgreSQL
    Description = PostgreSQL Data Source
    Server = xxx
    Port = 5432
    UserName = postgres
    Password = xxx
    ;Socket = 4096
    ;end odbc.ini
    odbcinst.ini_
    # Example driver definitions
    # Driver from the postgresql-odbc package
    # Setup from the unixODBC package
    [PostgreSQL]
    Description     = ODBC for PostgreSQL
    Driver          = /usr/lib/psqlodbc.so
    Setup          = /usr/lib/libodbcpsqlS.so
    Driver64     = /usr/lib64/psqlodbc.so
    Setup64          = /usr/lib64/libodbcpsqlS.so
    FileUsage     = 1
    # Driver from the mysql-connector-odbc package
    # Setup from the unixODBC package
    [MySQL]
    Description     = ODBC for MySQL
    Driver          = /usr/lib/libmyodbc5.so
    Setup          = /usr/lib/libodbcmyS.so
    Driver64     = /usr/lib64/libmyodbc5.so
    Setup64          = /usr/lib64/libodbcmyS.so
    FileUsage     = 1
    hs/admin/initpostgresql.ora_
    HS_FDS_CONNECT_INFO = postgresql
    HS_FDS_TRACE_LEVEL = off
    HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so
    set ODBCINI= /etc/odbc.ini
    listener.ora*
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = zzz)(PORT = 1521))
    ADR_BASE_LISTENER = /home/splash/oracle
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC=
    (SID_NAME=postgresql)
    (PROGRAM=dg4odbc)
    (ORACLE_HOME=/home/splash/oracle/product/11.2.0/dbhome_4)
    (ENVS=LD_LIBRARY_PATH=/usr/lib64:/home/splash/oracle/product/11.2.0/dbhome_4/lib)
    tnsnames.ora_
    ORCLDOCS =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xxx)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = orcldocs)
    postgresql =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = host_with_postgres)(PORT = 5432))
    (CONNECT_DATA = (SID = postgresql))
    (HS = OK)
    )

    I have enabled
    This is in sqlnet client trace file:
    (4294842112) [28-NOV-2011 16:37:35:650] nscall: error exit
    (4294842112) [28-NOV-2011 16:37:35:650] nioqper: error from nscall
    (4294842112) [28-NOV-2011 16:37:35:650] nioqper: ns main err code: 12537
    (4294842112) [28-NOV-2011 16:37:35:650] nioqper: ns (2) err code: 12560
    (4294842112) [28-NOV-2011 16:37:35:650] nioqper: nt main err code: 507
    (4294842112) [28-NOV-2011 16:37:35:650] nioqper: nt (2) err code: 0
    (4294842112) [28-NOV-2011 16:37:35:650] nioqper: nt OS err code: 0
    (4294842112) [28-NOV-2011 16:37:35:650] niomapnserror: entry
    (4294842112) [28-NOV-2011 16:37:35:650] niqme: entry
    (4294842112) [28-NOV-2011 16:37:35:650] niqme: reporting NS-12537 error as ORA-12537
    (4294842112) [28-NOV-2011 16:37:35:650] niqme: exit
    (4294842112) [28-NOV-2011 16:37:35:650] niomapnserror: exit
    (4294842112) [28-NOV-2011 16:37:35:650] niotns: Couldn't connect, returning 12537
    (4294842112) [28-NOV-2011 16:37:35:650] niotns: exit
    (4294842112) [28-NOV-2011 16:37:35:650] nigcui: entry
    (4294842112) [28-NOV-2011 16:37:35:650] nigcui: Clr User Interrupt: hdl=1, prc=0x170a98e, ctx=0x1414c10.
    (4294842112) [28-NOV-2011 16:37:35:650] nigcui: exit (0)
    In listener trace also this errors.

  • Create database link from oracle DB to MySql database using dg4odbc

    Hi All
    we need to fetch a data of MySQL database from oracle database using dg4odbc connection.
    we are getting the below erros when we query select * from dual@myodbc;
    ORA-28546: connection initialization failed, probable Net8 admin error
    ORA-02063: preceding line from BUGZILLA
    OS and database details as follow
    1. OS - OEL 5.9 32 bit
    2. Database - 11.2.0.1 XE
    3. MySQL -  5.5.32
    4. ODBC - dg4odbc
    5. unixODBC - 2.2.14
    6.MySQL Connector - 5.1
    kindly help me to get out of this issue.
    Thanks in Advance
    Regards
    Venkatesh V

    Hi All
    we need to fetch a data of MySQL database from oracle database using dg4odbc connection.
    we are getting the below erros when we query select * from dual@myodbc;
    ORA-28546: connection initialization failed, probable Net8 admin error
    ORA-02063: preceding line from BUGZILLA
    OS and database details as follow
    1. OS - OEL 5.9 32 bit
    2. Database - 11.2.0.1 XE
    3. MySQL -  5.5.32
    4. ODBC - dg4odbc
    5. unixODBC - 2.2.14
    6.MySQL Connector - 5.1
    kindly help me to get out of this issue.
    Thanks in Advance
    Regards
    Venkatesh V

  • Why Oracle than any other database?

    Just needs the inputs .........
    What makes Oracle database better than other.
    What are the features that makes Oracle as the preferred database.
    Recently One Pre-Sales guy from Sybase asked me why Oracle and not Sybase or any other Db.
    How to handle such questions......

    Lock escalation. There is no such concept in Oracle. Can you lock a million rows in Sybase using a row lock alone and still allow concurrency for other sessions to also lock a million rows? If you commit a million row transaction, how long does it take in Sybase? In Oracle, locking one row or a million rows has the same overheads - there are no overheads. Commit a transaction, be that a one row transaction or a million row transaction, it is equally fast (and usually sub-second).
    In Sybase readers block writers and writers block readers. Which means that for readers not to be blocked, they need to read uncommitted (dirty) data. In Oracle, readers never block writers and writers never block readers - and the data delivered via a read is always consistent.
    Scalability. No other vendor has anything like the shared everything cluster technology from Oracle called Real Application Clusters.
    And this is just scratching the surface. Sybase is technically inferior to Oracle. And that is just a plain fact.
    Once sat with a couple of Ingres engineers that were flown out from the UK to fix some serious bugs. Invariable we got talking about db features and they "us too" when I mentioned an Oracle feature. Only I knew that they had no real concept of what the Oracle feature entails and that the so-called equivalent Ingres feature does maybe at best 50% of what the Oracle feature does.
    So I showed them instead something simple. Or so I thought. I did a 'SELECT count(*) FROM table' on our data warehouse platform (and old HP box) on the largest fact table. It returned the answer of 700+ million rows in far less than 30 seconds.
    Their reaction? First stunned and then the question, "Is this a required feature for the database?", implying that it too can be done (hacked?) in Ingres, should the customer require such a fast select on such a huge table.
    No idiot - it is not a requirement. It is simply how Oracle works out of the box when used correctly.
    IMO, it is not even worth getting into these feature vs. feature matches with these 3rd party database experts. They do not want to understand what makes Oracle technically superior than their product.
    Read the Sybase DBA manual.. or Ingres DBA manual.. or SQL-Server DBA manual. Look at the sections that deal with performance tips and hints. It is fricken scary. And stuff that you will never ever have to deal with in Oracle as it is simply not a problem in Oracle.

  • Is it Possible to upload the output from Oracle reports To Access database

    Hi All,
    Wish you All a Very Happy New Year.
    I have a query.Is it possible to
    upload the output from the Oracle reports
    to the Access database???
    Any suggestions would be appreciated.
    TIA
    sg

    Hi sg,
    Research the DDE option.
    Dynamic Data Exchange (DDE) is a mechanism by which applications can communicate and exchange data in Windows.
    I have imported data into the excel spreadsheet using DDE built in functions. I am sure it can work with MS Acess as well. If not, then you need to create a 2 step process .. reports -> excel -> access.

  • Call EJB From Oracle Stored proc or Database loaded Java?

    Are there any examples of calling an EJB, residing in the OC4J on a machine separate from the DB server,
    from an Oracle PL/SQL stored proc.
    The Stored proc can call java loaded into the DB. That java makes the intial bean context. Or another way if suggested.
    The reason is that I need to use some drivers that I have so far been unable to load directly into the DB using
    loadjava util. I plan on using the driver in the EJB, located on a different machine. But I'd like so know if its possible to
    make the IntialContext call to the EJB container from PL/SQL. Are the OC4J drivers loadable to be
    able to be called from a database loaded java class? ( I might be a little off on my terminology)
    Bob
    [email protected]

    Hi Bob,
    Your question has been previously asked on this forum many times already.
    You can probably find the relevant postings by doing a search of the
    forum archives.
    To summarize those posts, as I understand it, the latest version of OC4J
    (version 9.0.3) contains a "oc4jclient.jar" file (I think that's the name
    of the file), that can be loaded into the Oracle database (using the
    "loadjava" utility), and which allows a java stored procedure to invoke
    methods on an EJB residing in OC4J.
    Please note that I have not tried any of the above -- I am only summarizing
    for you what has already been posted. And like I said before, a search
    of the forum archives will probably give you more details.
    Good Luck,
    Avi.

  • How to connect from Oracle to SQL Server Database?

    I want to connect to SQL Serv DB via Oracle 10g can anyone assist please?

    Hi,
    you should post this question in the database forum (General Database Discussions - this is specially for the Oracle Warehouse Builder.
    Regards,
    Detlef

  • Upgrade to Oracle 9i from Oracle 8.1.6 database

    I suppose you have read this question many times, but I can't find the correct answer.
    Is there some document or URL address to upgrade a Oracle Database 8.1.6 to Oracle 9i?
    Where can I read about this topic?
    Thanks in advance,
    Patty

    Raghvendra,
    If you are still trying on this one, and haven't yet been successful, try out this. Get your 9i database exactly as how it was before you began any of the imports. I mean keeping the SYSTEM tablespace and the other defaults like USERS, TOOLS, TEMP, etc drop all others if they weren't there originally. Next take a good report of the DBA_TABLESPACES table with all vital information like TABLESPACE_NAME, INITIAL_EXTENT, NEXT_EXTENT, MAX_EXTENTS, etc and on the 9i database create the extra ones just as in 8 version. As for the ones already there in 9i like the SYSTEM, change its parameters to facilitate bigger values if required as in 8 version or maybe go with the recommendations as in Oracle documentation for the 9i migration.
    Once this is done, why don't you post your import script here so that we can look at it and suggest you furthermore, perhaps?

  • How to Connect Oracle Developer to Other Databases

    Hello I am using Developer 6i.
    Want to connect this to another Database like Ms.Access or Ms.Sql Server.
    Send me how to USE OCA,
    I tried hard but Not Success

    hi
    plz use Net Configuration Assistant or set tnsnames.ora with connect string and computer name.
    Net Configuration Assistant.
    when its opened then go to .
    *Local Net Service Name Configuration.
    *Click Next.
    *Add.
    *Click Next.
    * Service Name--Type here connect String which is XE or any Connect String.
    *TCP.
    *Click Next.
    *Host Name--Enter here Computer name or Ip address.
    *Yes,Perform a test.
    you can enter correct password and username here.
    Note:- your Database should be Up if its not Up it will through the same error so plz startup your database first.
    sarah

  • Union  dataset from oracle function with dataset from a postgres function

    I retrieve two sets of data,
    one from an oracle database using  Command_1    select * from  table(functionname(param1, param2))
    one from postgres database using  Command_2     select * from  functionname(param1, param2)
    i can join  the two tables (Command_1 and Command_2) with database expert > links
    I would like to know if it is possible to UNION the two sets

    Don't think so.
    I have only done that by linking from Oracle to the other database and forming the union in Oracle.
    Ian

  • Ora AppS 10 Vs Oracle other Databases (Archtiecture diff)

    Friends,
    I don't have idea about Oracle Application Server.
    And i am going to check Oracle Application Server just for knowledge purpose.
    I want to know, Is Oracle App Server 10 has same architecture like Oracle 10g or other databases.
    I mean does it has same concept of Control file, datafile and others?
    Can someone mention the points of "Post Implementation of Oracle Application Server 10"?
    What should be mine primary task?
    i would really appreciate any helpful comments.

    No, the Oracle Home directory could seem very similar, but is because they have a like a common platform, because is some products the OAS could use a database and the DB could use the Enterprise manager that need a little OAS for work, as OC4J and so on.
    OAS have different control options, the master process is the opmn and it has his own folder with bin and config folders. And for the applications, like any web server, it needs where to alocate the apps, so it have the j2ee/OC4JContainter/... the database could have this but is because as I say it uses the EM.
    THey are not quite similar but they could share some characteristics.
    REgards

  • Oracle VPD on Remote database using DBLINk

    Hi All,
    How can i apply row level security on a table that is available in another database using DBlink
    we have two databases PDSSM and EVTA, and i would like to apply row level security on a table in EVTA from a schema in PDSSM using dblink. MXODSADM IS A SCHEMA IN EVTA AND MXEMBARGO IS A SCHEMA IN PDSSM. there is a dblink(EVTA.GMM.COM) between mxembargo and mxodsadm.
    begin
    dbms_rls.add_policy (
    object_schema => 'MXODSADM',
    object_name => 'vehicle_retail_sale',
    policy_name => ' MXEMBARGO_EVTA_POLICY',
    function_schema =>'MXEMBARGO',
    policy_type => dbms_rls.SHARED_CONTEXT_SENSITIVE,
    --policy_type => dbms_rls.STATIC,
    policy_function => ' MXEMBARGO_EVTA_POLICY.MXEMBARGO_EVTA_PREDICATE',
    statement_types => 'select, insert,update,delete',
    update_check => TRUE,
    enable => TRUE,
    static_policy => TRUE
    end;
    I am a complete Database person and i need to do this in my application, can anyone provide me how can i do this using dblink.

    wojpik wrote:
    hello
    I have one short question to you.
    Is that possible to create view at remote database using dblink? Following syntax returns error
    create view ViewName@DbLinkDame (ColumnName) as
    (select 1 from dual )
    "ORA-00905:missing keyword"
    Is that possible at all?
    And particulary - is that possible when remote database is MSSQL and I am using heterogeneous services?
    I really appreciate your help
    best regards
    Wojtek
    Edited by: wojpik on Oct 21, 2009 3:59 AMI doubt you would be able to fire any ddl through database link. You have to connect to remote database to run any ddl even if it is Oracle or some other database.
    Regards
    Anurag

  • Oracle Enterprise Manager 11g Database Control log file location

    Any one knows where the log file is for Oracle Enterprise Manager 11g Database Control. I am trying to set up EUS proxy authentication and running into issues when trying to search proxy user in my DB. The search returns no results and I am not sure where to look for. Please not my setup does work for EUS with shared or exclusive schema. I need to use Oracle DB proxy authentication for my application and that would need a setup of EUS with proxy permissions so please advice if you know where the log file is for Oracle Enterprise Manager 11g Database Control or if there is any logging I can turn on to see what search parameters are passed from Oracle Enterprise Manager 11g Database Control to my DB by using DB audit etc.
    Thanks,

    Be patient...wait for report.
    If after some time report does not appear, go to Advisor Central and find it there.
    :p

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

Maybe you are looking for