Posts

Showing posts with the label oracle

Connection Basic between Java and Oracle

1. Create ODBC driver for oracle if 32bit os and 32 bit oracle no issue. if 64bit os and 32 bit oracle issues !!! go to C:\Windows\SysWOW64\odbcad32.exe then add a new odbc (here i have created JavaOracleODBC) connection for oracle using username and password. 2. Open Eclipse and new project and write the below codes   import java.sql.*; public class dbconnection {     /**      * @param args      */     public static void main(String[] args) {         // TODO Auto-generated method stub         try{             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");         }catch (ClassNotFoundException e){             System.out.println(e.getMessage());         }         t...

Database Link with Oracle to MSSQLServer

Here I have posted about how to connect with MSSQLSERVER from Oracle. There is a difference between Oracle 10g and 11g. In 10g parameter HSODBC is used inithsodbc file and In 11g DG4ODBC is used in initdg4odbc file. Using Generic Connectivity (HSODBC) we can create db link between Oracle and SQL server. Machine (1) DB Version : Oracle 10g Operating System : RHEL 5.4 IP : 192.168.0.31 Host : abcdbt Machine (2) Version : SQL Server 2005 Operating System : Windows server 2008 x86 IP : 192.168.0.175 Host : SQLDEV1 User/PW : sa/abc@123! (Connect to database) Database : SQLTEST (exsisting) Table : T (“ T “ is the table existing in SQLTEST database with 10 rows) Prerequisites in Machine (2): a) Oracle 10g software b) User account to access SQL Server database (sa/abc@123!) c) Existing SQL Server Database (SQLTEST) d) Tables (testing purpose) (T) Steps: 1) Install Oracle 10.2.0.1 (Only SW,No need of database) (Machine 2) 2) Create a DSN where your windows Oracle 10g SW resides (Machine 2) Cont...