SQL Override In OWB

Hello
I am new to OWB, as was wondering how I can view and edit operators using sql. Example I would like to write a source query that joins to mulitple tables in my source system and then inserts into my target object/operator
Thanks
Michelle

Hi Michelle
There is a way using a view in OWB to inline the SQL;
https://blogs.oracle.com/warehousebuilder/entry/owb_11gr2_mappings_and_inline_sql
You can also use operators for a huge amount of the SQL dialect, there is a set of blogs linked below that illustrate an expert I created to generate mappings from SQL which is useful to get the idea behind some of the operators;
https://blogs.oracle.com/warehousebuilder/entry/sql_and_owb_accelerated_map_co
Cheers
David

Similar Messages

  • Connect to MS SQL server from OWB on Linux platform

    Hi,
    I want to connect to MS SQL server through OWB, on Linux platform.
    I suppose I would use JDBC driver, and Heterogeneous services. Is that possible?
    I did not see anything on JDBC driver for MS SQL server for Linux platform from Oracle.
    Also, I was wondering is Oracle Gateway 10g for Linux a way to connect to MSSQL server?
    Any leads would be appreciated.
    Thanks
    Ani

    Hi,
    This quite an actual topic for myself, so I decided to take some time to collect some information.
    Start at:
    * Oracle Generic Connectivity and Oracle Transparent Gateway - http://www.oracle.com/technology/products/gateways/gateways_fov.html
    You can use the free Heterogenous Services component named Generic Connectivity for connecting to SqlServer over ODBC. You will need to find (or purchase?) a third-party ODBC driver for SqlServer for Linux, e.g. from www.datadirect.com. Setting this up will allow you to define a databaselink to the SqlServer. Open Gateways implements a limited set of the oracle SQL, so you will have to find out what is possible and what not.
    See also:
    * How To Setup HSODBC on Linux - https://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=264567.1
    * Generic Connectivity Available on Linux x86 with 10g - https://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=261726.1
    You can also use the Transparent Gateway for SqlServer (HS), which is about EURO 12000 per computer(!). This gives you a full implementation of Oracle SQL and you can access the SqlServer like it was Oracle.
    You can also install Microsofts JDBC drivers into Oracle's JVM, and connect through JDBC to SqlServer. This is however not supported by Oracle, but it will work. See:
    * What is required for a Java Stored Procedure to connect to a SQL Server Database? - https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=276167.1
    See also:
    * Options for Connecting to Foreign Data Stores and Non-Oracle Databases - https://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=233876.1
    * JDBC Developer's Guide - http://download-west.oracle.com/docs/cd/B14117_01/java.101/b10979/overvw.htm
    Good luck, Erik Ykema

  • Error while connecting to SQL SERVER from OWB

    HI All,
    I got the following error while connecting to SQL SERVER from OWB(10gR2).
    1). Created DSN with (GMSCADA)
    2). tnsnames file is updated with the following information
    GMSCADA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.60.29)(PORT = 1433))
    (CONNECT_DATA =
    (SERVICE_NAME = SA)
    3). Tried to connect to SQL SERVER frm OWB
    Username: sa
    password: sa
    host: 172.16.60.29
    port: 1433
    service name: GMSCADA
    schema: sa
    I got the following error, when I click Test Connection:
    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 OWB_3095
    Regards,
    Kumar.

    Hi David,
    What is Gateway, How I have to setup, Please let me know.
    I tried according to the Demo, But still I am facing the same problem. Which system IP I have to put in the host details.
    Can u please let me know.
    Regards,
    Kumar.

  • SQL Override. How to use custom SQL in ODI?

    I am new to ODI & have an Informatica background. I am looking for an SQL override capability in ODI. I have an existing SQL which has complex joins, in-line queries, filters, unions & many other complexities. The query reads many existing tables & output 5 fields, which I need to populate in the target table. In Informatica, I would simply create a Target table of these 5 fields, import the same table as both source & target, & then override the source qualifier with the existing SQL. Does ODI have a similar feature?
    I know that the same can be achieved using core ODI features, but I am trying to get it done quickly without re-inventing the wheels.
    Thanks,
    Dinesh.

    Dinesh
    you can not use SQL over-ride feature which informatica has. I am an informatica developer myself. So I can feel your pain. You are gonna miss a lot of features Informatica has. the one you are looking can not be done using ODI Interfaces. But can be done using ODI Procedures. When you create a step in Procedure you would mention the Source and target schema informations/Context Logical Schema info which should do the work for you. If your source and targets are in different Server then create a DBlink between two servers. Now when you put your select query in it put it like an insert query.

  • Loading pl/sql scripts into OWB and running it

    Hi,
    Does anyone have an example for loading and executing PL/SQL Scripts in OWB?.
    Thanks
    Mehdi

    Hi Mehdi,
    Can you be more specific about what you want to achieve?
    Do you mean running a package that OWB generated as a mapping?
    Or running some external code?
    Please check the User Guide, especially chapters 6 (Creating Mappings), 9 (Using Oracle Warehouse Builder Transformations) and 11 (Deploying to Target Schemas and Executing ETL Logic).
    Good luck, Patrick

  • Sql override-lookup

    Hi Gurus,
    Why to give SQL query in Lookup Sql Override in lookup transformation,what is the use of that option?

    Hi
    If you need to filter the data apart from applying join conditions, you do it by giving sql override. In this way the Lookup Cache holds the filtered data and not the entire data.
    Hope this helps
    Regards

  • SQL Server 2005 OWB Source

    Hello All
    Iam using OWB 10Gr2 on the win2003 box. we have a source in MS Sql server 2005. I followed some documents and modified the below files as required.
    Sql server,Oracle database and OWB are on same server. Sql services are running fine and the ODBC is tested sucessfully. Database and OWB are also running perfectly.
    1. Created an ODBC pointing to the sql server in control panel by name SQLODBC.
    2. Modified the tns file entry as follows
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.101.3.14)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    SQLODBC =
         (DESCRIPTION =
         (ADDRESS = (PROTOCOL = TCP)(HOST = 10.101.3.14)(PORT = 1521))
         (CONNECT_DATA =
         (SID = SQLODBC)
         (HS = OK)
    3. Modified Lisiner.ora file as follows
    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 = SQLODBC)      
    (ORACLE_HOME= C:\oracle\product\10.2.0\db_1)
    (PROGRAM = hsodbc)
    4. from the (C:\oracle\product\10.2.0\db_1\hs\admin) i renamed the inithsodbc to initSQLODBC.ora and modified the connects as follows
    # HS init parameters
    HS_FDS_CONNECT_INFO = SQLODBC
    HS_FDS_TRACE_LEVEL = 4
    After this above 4 steps i tested the lisitner
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    C:\Documents and Settings\Administrator> lsnrctl status SQLODBC
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 25-APR-2011 08:24
    :34
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.101.3.14)(PORT=1521))
    (CONNECT_DATA=(SID=SQLODBC)(HS=OK)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 24-APR-2011 06:50:54
    Uptime 1 days 1 hr. 33 min. 41 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\oracle\product\10.2.0\db_1\network\admin\listener.o
    ra
    Listener Log File C:\oracle\product\10.2.0\db_1\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=wlsuresh.uae.radil.loc)(PORT=1521)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "SQLODBC" has 1 instance(s).
    Instance "SQLODBC", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orcl_XPT" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    When iam trying to create an new module under OWB-Non oracle-ODBC it is throwing error.
    Iam passing user id and password in double quotes. when iam trying to browse schemas it is throwing the following error
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][H006] The init parameter <HS_FDS_CONNECT_INFO> is not set. Please set it in init<orasid>.ora file.
    ORA-02063: preceding 2 lines from OWB_106
    Kind and quick help is highly appreciated.
    Thx & reg
    S.Gyazuddin

    Hello David
    After doing some changes iam able to ping my DNS entry which i did in TNSNAMES>ORA file.
    when i try to create DB link using the blow command and testing the link it is throwing error
    create database link testingMSQL connect to SA identified by SA using 'SQLODBC';
    +++++++++++++++++ERROR++++++++++++++
    ora-12505 TNS lisitner does not currently know of SID given in connect discriptor
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    My lisitner.oar file is as follows
    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=SQLODBC)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
    (PROGRAM=hsodbc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = wlsuresh.uae.radil.loc)(PORT = 1521))
    Reg
    S.gyazuddin

  • How to use Oracle 10G SQL features in OWB?

    We are using OWB repository 10.2.0.1.0 and OWB client 10.2.0.1.31. The Oracle version is 10 G (10.2.0.3.0). OWB is installed on Linux.
    Oracle 10G SQL offers
    1) Inserting Into a Table with Error Logging
    2) conditional_insert_clause, Specify the conditional_insert_clause to perform a conditional multitable insert.
    Did anyone use above features in OWB10G mapping?
    How do we use them?
    Thanks in advance.
    RI

    Hi,
    Just a thought on the multi-table insert. OWB generates multitable insert when one source is mapped to multiple targets only on the condition that after the splitter there should not be any OWB operator that can change the cardinality of the row-set coming out of the splitter (like joiners, filters, aggregators etc.)..
    Regarding the link, I was wondering where I could find a decent documentation of the shadow table and the DML Error Logging through OWB .. Thanks for the link.
    OWB error messages are basically Oracle Error Messages when you consider the code that gets deployed. Other than that VLD errors are sometimes mysterious and hard to debug.. Hope someone can give us more details on how to handle such VLD errors :)
    HTH
    -AP

  • Problems when trying to import metadata from SQL server using OWB

    Hi,
    We are using Oracle 11.2 EE on AIX and OWB: 11.2. We are in the process testing Oracle Transparent gateway for SQL Server and have installed and configured it on a standalone windows server. We and have run the ORACLE_HOME\dg4msql\admin\dg4msql_cvw.sql on SQL Server side, in order to query the SQL-Server data dictionary. We have created a DB-link and can pull data correctly without any problems. When trying to import metadata in OWB Client on win xp, we have created a non-oracle SQL Server Module and are able to connect and start the import, but the displayed table names look strange and can not be imported. In front of every letter there is a square box, so instead of ADDRESS (the address table in the source system) , it reads "squarebox"A"squarebox"D"squarebox"D"squarebox"R"squarebox"E"squarebox"S"squarebox"S and subsequently the import fails with :API0413: Illegal name [<tablename>] Name with preceding and trailing spaces is not allowed.
    The gateway have been configured with the following parameters:
    HS_FDS_CONNECT_INFO=<connect string>
    HS_FDS_TRACE_LEVEL=OFF
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    HS_LANGUAGE=AMERICAN_AMERICA.WE8MSWIN1252
    Any ideas ?
    This topic has been posted in the Heterogenious Forum as well, but as the problem is within OWB, I also post it here.
    Thanks in advance!
    Henrik
    Edited by: he**** on Nov 15, 2011 1:29 PM

    Henrik,
    I've found other problems where OWB adds a space between all characters returned from SQL*Server which is what is happening in your case, although it is being displayed as a square box.
    In one of these cases the problem was fixed by using the 11.2.0.2 OWB so would it be possible for you to try with that version ?
    Also, as the problem is not with the gateway itself as you can select successfully using a database link then it would be better to follow up in the OWB forum -
    Forum: Warehouse Builder
    Warehouse Builder
    as they will be able to help with the OWB side of the problem.
    Regards,
    Mike

  • Import from sql server to OWB

    I have a sql server source, and the target is oracle10.2. OWB 10.2. I can connect to connect to sql server from sql*plus and see the data.
    In OWB i imported the tables and created a simple mapping 1:1. It Validated and generated code successfully.
    When i deploy the mapping first time i am not getting error message but i get 6 warning messages. but when i deploy the mapping second time i am getting following error and 6 warning messages.
    Name Action Status Log
    NON_ORACLE_SS_LOCATION1 Create Error RA-02011: duplicate database link name
    SRT_I_ODBC_M Create Warning ORA-06550: line 11, column 3: PL/SQL: SQL Statement ignored
    SRT_I_ODBC_M Create Warning ORA-06550: line 147, column 7: PL/SQL: SQL Statement ignored
    SRT_I_ODBC_M Create Warning ORA-06550: line 177, column 3: PL/SQL: ORA-00942: table or view does not exist
    SRT_I_ODBC_M Create Warning ORA-06550: line 26, column 3: PL/SQL: ORA-00942: table or view does not exist
    SRT_I_ODBC_M Create Warning ORA-06550: line 34, column 3: PL/SQL: SQL Statement ignored
    SRT_I_ODBC_M Create Warning ORA-06550: line 49, column 3: PL/SQL: ORA-00942: table or view does not exist
    can i know where exactly i am going wrong?

    Henrik,
    I've found other problems where OWB adds a space between all characters returned from SQL*Server which is what is happening in your case, although it is being displayed as a square box.
    In one of these cases the problem was fixed by using the 11.2.0.2 OWB so would it be possible for you to try with that version ?
    Also, as the problem is not with the gateway itself as you can select successfully using a database link then it would be better to follow up in the OWB forum -
    Forum: Warehouse Builder
    Warehouse Builder
    as they will be able to help with the OWB side of the problem.
    Regards,
    Mike

  • How to check SQL activity in OWB Process flow

    Hi,
    In OWB process flow,I need to check SQL activity. How to check that? I am using OWB 11g R2.
    Regards,
    Rashmik

    Gowtham,
    Well the following hint is provided by oracle warehouse builder help.........
    The time-out setting for the workflow engine determines how long the File Exist activity waits for a file. If the file does not arrive before the time-out setting expires, the File Exists activity terminates with errors.
    well someone with deep workflow knowledge can answer this one...
    If you get the answer please share with us.....
    Regards,
    Suraj.

  • Plugging a sql query into OWB.

    Hi,
    I have a complex Sql query which returns some records. I want to use this query in OWB. But i don't want to write any procedures or functions. Is there a way just to plug this code into OWB to run it.
    vasu

    Any objection to putting the query into a view?
    The only other possible way I can think of that might work would be to create an expression object, define your desired output columns in the output group, and then copy in your query per column as the defined expression for that column. (hardly the efficient option!). I think you might have to create some sort of dummy input for this to pass through the validation for expressions too (e.g. perhaps also use a constant defined as sysdate passed as an input to the expression, but then never referenced in the queries).
    Can't say for sure if you can fool OWB into using your query in an expression object or not - but that would be the only way I can think of which might be possible to avoid using a view/function/procedure.

  • Regarding SQL query in OWB

    Pls advice how can we use free hand sql query in an OWB job?
    There must be a way other than mapping src tables and joiner , aggregator to target table. How to implement SQL sub-queries in OWB?
    -Kuntala

    OWB is all about creating a mechanical process that works fast, so you wouldn't really expect to enter ad hoc queries. What is the purpose of the project, and what problem is the freehand query meant to solve?

  • Inserting sql scripts in OWB 10g using OMB PLUS

    Hey burleson, thanks for the reply..
    Infact i am new to OWB and my question can be very silly to you.
    Infact i have 1 source table in OWB named 'SALGRADE' which contains data and i have 1 target table named 'TARGET_SALGRADE' which has the same structure as the source table.
    The script i have run and tested is as such :
    INSERT INTO TARGET_SALGRADE
    (GRADE,
    LOSAL,
    HISAL)
    SELECT
    GRADE,
    LOSAL,
    HISAL
    FROM SCOTT.SALGRADE;
    I have tested it in sqlplus and the update has been done.
    Can you please tell me how do i proceed in OMB PLUS and how do i write the script there??
    Regards,
    Amrish

    You can run SQL scripts using the SQLPLus activity in a process flow.
    But the traditional mechanism to move data in OWB is using mappings. The post below might be interesting if you know SQL to understand how mappings are constructed;
    http://blogs.oracle.com/warehousebuilder/2007/08/sql_and_owb_accelerated_map_co.html
    Cheers
    David

  • How to execute SQL scripts using OWB Process flows ?

    Hi,
    I have some SQL Scripts. I have to execute them using OWB Process flows.
    Can i get any document or link which helps me in achieving this?
    Thanks in Advance,
    SriGP

    Sutirtha,
    Thank you very much. I really appreciate all of your responses.
    I have one more question ( Sorry for flooding you with lot of questions :) )
    How to capture the errors which occured inside the SQL Scripts.
    My scenario is like this. I have two sql scripts Script_1.sql and Script2.sql namely. I would like to put dependency on the execution of the scripts.
    If Script_1.sql executes succesfully without any errors, then EXECUTE Script_2.sql
    else if Script_1.sql execution contains errors then DON'T EXECUTE Script_2.sql
    As of now, i observed that the Process flow shows Success State even if there is an error in the sql script execution. Because of which i was not able to put dependency on the execution of the scripts.
    I think i can do it by tweaking(changing) the code inside the SQL Scripts, like logging the errors in some log table and reading it before the next script execution.
    But the restriction is, I Should not touch/change the existing SQL Scripts.
    Do we have any mechanism in the ProcessFlows to identify the SQL Errors that occurred during execution of SQL Scripts ?
    Please suggest any idea on this. It will be great if you can help in this.
    Thanks in advance,
    SriGP.

Maybe you are looking for