How to create a database link from Oracle database to DB2 on system i - oracle

I'm trying to establish a connection to a DB2 database using a database link in Oracle.
The final objective is to be able to do a "create table XXX as select * from YYY#DB2"
I can connect directly to the DB2 database using SQL Developer and the db2jcc.jar connector but i can't create the database link.
Additionaly, when i use the feature "Migrate to Oracle..." on SQL Developer it just dump a java exception.
Thanks in advance,
Manuel

One way of doing this is with "heterogenous services", ie, Oracle takes via ODBC to a remote non-oracle data source.
There's a manual for this in the standard doc set:
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/heter/index.html
but in a nutshell, the basic steps are:
1) have an ODBC driver for DB2 on your database server, or on a machine that your database server can reach.
2) Configure an ODBC target for that DB2 database. Lets call it "MYDB2"
3) create a file initMYDB2.ora in $ORACLE_HOME/hs/admin. Configure it as per the sample (init4g4odbc.ora). It points to your MYDB2 target.
4) In that directory, you'll also find samples for listener.ora and tnsnames.ora.
So you'll end up with a tnsnames entry called "MYDB2". It will reference the initMYDB2.ora, which will point to the MYDB2 odbc target, which will be your DB2 database.
Then you create a database link in the normal way:
create database link blah
connect to my_db2_user
identified by my_db2_password
using 'mydb2';
Hope this helps.

Related

How do I connect to oracle apex database through JDBC?

I have got a workspace in apex.oracle.com , Now , I want to connect to that database through JDBC from ubuntu-14.04 machine. please explain the steps , From where should I download the drivers and what should be the arguments in
DriverManager.getConnection();
step by step please. Thank you
You will not be able to connect to the database that's supporting the APEX instance on apex.oracle.com. If you are hosting your own instance, it's no different than connecting to any other Oracle database.A quick code snippet can be found here: http://www.java2s.com/Code/Java/Database-SQL-JDBC/TestOracleJDBCDriverInstallation.htm. You will need a password for the user/schema that you wish to connect to. If you don't have one, then talk to your DBA.
BTW, please remember that no production-type application and data should be used on the public APEX instance.
Maybe your problem is (or was) that you cannot connect via JDBC using the users you administered in your APEX workspace.
It seems to me that APEX users are not regular users for DB connections via JDBC. If my assumption is right, then you need to create database user with sufficient privileges to access the workspace tables.

import data from access to relational database (oracle)

Is it possible to transfer data from non-relational databases to relational database systems? I have data in an access database and I want to export it to a relation oracle database. If possible, how do i set up the relations between various tables? Thanks
To connect to Oracle with MS-Access.
Step 1: Prepare the MS-Access environment
Step 2: Define ODBC connectivity
Step 3: Prepare the Oracle Environment
Step 4: Configure and Start the Oracle Listener
Step 5: Configure Oracle HS:
Step 6: Configure Oracle connectivity to Windows Machine
Step 7: Create a database link
This article shows how Oracle's Heterogeneous Services can be configured to allow a database to connect to a Microsoft Access database using standard databases links.
http://www.orafaq.com/node/60
To migrate a Microsoft Access Database to Oracle Database 11g read the following link
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/hol08/sqldev_migration/msaccess/migrate_microsoft_access_otn.htm

Reading SAS Dataset into Oracle

I have installed SAS Enterprise Guide 9.3 and SAS JDBC Drivers 9.3 and have some test SAS data sets that I need to load into Oracle. We have licenses for
ODBC SAS/ACCESS ODBC
PCFILE SAS/ACCESS PC File Formats
CONNECT SAS/CONNECT
WKSPSRVLOCAL SAS Workspace Server for Local Access
I am using Windows 7. I am not sure about next steps
Can I read SAS Datasets having just installed SAS EG?
Which JAR files are required
How will the connect string look like and what will be the port, username & password.
Appreciate any help I can get.
Thanks
Not an expert in this. If you can do this, you will need to connect through the local Workspace server. I've only connected through a server Workspace server to get a JDBC connection.
How I've done it in the past. Always possible this is not the best method.
Step 1. Connect to SAS workspace. http://support.sas.com/documentation/cdl/en/itechjcdg/61499/HTML/default/viewer.htm#connfact_direct.htm
Step 2. Use the DataService on the Workspace to get a JDBC connection to the current SAS session. http://support.sas.com/documentation/cdl/en/itechjcdg/61499/HTML/default/viewer.htm#jdbcconn.htm
Alternative: Connect through ODBC to Oracle in SAS and use SAS to write the tables into your Oracle DB. See the SAS/ACCESS documentation. http://support.sas.com/documentation/onlinedoc/access/index.html
Hope this helps!

How change the driver used by MS Access 2010 x64 to connect to external ORACLE database

I want to know if is there a way of change the driver used by Microsoft Access to extract data (only use select like querys) from Oracle 9i data base.
The Access to Oracle connection is made using an external data source (linked table) and usually the default Access driver is ODBC for ORACLE, but I want to change that and use a JDBC driver for ORACLE instead.
Thanks in advance.
The Access to Oracle connection is made using an external data source (linked table) and usually the default Access driver is ODBC for ORACLE, but I want to change that and use a JDBC driver for ORACLE instead.
I'm fairly certain that this is impossible. Access linked tables connect via Jet/ACE (for links to another Access database), or ODBC (for all other data sources). JDBC is not an option.

Access Oracle Table from Sql Server

I have two different databases, one is in sql server and one is in oracle. i create a linked server between those two. how can i get data from oracle without the option "openquery".
Please help me out this.
You can create a connection link in oracle and then you can access the sql server database
see: Oracle connection link

Resources