CFC query union with database query

I'm trying to invoke a webservice to return a query, and then
run a parallel query in another database, and UNION the two with a
query of query. Both the webservice server and the local server are
CF7, both running MySQL, both accessing tables with parallel
structures. The webservice returns what appears to be a normal
query from CFDUMP, but then when I UNION it with the second query,
I get either "Incorrect Select List" or "Columns with index number
equal "1" have diffent types (SMALLINT, JAVA_OBJECT)" errors. So
apparently there's something different about the query from the
webservice that's causing problems?

Thanks, this fixed it. I had not realized CF had it's own Q
of Q CAST function. Here's the documentation on it, in case it has
eluded others.
http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?cont ext=ColdFusion_Documentation&file=00001271.htm
Adobe: It would be nice if the LiveDoc page for a main tag
like CFQUERY would link to all related pages, like this one above.
Then when looking for information on using a particular tag, it
would be much more likely to find the related page.

Similar Messages

  • Query regarding XI interaction with database

    Hi all,
    I have got the Oracle database and SAP R/3 system
    Is it possible that through JDBC adapter ,
    a) Direct fetching of data from database
    b) Data should come in XI and after mapping should be  
        posted in SAP R/3 .i.e complete automated process
    c) Is it possible to put direct query statement in XI
        while connection with database through JDBC adapter
        E.g For fetching the vendor data from database
        Select * from .... 
    Thanks in advance
    Shikha Jain

    Shikha,
    <i>a) Direct fetching of data from database</i>
    In the JDBC Sender adapter you have to mention the SQL Query.
    <i>b) Data should come in XI and after mapping should be
    posted in SAP R/3 .i.e complete automated process</i>
    This is what XI does. There is no manual intervention needed.
    <i>c) Is it possible to put direct query statement in XI
    while connection with database through JDBC adapter
    E.g For fetching the vendor data from database
    Select * from ....</i>
    your question a is same. You can execute a SQL statement in the Adapter which polls the database in the intervals you mention. It could be a SELECT or EXEC PROC etc.
    regards
    Shravan

  • Can you use DSUM in CFC query?

    I am trying to create a query that returns,
    Today, MTD, and YTD columns.  It can be done in Access like this:
    SELECT G.TranDate, G.Desc
    , DSum("amount","GLTest","trandate =DateSerial(2009, 2, 1)") AS Today
    , DSum("amount","GLTest","trandate >=DateSerial(2009, 2, 1) AND trandate <= DateSerial(2009, 2, 15)") AS MTD
    , DSum("amount","GLTest","trandate >=DateSerial(2009, 1, 1) AND trandate <= DateSerial(2009, 2, 15)") AS YTD
    , DSum("amount","GLTest","trandate =DateSerial(2008, 2, 1)") AS LY_Today
    , DSum("amount","GLTest","trandate >=DateSerial(2008, 2, 1) AND trandate <= DateSerial(2008, 2, 15)") AS LY_MTD
    , DSum("amount","GLTest","trandate >=DateSerial(2008, 1, 1) AND trandate <= DateSerial(2008, 2, 15)") AS LY_YTD
    FROM GLTest AS G
    WHERE (((G.[TranDate])=#2/15/2009#))
    ORDER BY 1;
    But, this is the result in an actual CFC test:
    Error Executing Database Query. 
    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft]
    [ODBC Microsoft Access Driver] Too few parameters. Expected 2. 
    The error occurred in C:\Inetpub\wwwroot\Daily2006NoForms\CFCS\Test.cfc:
    Called from C:\Inetpub\wwwroot\Daily2006NoForms\cfcTester.cfm: line 124
    Called from C:\Inetpub\wwwroot\Daily2006NoForms\CFCS\Test.cfc: line 169
    Called from C:\Inetpub\wwwroot\Daily2006NoForms\cfcTester.cfm: line 124
    <cfquery>
    SELECT glt_trandate, glt_desc, glt_amount
    , DSUM("glt_amount", "GLTrans", "glt_trandate =#createODBCDate(toDate)#") AS MTD
    FROM GLTrans
    WHERE ((glt_trandate) = #createODBCDate(toDate)#)
    </cfquery>
    This is what is actually being sent.
    SELECT glt_trandate, glt_desc, glt_amount
    , DSUM("glt_amount", "GLTrans", "glt_trandate ={d '2009-12-02'}") AS MTD FROM GLTrans
    WHERE ((glt_trandate) = {d '2009-12-02'})

    I'll first-up concede that I have't used Access since I was at polytech.  So anything I offer up here is going to be vague, and based on recollections of reading about other people's problems with it.
    I'd usually strum up an Access DB and have a mess around with it, but I don't have MS Office installed on this machine, and I can't be arsed downloading a trial of the thing just to sort out one query.  I'm sure you understand ;-)
    Firstly, one recollection I have is that whilst the query tool in Access is quite forgiving of non-standard SQL, JDBC drivers are not.  One thing that could cause gyp is using double-quotes instead of single-quotes.  I know the Acces query tool will accept double quotes, but they're not actually valid in SQL.  So perhaps try single quotes instead.
    Also I am really surprised that you have success using CF's "ODBC date format" - eg: {d '2009-12-02'} - when Access expects dates like this: #2/12/2009#.  I know this has not worked for people in the past.  I think just '2009-12-02' might work, but don't quote me on that.  Or just do it "properly" my using a <cfqueryparam> (which as I touched on, you should be doing as a matter of course anyhow).
    That "Too few parameters" error Access spits out is a fairly ubiquitous one: it seems to be what it says whenever it sees an expression it doesn't understand.  So I would not put too much stock in that actually being the problem.
    Have you tried taking the SQL that CF is passing to the driver, and running that straight in Access's query tool?  It might give a better error.
    Of course no post about Access problems would be complete without the caveat that Access is not intended to be used as a server-based DB solution, it's a desktop app, so it's completely inappropriate to be used as a DB for a multi-user environment such as a website back-end.  So if there's any way you could possibly stop using Access and use a proper DB system, that would be the best thing to do: if, for example, you are only just starting the project and you would not take too much of a hit from swapping Access out.  It might not be an option, or it might be outwith your control, I guess.
    Adam

  • CFC Query issue

    Hi, I was working on a cfc for an ajax sequential dropdown application. I have a functioning script, but not getting the desired results from my queries, so I'm assuming it may be my query construct. Also, I think that although I got this code from Ben Fortas CF Ajax Related Selects tutorial, I was wondering if I could actually do this in one query with a construct view and then loop through all the returned data as the user selects it.
    Here is my cfc
    <cfcomponent output="false">
    <!--- Set datasource --->
    <cfset THIS.dsn="automotive">
    <!--- Function to get data from datasource --->
    <!--- Get array of car manufactures --->
    <cffunction name="getMakes" access="remote" returntype="array">   
       <!--- Set variables --->
       <cfset var data="">
       <cfset var result=ArrayNew(2)>
       <cfset var i=0>     
       <!--- Query DB --->
       <cfquery name="data" datasource="#THIS.dsn#">
      SELECT manufactureID, manufactureBrand
      FROM manufacture
            ORDER BY manufactureBrand
          </cfquery>
       <!--- loop through makes and convert to array--->
            <cfloop index="i" from="1" to="#data.RecordCount#">
             <cfset result[i][1]=data.manufactureID[i]>
                <cfset result[i][2]=data.manufactureBrand[i]>       
            </cfloop>
            <!--- Return results --->
       <cfreturn result>
    </cffunction>
        <!--- Get Models by Make --->
        <cffunction name="getModels" access="remote" returnType="array">
         <cfargument name="manufactureID" type="numeric" required="true">
            <!--- Get data --->
            <cfquery name="data" datasource="#THIS.dsn#">
             SELECT modelID, models
                FROM models
                WHERE manufactureID = #ARGUMENTS.manufactureID#
                ORDER BY models       
            </cfquery>
            <!--- Convert to Array --->
            <cfloop index="i" from="1" to="#data.RecordCount#">
             <cfset result[i][1]=data.modelID[i]>
                <cfset result[i][2]=data.models[i]>
            </cfloop>
            <!--- and return results --->
            <cfreturn result>       
        </cffunction>
        <!--- Get models by year --->
        <cffunction name="getYears" access="remote" returnType="array">
         <cfargument name="modelID" type="string" required="true">
            <!--- Get Data --->
            <cfquery name="data" datasource="#THIS.dsn#">
             SELECT modelID, modelYear
                FROM models
                WHERE modelID = #ARGUMENTS.modelID#
                ORDER BY modelYear
            </cfquery>
            <!--- Convert to Array --->
            <cfloop index="i" from="1" to="#data.RecordCount#">
             <cfset result[i][1]=data.modelID[i]>
             <cfset result[i][2]=data.modelYear[i]>
            </cfloop>
            <!--- and return results --->
            <cfreturn result>   
        </cffunction>
    </cfcomponent>
    and my select cfform
    <cfform>
      <table>
        <tr>
          <td>Select Your Make:</td>
          <td><cfselect name="manufactureID"
                     bind="cfc:cars.getMakes()"
                     bindonload="true" /></td>
        </tr>
        <tr>
         <td>Select Your Year</td>
            <td><cfselect name="modelYear"
                 bind="cfc:cars.getYears({modelID})" /></td>
        </tr>
        <tr>
         <td>Select Your Model</td>
            <td><cfselect name="modelID"
                 bind="cfc:cars.getModels({manufactureID})" /></td>
        </tr>
      </table>
    </cfform>
    Now the problem is, that when the manufactureBrand is selected, the models select list populates fine, but the year only populates ONE year. You can drill down on the Year select unless you select another model. There may be 10 years a particular model was made and by selecting another iteration of that model, another year would be displayed.
    Any tips on where my query is lacking or not well formed? Thanks in advanced!

    teedoffnewbie wrote:
    I'm still worndering if my models table is even set up correctly. It's been so long since I worked with databases that I'm a bit rusty.
    My models table contains four columns:
    modelID, models, manufactureID, modelYear
    the database is a list so far of all makes and models of cars from 1990 through 2010, so you could see as of now I think I have well over 21,000 records.
    When I run the simple query as above, and dump the query, I get all the modelID ans the years associated with each modelID. So, for example, modelID 1 has 1990, all the way down to around modelID 300 or so. I had thought initially that I should have a table solely for the years, but decided not to. Maybe this was wrong.
    btw yes that's a good idea. I''ll work on each query one at a time within the page, then once they all work, I'll move them over to a component.
    You have confirmed what I thought: one modelID may match one modelYear. If so, then your code is behaving as expected!
    I suggested you run the following test. You said you had. I doubt it. You probably had run a similar test, but not this one. So here it is again.
    Since you have a large number of records, I have added a further line to limit the number of records returned to 100. I am on MySQL. Translate accordingly to your own database syntax.
    <cfquery name="testData" datasource="automotive">
             SELECT modelID, count(modelYear) as noOfYears
              FROM models
             GROUP BY modelID
              ORDER BY noOfYears
              Limit 100
    </cfquery>
    If the value 1 occurs in the column noOfYears, then that is the confirmation we need.

  • How can I use cfc query result to grid.dataprovider

    In rich from ,I builder a button , when it click ,I want to
    use cfc query some sql result ,and put it in grid.
    I use flower code ,but it have error ,help me !!!
    <CFSAVECONTENT variable="upd_query">
    <cfinvoke
    component="test.components.Getorder"
    method="GetAllorder"
    returnvariable="GetAllorderRet">
    </cfinvoke>
    <cfif Isstruct(GetAllorderRet)>
    s_ghid1.visible= false;
    abc.text = "The GetallorderRet is struct";
    </cfif>
    <cfoutput>
    listorder.dataProvider = [#GetAllorderRet.];
    </cfoutput>
    </CFSAVECONTENT>
    In form:
    <cfinput type="button" name="s_search" style="
    borderThickness:1;" onClick="#upd_query#"
    value="Search"/>

    Can you expand on that? I'm sorry but I am new and a novice to the SSIS world and I want to do this as best I can and as efficiently as I can. Are you saying that Rajen's way suggested above is the way to go?
    A little background....external data from a 3rd party client. I'v staged that external data to a SQL Server staging table. I have to try and match that data up to our database using SSN, DOB, and Gender...and if I can't match that way then I have to try
    and match by Name. I need to make sure that there is only one and only one account for that match. If I cannot match and match one and only one, then I'll create rows on a DataAnomaly Table. If I do match, then I have to check and make sure that there is only
    one and only one Member span for that match. Similarly handle the data anomaly and then check and make sure there is a "Diabetes" claim and similarly handle the DataAnomaly accordingly.
    That's where I'm at. Sooooo are you saying to use Rajen's suggestion? I don't think I can do that because I need multiple SQL tasks and I cannot connect multiple OLE DB Source tasks.
    Any help and suggestions are greatly appreciated.
    Thanks.

  • Synchronize with database problem

    Hi,
    I'm using JSF ADF BC, I have two tables in database, I've added new field to each, I go back to jdeveloper, and right click on both entities and click on synchronize with database, select new field that I've created and everything works fine, then I go to view object and here is the problem, in first view object I can add newly created and synchronized field like supposed (mapped to column or sql), but in the second view no matter what I do it is alway created as transient, I've tried deleting and synchronizing couple of times, changing properties, going to view row impl, view.xml, but it's always the same problem. Please can anyone help, I don't want to create whole view from scratch, every association, view link etc.
    Thanks in advance,
    Tomislav

    Hi,
    on view object editor screen, put your cursor on "Attributes" (left side of the screen) then click "NEW" button (on the right side of the screen), then fill in Attribute Name, check the "Map to column or SQL", and fill in query column. You are done.

  • Keeping Entity EJBs synchronized with Database

    Is it possible that container managed persistance takes care of synchronizing entity beans' states with database record even if there is some external non-Java application that changes the state of the records straigth at database?
    For example:
    1. I map CMP entity bean to a database table's row and query it's state from J2EE client
    2. I modify some data releted to that particular bean in the database: change some values by command line (SQL+ at the case of Oracle) on the row in the table in the database
    3. I query again the same bean's state
    Now, is the state I will get at the section 3 the same I got at section 1? If so, then CMP hasn't synchronized the bean's state and I get wrong value when reading it at second time.
    Can I automatize this synchronization task some how? This is very important issue when trying to take J2EE architecture in use on old legacy database systems which still have their own non-J2EE clients running.

    So if the entity bean is not used in a transaction it's state will not be re-read from the database, correct?There is no such thing.... if you invoke an entity bean in an unspecified transaction context I believe the spec defines it as a non-deterministic situation but in general the state will be re-read(but why would you want to do that?).
    Has the container do a database query for each read of B bean state?This is a vendor specific issue.... it depends on your EJB container provider, I know some vendors have all kinds of configurations to optimize these situations.
    Which are all the situations when an entity bean's state is (re-)read from the database?In general the state will be re-read at the first time a bean is invoked in a single transaction, but vendors offer a lot of mechanisms to configure all kinds of "sunchronization strategies".
    Do you really mean that every time I read a bean's state it will be the same with the database?
    Is there any exceptions? The important thing to notice is that we have to assume that state of the database
    changes all the time by non-J2EE legacy clients. You should be able to control this with the locking mechanisms(as mentioned before) that your container and RDBMS provides. in your situation, it sounds like pessimistic concurrency control would be appropriate.

  • How can i increase performance JSP with database?

    Hi,
    I am working a forum.
    I have been facing a problem.
    i am getting collection of records from sql server database to jsp page. here all the records to take long time (*delayness jsp with database*).
    plz any bodies know that increase the permance, tell me.
    thanks & regards,
    k.s.kumar

    again very bad idea never use Put DB Code or Business Logic or Special Service requests inside the servlets/backing beans.
    Ideally the below is the method which is recommended for a Peformant J2EE application which focuses at modulality,configurablity,scalablity & performance.
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/index.html
    Anyways,it might be a costly in terms of investment.Ideally i personally fell the below way/patterm could be comparable.
    <!-- View / Presentation Layer -->
    STEP 1 --> VIEW RENDERED(JSP renders view using a View Object/Objects)
    STEP 2 --> USER (Fills Forms accordingly and request for an action)
    <!-- Controller part -->
    STEP 3 --> Controller(Servlet+Backing Bean)
    STEP 3.1 ---> Mapps the request made into a View Object & Scopes it (Done by servlet )
    STEP 3.2 ---> validation of the data in the VO (and servlet is responsible to find appropriate Backing Bean to pass on the respective View Object)
    STEP 3.3 ----> Backing Bean takes help of a ServiceLocator Object(Singleton Object) and gets appropriate Business Object which takes care of all the appropriate business rule(Managed by Specific Containers)
    <!-- Service Locator takes help of specific Stubs to provide access to specific business Object -->
    <!-- MODEL PART -->
    STEP 3.4 ---->Backing bean passes on respective View Object to the Business Object and Business Object apply business rule on the data recievd from the Backing bean and sends appropriate DTO to DAO Object(Singleton Object)
    STEP 3.5 ----> DAO executes responsible DB query and returns a DTO/Collection of DTO to Business Object.
    STEP 3.6 ----> Business Object apply business rules on the data and then passes it back to backing bean.
    STEP 3.7 -----> Backing Bean receievs appropriate DTO/Collection of DTO sent by Business Object Update the View Object Accordingly.
    STEP 3.8 -----> Depending on the results return by Business Object the backing bean returns to reference appropriate JSP to forward/redirect.
    STEP 3.9 -----> Servlet identifies the reference returned and forward/redirects accordingly.
    STEP 4 ---> Repeat STEP 1
    NOTE: One can make use of any builtin frameworks(like struts,JSF,tapestry,Spring MVC,etc or your custom built framework in VC layers, EJB or Spring IoC or Custom Built Component Layer handling business objects and any ORM like hibernate,Oracle Toplink,Ibatis,JDO,JPA or specific custom devoloped DAO layer) to do this job.
    Might Sound bit complicated but is a better way to plug & play with each layer and can enusure other layer is not distrubed because of change in one layer,distributes the load on respective layer & so on.
    Hope that sounds logical
    REGARDS,
    RaHuL

  • ORA-16792 Configuration Property value is inconsistent with database set...

    Hi All:
    I am on 10.2.0.3 with physical standby against my primary.
    I few days ago I changed the parameter log_archive_max_processes on both primary & standby (without using DG Broker) & I think that's the reason for this message. ORA-16792 explanation is unclear to me. Log transfer and application work fine, primary & standby are in synch.
    If somebody experienced that problem kindly share the solution or point me into the right direction.
    TIA.

    (without using DG Broker) ...But you HAVE a running dataguard broker environment? At least the error message indicates this, don't change parameters outside the broker,that makes your standby environment inconsistent.
    Error:     ORA-16792 (ORA-16792)
    Text:     Some configurable property value is inconsistent with the
         database setting.
    Cause:     The values of one or more configurable properties are
         inconsistent with database in-memory settings or SPFILE settings.
         This may be caused by a user operation on the database outside of
         the Data Guard broker's control.
    Action:     Query property InconsistentProperties on the database or check
         the Data Guard broker log to find which properties are
         inconsistent. Reset these properties to make them consistent with
         the database settings.

  • Add management server: Setup version: 7.0.9538.0 is not compatible with database version: 7.1.10226.0

    I want to add another management server to our existing SCOM environment. But whenever I run this setup on a new server I get stuck in the window for selecting the OperationsManager database. The database field stays blank and in the OpsMgrSetupWizard log
    there are lines that the setup version is not compatible with the database version. But I use the same installer as when I installed the other management servers a year ago.
    Maybe there is a newer setup installer? But I can't find it.
    [10:42:54]: Error:
    :Error:setup version: 7.0.9538.0 is not compatible with database version: 7.1.10226.0
    [10:42:54]: Info:
    :Info:Using DB command timeout = 1800 seconds.
    [10:42:54]: Info:
    :Info:isOMDatabase:  Read returned true.  so far, this is OM DB, not an empty DB
    [10:42:54]: Debug:
    :Connection was not open.  We will try to open it.
    [10:42:54]: Debug:
    :SqlConnectionReady returned True.
    [10:42:54]: Info:
    :Info:Using DB command timeout = 1800 seconds.
    [10:42:54]: Info:
    :Info:isOMDatabase:  Read did not return true.  The MG is missing. This is not OM DB
    [10:42:54]: Info:
    :Info:Using DB command timeout = 1800 seconds.
    [10:42:54]: Always:
    :Azman store table not found in OperationsManagerDW table, assuming this is an not a valid OMDB for empty DB scenario.
    [10:42:54]: Info:
    :Info:DatabaseConfigurationPage: DB connection attempt completed.
    [10:42:54]: Info:
    :Info:DatabaseConfigurationPage: DB connection attempt completed.

    Never mind, found it!
    Apparently there was a newer version of SCOM setup in msdn and someone upgraded our existing SCOM environment. Downloaded the new setup, new report viewer controls and a System
    CLR Types for Microsoft® SQL Server® 2012 and now it works!! 

  • UDI-00018: Data Pump client is incompatible with database version 11.2.0.1

    Hi
    I am trying to import data in Oracle 11g Release2(11.2.0.1) using impdp utitlity and getting below errror
    UDI-00018: Data Pump client is incompatible with database version 11.2.0.1.0
    Export dump has taken in database with oracle 11g Release 1(11.1.0.7.0) and I am trying to import in higher version of the database. Is there any parameter I have to set to avoid this error?

    AUTHSTATE=compat
    A__z=! LOGNAME
    CLASSPATH=/app/oracle/11.2.0/jlib:.
    HOME=/home/oracle
    LANG=C
    LC__FASTMSG=true
    LD_LIBRARY_PATH=/app/oracle/11.2.0/lib:/app/oracle/11.2.0/network/lib:.
    LIBPATH=/app/oracle/11.2.0/JDK/JRE/BIN:/app/oracle/11.2.0/jdk/jre/bin/classic:/app/oracle/11.2.0/lib32
    LOCPATH=/usr/lib/nls/loc
    LOGIN=oracle
    LOGNAME=oracle
    MAIL=/usr/spool/mail/oracle
    MAILMSG=[YOU HAVE NEW MAIL]
    NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
    NLS_DATE_FORMAT=DD-MON-RRRR HH24:MI:SS
    ODMDIR=/etc/objrepos
    ORACLE_BASE=/app/oracle
    ORACLE_HOME=/app/oracle/11.2.0
    ORACLE_SID=AMT6
    ORACLE_TERM=xterm
    ORA_NLS33=/app/oracle/11.2.0/nls/data
    PATH=/app/oracle/11.2.0/bin:.:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/oracle/bin:/usr/bin/X11:/sbin:.:/usr/local/bin:/usr/ccs/bin
    PS1=nbsud01[$PWD]:($ORACLE_SID)>
    PWD=/nbsiar/nbimp
    SHELL=/usr/bin/ksh
    SHLIB_PATH=/app/oracle/11.2.0/lib:/usr/lib
    TERM=xterm
    TZ=Europe/London
    USER=oracle
    _=/usr/bin/env

  • EXP-00037: Export views not compatible with database version

    kindly help with this error. We have already run catexp.sql but still that is not helping, we are still getting the same error.
    we are exporting 8i db.
    Export: Release 8.1.7.0.0 - Production on Thu Feb 21 14:34:25 2008
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    Connected to: Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.0.0 - Production
    EXP-00037: Export views not compatible with database version
    EXP-00000: Export terminated unsuccessfully

    Does this apply to you?
    Error: EXP 37
    Text: Export views not compatible with database version
    Cause: The Export utility is at a higher version than the database version
    and is thereby incompatible.
    Action: Use the same version of Export utility as the database.

  • CMP Entity Bean with database specific features

    Hi there,
    I�m studying Entity Beans and I'm doing some experiences with SQL Server.
    At first, I built a CMP Bean and marked in deploytool to create the tables. Ok, it worked.
    Now, I'm trying to interact to an existent database. But, I got a problem: the primary key is defined by the Server. I can read it and I can remove entries. But, when I try to insert some entry, I can't pass the key in SQL statement. I edited the generated statement to do it, but it doesn't work. I get a RollbackException.
    My question is: is it possible to do what I'm intending to do with CMP? What am I doing wrong?
    Do you think that, to do this, I should use BMP Entity beans?
    Thanks in advance,
    Anicio

    "CMP provides you with database independence and less coding efforts."
    BMP is not database dependent, unless you invoke database specific things in your SQL (something I do not do). CMP on the otherhand is inherently appserver specific (which was it's goal when BEA, IBM, et al. came up with it), and still limits your design possibilities. See this thread for an example:
    http://forum.java.sun.com/thread.jsp?forum=13&thread=318785
    As for less coding effort, that is a relative statment. Yes a simple CMP bean requires less coding to develop the first time. I personally view a few lines of SQL to load and store the data as being fairly trivial. But that needs to be offset with the problems inherent in using appserver specific CMP implementations.
    As an example, try mapping WebSphere CMP to a pre-existing database without using IBM's IDE. It's an incredible pain in the ass since WebSphere does not come with a "meet-in-the-middle" solution. Any J2EE developer that has had the experience of working with different appservers (especially if they have had to port an app, as I have) can attest to the complications that arise with each implementation.
    A BMP bean, written with non-DB-specific SQL, is the most portable, most flexible approach to EntityBeans. Yes, it requires the developer to be able to write some SQL, which should not take a significant amout of time. WRT queries, you have to write them, either SQL, EQL, or some appserver specific format.
    As an aside, the use of code generators to simplify the creation of EJBs lends itself well to BMP. By using a (or writing your own) code generator, you can mitigate the annoying SQL bugs that creep up early in development.

  • Installing EM Grid Control 10.2.0.3 with Database 10.2.0.3 On RHEL4 U3 & U4

    Note: This is not an official document, it discusses Oracle Enterprise Manager Grid Control (EMGC) installation on Redhat Linux Update 3 & Update 4 with new database NOT with an existing database. Both OS Updates were installed with FULL PACKAGE INSTALLATION option. Oracle Universal Installer creates the database automatically before creating the EMGC repository.
    •     For Linux the base version of the EMGC is 10.2.0.1 and for Windows platform it is 10.2.0.2.
    •     The database release is 10.1.0.4 with EMGC 10.2.0.1.
    •     When installed it creates three Oracle Homes: 1) db10g (database), 2) oms10g (Oracle Management Service), and 3) agent10g.
    Course of Action:
    To get to Oracle EMGC 10.2.0.3:
    •     Install EMGC 10.2.0.1      
     Upgrade Oracle Home oms10g to 10.2.0.3.
     Upgrade Oracle Home agent10g to 10.2.0.3.
    To get to Oracle Database 10g 10.2.0.3:
    •     Oracle Database 10g 10.1.0.4 will get installed by the OUI automatically
     Upgrade Oracle Database 10g to 10.2.0.1 in new Oracle DB Home.
     Upgrade new Oracle DB Home to 10.2.0.3.
    ====================================
    Installing EM Grid Control 10.2.0.1:
    ====================================
    To install EMGC 10.2.0.1 download all the three files: Linux_Grid_Control_full_102010_disk1.zip, Linux_Grid_Control_full_102010_disk2.zip, Linux_Grid_Control_full_102010_disk3.zip from http://www.oracle.com/technology/software/products/oem/htdocs/linuxsoft.html.
    If you have unzipped all the downloaded zip files in separate directories then the very first error message slammed at your face after starting the installation will be something like “OUI-10133: Invalid Staging Area. There Area No Top Level Components”. All you have to do is to unzip all the three files in the single directory (Metalink 395030.1).
    After unzipping all the files in the same directory follow the steps that are given on the follow URL.
    http://www.oracle.com/technology/obe/obe10gemgc_10202/install/install.htm
    BUT the problem is that you will be punched with few other error messages during the installation that will terminate the installation. The WORKAROUND is given below.
    There are three stages of the installation by OUI:
    1.     Installation of EM Repository Database 10.2.0.1.
    2.     Installation of EM Grid Console 10.2.0.1.
    3.     Installation of Agent 10.2.0.1.
    The first stage completes without any problem and on the OUI you will see: Oracle Enterprise Manager Repository Database 10.2.0.1.0 installed. While installing the Grid Console, during copying files for "Oracle Application Server 10g 10.1.2.0.2" at 90% OUI will pop up an error message "An error occurred during runtime." You will see lines similar to the following lines in the installation log files.
    INFO: Calling Action SpawnActions10.1.0.3.0 Spawn
    installcommand = /u01/app/oracle/product/10.2.0/oms10g/bin/OracleAS_Relink_Patch.sh
    deinstallcommand =
    WaitForCompletion = null
    INFO: Exception occured during spawning :java.io.IOException: /u01/app/oracle/product/10.2.0/oms10g/bin/OracleAS_Relink_Patch.sh: cannot execute
    INFO: Spawning the modified command :/u01/app/oracle/product/10.2.0/oms10g/bin/OracleAS_Relink_Patch.sh
    INFO: Exception thrown from action: Spawn
    Exception Name: RuntimeException
    Exception String: An error occurred during runtime.
    Exception Severity: 0
    Problem:
    There is a bug which is still being worked on by the DEV : Bug 5203165 : Abstract: CANNOT EXECUTE ../oms10g/bin/OracleAs_Relink_Patch.sh AT INSTALL
    Note that this is an unpublished bug, not viewable via Metalink. The bug apparently occurs only on RHEL4 (32bit) Update 2 and Update 3 (I faced the same thing in Update 4 as well).
    Workaround:
    •     Leave the error message as it is and change the execution permission of the script OracleAS_Relink_Patch.sh.
    $ chmod +x /u01/app/oracle/product/10.2.0/oms10g/bin/OracleAS_Relink_Patch.sh
    •     Now press Retry on the error message pop up window. The installation will resume.
    On the same stage while linking at 90% one another error message will pop up “Error in invoking target 'install' of makefile '/u01/app/oracle/product/10.2.0/oms10g/sqlplus/lib/ins_sqlplus.mk'”.
    Problem:
    Hitting bug : 5203194 :Abstract: RELINK FAILS ON 10.2 GC INSTALL -LIBCLNTSH.SO: UNDEFINED REFERENCE TO NNFGTABLE
    Bug is not published in Metalink. As per the description: Installing 10.2.0.2 Grid Control on RHEL4 Update 2 or Update 3 (I faced the same thing in Update 4 as well). This generates an error in the linking phase. The error is generated while attempting to relink sqlplus.
    Workaround:
    •     Stop installation of all components.
    •     Restart the installation and pick the option to resume the installation.
    •     This allows the installation to complete.
    If by any chance you press continue instead of stopping the installation you should get ready for the garbage OUI is going to throw at you:
    Error in invoking target 'install' of makefile '/u01/app/oracle/product/10.2.0/oms10g/network/lib/ins_net_client.mk'
    Error in invoking target 'install' of makefile '/u01/app/oracle/product/10.2.0/oms10g/network/lib/ins_nau.mk'
    Error in invoking target 'install' of makefile '/u01/app/oracle/product/10.2.0/oms10g/webcache/lib/ins_calypso.mk'
    During Setting up 'Perl Interpreter 5.6.1.0.2d'
    An error occurred during runtime
    During Setting up 'Oracle Application Server 10g 10.1.2.0.2'
    The OPMN Process Manager failed to start. Please check the logs in the /u01/app/oracle/product/10.2.0/oms10g/opmn/logs directory for the cause of failure. Once the cause of failure has been remedied, start OPMN manually and click Retry.
    HTTP Server Configuration Assistant Failed.
    OUI-25031:Some of the configuration assistants failed. It is strongly recommended that you retry the configuration assistants at this time. Not successfully running any "Recommended" assistants means your system will not be correctly configured.
    1. Check the Details panel on the Configuration Assistant Screen to see the errors resulting in the failures.
    2. Fix the errors causing these failures.
    3. Select the failed assistants and click the 'Retry' button to retry them.
    ====================================
    Upgrading EM Grid Control 10.2.0.1 to 10.2.0.3:
    ====================================
    I hope after installing EMGC 10.2.0.1 you are still intending to upgrade it..... :-D Now for that download GridControl_10.2.0.3_Linux.zip from http://www.oracle.com/technology/software/products/oem/htdocs/linuxsoft.html and follow the README.txt file included with the upgrade patch. Before starting the upgrade you will probably have to apply a patch (4329444) on the existing database (10.1.0.4). Anyway, its one of the prereq that you have to complete.
    For upgrade follow the steps given on the following URL.
    http://www.oracle.com/technology/obe/obe10gemgc_10203/patching/patching.htm
    •     Keep one thing in mind that you will have to apply the above mentioned patch twice. Once for oms10g home and once for agent10g home.
    •     Stop all the EMGC related services.
    •     When applying the patch to a particular home change the ORACLE_HOME to that home. E.g. when applying the patch on the oms10g home:
    ORACLE_HOME=$ORACLE_BASE/product/10.2.0/oms10g
    and for agent10g home:
    ORACLE_HOME=$ORACLE_BASE/product/10.2.0/agent10g
    ====================================
    Upgrading Database from 10.1.0.4 to 10.2.0.1:
    ====================================
    Download the file 10201_database_linux32.zip from http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201linuxsoft.html.
    •     Shutdown all the EMGC related services, the listener, and the database.
    •     Start the installation of 10.2.0.1.
    •     Since 10.2.0.1 is a base release that is why you cannot install it in the existing Oracle Home i.e. in db10g. You have to define a separate Oracle Home for the new installation say db10gR2.
    •     During the installation it will ask you to upgrade the existing database 10.1.0.4 to 10.2.0.1, click YES.
    •     Hopefully the installation will go just fine.
    ====================================
    Upgrading Database from 10.2.0.1 to 10.2.0.3:
    ====================================
    Download the file p5337014_10203_LINUX.zip from http://metalink.oracle.com.
    •     Shutdown all the EMGC related services, the listener, and the database.
    •     Start the installation of 10.2.0.3.
    •     During installation it will ask for the Oracle Home, give the new Oracle Database Home i.e. db10gR2 and proceed.
    •     Hopefully the installation will go just fine.
    •     Start the database, listener, and all the EM GC related services:
    o     $ORACLE_HOME/../oms10g/bin/emctl start em
    o     $ORACLE_HOME/../agent10g/bin/emctl start agent
    o     $ORACLE_HOME/../oms10g/opmn/bin/opmnctl startall
    •     Try accessing the EMGC through the browser http://xyz.abc.com:4889/em
    •     You will see two Oracle databases in the EMGC, the old one, 10.1.0.4 and the new one 10.2.0.3. Don’t worry it will not bother you at all. It will only occupy a GB or so. Though, you can remove it through OUI.
    Congratulations!!!! you have now Enterprise Manager Grid Control 10.2.0.3 with Database 10.2.0.3 on RHEL 4 Update 3.
    You can repeat the same exercise for RHEL4 Update 4 as well, but during pre-installation checks you will get 1 warning that:
    Checking for compat-libstdc++-296-2.96-132.7.2; found Not found. Failed <<<<
    Checking for libstdc++devel-3.4.3-22.1; found Not found. Failed <<<<
    Checking for openmotif-21-2.1.30-11; found openmotif-2.2.3-10.RHEL4.5. Failed <<<<
    Actually, these packages are already there in the OS but the higher versions. It is evident from the above messages that first it “founds” the package but due to the version conflict it says that “Not found”. All you have to do is click on the check box next to warning, it will change to User Verified or something. Now press Next and follow the same steps that we followed for Update 3.

    The quicker way is to use sofware only method to install 10204 oms and dirctly use 10203 datbase directly as a oms repository.
    Check the section Installing 'Software-Only' and Configuring Later
    http://download.oracle.com/docs/cd/B16240_01/doc/install.102/e10953/installing_em.htm#CCHGBDCB

  • Datareader is not able to connect with database-Urgent

    Hi All,
    All of a sudden the Datareader component in my ML experiment is not able to connect with database with the following error:
    [ModuleOutput] DllModuleHost Error: 1 : Program::Main encountered fatal exception: Microsoft.Analytics.Exceptions.ErrorMapping+ModuleException: Error 0000: Internal error ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: The value's length for key 'password' exceeds it's limit of '128'.
    Module finished after a runtime of 00:00:00.2031339 with exit code -2
    Module failed due to negative exit code of -2
    It complains about the password being long-but the same credentials I have been using for the last 2 months and still able to use it to run sql queries on that same database using the management portal.
    It appears that Azure encrypts the password and that encrypted password is too long...just my guess after looking that the output.Inside Ml it just says as internal error
    Would appreciate if someone can point to the issue at the earliest...(There is a demo early next week)
    Subscription:Enterprise,
    LOCATION: East Asia
    Regards,
    Biswajit

    Hi,
    Please check this url:
    https://studio.azureml.net/Home/ViewWorkspace/bc85d4f81d2246c4b1430eb395229a3a?&hashSeg=#Workspaces/Experiments/Experiment/bc85d4f81d2246c4b1430eb395229a3a.f-id.11776ae4400f4c1aa9f58308c30810fa/ViewExperiment
    which is an experiment which I created doing save as of the experiment in which the data reader works.
    I stripped everything except the data reader and setup the rest of the components...I finally have to write the results back ,so also pulled a Writer component.
    Now,the data reader works fine..but the Writer fails:
    Error 0071: Incorrect username "acnadmin" or password is passed
    Strangely,its the same credentials set in the DataReader.
    Looks like all the DataInput/Output components created recently only have the problem.
    Once again,while the datareader in this case passes the password in plain text,the writer encrypts,hence fails.

Maybe you are looking for