Database control support for "IN" clause

Does anyone know if the database control supports an 'IN' clause construct, e.g.,
SELECT name FROM mytable WHERE id IN ( {values} )
where values would be passed in as a variable length array of Strings or Integers?
Thanks,
DC

I forgot to paste in the link to the documenation. Here it is
http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/database/conParameterSubstitutionInJwsSqlStatements.html
"John Rohrlich" <[email protected]> wrote in message
news:[email protected]..
Dave,
I think you will need to build the sql and pass it to the control method.
For example
String matchMe = "('Bill Walton', 'Fred Williams')";
Customer[] customers = weblogicCustomer.getCustomersIn(matchMe);
* @jc:sql statement= "SELECT name from weblogic.customer where namein
{sql: matchMe}"
public Customer[] getCustomersIn(String matchMe);
Here is a link to a doc explaining parameter substitution for jc:sql
statements
- john
"Dave Chappelle" <[email protected]> wrote in message
news:[email protected]..
Does anyone know if the database control supports an 'IN' clauseconstruct, e.g.,
SELECT name FROM mytable WHERE id IN ( {values} )
where values would be passed in as a variable length array of Strings orIntegers?
Thanks,
DC

Similar Messages

  • Is OEM database control configured for the DBs?

    Hi
    I have multiple oracle (10gR2) databases running on a linux (5.8) server. How can I check that for which of the databases has the OEM Database Control been configured and on what port is it listening?
    Best regards

    Thank you everyone!
    Here is what I see (I have changed the DB names):
    ==============
    [oracle@vm58-1 install]$ emctl status dbconsole
    TZ set to US/Eastern
    Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
    Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
    https://vm58-1.com:1158/em/console/aboutApplication
    EM Daemon is not running.
    Logs are generated in directory
    /u01/app/oracle/product/10.2.0/db_1/vm58-1.com_db1/sysman/log
    [oracle@vm58-1 install]$ export ORACLE_SID=db2
    [oracle@vm58-1 install]$ emctl status dbconsole
    TZ set to US/Eastern
    OC4J Configuration issue.
    /u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_vm58-1.com_db2
    not found.
    [oracle@vm58-1 install]$
    ==============
    So it seems that DB Console was configured for db1. When I try to start it, I get following output
    ========
    [oracle@vm58-1 install]$ export ORACLE_SID=db1
    [oracle@vm58-1 install]$ emctl start dbconsole
    TZ set to US/Eastern
    Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
    Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
    https://vm58-1.com:1158/em/console/aboutApplication
    Starting Oracle Enterprise Manager 10g Database Control
    ========
    And these "dots" just continue to appear and it is running for 15+ minutes now.
    Please advise how to check what is happening.
    Grid Control suggestion - I agree. I believe Grid Control is not free and the client does not seem to be interested to spend more money :-)
    Best regards

  • Grid Control Support for Tripwire

    Does Oracle EM GridControl support Tripwire?
    Do we need a seperate licence from oracle and how to configure Grid control to support Tripwire?
    Any refrence link is much appreciated..

    this is what i have now.
    i have a system with grid control and database server
    as version 10.1.0
    now i am installing in a new system oracle database
    server version 10.2.0. and i want to link this 10.2.0
    with the existing grid control. will this work?Yes. Just discover your new 10..2.0 database using the 10.1.0 Grid Control.
    >
    will it be a good idea to upgrade the database server
    and the grid control in the old system from 10.1.0
    to 10.2.0 version?
    Good idea to read all the release notes and compatibility section that come with you version. It is not a good idea to guess (unless it is a small test system). On my test PC, I upgraded repository to 10.2.0.1.0 and left Grid Control as 10.1.0.3. It works fine.

  • Prime Infrastructure 2.0: Open Database Schema Support available?

    Hello,
    I searched the forum for an Open Database Schema Support for PI.
    I only found Open Database Schemas for the Cisco Works LAN Managemet Solutions and Cisco Prime LAN Managemet Solutions.
    Exists an open Database Schema Support for Prime Infrastructure 2.0 as it exists for the older LAN Managemet Solutions ?
    Thanks.
    Bastian

    Programmatic interface to Prime Infrastructure is done via the the REST API vs. any open database schema.
    There are published reference guides here. For the most up to date information, please see your PI server itself. In Lifecycle view, the help menu has a link to the server-based API information:

  • Pagination support for non-Oracle databases?

    Hi,
    I just read this thread (Pagination Support on pagination support. Is there any way to get pagination with non-Oracle databases? We are using an IBM iSeries / AS/400 DB2 database right now, and we're planning to use some local lightweight database in the near future as well (probably Cloudscape/Derby or "IBM Everyplace database".)
    We currently use code like this:
    String sql = "SELECT art FROM Artikel art" +
                /* dynamically generated where statement is added here */
                + "ORDER BY art.artikelNummer";
    Query q = em.createQuery(sql);
    q.setFirstResult(firstResult);
    q.setMaxResults(maxResults);If I look in the TopLink logs, I see queries like this:
    SELECT ARTNR, ARALT, ARAFJ, ARXII, ARAVJ, ARXIV, ARANJ, AHGCD, ARNVJ, ARCRJ, ARARK, ARFKJ, ARTNK, ARGP1, ASGCD, ARGP2, ARPR1, ARGP3, ARPR2, AREX1, ARPR3, AREX2, ARPR4, AREX3, ARASA, ARINA, ASSCD, ARIA1, ARBAN, ARIN1, ARBAV, ARIA2, ARBAK, ARIN2, ARCES, ARIA3, ARCDT, ARIN3, ARCRE, ARIA4, ARCWK, ARIN4, ARHBH, ARIA5, ARDFA, ARIN5, ARDFG, ARIA6, ARDOS, ARIN6, AREPW, ARINN, ARFOD, ARIAS, ARFOE, ARINS, ARFOF, ARNAB, ARFOI, ARNIB, ARFON, ARNIA, ARFOS, ARNN1, ARFTA, ARNA2, ARVIV, ARNO2, ARGAP, ARNN3, ARGPT, ARNA4, ARGPD, ARNO4, ARGPA, ARNN5, ARGPO, ARNA6, ARHIS, ARNN6, ARISP, ARNIO, ARKHM, ARNNS, MAGCD, AROVJ, MTGCD, ARPL1, ARMXM, ARPL2, MRKCD, ARPL3, ARMVR, ARVKJ, ARMIM, ARV12, ARMDT, ARVVJ, ARMTE, AR#VR, ARMTU, ARZLS, ARMTM, ARIAT, ARMWK, ARAVS, MPCCD, ARNVS, ARBTW, ARFJS, ARXI2, ARG2S, ARXI3, ARE1S, ARXI4, ARE3S, ARXI6, ARIB1, ARXI1, ARIB2, ARXI5, ARIB3, AROPI, ARIB4, ARPRV, ARIB5, SZGCD, ARIB6, ARSPC, ARINO, ARSMF, ARIOS, VEAAN, ARNIS, ARSYN, ARNO1, ARVR1, ARNA3, ARV1S, ARNN4, ARVR2, ARNO5, ARV2S, ARNIN, ARVR3, ARNOS, ARV3S, ARP1S, ARTFA, ARP3S, ARTFG, ARS12, ARUVC, ARZLD, ARUCW, ARAJS, ARBKV, ARCJS, ARVVI, ARG3S, ARVVP, ARINB, VPOCD, ARIO2, VPECD, ARIO4, ARVIH, ARIO6, ARVHG, ARNBS, ARVRW, ARNN2, ARVPR, ARNA5, ARVVR, ARNAS, ARVVS, ARP2S, ARVV1, ARSVV, ARZK1, ARNJS, ARNA1, ARNO3, ARIO1, ARNO6, ARIO5, AROJS, ARE2S, ARVJS, ARIBS, ARIAD, ARIO3, ARG1S FROM ART WHERE ((((ARUVC = 'N') AND (ARHIS = 'N')) AND (ASGCD = 7)) AND (AHGCD = 15)) ORDER BY ARTNR ASC
    (Yeah, I know we have too much columns in the table...)
    So, no pagination in the query. As you can see, we have a mechanism in place to dynamically generate a where clause. This is because the user can set filters. The problem is, if our user sets a filter that causes the result set to be significantly smaller, the performance is way better than when he sets no filter at all. We suppose this is because the whole result set is sent to TopLink, regardless of the values of firstResult and maxResults.
    We are using TopLink Essentials 2.1-10, by the way.
    Message was edited by:
    Bart Kummel

    Hi all,
    I'm trying to subclass <tt>DatabasePlatform</tt> to add pagination support for the AS/400 DB2 database of my customer. To be fair, it is not going very well so far.
    The first problem is, the query Chris found by googling (Re: Pagination support for non-Oracle databases?), does not work for AS/400s version of DB2. In fact, although it is called "DB2", the database on the AS/400 system is a whole other database than the "normal" DB2 database that runs on Windows and *nix. The AS/400 DB2 simply does not have a "ROW_NEXT" function.
    Another option would be to use the <b>row_number() over()</b> mehtod. But, as can be read here, this function is only available from version V5R4 of OS/400. And guess what? We're stuck on V5R3 at this client. (We cannot upgrade, because there's an application in use that's written in Delphi and IBM dropped the Delphi binding from V5R4...)
    So I pretty much ran out of options. On the mailing list I linked to above, someone mentions the option to make a sort of stored procedure that generates a row count number. An example of how to do this can be found here. I implemented it, and ended up with this code:
    package com.myclientsname.persistence;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import org.eclipse.persistence.expressions.ExpressionBuilder;
    import org.eclipse.persistence.internal.databaseaccess.DatabaseCall;
    import org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter;
    import org.eclipse.persistence.internal.expressions.SQLSelectStatement;
    import org.eclipse.persistence.internal.sessions.AbstractSession;
    import org.eclipse.persistence.logging.SessionLog;
    import org.eclipse.persistence.platform.database.DatabasePlatform;
    import org.eclipse.persistence.sessions.SessionProfiler;
    public class AS400Platform extends DatabasePlatform {
        private static final long serialVersionUID = 0L;
        public AS400Platform(){
             super();
             super.setShouldBindAllParameters(false);
        public void printSQLSelectStatement(DatabaseCall call, ExpressionSQLPrinter printer, SQLSelectStatement statement) {
            int max = 0;
            int firstRow = 0;
            if (statement.getQuery()!=null){
                max = statement.getQuery().getMaxRows();
                firstRow = statement.getQuery().getFirstResult();
            if ( !(max>0) && !(firstRow>0) ){
                super.printSQLSelectStatement(call, printer,statement);
                return;
            } else {
                statement.setUseUniqueFieldAliases(true);
                ExpressionBuilder builder = new ExpressionBuilder();
                statement.addField(builder.getField("COUNTER() AS CNTR"));
                printer.printString("SELECT * FROM (");
                call.setFields(statement.printSQL(printer));
                printer.printString(") AS R WHERE R.CNTR >= ");
                printer.printParameter(DatabaseCall.FIRSTRESULT_FIELD);
                if ( max > 0 ){
                    // Use of binding parameters is not allowed here, so use
                    // String concatenation instead...
                    printer.printString(" FETCH FIRST " + max + " ROWS ONLY");
            call.setIgnoreFirstRowMaxResultsSettings(true);
        public boolean wasFailureCommunicationBased(SQLException exception, Connection connection, AbstractSession sessionForProfile){
            if (connection == null || this.pingSQL == null){
                //Without a connection we are  unable to determine what caused the error so return false.
                //The only case where connection will be null should be External Connection Pooling so
                //returning false is ok as there is no connection management requirement
                    //If there is no ping sql then we can not perform the ping.
                return false;
            PreparedStatement statement = null;
            try{
                sessionForProfile.startOperationProfile(SessionProfiler.ConnectionPing);
                if (sessionForProfile.shouldLog(SessionLog.FINE, SessionLog.SQL)) {// Avoid printing if no logging required.
                     sessionForProfile.log(SessionLog.FINE, SessionLog.SQL, getPingSQL(), (Object[])null, null, false);
                statement = connection.prepareStatement(getPingSQL());
                ResultSet result = statement.executeQuery();
                result.close();
                statement.close();
            }catch (SQLException ex){
                try{
                    // Had to add this check because of NullPointerExceptions
                    // (maybe a bug?)
                    if(statement != null){
                        //try to close statement again in case the query or result.close() caused an exception.
                        statement.close();
                } catch (SQLException exception2) {
                    //ignore;
                return true;
            }finally{
                sessionForProfile.endOperationProfile(SessionProfiler.ConnectionPing);
            return false;
    }(As you can see, I had to override the <tt>wasFailureCommunicationBased()</tt> method as well, due to some unexpected NPE's. (A bug, perhaps?))
    This code does work. However, the performance is not very well. The first page comes relatively fast, but as you browse further in the table, each page comes slower. I assume this is because the counter() method has to be evaluated for each row in the table.
    I have to get the performance better and constant. Does anyone have an idea how to optimize this further?
    Best regards,
    Bart Kummel

  • Selective XML Index feature is not supported for the current database version , SQL Server Extended Events , Optimizing Reading from XML column datatype

    Team , Thanks for looking into this  ..
    As a last resort on  optimizing my stored procedure ( Below ) i wanted to create a Selective XML index  ( Normal XML indexes doesn't seem to be improving performance as needed ) but i keep getting this error within my stored proc . Selective XML
    Index feature is not supported for the current database version.. How ever
    EXECUTE sys.sp_db_selective_xml_index; return 1 , stating Selective XML Indexes are enabled on my current database .
    Is there ANY alternative way i can optimize below stored proc ?
    Thanks in advance for your response(s) !
    /****** Object: StoredProcedure [dbo].[MN_Process_DDLSchema_Changes] Script Date: 3/11/2015 3:10:42 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- EXEC [dbo].[MN_Process_DDLSchema_Changes]
    ALTER PROCEDURE [dbo].[MN_Process_DDLSchema_Changes]
    AS
    BEGIN
    SET NOCOUNT ON --Does'nt have impact ( May be this wont on SQL Server Extended events session's being created on Server(s) , DB's )
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
    select getdate() as getdate_0
    DECLARE @XML XML , @Prev_Insertion_time DATETIME
    -- Staging Previous Load time for filtering purpose ( Performance optimize while on insert )
    SET @Prev_Insertion_time = (SELECT MAX(EE_Time_Stamp) FROM dbo.MN_DDLSchema_Changes_log ) -- Perf Optimize
    -- PRINT '1'
    CREATE TABLE #Temp
    EventName VARCHAR(100),
    Time_Stamp_EE DATETIME,
    ObjectName VARCHAR(100),
    ObjectType VARCHAR(100),
    DbName VARCHAR(100),
    ddl_Phase VARCHAR(50),
    ClientAppName VARCHAR(2000),
    ClientHostName VARCHAR(100),
    server_instance_name VARCHAR(100),
    ServerPrincipalName VARCHAR(100),
    nt_username varchar(100),
    SqlText NVARCHAR(MAX)
    CREATE TABLE #XML_Hold
    ID INT NOT NULL IDENTITY(1,1) PRIMARY KEY , -- PK necessity for Indexing on XML Col
    BufferXml XML
    select getdate() as getdate_01
    INSERT INTO #XML_Hold (BufferXml)
    SELECT
    CAST(target_data AS XML) AS BufferXml -- Buffer Storage from SQL Extended Event(s) , Looks like there is a limitation with xml size ?? Need to re-search .
    FROM sys.dm_xe_session_targets xet
    INNER JOIN sys.dm_xe_sessions xes
    ON xes.address = xet.event_session_address
    WHERE xes.name = 'Capture DDL Schema Changes' --Ryelugu : 03/05/2015 Session being created withing SQL Server Extended Events
    --RETURN
    --SELECT * FROM #XML_Hold
    select getdate() as getdate_1
    -- 03/10/2015 RYelugu : Error while creating XML Index : Selective XML Index feature is not supported for the current database version
    CREATE SELECTIVE XML INDEX SXI_TimeStamp ON #XML_Hold(BufferXml)
    FOR
    PathTimeStamp ='/RingBufferTarget/event/timestamp' AS XQUERY 'node()'
    --RETURN
    --CREATE PRIMARY XML INDEX [IX_XML_Hold] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index
    --SELECT GETDATE() AS GETDATE_2
    -- RYelugu 03/10/2015 -Creating secondary XML index doesnt make significant improvement at Query Optimizer , Instead creation takes more time , Only primary should be good here
    --CREATE XML INDEX [IX_XML_Hold_values] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index , --There should exists a Primary for a secondary creation
    --USING XML INDEX [IX_XML_Hold]
    ---- FOR VALUE
    -- --FOR PROPERTY
    -- FOR PATH
    --SELECT GETDATE() AS GETDATE_3
    --PRINT '2'
    -- RETURN
    SELECT GETDATE() GETDATE_3
    INSERT INTO #Temp
    EventName ,
    Time_Stamp_EE ,
    ObjectName ,
    ObjectType,
    DbName ,
    ddl_Phase ,
    ClientAppName ,
    ClientHostName,
    server_instance_name,
    nt_username,
    ServerPrincipalName ,
    SqlText
    SELECT
    p.q.value('@name[1]','varchar(100)') AS eventname,
    p.q.value('@timestamp[1]','datetime') AS timestampvalue,
    p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') AS objectname,
    p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') AS ObjectType,
    p.q.value('(./action[@name="database_name"]/value)[1]','varchar(100)') AS databasename,
    p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') AS ddl_phase,
    p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') AS clientappname,
    p.q.value('(./action[@name="client_hostname"]/value)[1]','varchar(100)') AS clienthostname,
    p.q.value('(./action[@name="server_instance_name"]/value)[1]','varchar(100)') AS server_instance_name,
    p.q.value('(./action[@name="nt_username"]/value)[1]','varchar(100)') AS nt_username,
    p.q.value('(./action[@name="server_principal_name"]/value)[1]','varchar(100)') AS serverprincipalname,
    p.q.value('(./action[@name="sql_text"]/value)[1]','Nvarchar(max)') AS sqltext
    FROM #XML_Hold
    CROSS APPLY BufferXml.nodes('/RingBufferTarget/event')p(q)
    WHERE -- Ryelugu 03/05/2015 - Perf Optimize - Filtering the Buffered XML so as not to lookup at previoulsy loaded records into stage table
    p.q.value('@timestamp[1]','datetime') >= ISNULL(@Prev_Insertion_time ,p.q.value('@timestamp[1]','datetime'))
    AND p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') ='Commit' --Ryelugu 03/06/2015 - Every Event records a begin version and a commit version into Buffer ( XML ) we need the committed version
    AND p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') <> 'Replication Monitor' --Ryelugu : 03/09/2015 We do not want any records being caprutred by Replication Monitor ??
    SELECT GETDATE() GETDATE_4
    -- SELECT * FROM #TEMP
    -- SELECT COUNT(*) FROM #TEMP
    -- SELECT GETDATE()
    -- RETURN
    -- PRINT '3'
    --RETURN
    INSERT INTO [dbo].[MN_DDLSchema_Changes_log]
    [UserName]
    ,[DbName]
    ,[ObjectName]
    ,[client_app_name]
    ,[ClientHostName]
    ,[ServerName]
    ,[SQL_TEXT]
    ,[EE_Time_Stamp]
    ,[Event_Name]
    SELECT
    CASE WHEN T.nt_username IS NULL OR LEN(T.nt_username) = 0 THEN t.ServerPrincipalName
    ELSE T.nt_username
    END
    ,T.DbName
    ,T.objectname
    ,T.clientappname
    ,t.ClientHostName
    ,T.server_instance_name
    ,T.sqltext
    ,T.Time_Stamp_EE
    ,T.eventname
    FROM
    #TEMP T
    /** -- RYelugu 03/06/2015 - Filters are now being applied directly while retrieving records from BUFFER or on XML
    -- Ryelugu 03/15/2015 - More filters are likely to be added on further testing
    WHERE ddl_Phase ='Commit'
    AND ObjectType <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND ObjectName NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND T.Time_Stamp_EE >= @Prev_Insertion_time --Ryelugu 03/05/2015 - Performance Optimize
    AND NOT EXISTS ( SELECT 1 FROM [dbo].[MN_DDLSchema_Changes_log] MN
    WHERE MN.[ServerName] = T.server_instance_name -- Ryelugu Server Name needes to be added on to to xml ( Events in session )
    AND MN.[DbName] = T.DbName
    AND MN.[Event_Name] = T.EventName
    AND MN.[ObjectName]= T.ObjectName
    AND MN.[EE_Time_Stamp] = T.Time_Stamp_EE
    AND MN.[SQL_TEXT] =T.SqlText -- Ryelugu 03/05/2015 This is a comparision Metric as well , But needs to decide on
    -- Peformance Factor here , Will take advise from Lance if comparision on varchar(max) is a vital idea
    --SELECT GETDATE()
    --PRINT '4'
    --RETURN
    SELECT
    top 100
    [EE_Time_Stamp]
    ,[ServerName]
    ,[DbName]
    ,[Event_Name]
    ,[ObjectName]
    ,[UserName]
    ,[SQL_TEXT]
    ,[client_app_name]
    ,[Created_Date]
    ,[ClientHostName]
    FROM
    [dbo].[MN_DDLSchema_Changes_log]
    ORDER BY [EE_Time_Stamp] desc
    -- select getdate()
    -- ** DELETE EVENTS after logging into Physical table
    -- NEED TO Identify if this @XML can be updated into physical system table such that previously loaded events are left untoched
    -- SET @XML.modify('delete /event/class/.[@timestamp="2015-03-06T13:01:19.020Z"]')
    -- SELECT @XML
    SELECT GETDATE() GETDATE_5
    END
    GO
    Rajkumar Yelugu

    @@Version : ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
        May 14 2014 18:34:29
        Copyright (c) Microsoft Corporation
        Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    (1 row(s) affected)
    Compatibility level is set to 110 .
    One of the limitation states - XML columns with a depth of more than 128 nested nodes
    How do i verify this ? Thanks .
    Rajkumar Yelugu

  • How to Schedule Job using Database Control for SQLPLUS script?

    Hi All,
    I am using Database version 10.2. I would like to schedule a SQLPLUS script job using Database control (Not using Grid Control!). The following is the script.
    ========================================================
    define OEM_FRIENDLY=1
    define OWB_BACKGROUND=0
    set serveroutput on
    set verify off
    whenever sqlerror exit failure;
    define REPOS_OWNER='&1.'
    define LOCATION_NAME='&2.'
    define TASK_TYPE='&3.'
    define TASK_NAME='&4.'
    define SYSTEM_PARAMS='&5.'
    define CUSTOM_PARAMS='&6.'
    alter session set current_schema = &REPOS_OWNER.;
    set role owb_d_&REPOS_OWNER., owb_o_&REPOS_OWNER.;
    variable exec_return_code number;
    begin
    -- Initialize Return Code
    :exec_return_code := wb_rt_api_exec.RESULT_FAILURE;
    -- Run Task
    :exec_return_code := wb_rt_api_exec.run_task('&LOCATION_NAME.',
    '&TASK_TYPE.',
    '&TASK_NAME.',
    '&CUSTOM_PARAMS.',
    '&SYSTEM_PARAMS.',
    &OEM_FRIENDLY.,
    &OWB_BACKGROUND.);
    end;
    exit :exec_return_code;
    ===========================================================
    Is it possible to schedule SQLPLUS script with 6 different parameters? If yes then how can I schedule for monday to friday or only for Saturday and sundays.
    Please provide brief steps.
    Thanks for your help in advance.
    - Mehul

    Let me explain to you about scheduler.
    You can schedule a pl/sql stored procedure TEST_S as follows...
    Begin
    dbms_scheduler.create_job(
    job_name=>'MY_JOB',
    Job_Type=>'STORED_PROCEDURE',
    job_action=>'TEST_S',
    start_date=>sysdate,
    repeat_interval=>'freq=monthly;BYDAY=MON,TUE,WED,THU,FRI',
    end_date=>null');
    END;
    You can also also execute o/s script like .bat or .sh. For this job type should be EXECUTABLE.
    Example of converting a .sql script in .bat script...
    insert.sql
    insert into dept values(50,'IT','LONDON');
    exit
    insert.bat
    sqlplus scott/tiger @insert.sql
    Executing now...
    C:\Documents and Settings>insert.bat
    C:\Documents and Settings>sqlplus scott/tiger @insert.sql
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Mar 1 08:01:00 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    1 row created.
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - P
    oduction
    With the Partitioning, OLAP and Data Mining options
    C:\Documents and Settings>
    So first read about DBMS_SCHEDULER and do the work in prompt. Then you can go and schedule it even by database control.
    Scheduling by database control...
    http://www.oracle.com/technology/oramag/oracle/04-jul/o44tech_dba.html
    Scheduler
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm#CIHEHDHA
    PS: By default each job you created is disable state. Please enable it by enable procedure of DBMS_SCHEDULER package.

  • How do I create a new emkey for Enterprise Manager Database Control?

    Hi,
    I just installed 11gR2.
    I am evaluating it.
    How do I create a new emkey for Enterprise Manager Database Control?
    I tried various combinations of this command:
    emctl config emkey
    I did find a probable bug:
    $ emctl config emkey -emkey -emkeyfile emkey.ora -force -sysman_pwd he11ow0rld
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
    Undefined subroutine &EmKeyCmds::promptUserPasswd called at /u2/app/oracle/product/11.2.0/dbhome_1/bin/EmKeyCmds.pm line 160, <FILE> line 3.
    $
    Again,
    How do I create a new emkey for Enterprise Manager Database Control?
    I do have a copy of my old key but it is no longer good because I reinstalled the repository with these commands:
    emca -repos drop ...
    emca -repos create ...
    Oh, and where is emctl "documented".
    I poked around in some book-index links and with the search engine.
    I could not find anything.
    Thanks,
    -Janis

    user11892726 wrote:
    Oh, and where is emctl "documented".
    http://download.oracle.com/docs/cd/B16240_01/welcome.html

  • Frustrating lack of support for Mission Control / Spaces on Mac OS

    I'm posting this on the InDesign board, but this question applies equally to all apps in the Creative Suite.
    Is there any way to make InDesign/Creative Suite work properly with Spaces (a feature that has been around for years now)? It is incredibly frustrating to not be able to use this excellent organisational aid with any of the Adobe apps. There seems to be a whole mishmash of problems with it, from pallettes disappearing and moving to a different space to the document you are working on, to entire apps not being visible in Mission Control. Not to mention problems when trying to hide/unhide apps.
    When I'm working with any other apps on my system, I can take advantage of Mission Control, but have forego these advantages when using the Creative Suite. Isn't it really about time that Adobe put some effort into supporting these OS-level features. Whether you favour Mac OS or Windows, you should be able to take advantages of the system you prefer to work on.
    Is there any word on whether CS6 will support these features? (I'm not exactly holding my breath).
    Thanks.

    When I'm working with any other apps on my system, I can take advantage of Mission Control, but have forego these advantages when using the Creative Suite. Isn't it really about time that Adobe put some effort into supporting these OS-level features. Whether you favour Mac OS or Windows, you should be able to take advantages of the system you prefer to work on.
    Is there any word on whether CS6 will support these features? (I'm not exactly holding my breath).
    There is no word on anything about InDesign CS6 yet. (Those who know can't say, and I'm not aware of any substantive leaked information.)
    I think that Spaces/Mission Control support is probably predicated on the Carbon to Cocoa conversion. So until InDesign is a Cocoa app, this is unlikely to improve. Personally I manage to avoid using Spaces to any significant degree, so I don't really notice these things. Have you tried Photoshop, which is a Cocoa app? Does it behave better?
    I don't know to what extent these issues are specific to the app, or all tied up in libraries that are common to all the Adobe apps.

  • Lack of support for FIM database mirroring

    The official line is that database mirroring is not a supported architecture for the FIM deployment. I am not proposing using this, however I'd like to understand 1) What the issues really would be with a mirrored database deployment, 2) Will support
    ever be added for this, and will it come in the form of SQL AlwaysOn?
    Really appreciate help and input.
    Rgds,
    David

    Database mirroring comes has two modes regarding transactions: synchronous or asynchronous.
    Synchronous requires that the data be committed in both places before releasing the transaction. This has a big performance impact on the FIM Service database and to a lesser extent on the FIM Sync Database.
    Asynchronous means that data isn't committed in both places at the same time, the mirror can fall behind and then in failover you could be behind. In order to have automatic failover with Mirroring you have to be able to modify the connection string to include
    the failover partner or the client has to support getting that data at first logon. While you can modify the FIM database connection strings, it is not understood if FIM is using database clients that support mirroring. I believe it is. Even with asynchronous
    you still have performance hit for copying every transaction to the mirror.
    SQL Always On combines the best of mirroring and clustering to allow you to group databases together into an availability set, and then automatic failover the whole group to another server. It should be noted that Always On makes use of a similar underlying
    mechanisms as mirroring to copy the data -- this is evident when you read that Always on also has an asynchronous and synchronous mode. You will most likely run into the same performance quandary.
    Will the product group add support for it? My guess is that it depends on if they find a good way to address the performance issues.
    David Lundell, Get your copy of FIM Best Practices Volume 1 http://blog.ilmbestpractices.com/2010/08/book-is-here-fim-best-practices-volume.html

  • Using "in" clause in the query in Database control

    Hi,
    I have a database control and need to fire an update query to update a set of rows based on a list of values as input
    Like below
    update tablename
    set column1="value1"
    where column2 in (.......)
    I need to pass a list of values for this query where column2 is a NUMBER field in Oracle DB.
    can anyone help me how to go about passing this list of values?
    Help is appreciated.
    Thanks

    You may build the comma-separated list in Java and use " {sql: ...} " in your query: http://e-docs.bea.com/workshop/docs81/doc/en/workshop/java-class/com/bea/control/DatabaseControl.html (sorry, I can't find the documentation for WLI 9.2).

  • Not able to create database even with a subscription. (The operation is not supported for your subscription offer type)

    Hi,
    I am trying to create a SQL server database, but are not able to. I get this message: The operation is not supported for your subscription offer type.
    I have to azure accounts and this is only happening in one of them.
    I have created a subscription, but I can see that I have 1250 NOK in credit that is expiring in 29 days.
    Regards
    Christian
    ChristianLLoyd

    Hi Christian,
    The error you saw should only occur for a subscription used with a free trial offer type. Please use the below link to open a support ticket.
    http://azure.microsoft.com/en-us/support/options/
    You can check the following links for similar issues.
    The operation is not supported for your subscription offer type
    Could not submit the request to create database
    DBNAME. The operation is not supported for your subscription offer type
    Thanks,
    Lydia Zhang
    If you have any feedback on our support, please click
    here.
    Lydia Zhang
    TechNet Community Support

  • Is it possible to add support for new database type in Data Modeler?

    Hi,
    I see that Data Modeler v.4 supports different versions of Oracle, DB2 and MS SQL. Is it possible to add support for a new database family,
    PostgreSQL for example? I hoped that RDBMS Site editor can do it, but so far I don't see any possibility to add XML files with metadata for a new RDBMS.
    I did it previously for PowerDesigner were it is possible to add and modify definitions for new relational databases.
    Thank you,
    Sergei

    There is discussion option as an out of the box feature. Check this: BI launch pad 4.0: Participate in a discussion about a document

  • SP1 to R2 Upgrade - The installed Version of SQL Server is not supported for the operational database

    Hello, 
    Am trying to upgrade a SCOM SP1 environment to SCOM R2( 3 MGT servers, 1 GW and 2 Web console boxes )
    The prerequisites are failing and it is stating the following ; 
    Operational Database SQL Version Check - The installed Version of SQL Server is not supported for the operational database
    Data Warehouse  SQL Version Check - The installed Version of SQL Server is not supported for the data warehouse
    The SQL servers are running SQL 2012 SP1 64 Enterprise, which is compatible.
    All other pre-upgrade tasks have been done. 
    Help appreciated! 

    I'm having the exact same issue, I believe. I think that Tubble has problem with SCOM 2012. Not 2007.
    I've checked the compatibility list for both SCOM 2012 SP1 and R2. All newer Windows Server and SQL versions are supported. We're running the SQL 2012 SP1 x64 Standard edition on a Windows Server 2012 Standard.
    I even tried to move the database from SQL 2012 to an older SQL 2008 R2, but that's not supported either. Only upgrading. Not downgrading.
    So, I started checking the opsMgrSetupWizard.log file for clues. And the error message was there as well. But the reason why it says not supported is that it can't get the info about the OS version, so I guess it assumes the OS version is to low. The RPC
    service can not be reached.
    [10:29:11]: Error: :GetRemoteOSVersion(): Threw Exception.Type: System.Runtime.InteropServices.COMException, Exception Error Code: 0x800706BA, Exception.Message: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    [10:29:11]: Error: :StackTrace: at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
    at System.Management.ManagementScope.InitializeGuts(Object o)
    at System.Management.ManagementScope.Initialize()
    at System.Management.ManagementObjectSearcher.Initialize()
    at System.Management.ManagementObjectSearcher.Get()
    at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SetupValidationHelpers.GetRemoteOSVersion(String remoteComputer)
    [10:29:11]: Debug: :IsSQLOnAValidComputer: remote OS version string was null or empty.
    [10:29:11]: Error: :Error:IsValidSQLVersionCheck: SqlServer OS version is too low.
    [10:29:11]: Debug: :**************************************************
    [10:29:11]: Error: :<![CDATA[CheckPrerequisites: Logic Type:and IsValidOMDBSQLVersionCheck: 2]]>
    [10:29:11]: Error: :
    [10:29:11]: Error: :CheckPrerequisites: OMDBSqlVersionCheckTitle: Failed
    [10:29:11]: Error: :
    [10:29:11]: Debug: :**************************************************
    [10:29:33]: Error: :GetRemoteOSVersion(): Threw Exception.Type: System.Runtime.InteropServices.COMException, Exception Error Code: 0x800706BA, Exception.Message: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    [10:29:33]: Error: :StackTrace: at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
    at System.Management.ManagementScope.InitializeGuts(Object o)
    at System.Management.ManagementScope.Initialize()
    at System.Management.ManagementObjectSearcher.Initialize()
    at System.Management.ManagementObjectSearcher.Get()
    at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SetupValidationHelpers.GetRemoteOSVersion(String remoteComputer)
    [10:29:33]: Debug: :IsSQLOnAValidComputer: remote OS version string was null or empty.
    [10:29:33]: Error: :Error:IsValidSQLVersionCheck: SqlServer OS version is too low.
    [10:29:33]: Debug: :**************************************************
    So, in our case this was just a FW that was blocking some high ports between management server and SQL. I believe TCP port 135 also needs to be open.
    Let's hope this fixes your issue as well, Tubble.
    Have a great day!

  • BO XI3.1: Support for Greenplum/PostGres Database

    Is Support for GreenPlum /Postgres database schedule for next service pack of BO XI3.1?
    With Postgres database - we have support only in Crystal and not in BO according to supported platform guide.
    Could you please advise whether we have scheduled the support for GreenPlum/Postgres database for BOXI 3.1 - in the next release of BOXI 3.1 SP2 ?
    Information from customer :
    - for Postgres database with ODBC drivers are working ok.
    - whether GreenPlum database is going to be supported in the next service pack
    - whether Postgres JDBC drivers could be used to Connect to GreenPlum Database instead of Postgres ODBC Drivers.
    Could you please advise on this database support as requested by customer ?
    Regards,
    Ganesh

    Hi, I've experienced using Greenplum database and odbc PostsgreSQl
    For BOE 3.1, you can create Webi, but not applicable with dashboard part. Where it cannot recognized the Postgre driver.
    Currently i'm trying to use another driver from DataDirect.
    Thats all for now.

Maybe you are looking for

  • Photo gallery in DW CS3

    Can someone tell me how to make a photo gallery in DW CS3? I mean a site with thumbnails that are linked to larger images, preferably all thumbnails on one site, not the filmstrip system. I read that there would be a gallery option in DW, but I canno

  • How Do you create photo albums

    How do I put my photos into albums?

  • I Recently Unblocked My Iphone 3G and Now I Cant Connect To My Wi Fi At Home. Help!

    I Recently Unblocked My Iphone 3G and Now I Cant Connect To My Wi Fi At Home. Help!

  • Media Encoder in Windows unable to create output file

    I'm trying to create an Avid DNxHD Quicktime file so that I can load in my older Mac Pro and make ProRes files for delivery. When I add the file to the rendering queue it fails every time. Tried several DNX settings, 8 bit, 10 bit but no difference.

  • U44M1P34 error

    I got the above errormsg when updating Indesign CC 9.2.1. Followed the the error recovery instructions (uninstall, remove folders ...). Reinstalled the app, but now the patch failed and Indesign won't start anymore. Suggestions? Gert