SQL query against tables on MS SQL Server and Oracle using Oracle BI

Hi All
I have two databases Oracle and MS SQL Server. I want to write a query statement which will retrieve data from both databases and publish this data into one report. That is I want to join/merge data from tables in both database into one report with one SQL Statement something like:
Select o.F1,o.F2, m.F1,m.F2
from
table@oracleServer o,
table@microsoftSQLServer m
where o.F1=m.F1;
Can Oracle BI Publisher do this?
Basically I want to query simultaneously two heterogeneous data sources in one SQL statement. Is there such a tool? I don't want to build a warehouse by moving data from SQL Server into Oracle or vice-versa. I don't want to duplicate data. I want to be able to query data at its source via 1 SQL statement.
How would one go about doing such a thing?
Many Thanks
Kubilay.

Hi Matt and Thomas
Many thanks for your replies.
Yes I have to do the join. Even worse I have to write an Aggregate query like this!
Select o.F1,o.F2, m.F1,m.F2, count(*)
from
table@oracleServer o,
table@microsoftSQLServer m
where o.F1=m.F1
group by o.F1,o.F2, m.F1,m.F2;
These are 2 different systems (hardware & software) which actually do the same job, they produce transactions for a common business entity. Kind of, both sell tickets for the same ABC ferry company.
I can not put them side by side on the dashboard, as I need to aggregate the data and present it maybe in a Oracle BI Report for Accounting and Financial reconciliation purposes.
The truth is, as it is. I can't change it, is too late.
I have to device a way to harvest both systems as they are. I don't want to move around data. I thought looking at Oracle BI I could write SQL against multiple Data Sources. I am struggling to find a way. As it seems that it can "SQL query" 1 data source at a time.
I have been hinted on another forum (OracleTURK) to use Oracle Transparent Gateways and Generic Connectivity. http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/toc.htm
Shame, I have to pay licenses for OWB and Oracle Transparent Gateways. I thought DB vendors can do better. Why do I have to pay to access the other 50% of the market.
I can understand the performance implications this might have. Because of it I might even be forced at the end to move data (ETL) into a separate database, slice it into partitions and manage it that way. Pitty because currenlty I only need one report out of these systems but seems like will be dear to get.
Thank you for all your help.
Kubilay

Similar Messages

  • Extract the data from SQL Server and Import into Oracle

    Hi,
    I would like to run a daily job that will export the table data from SQL server table (it will be only one or two table) and Import back into Oracle table (it might one or two table tables).
    Could you please guide me that how can i do this using either sql server or oracle?
    We have oracle 9.2 and sql server 2005.
    Normally i do from flat file which is generated by source destination nand i dump into oracle using sql*loader but this time I have to directly extract/export the data from MS Sql server and load into Oracle table, mostly it will reload so i might doing any massaging data during the load.
    If you show me the detail approach, it will be really appreciated.
    I have access to Sql server but i don't how to use sql server to do this or using oracle as a daily job even becuase have to schedule the job for this as it will be a daily job.
    Thanks,
    poratips

    Unless you can find an open source ODBC driver for SQL Server that runs on Solaris (and I wouldn't be overly hopeful there) Heterogeneous Services would require that you license something-- a third party ODBC driver, a new Oracle instance, or an Oracle Transparent Gateway.
    As I stated below, you could certainly use SQL Server's ETL tool, DTS. Oracle's ETL tools would require additional licensing since you're just on 9.2. You could also write a small application (Java or otherwise) that connected to both databases and transferred the data. If you're particularly enterprising, you could load the SQL Server Type 4 JDBC driver into Oracle's JVM and write a Java stored procedure that connected to the SQL Server database via JDBC, but that's a pretty convoluted approach.
    Justin

  • Best way to spool DYNAMIC SQL query to file from PL/SQL

    Best way to spool DYNAMIC SQL query to file from PL/SQL [Package], not SqlPlus
    I'm looking for suggestions on how to create an output file (fixed width and comma delimited) from a SELECT that is dynamically built. Basically, I've got some tables that are used to define the SELECT and to describe the output format. For instance, one table has the SELECT while another is used to defined the column "formats" (e.g., Column Order, Justification, FormatMask, Default value, min length, ...). The user has an app that they can use to customize the output...which leaving the gathering of the data untouched. I'm trying to keep this formatting and/or default logic out of the actual query. This lead me into a problem.
    Example query :
    SELECT CONTRACT_ID,PV_ID,START_DATE
    FROM CONTRACT
    WHERE CONTRACT_ID = <<value>>Customization Table:
    CONTRACT_ID : 2,Numeric,Right
    PV_ID : 1,Numeric,Mask(0000)
    START_DATE : 3,Date,Mask(mm/dd/yyyy)The first value is the kicker (ColumnOrder) as well as the fact that the number of columns is dynamic. Technically, if I could use SqlPlus...then I could just use SPOOL. However, I'm not.
    So basically, I'm trying to build a generic routine that can take a SQL string execute the SELECT and map the output using data from another table to a file.
    Any suggestions?
    Thanks,
    Jason

    You could build the select statement within PL/SQL and open it using a cursor variable. You could write it to a file using the package 'UTL_FILE'. If you want to display the output using SQL*Plus, you could have an out parameter as a ref cursor.

  • How the SQL Query Parsing is processing inside SQL/PLSQL engine?

    Hi all,
    Can you explain how the SQL Query Parsing is processing inside SQL/PLSQL engine?
    Thanks,
    Sankar

    Sankar,
    Oracle Database concepts - Chapter 24..
    You will find the explanation required under the heading parsing.
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14220/sqlplsql.htm

  • Pass the result of a SQL Query as table_name  for another SQL Query

    Hi All,
    How to pass the result of a SQL Query as parameter to another SQL Query
    Eg: I am doing the steps below.
    1) select distinct table_name as TAB1 from all_tab_cols where table_name like 'T_%' and column_name like '%XYZ'
    2) I want to pass the table_name from step 1 above as parameter to another query "select * from TAB1"
    Thanks

    Naveen B wrote:
    Hi All,
    How to pass the result of a SQL Query as parameter to another SQL Query
    Eg: I am doing the steps below.
    1) select distinct table_name as TAB1 from all_tab_cols where table_name like 'T_%' and column_name like '%XYZ'
    2) I want to pass the table_name from step 1 above as parameter to another query "select * from TAB1"
    ThanksYou should craete PL/SQL code with cursor which will accept a parameter and call that cursor inside the first one
    But if the first sql returns only one row, you can do it with simple sql code
    select * from (select distinct table_name as TAB1 from all_tab_cols where table_name like 'T_%' and column_name like '%XYZ')- - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • Write the sql query to find largest value in row wise without using   great

    write the sql query to find largest value in row wise without using
    greatest fuction?

    Another not so good way, considering you want greatest of 4 fields from a single record:
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (Select 100 col1,200 col2,300 col3,400 col4 from dual
      2  union select 500,600,700,800 from dual
      3  union select 900,1000,1100,1200 from dual
      4  union select 1300,1400,1500,1600 from dual
      5  union select 1700,1800,1900,2000 from dual
      6  union select 2100,2200,2300,2400 from dual
      7  union select 2800,2700,2600,2500 from dual
      8  union select 2900,3000,3100,3200 from dual)
      9  SELECT (CASE WHEN col1 > col2 THEN col1 ELSE col2 END) Max_value
    10  FROM
    11  (SELECT (CASE WHEN col1_col2 > col2_col3 THEN col1_col2 ELSE col2_col3 END) col1,
    12         (CASE WHEN col2_col3 > col3_col4 THEN col2_col3 ELSE col3_col4 END) col2,
    13         (CASE WHEN col3_col4 > col4_col1 THEN col3_col4 ELSE col4_col1 END) col3
    14  FROM
    15  (SELECT (CASE WHEN col1 > col2 THEN col1 ELSE col2 END) col1_col2,
    16         (CASE WHEN col2 > col3 THEN col2 ELSE col3 END) col2_col3,
    17         (CASE WHEN col3 > col4 THEN col3 ELSE col4 END) col3_col4,
    18         (CASE WHEN col4 > col1 THEN col4 ELSE col1 END) col4_col1
    19* FROM t))
    SQL> /
    MAX_VALUE
           400
           800
          1200
          1600
          2000
          2400
          2800
          3200
    8 rows selected.
    SQL> Edited by: AP on Sep 21, 2010 6:29 AM

  • SQL query works in SSIS, SSMS/SQL server but fails in deployment?

    The SQL query in my execute sql task is correct. It works in SSIS and SSMS also. But, it fails when I deploy my package. The error -
    Code: 0xC002F210
    Source: MySQLTask Execute SQL Task Description: Executing the query
    "UPDATE [MyTable] SET MyCol..."
    failed with the following error: "Invalid object name 'MyTable'.".
    Possible failure reasons: Problems with the query "ResultSet" property
    not set correctly parameters not set correctly or connection not established
    correctly.
    What could be the reason for this error and how do I fix it ?
    Thanks.

    Does the database have the object [MyTable]?  What is the default schema for the user?  Is the table (assuming it exists) in the default schema for the user?
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com
    Yes, the DB has the object [MyTable]. The default schema is dbo, as given by SELECT SCHEMA_NAME()
    The table is in the default schema for the user as per - 
    SELECT * 
    FROM INFORMATION_SCHEMA.TABLES 
    WHERE TABLE_SCHEMA = SCHEMA_NAME() 
    AND  TABLE_NAME = 'MyTable'

  • XML SQL - query the table with XML in column [urgent]

    I have table which have to be query-ied with
    oracle.xml.sql.query.OracleXMLQuery class to produce XML
    document for web.
    Problem is that in one column is already XML data (well formed
    HTML) like this:
    <font face="Arial">click</font>
    and when I call OracleXMLQuery.getXMLString() it encode all's '<'
    as ';lt' and so on.
    Can I turn off that kind of encoding some way or is it better
    sollution for this?
    thanks in advance
    Bojan
    null

    You can use an XSLT Stylesheet to achieve what you are wanting to do.
    Say the name of the column containing
    the markup is named "DOC", then
    transforming the output of OracleXMLQuery
    by the following stylesheet using
    the oracle.xml.parser.v2.XSLProcessor...
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl utput method="xml" omit-xml-declaration="yes"/>
    <xsl:template match="@*|node()">
    <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
    </xsl:template>
    <xsl:template match="DOC">
    <xsl:value-of select="." disable-output-escaping="yes"/>
    </xsl:template>
    </xsl:stylesheet>
    Will give the results you are looking for.
    You can use the XSQL Servlet to make this combination even easier if that is applicable to your situation.

  • Failed to parse SQL Query - External Tables [Apex 4.0.2]

    Greetings experts -
    Has anyone encountered errors when creating a report in Apex that sources from an external table within the database? I'm using the 4.0.2 version that is packaged with the 11g XE edition on 64bit CentOS.
    For example, I might run:
    SELECT NULL LINK,
    COL1 LABEL,
    COL2 VALUE
    FROM MYTAB;
    Where MYTAB is an external table sitting on top of a comma-separated file. When I go to create the page, I'm prompted with the "Failed to parse SQL" dialogue.
    I noticed that if I did CTAS on the external table, and referenced the CTAS table, my page ran without problem!
    Any ideas? Is this a known "limitation" of Apex?
    Thanks,
    CJ

    Chiedu,
    Please try removing all declarative validations on this tabular form, and see if it works as expected then. There are some limitations on the type of views and joins that are supported by tabular forms when using the new declarative validations, i.e. you'll need a key preserved table in your view or join.
    Regards,
    Marc

  • SQL Query for Project Permission in Project Server 2010

    HI
    I have assign multiple users on multiple projects with different level permission, 
    The permission level is assign from Project Permission (icon ribbon in PWA 2010.)
    (1.Open the project within Project Professional or Project Web App,
    2.Edit and Save
    the project within Project Professional or Project Web App
    3.Edit Project
    Summary Fields within Project Professional or Project Web App
    4.Publish the
    project within Project Professional or Project Web App
    5.View the Project
    Summary in the Project Center
    6.View the Project
    Schedule Details in Project Web App.
    7.View the Project
    Site)
    Is there any SQL Query to find which user/resource is assign to which projects and what above permission is assign.
    Thanks 
    Farhan
    farhan

    Hi Farhan,
    Please find the SQL below below which will give project permission users:
    select RES_SECURITY_GUID from ProjectServer_Published.dbo.MSP_RESOURCES where RES_UID = '37A56C30-34DE-417B-95A8-42FBA6F47565'
    select PROJ_NAME  from ProjectServer_Published.dbo.MSP_PROJECTS where PROJ_UID in (
    select distinct c.PROJ_UID from ProjectServer_Published.dbo.MSP_WEB_SECURITY_PROJECT_CATEGORIES c
              INNER JOIN ProjectServer_Published.dbo.MSP_WEB_SECURITY_SP_CAT_RELATIONS pcr on pcr.WSEC_CAT_UID = c.WSEC_CAT_UID
              INNER JOIN ProjectServer_Published.dbo.MSP_WEB_SECURITY_SP_CAT_PERMISSIONS pcp on pcp.WSEC_REL_UID = pcr.WSEC_REL_UID
              INNER JOIN ProjectServer_Published.dbo.MSP_WEB_SECURITY_GROUP_MEMBERS gm on gm.WSEC_GRP_GUID = pcr.WSEC_SP_GUID
              INNER JOIN ProjectServer_Published.dbo.MSP_WEB_SECURITY_FEATURES_ACTIONS AS SFA ON SFA.WSEC_FEA_ACT_UID = pcp.WSEC_FEA_ACT_UID
              INNER JOIN ProjectServer_Published.dbo.MSP_WEB_CONVERSIONS AS CONV ON CONV.CONV_VALUE = SFA.WSEC_FEA_ACT_NAME_ID where (1=1)
    And (CONV.LANG_ID = 1033) and gm.WRES_GUID = '2F5512D4-F561-43AF-AB7B-A189B0B9B6E8') -- Replace with above returned RES_SECURITY_GUID
    Vivek

  • SQL query returns value but EXEC SQL Task fails to assign variable

    I have an execute SQL task to get an identifier from an Oracle database and assign it to a variable (the variable is used in subsequent query's where clauses to transfer the data to a SQL Server database). If I copy the query from the SSIS
    package to the Oracle SQL Developer interface and run the query; I get the expected single identifier. If I run the execute SQL task I get the error "[Execute SQL Task] Error: An error occurred while assigning a value to variable "VariableName":
    "Single Row result set is specified, but no rows were returned."
    I can create phony/simpler versions of the query that will return the wrong identifier that will successfully assign the value to the variable, so the problem isn't with the variable itself or the way the result set is set up in the task (Result
    Set/Single Row in the General panel; Result Name 0/VariableName in the Result Set panel).
    How can two queries that return a single value produce different results with respect to the variable assignment process?

    Perhaps you can trap (profile) the query in Oracle to see what it gets submitted,
    thing is this query
    select id from table where ProcessedStatusColumn is null and DateColumn = (sub select to get most recent date in table where ProcessedStatusColumn is null)
    is not guaranteed to return a value, you need a default returned in case the search failed e.g.
    select
    NVL(id, 0)
    from table where ProcessedStatusColumn is null and DateColumn =
    (sub select to get most recent date in table where
    ProcessedStatusColumn is null)
    Arthur My Blog

  • SQL Query for ELM/PLM licenses Required, Installed and Available

    Support Forum,
    I have been writing test SQL queries against the 'licensingresourceusage' and 'licenseserver' from the UCM Data Dictionary 10.0 and have not come across a method to retrieve total licenses, either 'Required', 'Installed' or 'Available' in ELM/PLM.
    I have retrieved licenses allocated to an enduser e.g. tin, copper, bronze, etc.  But I cannot find the overall license summary.
    Does the ELM/PLM run a separate dB with no SQL access? or I am not using the correct command syntax for the given tables in the UCM 10.0 Data Dictionary.
    Any suggestions would be greatly appreciated.  Thanks.

    aman,
    this is a great article.  Many of the SQL queries I have done are included with this doc.  I was definitely on the right track.  I have no digested all of the doc...but from initial scan it seems right on track.  I appreciate the assistance.
    David

  • Need a SCCM SQL Query Report for Installed Software with Packages and Applications.

    I need a report that will show the number of installs of all of the workstations applications and packages over a given period of time. 
    This will let us know how effective our deployments are and how well the on-demand software is being adopted.
    Any help?

    Your Install Source might be an option as most SCCM deployments will install from C:\Windows\ccmcache\xx [where xx is a random folder name]. Most software vendors will put an install source in the registry, but not all do, so it won't be completely accurate.
    When software is installed manually, the install source path won't be C:\Windows\ccmcache\xx.
    Here is a SQL query I have for Install Source:
    SELECT v_GS_COMPUTER_SYSTEM.Name0 as 'Computer Name', v_GS_INSTALLED_SOFTWARE.ProductName0 as 'Software Title', v_GS_INSTALLED_SOFTWARE.InstallSource0 as 'Install Source', v_GS_INSTALLED_SOFTWARE.ProductVersion0 as 'Version', v_GS_INSTALLED_SOFTWARE.InstalledLocation0
    as 'Installed Location', v_GS_INSTALLED_SOFTWARE.InstallDate0 as 'Install Date'
    FROM v_GS_COMPUTER_SYSTEM INNER JOIN v_GS_INSTALLED_SOFTWARE ON v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_INSTALLED_SOFTWARE.ResourceID
    WHERE v_GS_INSTALLED_SOFTWARE.ProductName0 like '%Office 365 Pro%'
    ORDER BY v_GS_COMPUTER_SYSTEM.Name0

  • Why query against table(dbms_xplan.display) take too long?

    the env is PROD, version is Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi.
    Most of the time, when I do explain plan and query the table(dbms_xplan.display), it takes like 3-8 minutes to display the result.
    So, I wonder what might go wrong here?
    How a simple query would take this long?
    Any thought or guess are welcome.
    Thanks

    That is not an option here. I only have query privilege on PROD.
    All I can do is to figure out the reason for the slowness and advise the fix.
    Thanks.

  • Migrate From MS Access 2003 to Oracle using Oracle SQL Developer 3.0

    Hello All,
    I am trying to migrate Access DB .mdb using the Oracle SQL Dev 3.0 Data Migration Wizard, everything go very nice and smooth until the Capture Step, for sure am using the online mode, in the Capture Step the list of available databases is empty and a Msg Box saying that the DB list should have at leats one database selected, so I don't know what's that mean or how to fix this.
    in my .mdb file I have four tables and I can copy the data to Oracle using the Right click and copy to Oracle Function, but it really takes much time.
    Any help would be really appreciated and thanks in advance.
    yours,
    Hussein

    Just to clarify:
    You have created the migration repository and start the migration using Tools => Migration => Migrate
    - now you've selected the repositiry
    - specified a project
    - selected the source database
    => you've choosen the ONLINE Mode
    ==>> and now you don't see your MS Access database in the "Connection" List
    Is this correct?
    If the steps you're doing match the steps I've posted above, then please be aware for MS Access migrations you need to choose the OFFLINE method. The MS Access source database information is collected by the MS Access Exporter available from Tools => Migration => MS Access Exporter
    Once you've created the XML/OCP file you specify this newly created file during the OFFLINE migration mode.
    If your steps differ from mine, please post yours more detailed.
    Thx.

Maybe you are looking for

  • IPod or iTunes not working properly

      Model: mc297c Type: Classic Size: 160 GB Colour: Black Version: 2.0.4 PC Serial: 8LO******ZU Problem: Video will skip. Audio continues as normal, but the video is like it is fast-forwarding. Also, the timer in the bottom just goes up, like a stopwa

  • Passing Objects: ServletContext versus JNDI

    I am currently developing a Web application that uses a variation of the (often recommended) model-view-controller architecture. Specifically, I have a single Front Controller Servlet that identifies what the request is for, and then delegates proces

  • Adobe Acrobat standard printing problems

    I use a program that most of my printable items are on legal paper. I print these to letter size pdf files. As of today, each time I clicke print and change to letter size and print, it defaults back to legal size and not all of my page prints. I am

  • Can't download updates for cs5

    I am registered with CS5 and all apps were re-downloaded yesterday.  When I try to update there are 3 updates that fail.  After Effects 10.0.2, Bridge 4.0.5 and Ext Mgr 5.0.   An error comes up after the update appears to have downloaded and says dow

  • Tracking of construction equipments in PS

    we have a construction buisness and having number of equipments which need to mobilise from one site to others during project execution. How can i track these equipments from one site to another in PS. We are not going for equipment PRT. Any thing po