Query data from MS SQL db through Oracle ? By using JAVA ?

Hi folks,
I would like to sync our one table in oracle db with table in different system, stored in MS SQL database.
What would be the easiest option for connection from Oracle to MS SQL db to be able to query data from MS SQL through some Oracle package?
If possible, I would like to keep all "tricky steps" within Oracle database. I heard about option with Java, but so far we have no experience with java in Oracle.
Our database: Oracle 11g Database Standard Edition One
Many thanks,
Tomas

C:\Users\tomeo>dg4pwd HELIOS
ORACLE Gateway Password Utility
Constructing password file for Gateway SID HELIOS
For user account SYSTEM
OPW-00001: Unable to open password-file (RC=0)
C:\Users\tomeo>

Similar Messages

  • Use evdre to query data from a SQL View

    Hi all
    I believe that it is possible to use evdre to query data from a SQL View. If this is possible then how does one go about setting it up in the evdre options (assuming that the view has already been created)?
    Regards,
    Byron

    Byron,  perhaps this is no longer supported, it might be worth opening up a case at service.sap.com on this.  However, I did find the following on Page 11 of the "Usages and Considerations of EVDRE" pdf file.  This doc is imbedded in the helpfile for BPC 7 SP5 (which was released in August of 2009, well after note 1315011 was last updated.
    It looks like you are limited to one custom view per application, since you have to name the view in a parameter at the APPLICATION level.  Go into BPC Administration, login to the application related to the custom view, choose "Set Application Parameters" and enter the name of the view to the Application Parameter called "EVDRE_QUERYVIEWNAME"  If it is not listed, go ahead and create it at the bottom of the Application parameter screen.
    Also:  I interpreted the following info from Page 10 of the same doc:
    In your EVDRE, set the following options:
    QueryEngine: MANUAL
    QueryType:  enter either NEXJ  OR TUPLE  see below:
    NEXJ  - Use two-dimensional queries using the nonemptycrossjoin function
    TUPLE  - Use two-dimensional queries using tuples"
    And I'm assuming you'd enter a Y for the following two parameters:
    QueryViewName
    "..to enforce the query engine to use a used-defined SQL view of the fact tables, when trying to read the values using SQL queries. This option is typically used in conjunction with the SQLOnly option (see below). "
    Option SQLOnly
    "..to enforce the query engine to only execute SQL queries, when reading data. This can be achieved using this option."

  • How to replicate data from MS SQL Server  to Oracle

    Hi,
    Can someone please help me on how to replicate data from MS SQL Server to Oracle 8i database.

    Dear,
    I'm a student.
    I do simple replication on Oracle 8.0.5 successfully. (one master site and one snapshot site). I only use the SQL*Plus and Schema Manager to do.
    But when I do advance replication (multimaster replication) I meet many problem. So I don't get the result.
    Do you show me the technology to do that ?
    Thanks !

  • TRANSFER DATA FROM MS-SQL SERVER TO ORACLE

    hello everybody
    can anyone tell me how 2 transfer or convert data from ms-sql server to oracle
    is there any utility
    if yes let me know .
    thanks in advance

    There are various options depending on how much data we're talking about, where you want the program logic, whether it's a one-time migration, etc.
    Among the options
    - Use SQL Server's DTS
    - BCP the data from SQL Server into flat files and use SQL*Loader to load it
    - Create a database link using Heterogeneous Services and Generic Connectivity to extract data from SQL Server
    - Use the Oracle Migration Workbench, which is now integrated into SQL Developer
    - Use an ETL tool like Oracle Warehouse Builder
    Justin

  • Transferring data from MS SQL Server to Oracle through Oracle's Stroed Procedure

    Hi,
    I need to access 3 tables of MS SQL Server database through oracle's Stroed procedure.
    Is It possible? if yes how to do?
    is there any way of accomplishing this?

    Yes. Using Attunity Connect native drivers for Oracle. Attunity Connect drivers are also licensed and resold by Oracle under the name "Oracle Transparent Gateways" or "Oracle Eterogeneous Services".
    The OEM Oracle driver are "light" ones. The Attunity drivers are more complete. Consult www.attunity.com

  • Help on measuring and labelling data from 4 different probes through LCR E4980A using labview

    CONDITION:
    Need to measure impedance (Z,theta) from 4 different probes using Agilent LCR E4980A meter through labview
    Here is how this is done. Using two different vi's.
    1-Switching vi-which is measuring impedance from Probe1 and switch to probe 2 and probe 3 and then to probe 4. (use medium rate on LCR)
    2-Test vi-which uses a single frquenccy list from a text file to run continous sweep and stores the measured data in a file.
    Test runs for about 1 hour.
    ISSUE:
    The stored data does not tell or label which data is for probe 1 or probe 2 and so on. All 1 hour data is in one file and very difficult to point to corresponding probe and kind of useless.
    QUESTION:
    As there are two separe vi's being used, is there a way to record or label the data withe the corresponding probe number or some way to point probe with data recorded? Any help would be appreciated.

    Thanks! Mike for your reply.
    I am attaching three files, I hope this helps to understand.
    1-Frequency List.txt - is just frequency listed in txt file to run LCR continously
    2-Frequency Sweep Data Capture.vi - is the labvie vi which runs and stores LCR data in a file
    3-LCR Switching in labview (jpg) is also a vi which switches between 4 probes for measurement.(e.g. Probe1-Ref-A, Probe2=Ref-B, Probe3=Ref-C and probe4=Ref-D)
    From here lets say when program measures probe1 , the data stored from file 2 should somehow points to that and then the program switches to probe2 the data should show that and similarly other two probes. Currently the stored data is one big fle with no mention of which data is for which probe.
    Attachments:
    Frequency Sweep Data Capture.vi ‏136 KB
    LCR switching labview.JPG ‏99 KB
    Frequency List.txt ‏46 KB

  • Sql server to Oracle migration using java

    I am doing a project in which i need to create a java application which migrates sql server(2000) db to oracle..kindly help me out

    Thanks for your help..i do not want any third party
    components..i am almost done with the tables
    migration and am trying to figure out about
    procedures..here is a code which does migrate
    tables...hope it helps you too!
    * Copyright Isocra Ltd 2004
    * You can use, modify and freely distribute this file
    as long as you credit Isocra Ltd.
    * There is no explicit or implied guarantee of
    functionality associated with this file, use it at
    your own risk.
    package com.isocra.util;
    import java.sql.DatabaseMetaData;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.PreparedStatement;
    import java.sql.ResultSetMetaData;
    import java.util.Properties;
    import java.io.FileInputStream;
    import java.io.IOException;
    * This class connects to a database and dumps all
    the tables and contents out to stdout in the form
    of
    * a set of SQL executable statements
    ublic class db2sql {
    /** Dump the whole database to an SQL string */
    public static String dumpDB(Properties props) {
    String driverClassName =
    props.getProperty("driver.class");
    String driverURL =
    props.getProperty("driver.url");
    // Default to not having a quote character
    String columnNameQuote =
    props.getProperty("columnName.quoteChar", "");
    DatabaseMetaData dbMetaData = null;
    Connection dbConn = null;
    try {
    Class.forName(driverClassName);
    dbConn =
    DriverManager.getConnection(driverURL, props);
    dbMetaData = dbConn.getMetaData();
    catch( Exception e ) {
    System.err.println("Unable to connect to
    database: "+e);
    return null;
    try {
    StringBuffer result = new StringBuffer();
    String catalog =
    props.getProperty("catalog");
    String schema =
    props.getProperty("schemaPattern");
    String tables =
    props.getProperty("tableName");
    ResultSet rs =
    dbMetaData.getTables(catalog, schema, tables,
    null);
    if (! rs.next()) {
    System.err.println("Unable to find any tables
    matching: catalog="+catalog+" schema="+schema+"
    tables="+tables);
    rs.close();
    lse {
    // Right, we have some tables, so we
    can go to work.
    // the details we have are
    // TABLE_CAT String => table catalog (may be null)
    // TABLE_SCHEM String => table schema
    (may be null)
    // TABLE_NAME String => table name
    // TABLE_TYPE String => table type. Typical types
    are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL
    TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
    // REMARKS String => explanatory
    comment on the table
    // TYPE_CAT String => the types
    catalog (may be null)
    // TYPE_SCHEM String => the types
    schema (may be null)
    // TYPE_NAME String => type name (may
    be null)
    // SELF_REFERENCING_COL_NAME String
    => name of the designated "identifier" column of a
    typed table (may be null)
    // REF_GENERATION String => specifies
    how values in SELF_REFERENCING_COL_NAME are created.
    Values are "SYSTEM", "USER", "DERIVED". (may be
    null)
    // We will ignore the schema and
    stuff, because people might want to import it
    somewhere else
    // We will also ignore any tables
    that aren't of type TABLE for now.
    // We use a do-while because we've
    already caled rs.next to see if there are any rows
    do {
    String tableName = rs.getString("TABLE_NAME");
    String tableType =
    rs.getString("TABLE_TYPE");
    if
    ("TABLE".equalsIgnoreCase(tableType)) {
    result.append("\n\n--
    "+tableName);
    result.append("\nCREATE TABLE
    "+tableName+" (\n");
    ResultSet tableMetaData =
    dbMetaData.getColumns(null, null, tableName, "%");
    boolean firstLine = true;
    while (tableMetaData.next()) {
    if (firstLine) {
    firstLine = false;
    } else {
    // If we're not the first line, then finish
    the previous line with a comma
    result.append(",\n");
    String columnName =
    tableMetaData.getString("COLUMN_NAME");
    String columnType =
    tableMetaData.getString("TYPE_NAME");
    // WARNING: this may give
    daft answers for some types on some databases (eg
    JDBC-ODBC link)
    int columnSize =
    tableMetaData.getInt("COLUMN_SIZE");
    String nullable =
    tableMetaData.getString("IS_NULLABLE");
    String nullString =
    "NULL";
    if
    ("NO".equalsIgnoreCase(nullable)) {
    nullString = "NOT
    NULL";
    result.append("
    "+columnNameQuote+columnName+columnNameQuote+"
    "+columnType+" ("+columnSize+")"+" "+nullString);
    tableMetaData.close();
    // Now we need to put the
    primary key constraint
    try {
    ResultSet primaryKeys =
    dbMetaData.getPrimaryKeys(catalog, schema,
    tableName);
    // What we might get:
    // TABLE_CAT String => table catalog (may be null)
    // TABLE_SCHEM String =>
    table schema (may be null)
    // TABLE_NAME String =>
    table name
    // COLUMN_NAME String =>
    column name
    // KEY_SEQ short =>
    sequence number within primary key
    // PK_NAME String =>
    primary key name (may be null)
    String primaryKeyName =
    null;
    StringBuffer
    primaryKeyColumns = new StringBuffer();
    while
    (primaryKeys.next()) {
    String thisKeyName =
    primaryKeys.getString("PK_NAME");
    if ((thisKeyName !=
    null && primaryKeyName == null)
    ||
    (thisKeyName == null && primaryKeyName != null)
    ||
    (thisKeyName != null && !
    thisKeyName.equals(primaryKeyName))
    ||
    (primaryKeyName != null && !
    primaryKeyName.equals(thisKeyName))) {
    // the keynames
    aren't the same, so output all that we have so far
    (if anything)
    // and start a
    new primary key entry
    if
    (primaryKeyColumns.length() > 0) {
    // There's
    something to output
    esult.append(",\n PRIMARY KEY ");
    if
    (primaryKeyName != null) {
    result.append(primaryKeyName); }
    esult.append("("+primaryKeyColumns.toString()+")");
    // Start again with the new name
    primaryKeyColumns
    = new StringBuffer();
    primaryKeyName =
    thisKeyName;
    // Now append the column
    if
    (primaryKeyColumns.length() > 0) {
    rimaryKeyColumns.append(", ");
    primaryKeyColumns.append(primaryKeys.getString("COLUMN
    _NAME"));
    if (primaryKeyColumns.length() > 0) {
    // There's something
    to output
    result.append(",\n
    PRIMARY KEY ");
    if (primaryKeyName !=
    null) { result.append(primaryKeyName); }
    result.append("
    ("+primaryKeyColumns.toString()+")");
    tch (SQLException e) {
    // NB you will get this
    exception with the JDBC-ODBC link because it says
    // [Microsoft][ODBC
    Driver Manager] Driver does not support this
    function
    ystem.err.println("Unable to get primary keys for
    table "+tableName+" because "+e);
    result.append("\n);\n");
    // Right, we have a table, so
    we can go and dump it
    dumpTable(dbConn, result,
    tableName);
    hile (rs.next());
    rs.close();
    dbConn.close();
    return result.toString();
    } catch (SQLException e) {
    e.printStackTrace(); //To change body of catch
    statement use Options | File Templates.
    return null;
    /** dump this particular table to the string
    buffer */
    private static void dumpTable(Connection dbConn,
    StringBuffer result, String tableName) {
    try {
    // First we output the create table stuff
    PreparedStatement stmt =
    dbConn.prepareStatement("SELECT * FROM "+tableName);
    ResultSet rs = stmt.executeQuery();
    ResultSetMetaData metaData = rs.getMetaData();
    int columnCount =
    metaData.getColumnCount();
    // Now we can output the actual data
    result.append("\n\n-- Data for "+tableName+"\n");
    while (rs.next()) {
    result.append("INSERT INTO "+tableName+" VALUES
    for (int i=0; i<columnCount; i++) {
    if (i > 0) {
    result.append(", ");
    Object value = rs.getObject(i+1);
    if (value == null) {
    result.append("NULL");
    lse {
    String outputValue =
    value.toString();
    outputValue =
    outputValue.replaceAll("'","\\'");
    esult.append("'"+outputValue+"'");
    result.append(");\n");
    rs.close();
    stmt.close();
    } catch (SQLException e) {
    System.err.println("Unable to dump table
    "+tableName+" because: "+e);
    /** Main method takes arguments for connection to
    JDBC etc. */
    public static void main(String[] args) {
    if (args.length != 1) {
    System.err.println("usage: db2sql <property
    file>");
    // Right so there's one argument, we assume it's a
    property file
    // so lets open it
    Properties props = new Properties();
    try {
    props.load(new FileInputStream(args[0]));
    System.out.println(dumpDB(props));
    } catch (IOException e) {
    System.err.println("Unable to open
    property file: "+args[0]+" exception: "+e);
    }hi,
    Thanks i used your coding and it works well...
    i also used other thing i inserting the queries and values in another schema with primary and foreign keys.. it works well..
    but problem is i cannot retrieve the unique constraint and other check constraint..
    i cannot insert it..
    and also i cannot create table in order i create the original..
    because the retrieve query s values display based on ascending order i want display query in creation time...
    because when i foreign keys .. the references in available before i create the table..that means a(table name) followed b(table name) .. a(table name) has contain foreign key of b(table name) .. but b (table name) not yet to create .. is possible.. to retrieve based creation time...

  • Read data from Excel and write into oracle database

    Hi
    I want  to know how can i read data from excel and write into oracle database using java.Kindly help me out to find a solution.
    Thanks and Regards
    Neeta

    Hai,
    I am suggesting the solution.
    I will try out and let u know soon.
    Make a coma separated file from your excel file.
    Assuming that your requirement allows to make a csv file.
    This file may be passed as an file object to be read by java.Using JDBC you must be able to populate the data base.You can also use String Tokenizer if needed.
    You do not want to  go via sql Loader?
    For reading the excel file itself do you want java?

  • What methods are available to migrate Data from MS SQL to Oracle DB 11g.

    Hi,
    Need to know the No of ways/ Techniques via we can Migrate data from MS SQL Server to Oracle DB 11g.
    Thanks ,
    NL

    hi,
    i came across this link in oracle demos :
    http://st-curriculum.oracle.com/obe/db/hol08/sqldev_migration/mssqlserver/migrate_microsoft_sqlserver_otn.htm
    the migration process using sql developer
    br,
    mrak

  • Best Practice on querying Data from Database

    Hello and I was wondering what is the preferred and best practice for querying data from an SQL database inside a JSP page. Is it using the JSTL library or another method? Thanks

    It depends on the size of the application really.
    The "correct and preferred" approach in a large MVC app would be to have a seperate class that does all the database access, retrieving the data into java objects.
    Check out [url http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html] DAO pattern
    You then "save" the data into request/session attributes, and forward to a jsp page to render the result.
    Most approaches recommend a separation between JSP (the view) and SQL code.
    The JSTL sql tags are provided more for "quick and dirty" code applicable in small applications, or for fast prototyping. That approach is not really robust for large scale applications.
    Cheers,
    evnafets

  • Loading from MS SQl Server to Oracle

    Hello,
    I am trying to load data from MS SQL Server to Oracle using LKM SQL to ORACLE, this works well with the tables with less number of rows but I have some tables with rows over few Mils so I am trying to use BCP to export into a flat file and then use SQL LDR to load into Oracle.
    My problem is ODI sits on UNIX and dosent support the BCP file format. Has someone ran into similar situation or have a solution to this?
    Thanks!

    Hi Srinivash, You can follow below KMs
    1. LKM SQL to SQL
    2. CKM ORACLE
    3. IKM SQL Incremntal Update (Insert and update)/ IKM SQL Control APpend (Insert only )
    Hope it helps.
    Thanks

  • How do I migrate views from MS SQL 2008 to Oracle 11g through SQL Developer

    Is there any way to migrate the views from MS SQL 2008 to Oracle 11g through SQL Developer? Please give me some detail steps. Thanks for your help.
    Kevin

    Hi Kevin,
    user13531850 wrote:
    Hi Turloch,
    When I use migrate to oracle, I got a problem, the migrate tool create a new schema for me in my case (AZTECA_KSMMS), it migrates all the stuffs under that schema (AZTECA_KSMMS). However my application need the all the Oracle data under schema AZTECA instead of AZTECA_KSMMS. Is there any way to specify specific schema (AZTECA) for target oracle database? Schema remapping is available:
    First Capture (separately) then during right click convert on the captured model there is a Specify the conversion options with a Object Naming tab where the schema (and other) name changes are editable.
    I have not used this recently.
    Also during the migration process, when I choose repository, there is a check box for truncate to reset repository to empty state, Do I need to check that truncate Check Box so the repository will be cleared from last migration?The repository can hold multple migration attempts. Check truncate to get rid of previous attempts information. This cleans up the repository - not the destination database.
    There are also online database and offline database options during the migration process, what are the difference between these two choices? After I migrated to Oracle, all my views has a red cross icon next to it. Does that mean the view migration is failed or not? Please give me your comments. Thanks for your help.offline: for big (amount of data) databases with simple data types,
    uses bcp + files + scripts + sqlldr.
    online: for small (amount of data) databases (easier),
    uses (Java) jdbc.
    The view is likely to be broken - recompiling it may help.
    The Oracle schema is created using a .sql file - see under generated in the directory you gave originally in the wizard. There is a .out file that contains the result of running this script including any errors. During conversion there are also likely to be warnings displayed on the UI.
    There may be a single issue that is causing multiple issues - if viewa depends on functionb, and functionb is broken, viewa will also fail.
    >
    Kevin-Turloch
    SQLDeveloper Team

  • How to query data from Oracle, MySQL, and MSSQL?

    For an environment consisting of Oracle 11g/12c enterprise edition, MySQL 5.7 community edition, and MSSQL 2008/2012 stanard/enterprise edition, is there any major issue using DG4ODBC to query data from all 3 platforms?
    Is there other free alternatives?
    If the queried data is mostly contained in MySQL or MSSQL, will it be more efficient to query from MySQL or MSSQL?
    If yes, any suggestion of how to do it in those platforms? I know MSSQL can use linked server but it is quite slow.

    mkirtley-Oracle wrote:
    Hi Ed,
        It is semantics.  By multiple instances I mean you have the gateway installed in an ORACLE_HOME which has 1 listener. However, if you are connecting to different non-Oracle databases or different individual databases of that non-Oracle database then you need multiple gateway instances for each database being connected.  I did not mean that you need a gateway installed in a separate ORACLE_HOME for each non-Oracle database to which you are connecting.
    Each of these would have a separate instance file within that ORACLE_HOME/hs/admin directory with the connection details for the non-Oracle database to which that instance connects.. So, you would have -
    initgtw1.ora - connects to MySQL
    initgtw2.ora - connect to SQL*Server northwind database
    initgtw3.ora - connect to SQL*Server test database
    etc
    etc
    Each of these instances would have a separate entry in the gateway listener.ora.
    In MOS have a look at this note -
    How To Add A New Database or Destination To An Existing Gateway Configuration (Doc ID 1304573.1)
    Regards,
    Mike
    Ah yes, we are in agreement, it was just semantics.  Thanks.

  • Decimal values truncated from SQL Call through Oracle ODBC

    Hi
    I'm using Oracle ODBC driver v 9.02.00.06; when I make a SQL call to query data from the Oracle ERP (PO_Lines_All), my decimal values are truncated. Instead of getting 112.25, I only get 112
    Can someone help me fix this problem?
    thanks

    The problem is commonly related to a language difference between Oracle and SQL Server.
    Try setting HS_LANGUAGE=american_america.we8mswin1252 in the intialisatuion file of HSODBC.
    Then start a new SQL*Plis session and give it a try.
    If you still have problems, set it to:
    HS_LANGUAGE=german_germany.we8mswin1252 in the

  • Export data from MS sql server table to an oracle table

    I need to move data from a sql server table to an oracle table and when ever the sql server table is updated it needs to automatically update the oracle table. Is there procedure to do this or do I migrate the data once and set up a trigger on the sql server table to update the oracle table? If the trigger is the answer how do I do that?

    You might want to check out Oracle's heterogeneous services functionality if you haven't done so already. Here are a few links:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/toc.htm
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/majfeat.htm#sthref74
    Also, consulting the Oracle streams manual may be helpful -- particularly Chapter 5.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14228/toc.htm
    Perhaps someone who is more familiar with SQL Server could provide a more helpful answer.

Maybe you are looking for

  • Column in apex_application_page_ir_rpt.report_columns not updated. Defect?

    Hi everyone, I discovered the following: I created an IR in my application. First I define the following query for the IR: SELECT * FROM apex_application_page_ir_rpt WHERE application_id = 22333 AND page_id = 2 That works fine. Then, I change my regi

  • Spell check in libreoffice [Solved]

    I feel like some magic retard for asking this but for some reason their appears to be no dictionaries installed, after installing libreoffice i've subsiquently installed libreoffice-en-GB and yet when i try and add a dictionary the way the wiki sugge

  • Error 1202 on itunes

    my itunes store isnt loading properly and i am getting error 1202 on all requests

  • Want to know the screens associated with a module pool program ??

    Hi, I have an M type program (module pool), say SAPMF05M. I want to 1) see which transaction code initiated it ?? 2) see the screens associated with it ?? how do i achieve this ?? I know just the program name !! thanks

  • Homogeneous System copy -  NW2004s

    I am trying to perform a homogeneous system copy of NW2004s ECC6 system using sapinst. Platform info: OS - HPUX DB - Oracle I am using DB specific (oracle) method to restore an offline backup. When I run the sapinst to import, I get past preliminary