PL/SQL Maximize Reuse

Hi All,
Imagine I have a team of 20+ developers all writing PL/SQL extracting data for our internal customers who in turn use this to answer key Business questions (sound familiar?).
The common data requests are packaged up and presented in a 'self serve' form to the customers via OBI/Answers.
However, across the team we have a series of ADHOC SQL queries (which maybe asked for again in a couple of months) that are also required. You know the ones, where everyone panics as a graph drops by 7%. :)
For these ADHOC requests, I want to store these some where, perhaps in a code repository? and therefore wondered if:
a) You have experienced this problem and what you did to resolve it?
b) Know of some 'principles' which would enable this code repository to be built
c) Know of some magical software (or prebuilt PL/SQL functionality) that would help
I look forward to your response.
Edited by: DaveyB on Sep 20, 2012 8:39 PM

>
The hyperthetical issue we face is that often we need to join 4 (badly optimised) or more large tables (some with in excess of a billion rows). In this situation a view wouldn't be suitable but rather a series of SQL scripts therefore a repository of 'some kind' is needed.
>
Why would a view not be suitable for that situation? A view is just a stored query. Your reasoning doesn't sense. Do you really want a junior developer to manually join 4 or more large tables and then you have to deal with the mess if they join them wrong or wind up with cartesian joins because they don't join on the correct columns. Not saying views are the answer but don't rule them out when they can take care of some of the basics for you.
Can't you just store the scripts/queries on a shared network drive? Then your developers can access them, modify to use the parameters they need and execute them.
That is a common approach using GUIs like sql developer and Toad both of which can access scripts on network drives and execute them.
>
One colleague did propose that we could store all the SQL statement in a table and fire them from there? Unsure how this would work with multiple parameters.
>
The parameters are just one issue. How do you plan to deliver the result set to the client (either the developer or the business user). Those result sets with likely have different projections for the different queries.
Just share the scripts. Either put them on a network drive to make them accesible or put them in your version control system where they can be checked out when needed.

Similar Messages

  • Use DAO or plain SQL?

    I am building a two-tiered enterprise app with Swing client and RDBMS backend. Over the last two weeks I've tried applying the DAO pattern to my design, manullay creating numerous DTO and DAO classes. I'm now starting to wonder if it's really worth the effort.
    My system is not complicated enough to justify the use of automated OR mapping tools or CMP. Also, the development staff on my team, including myself, have had no expereience in OR mapping and EJB; all we've done in the past involve simple application that accesses the database directly using SQL. We also feel that using SQL directly is adequate in implementing all the functionalities of our system.
    Our initial motivation for implementing DAO was to maximize reuse of persistence code, make code more readable and insulate UI/logic code from change in database schema. But it seems we're now spending too much time thinking about how to map database entities to DTOs, what DAOs to have, what DAO methods to define, etc., whereas in the past to get something from the database we could just write an SQL statement.
    TIA.

    I wouldn't do any application without using DAOs and
    DTOs.
    Perhaps you are focusing to much on the examples
    rather than on the pattern itself. Just because the
    examples do it does not mean that you have to do it.
    You can do with with just one infrustructure class (to
    do the connections, statement, etc) and then the
    following....
    class MyDTO
    public String field1;
    public String field2;
    class MyDAO
    static void create(MyDTO p) {...}
    static void update(MyDTO p) {...}
    static void delete(MyDTO p) {...}
    static MyDTO getById(String id) {...}
    static ArrayList getBySomethingElse(String
    somethingElse) {...}
    }And of course if you don't need one of the above
    methods then do not implement it.i have been doing almost everything in dao but i m not so sure why dtos are so essential, if you write your pojo well, dtos seem to be totally not needed; unless of course you are passing them across networks in ejb systems, and even that, theses days xmls are recommended instead. am i right?
    and lately i havee started using hibernate which i think is great even for small not complecated projects: it does not complicate things, and further, you can still do things in dao with hibernate, i dont see any conficts there: hibernate, jdo are mostly mapping mechnism, and dao is a design pattern.

  • Not able to copy all the record from the table?

    Hi All,
    I have a table Table_1 with 5 crores of data. I have created the same table structure Table_2 like Table_1 and trying to insert the entire data from Table_1 to Table_2 by use of the below code:
    CREATE OR REPLACE PROCEDURE insert_prc (limit_in IN PLS_INTEGER)
    IS
        cursor cur_insert
        IS
        SELECT  *
        FROM    Table_1;
        type tabtype_insert IS TABLE OF cur_insert%ROWTYPE INDEX BY PLS_INTEGER;
        v_tabtype_insert   tabtype_insert;
        v_limit_rows    NUMBER := 1000;
        v_start    PLS_INTEGER;
        v_end      PLS_INTEGER;
        v_update_count  NUMBER;
        v_bulk_errors   NUMBER;   
    begin
        DBMS_SESSION.free_unused_user_memory;
        show_pga_memory (limit_in || ' - BEFORE');
        v_start := DBMS_UTILITY.get_cpu_time;
        BEGIN
            open cur_insert;
            LOOP
                FETCH cur_insert BULK COLLECT INTO v_tabtype_insert LIMIT v_limit_rows;
                FORALL i IN 1..v_tabtype_insert.COUNT SAVE EXCEPTIONS
                INSERT INTO  Table_2
                VALUES v_tabtype_insert(i);
                EXIT WHEN v_tabtype_insert.COUNT < v_limit_rows;
                COMMIT;
            END LOOP;
            CLOSE cur_insert;
        EXCEPTION
        WHEN OTHERS
        THEN
            v_update_count := 0;
            v_bulk_errors := SQL%BULK_EXCEPTIONS.COUNT;
            dbms_output.put_line('Number of INSERT statements that failed : ' ||v_bulk_errors);
            dbms_output.put_line('*******************************************************************************************************************');
            /*FOR i IN 1..v_bulk_errors
            LOOP
                dbms_output.put_line('An Error ' || i || ' was occured '|| SQL%BULK_EXCEPTIONS(i).ERROR_INDEX ||
                                    ' during update of Actuator Model: '|| v_tabtype_mtl_items(SQL%BULK_EXCEPTIONS(i).ERROR_INDEX) ||
                                    ' . Oracle error : '|| SQLERRM(-SQL%BULK_EXCEPTIONS(i).ERROR_CODE));
            END LOOP;   */
            dbms_output.put_line('*******************************************************************************************************************');
        END; 
          v_end := DBMS_UTILITY.get_cpu_time;
          DBMS_OUTPUT.put_line (   'Elapsed CPU time for limit of '
                                || limit_in
                                || ' = '
                                || TO_CHAR (v_end - v_start)/100
          show_pga_memory (limit_in || ' - AFTER');
    end insert_prc;
    CREATE OR REPLACE PROCEDURE APPS.show_pga_memory (
       context_in   IN   VARCHAR2 DEFAULT NULL
    SELECT privileges required on:
       SYS.v_$session
       SYS.v_$sesstat
       SYS.v_$statname
    Here are the statements you should run:
    GRANT SELECT ON SYS.v_$session TO schema;
    GRANT SELECT ON SYS.v_$sesstat TO schema;
    GRANT SELECT ON SYS.v_$statname TO schema;
    IS
       l_memory   NUMBER;
    BEGIN
       SELECT st.VALUE
         INTO l_memory
         FROM SYS.v_$session se, SYS.v_$sesstat st, SYS.v_$statname nm
        WHERE se.audsid = USERENV ('SESSIONID')
          AND st.statistic# = nm.statistic#
          AND se.SID = st.SID
          AND nm.NAME = 'session pga memory';
       dbms_output.put_line(CASE
                                   WHEN context_in IS NULL
                                      THEN NULL
                                   ELSE context_in || ' - '
                                END
                             || 'PGA memory used in session = '
                             || TO_CHAR (l_memory)
    END show_pga_memory;
    /From the above procedure i am able to insert only some 5000000 data. Remaining 4 crores data is not inserted. But the program says it is completed sucessfully.
    Note: Table_2 is the partitioned table and Table_1 is non partitioned table.
    Can anyone please what is the problem on above code?
    Thanks

    user212310 wrote:
    -- Using BULK COLLECTS and FORALL's will consume more resources.Ya i will agree that. That's what i am using LIMIT clause passing value as 1000. It means PL/SQL will reuse the same 1000 elements in the collection each time the data is fetched and thus also reuse the same memory. Even if my table grows in size, the PGA consumption will remain stable.Limit or not, your process will consume more resources (and take longer) than the one i showed you. AND it's many many many more lines of code (harder to maintain, etc...).
    user212310 wrote:
    -- If you don't have a reason (aside from misguided understandings as to which is more performant) to use BULK COLLECTS and FORALL's then you should go with the direct INSERT INTO SELECT * method.The reason i am using BULK COLLECT is to reduce the execution time of the procedure.
    Please let me know if i misunderstood something.
    ThanksYes, you have.
    Please read this
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:760210800346068768

  • Xfce4 virtual desktop configuration and possible alternatives

    I’ve been a satisfied xfce4 user for some time now, but my needs have recently changed.  In the past, I have used just a single Workspace/Desktop to meet my needs.  Now, however, I find myself needing several virtual Desktops to better organize my workflow.  For instance, I would like to have separate Desktops for different functions, such as: personal apps, business apps, utilities, remote desktop sessions, various VM’s, etc.
    I know xfce4 supports multiple “Workspaces”, but I am currently unable to get them setup the way that I would like.  For example: 
        Xfce4 session manager only seems to offer to save the session information from the first “Workspace”, meaning that I’ll have to start several apps in all the additional Workspaces manually after every restart of X.
        The xfce4 Panel doesn’t appear to be customizable for each individual Workspace.  I would like to have a different set of Launchers, Tray, and/or panel Widgets for different Workspaces if possible.   
        It would be convenient to have some Workspaces default to “tiled” and others to “floating” window presentation if possible, although this is of a lower priority to me.
    Is something like this possible with xfce4?  Maybe I can replace some xfce4 components with something else to obtain more functionality?  Maybe something else altogether?  Or, is this all just wishful thinking?
    I hate to abandon xfce4 (custom themes, configurations, comfort level, etc),.  But, I will if I can find a sufficient reason.  Any thoughts or recommendations appreciated!

    Hi ,
    Personally , there is no problem with your server , it is just a mechanism like Identity Columns of SQL .
    "Reuse of values – For a given identity property with specific seed/increment, the identity values are not reused by the engine. If a particular insert statement fails or if the insert statement is rolled back then the consumed
    identity values are lost and will not be generated again. This can result in gaps when the subsequent identity values are generated."
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • ApplicationModule Pooling

    Hi,
    I'm designing an web application using bc4j. This application has an stateful nature and I'm concerned about scalability and server memory comsumption. A few questions:
    How does the Application Module pooling works when using nested Application Modules? And when using extended Application Modules?
    How can I release (statelessly) an Stateful Application Module that has been inactive for some period of time (the session does not expires - may be the user is working in another system module)?
    Thanks,
    Daniel

    Thank you John.
    I answered some of your questions and added more questions and comments...
    The web application I mentioned before will have 350-400 stateful Application Modules. I'm concened about server
    memory usage. I'd like to know how and when the pools are created and populated..
    If you are using the BC4J JSP application module tag then one pool is created for every ApplicationModule
    configuration.We are not using the jbo:ApplicationModule tag. We have a servlet that handle the AM retrieval, assuring that we have just one pool per Application Module definition.
    Having one application module definition implies in having a pool on the server or the pool is created by demand?.
    Pool is created on demand.Ok, I'm reliefed...
    Until now, every one of these 350 AMs is a Root AM. This implies allocating 350 pools!.
    If each AM is of a different type (different AM definition) then yes.
    .Yes, they are of different types.
    We've been thinking in use just one stateful RootAM and use RootAM.createApplicationModule to dynamically nest
    the AM needed to accomplish the task, instead of getting it from a pool..
    The decision depends upon your application requirements. If I understand correctly it is currently possible for a session
    to reference 350 different root ApplicationModule(s). Is each root ApplicationModule acquired serially or in parallel?
    .Yes, it's possible for a session to do that, but in practice only a sub-set of the 350 AMs will be used within the same session.
    I'm not sure I understand what you mean by acquiring an AM serially or in parallel.
    By "serially" you mean that in the same session I get AM1 from the pool, use it and then release it to the pool statelessly, before I get AM2 and AM3 and so on?
    By "in parallel" you mean getting the AMs from the pool, using it and then returning them statefully?
    If I undertand you right, I'm using the AMs in parallel, but I'd like to return them to the pool statelessly when I'm finished with the AM.
    If acquired serially then a session will only reference one transaction context at a time. The other 249
    ApplicationModule(s) will remain available in an ApplicationPool waiting to be reused. If they had been released
    without state management (statelessly) then they should not contribute significantly to the application footprint, though
    it may be necessary to enable connection pooling upon ApplicationModule release to maximize reuse of idle JDBC
    connections (jbo.doconnectionpooling=true).
    If acquired in parallel then a session may have up to 350 different transaction contexts with related JDBC
    connections. If this is not intended then dynamic and/or static nesting is definitely recommended.I did not understand: dynamic/static nesting is recommended for what situation?
    Hope this helps.Be sure it helped.
    JR Thanks
    Daniel

  • Compile locks on Resource database only

    Our server was recently crippled by blocked processes on the Resource database.
    Restarting the instance resolved the problem, however I would like to understand why Resource DB was blocking on compile, yet no other database was experiencing blocking.
    <blocked-process-report monitorLoop="717845">
     <blocked-process>
      <process id="processeb92c99c38" taskpriority="5" logused="0" waitresource="OBJECT: 32767:-412:0 [COMPILE]" waittime="7822" ownerId="6639115589" transactionname="sqlsource_transform"
    lasttranstarted="2014-09-05T23:00:11.117" XDES="0x201b053d20" lockMode="X" schedulerid="19" kpid="10208" status="suspended" spid="819" sbid="0" ecid="0" priority="-5"
    trancount="0" lastbatchstarted="2014-09-05T23:00:11.117" lastbatchcompleted="2014-09-05T23:00:11.117" lastattention="1900-01-01T00:00:00.117" clientapp="ediEnterpriseServiceRunner" hostname="WG1-SPRC-22"
    hostpid="138648" loginname="OdysseyAdmin" isolationlevel="read committed (2)" xactid="6639115589" currentdb="796" lockTimeout="4294967295" clientoption1="671090784" clientoption2="128056">
       <executionStack>
        <frame line="2" stmtstart="-1" sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"/>
        <frame line="2" stmtstart="-1" sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"/>
        <frame line="2" stmtstart="-1" sqlhandle="0x02000000b8e27d16fe8d28b092004808170c1d201fbac34b0000000000000000000000000000000000000000"/>
       </executionStack>
       <inputbuf>
    SELECT name, type_desc
    FROM [Odyssey1_SD001].sys.triggers
    WHERE parent_class = 0
    AND is_ms_shipped = 0
    AND is_disabled = 0   </inputbuf>
      </process>
     </blocked-process>
     <blocking-process>
      <process status="suspended" waitresource="OBJECT: 32767:-412:0 [COMPILE]" waittime="8574" spid="766" sbid="0" ecid="0" priority="-5" trancount="0" lastbatchstarted="2014-09-05T23:00:10.367"
    lastbatchcompleted="2014-09-05T23:00:10.367" lastattention="1900-01-01T00:00:00.367" clientapp="ediEnterpriseServiceRunner" hostname="WG1-SPRC-24" hostpid="18348" loginname="OdysseyAdmin" isolationlevel="read
    committed (2)" xactid="6639111342" currentdb="1070" lockTimeout="4294967295" clientoption1="671090784" clientoption2="128056">
       <executionStack>
        <frame line="2" stmtstart="-1" sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"/>
        <frame line="2" stmtstart="-1" sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"/>
        <frame line="2" stmtstart="-1" sqlhandle="0x02000000f030cd2a8c487038f8e4314b6bf429f9681699700000000000000000000000000000000000000000"/>
       </executionStack>
       <inputbuf>
    SELECT name, type_desc
    FROM [Odyssey2_SD001].sys.triggers
    WHERE parent_class = 0
    AND is_ms_shipped = 0
    AND is_disabled = 0   </inputbuf>
      </process>
     </blocking-process>
    </blocked-process-report>

    Hi Erland,
    I found that if I run the below query, I can get the -412.
    select
    *fromsys.sysobjectswherename='triggers'
    From the information of "waitresource=OBJECT: 32767:-412:0 [COMPILE]", I suspect there's a stored procedure invoked the triggers view and many connections are concurrently running the same stored procedure , so the blocking issue
    occured.
    In Microsoft SQL Server, only one copy of a stored procedure plan is generally in cache at a time. Enforcing this requires serialization of some parts of the compilation process, and this synchronization is accomplished in part by using compile locks. If
    many connections are concurrently running the same stored procedure and a compile lock must be obtained for that stored procedure every time that it is run, system process IDs (SPIDs) might begin to block one another as they each try to obtain an exclusive
    compile lock on the object.
    Another scenario in which compile locks occur is when the following conditions are true:
    The user who runs the stored procedure is not the owner of the procedure.
    If an existing plan is found during the SP executing, SQL Server reuses the cached plan and does not actually compile the stored procedure. However, the lack of owner-qualification forces SQL Server to perform a second cache lookup and obtain an exclusive
    compile lock before the program determines that the existing cached execution plan can be reused.
    Reference : http://support2.microsoft.com/kb/263889
    I think we need to check whether customer's stored procedure often conconcurrently running and often recomplie.
    Halin Huang

  • Predefined transformations for drop/create index?

    Hi,
    I want to add pre/postmap transformations for dropping/recreating indexes in the target table, for performance reasons.
    I can't find any predefined transformations for this (such as WB_DISABLE/ENABLE_ALL_CONSTRAINTS for constraints). It seems I have to program this myself (dynamic PL/SQL for reuse with other tables seems the logical choice), but it seems such a dumb oversight - has Oracle really not supplied predefined transformations for this? It must be an extremely common need in ETL?
    Regards,
    Kai Quale
    University of Oslo

    On further thought, one needs more information than the table name to (re)create an index. (That's actually one of my pet peeves against Oracle - that you can't enable/disable indexes in the same way as constraints.)
    Offhand, the only solution I see is to store index metainformation in a separate table, write custom procedures for disabling FKs/dropping indexes and enabling FKs/creating indexes, using the metatable.
    It is a pretty common task in data warehousing - disable FK/drop index => run mapping => enable FK/create index. How do people do this in OWB?
    Regards,
    Kai

  • PL/SQL reuse in ADF

    Is disabling the use of application module pooling good practice for intranet applications where the number of users are known in advance (although in the thousands)? This was suggested as a solution to limit the amount of recoding that will be required of existing PL/SQL programs that make extensive use of global temp tables/package variables/etc. By disabling pooling (and a few other tweaks) the user will access the db with the same session and hence database state is preserved between requests. But in my experience a lot of PLSQL code is written to fit specific use cases (mostly on Forms) without considering the need to reuse the code in any other context (although I must admit that it can easily happen in any other language). I have repeatedly tried to explain that state is better maintained and much easier to deal with if it sits on the application but perhaps I'm wrong. Any advice will be much appreciated.

    Hi,
    its not enough. If you want to build an ADF application that behaves like Forms, then you need to look for implementing dynamic JDBC credentials so that users have dedicated database connections (which is what Forms is doing). Note that using Application Module pooling and database connection pooling is guaranteeing you better performance so that the question is what the required changes are (global PLSQL variables need to be removed for sure) to PL/SQL so the logic can be used in ADF applications that follow best practices (which is that they run as true Java EE web applications)
    Frank

  • How to write SQL in crystal report that can reuse SQL execution plan cache?

    I write the following SQL with crystal report parameter fields, and it is connecting to SQL 2005
    Select Name from Customer where CustID = '{?CustID}'
    The SQL profiler show that It is an ad-hoc query, how to write parameterized SQL which can reuse Execution Plan.
    Edited by: Chan Yue Wah on May 14, 2009 3:17 AM

    Since there are too many report, it is not possible rewrite all. Is that crystal report do not have option to change how it query the database ?

  • Variable reuse with different sql clauses

    Hi There,
    Is it possible to reuse the same variable with different sql queries in packages....
    Example:
    i have a variable say
    1)variable name: filename
    2)query in variable: select 'emp.txt' from dual
    so using this variable name in data store, i am passing file name dynamically, but i need to change the file name emp.txt to dept.txt if emp.txt feed is missing.
    One solution from my side is using one dump table having file name. any more without using db tables
    please share views
    Cheers,
    Surya

    Hi Bhabani,
    Thanks for your prompt reply, it was really helpful....
    for suppose in i have feed name like dept.20110325, consider as sysdate.
    so i need to pass feed name like above format...
    As of my understanding from your reply, in third step we can give only string like 'emp1.txt', is not possible to write query like in assign mode: select 'dept'||to_char(sysdate,'yyyymmdd') from dual
    Cheers,
    Surya

  • UCCX 7.01, fresh install - SQL Reuse Utility doesn't work

    I am installing a fresh copy on UCCX 7.0 on two 7845 servers. As per the uccx70ig, after installing UCCX, before reboot, you install SQL. I have an MS SQL 2K CD from 4.0(5a), I installed the SQL Reuse Utility (SQLUtilTool.exe, v2.0.3) in the appropriate directory. After the "disable CSA", etc messages, I quickly get a message that the SQL install failed, look at C:\WINNT\setup.log for messages.
    There is nothing in there to indicate the problem.
    Anyone had this issue before? Thanks.

    Thanks, Anthony. The ZIP file, v2.0.3 was downloaded and expanded into a C:\SQL2K directory as per the instructions. The C:\WINNT\setup.log file that the failure message pointed me to shows the following:
    [InstallShield Silent]
    Version=v5.00.000
    File=Log File
    [Status]
    Completed=2
    [ResponseResult]
    ResultCode=0
    The C:\SQL2KUTIL.LOG file (for the last run) shows:
    CSCO:Wed May 05 16:24:04 2010:Display_Start_Message()
    CSCO:Wed May 05 16:24:05 2010:Display_Start_Message() - nResult = 6
    CSCO:Wed May 05 16:24:05 2010:CheckInstalled()
    CSCO:Wed May 05 16:24:05 2010:csco_clss::Registry::Registry() constructor begin
    CSCO:Wed May 05 16:24:05 2010:csco_clss::Registry::openKey() opening key SOFTWARE\Cisco Systems\CRA\CurrentVersion
    CSCO:Wed May 05 16:24:05 2010:csco_clss::Registry::readValue() sValue=version
    CSCO:Wed May 05 16:24:05 2010:csco_clss::Registry::readValue() sData=7.0(1)_Build168
    CSCO:Wed May 05 16:24:05 2010:CheckCRSInstalled() returned =1
    CSCO:Wed May 05 16:24:05 2010:CheckSqlCdInserted()
    CSCO:Wed May 05 16:24:05 2010:CheckSqlCdInserted(), sDrive value =E:\
    CSCO:Wed May 05 16:24:05 2010:CheckSqlCdInserted() returned =1
    CSCO:Wed May 05 16:24:05 2010:CheckSqlCdInserted() returned =1
    CSCO:Wed May 05 16:24:05 2010:IsSql2KInstalled()
    CSCO:Wed May 05 16:24:05 2010:csco_clss::Registry::Registry() constructor begin
    CSCO:Wed May 05 16:24:05 2010:csco_clss::Registry::openKey() opening key SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft SQL Server 2000 (CRSSQL)
    CSCO:Wed May 05 16:24:05 2010:IsSql2KInstalled() - exception: csco_clss::Registry::openKey() RegOpenKeyEx failed {The system cannot find the file specified: 2}
    CSCO:Wed May 05 16:24:05 2010:IsSql2KInstalled() returned =0
    CSCO:Wed May 05 16:24:05 2010:Sql_Installation()
    CSCO:Wed May 05 16:24:05 2010:RegAdd()
    CSCO:Wed May 05 16:24:05 2010:csco_clss::Registry::Registry() constructor begin
    CSCO:Wed May 05 16:24:05 2010:csco_clss::Registry::createKey() creating key SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags
    CSCO:Wed May 05 16:24:05 2010:csco_clss::Registry::addValue() type=4, value={ff25f0b5-c894-45f4-a29d-1bdd0c7926cd}, data=1
    CSCO:Wed May 05 16:24:05 2010:csco_clss::Registry::addValue() value added/updated successfully
    CSCO:Wed May 05 16:24:07 2010:StopNM()
    CSCO:Wed May 05 16:24:07 2010:csco_clss::Registry::Registry() constructor begin
    CSCO:Wed May 05 16:24:07 2010:csco_clss::Registry::openKey() opening key SOFTWARE\Cisco Systems\CRA\CurrentVersion
    CSCO:Wed May 05 16:24:07 2010:csco_clss::Registry::readValue() sValue=version
    CSCO:Wed May 05 16:24:07 2010:csco_clss::Registry::readValue() sData=7.0(1)_Build168
    CSCO:Wed May 05 16:24:07 2010:StopNM() in:s string from reg =7.0
    CSCO:Wed May 05 16:24:07 2010:csco_clss::Service::Service() opening service Cisco Unified CCX Node Manager
    CSCO:Wed May 05 16:24:07 2010:csco_clss::Service::StopServices() : Service is already stopped
    CSCO:Wed May 05 16:24:07 2010:StopNM() returned
    CSCO:Wed May 05 16:24:07 2010:LaunchSQL2K()
    CSCO:Wed May 05 16:24:07 2010:csco_clss::Process::launch() about to launch E:\SQL2K\x86\setup\setupsql.exe -s -f1 C:\SQL2K\setupSQL2K.iss
    CSCO:Wed May 05 16:24:07 2010:csco_clss::Process::initEnv(): Set 'PATH' to C:\Program Files\HP\NCU;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\wfavvid\lib;C:\Program Files\Cisco\bin;C:\Program Files\Cisco\AlarmService;C:\Program Files\Cisco\Desktop\bin;C:\Program Files\wfavvid\;
    CSCO:Wed May 05 16:24:12 2010:csco_clss::Process::launch() finished launching/waiting for process
    CSCO:Wed May 05 16:24:12 2010:LaunchSQL2K() returned successfully
    CSCO:Wed May 05 16:24:12 2010:LaunchSP4()
    CSCO:Wed May 05 16:24:12 2010:csco_clss::Process::launch() about to launch C:\SQL2K\MsSql2K.sp4\x86\setup\setupsql.exe -s -f1 C:\SQL2K\setupSP4.iss
    CSCO:Wed May 05 16:24:12 2010:csco_clss::Process::initEnv(): Set 'PATH' to C:\Program Files\HP\NCU;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\wfavvid\lib;C:\Program Files\Cisco\bin;C:\Program Files\Cisco\AlarmService;C:\Program Files\Cisco\Desktop\bin;C:\Program Files\wfavvid\;;
    CSCO:Wed May 05 16:24:17 2010:csco_clss::Process::launch() finished launching/waiting for process
    CSCO:Wed May 05 16:24:17 2010:LaunchSP4() returned successfully
    CSCO:Wed May 05 16:24:17 2010:SetStartType()
    CSCO:Wed May 05 16:24:17 2010:csco_clss::Service::Service() opening service mssearch
    CSCO:Wed May 05 16:24:17 2010:Exception in ServiceSetStarType()csco_clss::Service::Service() unable to open service. {The specified service does not exist as an installed service: 1060}
    CSCO:Wed May 05 16:24:17 2010:RegAddCiscoSQLflag()
    CSCO:Wed May 05 16:24:17 2010:csco_clss::Registry::Registry() constructor begin
    CSCO:Wed May 05 16:24:17 2010:csco_clss::Registry::createKey() creating key SOFTWARE\Cisco Systems\CRA\CurrentVersion
    CSCO:Wed May 05 16:24:17 2010:csco_clss::Registry::addValue() type=1, value=SQLProvider, data=cisco
    CSCO:Wed May 05 16:24:17 2010:csco_clss::Registry::addValue() value added/updated successfully
    CSCO:Wed May 05 16:24:17 2010:RegAddCiscoSQLflag() returned successfully
    CSCO:Wed May 05 16:24:17 2010:ReadMSSQL2KIssLogFile() in:sDirectory=C:\WINNTsLogFile=setup.log
    CSCO:Wed May 05 16:24:17 2010:ReadMSSQL2KIssLogFile() the sFilePath: C:\WINNT\setup.log
    CSCO:Wed May 05 16:24:17 2010:csco_clss::readMSSQL2KIssLogFile() the nResultCode: 0
    CSCO:Wed May 05 16:24:17 2010:csco_clss::readMSSQL2KIssLogFile() the nCompleted: 2
    CSCO:Wed May 05 16:24:17 2010:ReadMSSQL2KIssLogFile() found error in the Iss log file C:\WINNT\setup.log bError:1

  • Reuse a piece of code in SQL?

    I have a big SQL. And inside it, there is a piece of sub-query appear twice. So rather than writing the sub-query twice in the big SQL, I hope to reuse the sub-query in the "big SQL", i.e., is it possible that I only write it when it first appears, and when it appears again in the other places in the same big SQL, I only need to refer to it rather than re-write the whole sub-query once again? Hope the above does not confuse you. Thanks!

    This is a nonsensical example of the WITH clause but should give you an idea of the syntax. I've created 2 subqueries (my_tabs, my_objs). Once they're given a name, they can be used in a statement anywhere where you would use a table (or subquery). You can use them multiple times, but they can't be correlated subqueries. They have to be 'stand alone'.
    WITH
    my_tabs AS (SELECT table_name FROM user_tables)
    ,my_objs AS (SELECT object_name FROM user_objects)
    SELECT *
    FROM my_tabs
        ,my_objs
    WHERE my_tabs.table_name = my_objs.object_name
    ;

  • Parameter reuse in SQL statement

    I'm trying to convert to ODP.NET (version 10.1.0.200) from the Microsoft OracleClient. With the ms client I was able to reuse parameters within the sql statement multiple time. It appears with ODP.NET I can only do this one time with one parameter - after that an ora-01008 is thrown.
    For example:
    cmd.commandText = "select count(*) from some_table where (dept_no = :deptNo or :deptNo is null) and (emp_no = :empNo or :empNo is null)"
    Above would work in ms OracleClient but doesn't appear to in ODP.NET. I am correctly adding the parameters to the command - everything works fine until I add the second occurrence of the second parm...
    Has anyone else run into this or found a fix?

    Never Mind - The default behavior is cmd.BindByName = false. Once I set it to true everything was just wonderful.

  • Maximize Code Reuse Between Windows Phone 8 and Windows 8(via Microsoft Dev Center)

    Win8 App Developers: Picked this up on the Microsoft Dev site..great tips for reusing code between your Windows 8 app and Windows Phone.
    Summary: In this section, we will help you make the right choices to maximize code reuse in your apps. As a developer, you want to streamline your development and make maintaining your apps as efficient as possible. By working smarter, you give yourself more time to develop more apps and fill the marketplace with your creations. When building an app for Windows Phone 8 and Windows 8, you should look for opportunities to share code, designs, and assets as much as possible so that you maximize the return on your investment. This section describes the sharing techniques that you can use when building you app for both platforms.Read full article
    LenovoDev.com Manager

    Very useful! Thank you!
    Jonas
    Microsoft MVP: Windows Consumer Expert
    Yoga Tablet 2 10 || ThinkPad X1 Carbon (20A7007MPH) || ThinkPad Helix (3698-6EU) || IdeaCentre B540
    Twitter: @jonashendrickx

  • Reusing query results in PL/SQL

    I have a procedure in a package that I want to query several times using the analytical function row_number to get, say, the 5th row and the 95th row:
    select days_missed_negative_is_late
    into l_5pct
    from (select days_missed_negative_is_late,
    row_number() over(order by days_missed_negative_is_late asc) rn
    from (*some complicated query*)
    order by days_missed_negative_is_late))
    where rn = 5;
    then I do the whole thing again, except the last line reads "rn=95". This seems inefficient. I would like to build the results one time then query it twice:
    select days_missed_negative_is_late
    into l_5pct
    from something
    where rn = 5;
    select days_missed_negative_is_late
    into l_5pct
    from something
    where rn = 95;
    or the equivalent functionality, of course. Again, this is in a PL/SQL package. Any ideas of the best way to build the results and read them several times?

    Here is an example.
    1 select object_name from
    2 (select object_name,row_number() over(order by created) rn
    3 from all_objects
    4 where rownum<101)
    5* where rn in(5,95)
    SQL> /
    OBJECT_NAME
    I_CON2
    DEPENDENCY$
    You could for example 1) use a cursor and loop or
    2) select and bulk collect.
    I hope this helps.

Maybe you are looking for

  • URL Opens in new window but the window is teeny tiny - why?

    I've successfully used a button in Captivate 3 to launch another published Captivate in a separate window. I set the button options to Open URL and give the absolute filename. I set the window to "New". Now in Captivate 4 the correct file launches wh

  • How to put Blu Ray Dvds to Kindle Fire HD

    I'd like to transfer my Blu Ray Dvds to my Kindle Fire HD. However, while I have had no problems with the original disks, the files play fine on my device, but everything I converted has the same error message: "video cannot be played". What is the p

  • Sudden change in wireless range

    I've had Fios for TV and Internet in my home for about 10 months now. No problems. I keep the router — the standard MI424WR — in an office on the ground floor. Two days ago, during the bad snowstorm, I am online (Toshiba Satellite running Windows XP)

  • Drill down in tree report

    Hi gurus, This is regarding the drill down in the Tree report. My scenario is, i am doing a budget variance report which displays the report in tree format. i have texts for different nodes in the tree, along with that i have a 10 feilds which i disp

  • How to cache a site ?

    In my application server i have have an application built on portal and another built on JSP. Web Cache Caching rules are the default rules JSP application is in http://host:7778/ConsultaSinistros/ I add the following rule: ^/ConsultaSinistro/.*\.gif