SQL database move to Oracle

Hello,
I posted here yesterday about locating the Database connection string of a JSP program that I'm currently fixing.
A little background though, I'm actually an asp.net developer so some of these things in JSP is still new to me.
Anyway I found two files that may be connected to the database connection:
jdbc.properties :
jdbc.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.password=password
jdbc.url=jdbc\:sqlserver\://xx.x.x.xxx\:1433;DatabaseName\=Database1;failoverPartner\=xx.x.x.xxx;charset\=utf-8
jdbc.username=sa
and
jdbc_master.properties
jdbc.master.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.master.password=password
jdbc.master.url=jdbc\:sqlserver\://xx.x.x.xxx\:1433;DatabaseName\=Database2;failoverPartner\=xx.x.x.xxx;charset\=utf-8
jdbc.master.username=sa
Now what I need is now convert the connection string to connect to a converted Oracle Database. I have all the needed parameters such as the username, password, database name, ip address, etc.
Do I just change the driverClassName for this to an oracle string for me to connect to the new database?
Need expert advice, thanks!

You need to have classes12.jar in you classpath.then this will work
<%@ page import = "java.sql.*"%>
<%
//String driverclass="oracle.jdbc.driver.OracleDriver";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@<ipaddress>:<portnumber>:<schema name>","<userid>","<password>");
Statement st=con.createStatement();
ResultSet rs=null;
rs=st.executeQuery("select");
%>

Similar Messages

  • How to copy sql database tables to oracle database

    hii everybody,
    i have 50 sql databse tables and i want to copy these tables into oracle database,how can i achive this?.Any help highly appreciated.
    thanks.

    Hi,
    You haven't said if this is a one-off copy of the data or if it is comething you want to do on a regular basis.
    If it is a one-off move of the data then you could use the SQL*Developer migration workbench, see here for more details -
    SQL*Developer main page -
    http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html
    Database Migration technology -
    http://www.oracle.com/technetwork/database/migration/index-084442.html
    If it is something you want to do on a regular basis then you could use a gateway to make a connection between SQL*Server and Oracle and then copy or select from the remote tables.
    The following page has more detail -
    http://www.oracle.com/technetwork/database/gateways/index.html
    and this note if you have access to My Oracle Support -
    Master Note for Oracle Gateway Products (Doc ID 1083703.1)
    You could also use GoldenGate which allows real-time replication between Oracle and non-Oracle databases -
    http://www.oracle.com/technetwork/middleware/goldengate/overview/index.html
    Regards,
    Mike

  • Is it possible to migrate WebCenter Portal data from a SQL database to an Oracle database?

    We have our WebCenter Portal applications set up using a SQL database. Now we're wanting to migrate to an Oracle database and I'm wondering if that is possible.

    Yes it should be possible though i have not tried it myself. You basically export a file from mds ( xml) and import it into oracle db.
    Thanks
    manish

  • Steps to migrate SQL Database to Windows/Oracle

    hi
    We have an SQL database in our client network and client wants to migrate it to Windows/Oracle. Currently they have multiple databases on the same SQL server.
    So I am curious to know if oracle also allows the same in Windows.
    I read that we can indeed install one oracle home and use DBCA to create multiple oracle databases on the same host. Any pointers to any documents relevant? I also want to understood this setup and what it means for performance, backup/restore/recovery, patching/upgrade etc.
    Request your valuable inputs on this topic please.
    Regards,
    Raja

    936639 wrote:
    Basically i'm an oracle DBA and never worked in SQL Server. So could you please explain me in detail the below points alone
    " Currently they have multiple databases on the same SQL server (SQL allows it) . So I am curious to know if oracle also allows the same in Windows. I read that we can indeed install one oracle home and use DBCA to create multiple oracle databases on the same host"
    As you said you are an Oracle dba so you should know that within one Oracle home, we can create as many database as we want based on the hardware specs of that machine, though its not a good idea. You can create multiple database definitely under one home on Windows as well.
    Aman....

  • How to configure SharePoint 2010 / 2013 Search for SQL Database Contents and Oracle Database Contents?

    Hi All,
    We are planning to maintain the contents in SQL / Oracle. Could you please suggest anyone which is best for SharePoint 2010 / 2013 Search. How to configure the search for external content source?
    Thanks & Regards,
    Prakash

    This link explains supported and non supported scenarios to use Oracle for BCS
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/453a3a05-bc50-45d0-8be8-cbb4e7fe7027/oracle-db-as-external-content-type-in-sharepoint-2013
    And here is more on it
    http://msdn.microsoft.com/en-us/library/ff464424%28office.14%29.aspx 
    And here how you can connect Oracle to SharePoint for BCS functionality
    http://lightningtools.com/bcs/business-connectivity-services-in-sharepoint-2013-and-oracle-using-meta-man/
    Overall it seems SQL doenn't require any special arrangement to connect BCS to SharePoint.
    Regards,
    Pratik Vyas | SharePoint Consultant |
    http://sharepointpratik.blogspot.com
    Posting is provided AS IS with no warranties, and confers no rights
    Please remember to click Mark As Answer if a post solves your problem or
    Vote As Helpful if it was useful.

  • SQL - Database access using Oracle.connect(getCLass(), "connect.properties")..IM LOST

    Hi,
    I use Oracle.connect(getClass(),"connect.properties") before all of my #sql statements. If there are a bunch of methods with #sql statements, I use the connection method. I think this is my problem and Id like some feedback from other people.
    1) Should i be using an Oracle.connect statement before every #sql?
    2) If so, does it create new connections all the time or does it just know there is a current connection so it doesnt keep adding new connections?
    3) Is there a way to get one connection and then test to see if there is a connection so that i dont keep getting new connections?
    4) Do I have to close the connections? I tried Oracle.close(); but got some wierd errors. I read somewhere that If autocommit is true, you dont have to close jdbc connections.
    Thanks for your time and I appreciate any feedback that anyone has to offer.

    Hi Adam,
    Please find the answers inline.
    I use Oracle.connect(getClass(),"connect.properties") before all of my #sql statements. If there are a bunch of methods with #sql statements, I use the connection method. I think this is my problem and Id like some feedback from other people.
    1) Should i be using an Oracle.connect statement before every #sql?No, you don't have to call this each time, just call this once to intialize your DefaultContext and from then on, whenever
    #sql is used, it would fetch the connection from the DefaultContext.
    2) If so, does it create new connections all the time or does it just know there is a current connection so it doesnt keep adding new connections?No, it doesn't create connections each time.
    3) Is there a way to get one connection and then test to see if there is a connection so that i dont keep getting new connections?There would be only one connection
    4) Do I have to close the connections? I tried Oracle.close(); but got some wierd errors. I read somewhere that If autocommit is true, you dont have to close jdbc connections.The connection has to be closed explicitly using Oracle.close();
    For samples on using connect.properties refer to,
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/9i_sqlj/9i_sqlj.html#BatchingAndREFCursorSample
    Regards
    Elango.

  • How to move data from one database to another oracle database

    Hi
    All,
    AIX 5.3
    Oracle 10.2.0.3
    I want to move data between one oracle database to another oracle database.
    I know two method those are
    export/import
    dblink
    is there any other way I can move data?
    Thanks,
    Vishal

    I know below methods. However, using a perticular method is based on volume and type of data.
    1. imp/exp
    2. impdp/expdp
    3. SQL COPY command
    4. Transportable tablespace mathod
    5. dblink
    6. Export to flatfile and then use SQL Loader
    7. Oracle Migration Workbench
    Cheers
    Sameer

  • Migration from of database and app from SQL server 2005 to Oracle 10g

    Hello Every body,
    Lately, I have been requested to migrate one inhouse developed hub application from SQL server 2005 to Oracle 10g. The objective is to move application and also the database to Oracel 10g.
    Here is the current platform:
    OS Win 2008 64 bit
    JDK 1.4.2
    JBoss 3.2.5
    EJB 2.1
    My question is what kind of issues you guys see in above upgrade. As far I know, Schema and Database migration can be done by Oracle workbench. Oracle 10g supports JDK 1.4. Oracle 10g also supports EJB 2.1.
    Anything, I need to take into consideration or any risks or problems. I would like to list down all the risks, and accordingly, I am thinking of start the upgrade.
    Thanks in advance.
    Regards,
    Zeeshan Qureshi

    In general the Java/J2EE application needs work in the following categories:
    1. Connection Settings: Use Oracle JDBC drivers, create new data sources, connection pools and what not. Disable AUTOCOMMIT for Oracle JDBC Connections.
    2. For EJBs, you should regenerate the entity beans because some object names/column names might have changed in oracle.
    3. Any custom SQL that is in use in the EJBs will have to be ported to Oracle just as you would do in stored procedures and other applications.
    4. For Java front-ends, if you are using callouts to stored procedures and expecting result sets then they will require some changes. You need to modify the stored procedure call signature to include the REF CURSOR variables and process them.
    5. Changes to any SQL Server specific database functions manipulating character/date data will be required.
    6. CLOB/BLOB/XML apis are different across databases so if you are using those then focus on them as well.
    7. Retreiving Auto/generated keys from database also may need changes from what I have seen.
    Hope this helps..
    Regards
    Prakash
    NOTE: Not sure why but my posts from yesterday are not visible today. Even worse is that I can see them in one browser (FireFox) but not in Internet explorer. Crazy browser day I am having.

  • How to move sql server DB to oracle and DB2 to oracle

    Hi ,
    I would like to like to know what is the work involved when
    i want to retire sql server database and move to oracle and db2 to oracle.
    Please let me know the tools used for this purpose or wha should be done actually.
    Thanks in advance

    For the SQL Server migration you could use the SQL Developer utility. More details can be found at:
    http://www.oracle.com/technetwork/database/migration/index-084442.html
    This SQL Developer based migration utility also supports DB2 migrations when the Db2 database is a UDB DB2 V7, V8 or V9 and if it is running on LUW. For ALL other DB2 databases no actual migration utility is available. Possible alternatives might be Golden Gate, Oracle Database Gateway or the SQL*Loader utility.

  • How to migrate Azure SQL Codefirst DB to Oracle database?

    Hi,
    we have been developing a Web application with Windows Azure Code first  SQL DB using Code first approach.
    In the future we want to migrate our Azure SQL Code first DB to Oracle. If we migrate it to Oracle, does the application works fine? or do we need to do any additional actions in migrating from Azure SQL Code first  db to Oracle DB?
    It would be great if  anyone provides me complete information on this.

    Hi,
    You should be able to move the Azure SQL Code First Database to Oracle Database. You will have to make minor changes, for e.g connection string.
    Please have a check on the below link which talks about using Entity Framework 6 Code First with Azure SQL database as a backend. It will give you an idea on how to approach your migration.
    http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/migrations-and-deployment-with-the-entity-framework-in-an-asp-net-mvc-application
    Regards,
    Mekh.

  • How to move SQL database from one location to another location i.e. from C' drive to D' drive

    Hi, How to move SQL database from one location to another location i.e. from C' drive to D' drive ? please share some link.
    Thanks and Regards, Rangnath Mali

    Hi Rangnath,
    According to your description, my understanding is that you want to move databased from C drive to D drive.
    You can detach Database so that the files become independent, cut and paste the files from source to destination and attach again.
    There are two similar posts for your reference:
    http://mssqltalks.wordpress.com/2013/02/28/how-to-move-database-files-from-one-drive-to-another-or-from-one-location-to-another-in-sql-server/
    http://stackoverflow.com/questions/6584938/move-sql-server-2008-database-files-to-a-new-folder-location
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Error while migrate my primavera sql database to oracle database

    I have used the migrate batch file to migrate my old database "Primavera V 6.0 SQL" to new database "Primavera V 8.2 Oracle"
    the process in my labtop is OK
    but in my PC the process hanged on "Creat remaining database objects (e.g. constraints and indexes) " Step
    with this error
    "Error in Run SQL Script orppm_ins_aux.sql: DatabaseToolException (ORA-02298: cannot validate (ADMUSER.FK_RSRCRATE_RSRC) - Perant keys not found ) "
    any help fixing this error

    user11108903 wrote:
    Hi,
    I used the migration tool to migrate a Primavera 6.2 SQL database to Oracle 11G DB. The migration tool runned successfully and I am able to login to the database using P6.2 client with no problem; however when attemptiong to update the license on the now Oracle database using the privuser account I get the following error "License could not be loaded because of error: List index out of bounds (247). Please make sure that you are using a privileged database login" the error comes up before I can browse to the location of licesne.txt file. Same procedure on a "native" Oracle P6.2 database works perfectly with no problem. Has any one run into this problem before? any help will be appreciated.
    Best Reagrds,I have not seen that specifically but it appears that not all of the grants were correctly applied.
    I would suggest running the schema validation tool which can be found on the knowledgebase as Solution ID: prim75459 as this will tell you what is missing/invalid.
    Once you know that, you can pull the neccesary grants from the create scripts located in the cd1\install\database\scripts folder.

  • MS SQL Procedure Call from Oracle Database

    I have Oracle Database 11g connected to MS Sql Server 2008 via dg4msql, and need to execute procedure on MS Sql with parameters from Oracle, and get dataset (table) as a result.
    I'm not sure is it possible to call procedure directly from Oracle; One solution would be make function on MS SQL, and put select on procedure from Oracle, but what with parameters?
    Is there some possibility to call this procedure from Oracle and get this dataset as a cursor?
    Thanks in advance!
    Edited by: mihaelradovan on 2012.04.26 14:35

    Yes, of course I have DB Link in Oracle and procedure in SQL Server.
    Btw, I can select data from SQL Server table.
    I made one function in SQL Server, and I can not make select on this function, but in SQL Server I made view as select * from function_name, and select on this view from Oracle works. But problem is I have to call this procedure or function with parameters, and with view I can not do this.
    So, I must call procedure or function with parameters directly. I made all by the book (Oracle® Database Gateway for SQL Server User’s Guide), but probably I miss something...

  • How to Migrate my database from SQL Server 2000 to Oracle

    I want to transfer my database from SQL Server 2000 to Oracle, Can I do this without using Oracle Migration Workbench ??
    Please help me.
    Thanks in advance
    Vicky... :-)

    Do you have a good technical reason for not wanting to use the Migration Workbench?
    Given that it's free and does a hell of a lot of the work for you, why wouldn't you use it?
    Other than that, I would say you would be on your own...
    cheers,
    Anthony

  • Count number of rows from oracle and sql database and generate a report

    Hi All,
    Can someone help me in writing a java program for the following scenario?
    1. Read the number of rows available from oracle table and print the total row count in a Report.txt text file.
    2. Read the number of rows inserted in a sql database (after a specific process-just an information) and print the total row count in the same text file Report.txt .
    3. Read the Error Log file (which is generated after a specific process say it has success and failed report for each iterations) and print the number of success and number of failure in the same text file Report.txt .
    I need the final Report.txt file in the following format:
    1. Oracle table <table name> has 500000 rows.
    2. After completion of the specific process 300000 rows were added to SQL table <table name>
    Error Log Report:
    300000 successfull entries and 200000 failed entries were found from the Error Log file.

    Thanks for your immediate reply.
    I'm just a beginner in java so if i make any mistake please correct and excuse me. :)
    This is the code i have for connecting to two different database.
    package connectDatabase;
    * @author
    import java.sql.*;
    public class ConnectTo
         public void OracleDB()
              Connection dbconn;
              try {
                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                String connString="jdbc:oracle:thin:@SYS_IP:1521:oracl";
                dbconn = DriverManager.getConnection(connString, "uname","pwd" );
            catch(SQLException sqlex)
                 sqlex.printStackTrace();
            catch(Exception excp)
                excp.printStackTrace();
         public void SqlDB()
              Connection conn;
              try { 
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); 
                String url = "jdbc:odbc:connectDB"; 
                conn = DriverManager.getConnection(url,"uname","pwd");  
              catch (Exception e)
                System.err.println("An Exception occured! " +e.getMessage()); 
    }I'm just codding the second half which is for connecting to oracle databse and calculates the row count and displayes in the command prompt.
    then connects to SQL database and counts successfull insert in the table.(row count) and displayes on the command prompt.
    can you simplify the above code so that i can call the oracleDB() method and SqlDB() method seperately from another calss file using the object of this class?
    I'm ok if the report can be seen in a command prompt. FInally i need to calculate the success and failure count from the log file. will let you know once i'm done with codding.

Maybe you are looking for