SQL UDF in BusinessObjects - Possible?

Post Author: Ryan Quigley
CA Forum: Semantic Layer and Data Connectivity
I have a UDF that I created in SQL Server 2000.  I would like to utilize that UDF in a BusinessObjects XI R2 universe for reporting and dashboard purposes.  The first parameter is a field in the database that is already in the universe.  The second parameter needs to be a prompt for the user.  I've pasted the UDF below.
How can I have BO utilize the function?  I have had no luck so far.
Thanks!
Ryan Quigley
CREATE FUNCTION dbo.CalcRollingPendingInventoryDays
(     @Notes_GUID AS VARCHAR(72),     @Query_Date AS DATETIME)
RETURNS SMALLINT
AS
BEGIN      DECLARE @RollingPendingInventoryDays AS SMALLINT     DECLARE @Query_Date_Key AS INT     DECLARE @Date_Rcvd_Key AS INT     DECLARE @Date_Case_Closed_Key AS INT     DECLARE @Weekend_Days AS SMALLINT     DECLARE @Holiday AS SMALLINT
     SET @Notes_GUID = @Notes_GUID + '%'     SET @Query_Date_Key = (SELECT DATE_KEY FROM dbo.D_DATE WHERE @Query_Date = CALENDAR_DATE)     SET @Date_Rcvd_Key = (SELECT DATE_RCVD_KEY FROM dbo.F_COMPLAINT_TRACKING WHERE NOTES_GUID LIKE @Notes_GUID)     SET @Date_Case_Closed_Key = (SELECT DATE_CASE_CLOSED_KEY FROM dbo.F_COMPLAINT_TRACKING WHERE NOTES_GUID LIKE @Notes_GUID)      SET @Weekend_Days = (SELECT COUNT() FROM dbo.D_DATE WHERE (DATE_KEY BETWEEN @Date_Rcvd_Key AND @Query_Date_Key) AND (WEEKEND_INDICATOR = 'Y'))     SET @Holiday = (SELECT COUNT() FROM dbo.D_DATE WHERE (DATE_KEY BETWEEN @Date_Rcvd_Key AND @Query_Date_Key) AND (HOLIDAY_INDICATOR = 'Y'))
     IF (@Query_Date_Key < @Date_Case_Closed_Key) OR (@Date_Case_Closed_Key = -2)     BEGIN           SET @RollingPendingInventoryDays = @Query_Date_Key - @Date_Rcvd_Key - @Weekend_Days - @Holiday     END     ELSE     BEGIN           SET @RollingPendingInventoryDays = NULL     END
     RETURN @RollingPendingInventoryDays
END

Srini, @chris hope you don't mind me stepping in
Just checked this in 11.1.1.4.0 and 11.1.1.6.0 and it worked for me.
I used the HR schema and the Departments table
  <ViewAttribute
    Name="DepartmentName"
    IsNotNull="true"
    PrecisionRule="true"
    EntityAttrName="DepartmentName"
    EntityUsage="Departments"
    AliasName="DEPARTMENT_NAME"/>
  <ViewAttribute
    Name="nnn"
    IsPersistent="false"
    PrecisionRule="true"
    Precision="255"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    AliasName="VIEW_ATTR"
    Passivate="true"
    Expression="SUBSTR(DEPARTMENT_NAME, 1, 5)"
    SQLType="VARCHAR"/>
...The nnn attribute I added to show only the first 5 characters of the department name.
Timo

Similar Messages

  • Use of Input Variables in SQL-Queries Sometimes Not Possible

    Only in simple SELECT-statements the use of input variables ([%0], [%1], etc.) work without problems.
    In more complex queries the use of these variables is not possible (e.g. SELECT-statements with sub-queries, sometimes when UNION is used - but I couldn't find any general rule when the problems will arise; sometimes two different queries with the same query-structure behave in different ways when these variables are used).
    In these cases the query is not executed - not even the input-window to enter values into the input variables is displayed. The query stops with some strange error-messages in the status line. These error-messages doesn't have any relation to the actual query - sometimes it refers to field-names never used in the query or refers to syntax error which do not exist.
    If the input variables are replaced by constant values there are no problems so there can't be any syntax errors - the only difference is the presence or absence of input variables.
    Example:
      provided that the queries have a certain complexity
      SELECT ...
      FROM   ... OINV Tx ...
      WHERE  ... Tx.DocDate >= [%0] ...
      does not work,
      SELECT ...
      FROM   ... OINV Tx ...
      WHERE  ... Tx.DocDate >= '1.1.2007' ...
      works!
    Does anybody have run into the same problem and now if it is a bug of SAP-BO or an error on behalf of the user? Does anybody know a way to correct the problem?
    Thanks in advance!
    Frank
    By the way: Are there any rules where exactly input variables can be used in a query?
    Only in SELECT-statements? Where there exactly?
    In statements outside of SELECT?

    Only SAP Partners Can access service.sap.com/notes, but I think it is possible to search in them from the customer portal as well.
    Here are summary of the two notes mentioned before this:
    730960:
    <i>
    The following query is an example for how to define variables in long
    queries rather than using "Fixed Declares".
    You need to use exactly the same template as follows, do not delete
    "comments" from this query.
    The only changes you need to do :
    1. In the first and in the fifth rows you need to select the table to which you would like to relate the variable e.g. in this example, the variable is related to the table VPM1 - 'Payments to Vendors - Rows'.
    2. In the fourth and in the eighth rows you need to select the field to which you would like to define the variables e.g. in this example, the variable is the field 'DueDate'.
    /SELECT FROM [dbo].[VPM1] T0/
    declare  @fromdate as datetime
    /* WHERE */
    set @fromdate = /* T0.DueDate */ '[%0]'
    /SELECT FROM [dbo].[VPM1] T1/
    declare  @tilldate as datetime
    /* WHERE */
    set @tilldate = /* T0.DueDate */ '[%1]'
    select  OVPM.docnum, VPM1.dueDate,VPM1.CheckNum, VPM1.Branch,
    VPM1.BankCode, VPM1.CheckSum, OVPM.CardName,
    case
    when OPCH.docnum is null then VPM2.docEntry
    else OPCH.docnum
    end as 'docnum'
    from OVPM INNER join VPM1 on OVPM.docnum = VPM1.docnum
    left join  VPM2 LEFT JOIN OPCH ON VPM2.DocEntry = OPCH.DocEntry
    on OVPM.docnum = VPM2.docnum
    where OVPM.Canceled = 'N' AND VPM1.DueDate >=@fromdate AND
    VPM1.DueDate <=@tilldate
    </i>
    955295:
    <i>
    Using SAP Business One Survey Variables (parameters) in a 'Set' SQL Statement can give an error in the Query Generator.
    For Example:
    Declare @Num as numeric(2)
    Set @Num = [%0]
    Select T0.DocNum
    From ORDR T0
    Where DocNum = @Num
    Other terms
    query, SQL, parameter, survey, variable, query generator, set, declare, [%0], table, error, SAP Business One
    Reason and Prerequisites
    FAQ
    Solution
    In such cases you need to put in an SQL remark statement a reference field in the DB for the Survey Variable (any field).
    For Example: (to make the above query work)
    Declare @Num as numeric(2)
    Set @Num = /* T0.DocNum */ [%0]
    Select T0.DocNum
    From ORDR T0
    Where docnum = @Num
    </i>

  • SQL Loader:  Is it possible to set a variable?

    Hallo All,
    I am loading data with SQL Loader and find that I can set particular fields to particular values using 'CONSTANT'. That's great. However, I am loading multiple files into the same format and so would like to 'label' each load. This would be done by setting a variable before each load and then using this to write the load month (e.g. '200901') into the column 'SOURCE_FILE' in the destination table.
    I imagine the syntax would look something like this ...
    LOAD DATA
    strSource = '200809'
    INFILE 'source_data_200809.csv'
    strSource = '200810'
    INFILE 'source_data_200810.csv'
    strSource = '200811'
    INFILE 'source_data_200811.csv'
    APPEND
    INTO TABLE DESTINATION_TABLE
    FIELDS TERMINATED BY ";" OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (CUSTNO char,
    BARCODE char,
    NAME char,
    SOURCE_FILE char :strSource)
    Then, for each load I would reference the variable strSource and write the appropriate month into a column/field in the table.
    I have been googling and trawling through the documentation but I cannot seem to find a way to do this. Is it possible? Or maybe there is another method/way/trick to do this? Or maybe it is just a question of syntax?
    Any ideas?
    Regards,
    Alan Searle

    Hi Kamran,
    I took a look at that thread and there were some tips including details about sending parameters through the command line ...
    SQLLDR CONTROL=controlfile.ctl, DATA=yourdatafile.csv
    But here I would need to also be able to send a parameter that I could pick up and use within SQL Loader. This might be ...
    SQLLDR CONTROL=controlfile.ctl, DATA=source_data_200809.csv VAR=200809
    ... here I would write the value '200809' to a column in the table being loaded (so that I could track back to the source of the load).
    I checked the documentation but it doesn't seem to be possible to send a variable in this way.
    Any other tips?
    Regards,
    Alan

  • I want Query from QueryDataSet by SQL string, Is it possible ??

    if the sql string is :
    "select * from QueryDataset1 " and store the results in another QueryDataSetRR
    is it possible or not ?
    What ara the alternatves of store the retrived data from database and store it in (??) instead querdataset1 and use these data again using SQL string ??
    Regards,

    Well, most SQL servers allow some kind of temporary table to be generated, and you can always load a table from the results of a select
    INSERT results(f1, f2) SELECT f1, f2 FROM maindata WHERE .....
    But most database systems also allow a subquery which allows you, amongst other things, to further refine a SELECT by taking FROM from a subquery rather than a table.

  • Help with oracle sql to get all possible combinations in a table.

    Hello guys I have a small predicatement that has me a bit stumped. I have a table like the following.(This is a sample of my real table. I use this to explain since the original table has sensitive data.)
    CREATE TABLE TEST01(
    TUID VARCHAR2(50),
    FUND VARCHAR2(50),
    ORG  VARCHAR2(50));
    Insert into TEST01 (TUID,FUND,ORG) values ('9102416AB','1XXXXX','6XXXXX');
    Insert into TEST01 (TUID,FUND,ORG) values ('9102416CC','100000','67130');
    Insert into TEST01 (TUID,FUND,ORG) values ('955542224','1500XX','67150');
    Insert into TEST01 (TUID,FUND,ORG) values ('915522211','1000XX','67XXX');
    Insert into TEST01 (TUID,FUND,ORG) values ('566653456','xxxxxx','xxxxx');
    "TUID"                        "FUND"                        "ORG"                        
    "9102416AB"                   "1XXXXX"                      "6XXXXX"                     
    "9102416CC"                   "100000"                      "67130"                      
    "955542224"                   "1500XX"                      "67150"                      
    "915522211"                   "1000XX"                      "67XXX"                      
    "566653456"                   "xxxxxx"                      "xxxxx"                       The "X"'s are wild card elements*( I inherit this and i cannot change the table format)* i would like to make a query like the following
    select tuid from test01 where fund= '100000' and org= '67130'however what i really like to do is retrieve any records that have have those segements in them including 'X's
    in other words the expected output here would be
    "TUID"                        "FUND"                        "ORG"                        
    "9102416AB"                   "1XXXXX"                      "6XXXXX"                     
    "9102416CC"                   "100000"                      "67130"                      
    "915522211"                   "1000XX"                      "67XXX"                      
    "566653456"                   "xxxxxx"                      "xxxxx"  i have started to write a massive sql statement that would have like 12 like statement in it since i would have to compare the org and fund every possible way.
    This is where im headed. but im wondering if there is a better way.
    select * from test02
    where fund = '100000' and org = '67130'
    or fund like '1%' and org like '6%'
    or fund like '1%' and org like '67%'
    or fund like '1%' and org like '671%'
    or fund like '1%' and org like '6713%'
    or fund like '1%' and org like '67130'
    or fund like '10%' and org like '6%'...etc
    /*seems like there should be a better way..*/can anyone give me a hand coming up with this sql statement...

    mlov83 wrote:
    if i run this
    select tuid,fund, org
    from   test01
    where '100000' like translate(fund, 'xX','%%') and '67130' like translate(org, 'xX','%%');this is what i get
    "TUID"                        "FUND"                        "ORG"                        
    "9102416AB"                   "1XXXXX"                      "6XXXXX"                     
    "9102416CC"                   "100000"                      "67130"                      
    "915522211"                   "1000XX"                      "67XXX"                      
    "566653456"                   "xxxxxx"                      "xxxxx"                      
    "9148859fff"                  "1XXXXXX"                     "X6XXX"                       the last item should be excluded. The second digit in "org" is a "7" Fund is wrong, too. You're looking for 6 characters ('100000'), but fund on that row is 7 characters ('1XXXXXX').
    and this is sitll getting picked up.That's why you should use the _ wild-card, instead of %
    select  tuid, fund, org
    from    test01
    where  '100000' like translate (fund, 'xX', '__')
    and    '67130'  like translate (org,  'xX', '__')
    ;It's hard to see, but, in both calls to TRANSLATE, the 3rd argument is a string of 2 '_'s.

  • Is sql functions or trigger possible for adf button component

    while developing project using ADF BC and JSF, is possible to invoke sql functions or trigger for an adf button component. plz reply

    For this you define a method in the application module which you expose to the client. Then you can drag this method onto the button. The method is call when you click the button.
    Inside the method you can call pl/sql functions. Read chapter "37.5 Invoking Stored Procedures and Functions" here http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadvgen.htm#sm0297
    Timo

  • Web services access from PL/SQL. It is possible?

    Hello,
    I need to access some data from one database, using a Web Services (it's the only way I have permisson). It's possible to do that from an PL/SQL function/procedure from another database?
    Thanks,
    XaM

    Yes it is,
    You could use a java stored procedure
    http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html
    Regards
    Peter

  • SQL: combined SELECT-command possible???

    Hello Experts!
    in the enclosed SQL-command I'm actually selecting from table EKPO only the open POs with no reference in order-history (EKBE). Now I want to enlarge/combine this command in that way that additionally records from order history (EKBE) with a special movement type in EKBE are selected on top.
    Is it possible or do need a second select-command in the Z-application???
    THANKS for a response.
    Regards,
    Bernd
    select ebeln ebelp menge meins txz01 bukrs matkl
             werks matnr mtart labnr elikz pstyp from ekpo as b
        into (itab-bestnr, itab-pos, itab-best_mng,itab-meins, itab-text,
             itab-bukrs, itab-matkl, itab-werks, itab-matnr, itab-mtart,
             itab-labnr, itab-elikz, itab-pstyp)
        where ( mtart = 'ETMW' or mtart = 'ETVB' ) and
              menge > 0 and
              loekz <> 'L' and
              loekz <> 'S' and
              elikz <> 'X' and  " Endliefer-KZ
              ebelp not in ( select ebelp from ekbe where
                                    ebeln = b~ebeln ).
    Edited by: Bernd Thielemann on Jul 21, 2008 4:37 PM

    The result should be all open orders!
    1.) no EKBE
    2.) EKBE but quantity of goods receipt (WE) is less than quantity of the PO
    3.) intercompany-POs (stock transport order) have other movement types (like LFS and WA) which do not effect the status of the open PO until good-receipt movement is posted in the receiving plant .
    First/Second condition is realized. Third condition is the gap until now.
    Regards,
    Bernd

  • Rename SCCM SQL Database is this possible

    I would like to rename the SCCM 2012 database. I found a few links explaining how to rename the SCCM Database in SCCM 2007 using a site reset but I have not found anything on SCCM 2012. http://blogs.technet.com/b/configurationmgr/archive/2009/10/27/renaming-the-configuration-manager-2007-database.aspx
    Does anyone know if renaming the SCCM 2012 DB is possible. I would only like to rename it and not move it. I was able to get to the change SQL configuration options in the site reset wizard. The SQL server name could be change but the database name
    was grayed out and could not be changed.
    Thank you in advanced

    The reason for the rename is because we would like to use Configuration Manager 2012 Web Frontend for remote control access. This will give our Helpdesk and Desktop techs a web interface to be able to use for remote control feature without requiring the
    management console installed. We used something similar in the past and was very popular in our users. The problem is that the software is looking for an SCCM DB that is named CM_OURSITECODE. When setting up our SCCM 2012
    DB we used a different name for the database SCCM2012DB. I would like to  change our database name to CM_OURSITECODE so this Web Frontend software will work.
    I see where it says it is supported but that is for SCCM 2007 and we are using 2012. When I try the steps in the post I can change the server name but the database name is grayed out and can't be changed. In my case I would
    like to leave the server name alone and just change the database name. With the option being grayed out I'm thinking that MS has changed something to not allow DB name changes in SCCM 2012. I have not been able to find any documentation that states it is supported
    or not.
    IIRC, it's not best practise to talk directly to the DB either. This vendor probably should have used the SMS Provider instead.
    SMS Provider vs SQL Server: Although Configuration Manager leverages SQL Server for data storage, SQL Server is NOT the primary programming interface to Configuration Manager. The primary programming interface to Configuration Manager is the SMS Provider (WMI) - object creation and modification must be done via the SMS Provider. You should consider SQL Server as providing read-only access to Configuration Manager data for querying and reporting purposes. This is not a matter of permissions, rather matter of maintaining data integrity.
    http://msdn.microsoft.com/en-us/library/dn529009.aspx
    Tim Nilimaa-Svärd | Blog: http://infoworks.tv | Twitter: @timnilimaa

  • Dynamic Query using no PL/SQL . Is this Possible ??

    Hi Everyone,
    Based upon the innery query result , can we have a different outer query I want to know whether this is possible with out PL/SQL.
    Example:
    This is my inner query :
    with q1 as
    (select
    case when x>500 then 0
    else 1
    end value
    from
    table1 )
    Here is where I am stopped , I only want to run either of these queries depending upon the value,
    I know that i can do it using PL/SQL but I want to know whether we can do it with pure SQL
    Some thing like this to happen :
    when value=0 : run this query : select * from table2
    when value=1 : run this query : select * from table2 join table3 using (col1)
    Thanks.
    VK

    Sure. A little modified way ->
    satyaki>
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:01.82
    satyaki>
    satyaki>
    satyaki>select k.deptno,
      2         k.empno,
      3         k.ename,
      4         k.job,
      5         k.mgr,
      6         k.hiredate,
      7         k.sal,
      8         k.comm,
      9         null dname,
    10         null loc
    11  from emp k
    12  where &eid = 0
    13  union all
    14  select *
    15  from (
    16         select *
    17         from emp
    18         join dept
    19         using (deptno)
    20       )
    21  where &eid = 1;
    Enter value for eid: 0
    old  12: where &eid = 0
    new  12: where 0 = 0
    Enter value for eid: 0
    old  21: where &eid = 1
    new  21: where 0 = 1
        DEPTNO      EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM DNAME          LOC
            10       9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455
            10       7777 SOURAV     SLS                  14-SEP-08      45000       3400
            30       7521 WARD       SALESMAN        7698 22-FEB-81       1250        500
            20       7566 JONES      MANAGER         7839 02-APR-81       2975
            30       7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400
            30       7698 BLAKE      MANAGER         7839 01-MAY-81       2850
            10       7782 CLARK      MANAGER         7839 09-JUN-81       4450
            20       7788 SCOTT      ANALYST         7566 19-APR-87       3000
            10       7839 KING       PRESIDENT            17-NOV-81       7000
            30       7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0
            20       7876 ADAMS      CLERK           7788 23-MAY-87       1100
        DEPTNO      EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM DNAME          LOC
            30       7900 JAMES      CLERK           7698 03-DEC-81        950
            20       7902 FORD       ANALYST         7566 03-DEC-81       3000
    13 rows selected.
    Elapsed: 00:00:00.32
    satyaki>/
    Enter value for eid: 1
    old  12: where &eid = 0
    new  12: where 1 = 0
    Enter value for eid: 1
    old  21: where &eid = 1
    new  21: where 1 = 1
        DEPTNO      EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM DNAME          LOC
            10       9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455 ACCOUNTING     NEW YORK
            10       7777 SOURAV     SLS                  14-SEP-08      45000       3400 ACCOUNTING     NEW YORK
            10       7782 CLARK      MANAGER         7839 09-JUN-81       4450            ACCOUNTING     NEW YORK
            10       7839 KING       PRESIDENT            17-NOV-81       7000            ACCOUNTING     NEW YORK
            20       7566 JONES      MANAGER         7839 02-APR-81       2975            RESEARCH       DALLAS
            20       7876 ADAMS      CLERK           7788 23-MAY-87       1100            RESEARCH       DALLAS
            20       7788 SCOTT      ANALYST         7566 19-APR-87       3000            RESEARCH       DALLAS
            20       7902 FORD       ANALYST         7566 03-DEC-81       3000            RESEARCH       DALLAS
            30       7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0 SALES          CHICAGO
            30       7521 WARD       SALESMAN        7698 22-FEB-81       1250        500 SALES          CHICAGO
            30       7698 BLAKE      MANAGER         7839 01-MAY-81       2850            SALES          CHICAGO
        DEPTNO      EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM DNAME          LOC
            30       7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400 SALES          CHICAGO
            30       7900 JAMES      CLERK           7698 03-DEC-81        950            SALES          CHICAGO
    13 rows selected.
    Elapsed: 00:00:00.24
    satyaki>Regards.
    Satyaki De.

  • SQL Server Replication: Sybase as publisher and SQL Server as Subscriber possible or not?

    Hi,
    Using SQL Server Replication, data pulling from Sybase to SQL Server is possible or not?
    --sybase has publisher and sql has subscriber
    Thanks  

    Hello,
    Just as Hilary post, you should backup the following database and restore to the new server:
    1.The publication database at the Publisher
    2.The distribution database at the Distributor
    3.The subscription database at each Subscriber
    4.The master and msdb system databases at the Publisher, Distributor and all Subscribers
    After restoring the publication database from a backup, you reinitialize all subscriptions to the publications.
    Reference: Strategies for Backing Up and Restoring Merge Replication
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here.
    Fanny Liu
    TechNet Community Support

  • Bug in sppurge.sql. It´s possible???

    Hi.
    I´m working on Oracle 9.2.0.7.0 and I´m making a stored procedure that uses the statements of the sppurge.sql script, wich is distributed whit the Oracle instalation.
    After to do many test, I think that could be a mistake inside script.
    I wish someone smarter than me confirm it...
    In particular I refer to this fragment of code:
    --Delete any undostat rows that cover the snap times*
    delete from stats$undostat us
    where dbid            = :dbid
    and instance_number = :inst_num
    and begin_time      <  to_date(:btime, 'YYYYMMDD HH24:MI:SS')
    and end_time        >  to_date(:etime, 'YYYYMMDD HH24:MI:SS');
    This don´t have sense fo me... because it is setting a begin_time lesser that the lowest date and a higher end_time that the high date...
    A query whit that clauses don´t return data.
    I think that the correct statement is this:
    --Delete any undostat rows that cover the snap times*
    delete from stats$undostat us
    where dbid            = :dbid
    and instance_number = :inst_num
    and begin_time    >  to_date(:btime, 'YYYYMMDD HH24:MI:SS')
    and end_time    <  to_date(:etime, 'YYYYMMDD HH24:MI:SS');
    Notice I changed the direction of symbols > <
    this have sense an this return any data...
    what do you think about this???
    Regards

    I'm still confused...
    perhaps I haven´t understood the script yet.
    I want to delete all snapshot previous to one year ago.
    If I run this query I don´t have any data.
    SELECT * FROM  STATS$UNDOSTAT
    WHERE DBID=1840134570
    AND INSTANCE_NUMBER=1
    AND BEGIN_TIME <  TO_DATE('20071109 10:00:03', 'YYYYMMDD HH24:MI:SS')
    AND END_TIME  >  TO_DATE('20101130 10:00:05', 'YYYYMMDD HH24:MI:SS');
    But if I run it of this way, I get all records with dates prior to 11/30/2010, which are precisely those who I want to eliminate.
    SELECT * FROM  STATS$UNDOSTAT
    WHERE DBID=1840134570
    AND INSTANCE_NUMBER=1
    AND BEGIN_TIME >  TO_DATE('20071109 10:00:03', 'YYYYMMDD HH24:MI:SS')
    AND END_TIME  <  TO_DATE('20101130 10:00:05', 'YYYYMMDD HH24:MI:SS');
    Now my question is:
    Is it correct that these data should be eliminated if what I want is to delete the snapshots with more than a year old?

  • SQL Developer running slow, possibly caused by Java Virtual Machine

    Dear all
    I am currently working with SQL Developer 1.5.1, connecting to an Oracle database 10.2.0.2 and it is taking about 10 minutes for SQL Developer to load. I believe the problem may be due to the Java Development kit. I upgraded to the latest version last week.
    The versions running according to Java settings is:
    1.6 1.6.0_15 http://java.sun.com/products/autodl/j2se C:\Program Files\Java\jre6\bin\javaw.exe  true
    1.6 1.6.0_07 http://java.sun.com/products/autodl/j2se C:\Program Files\Java\jre1.6.0_07\bin\javaw.exe  true
    1.4 1.4.2 http://java.sun.com/products/autodl/j2se C:\Program Files\Java\j2re1.4.2\bin\javaw.exe  trueHaving looked at other posts on here I have run SQL Developer with the console and the messages in that are as follows:
    Exception initializing 'oracle.ideimpl.searchbar.SearchBarAddin' in extension 'S
    earch Bar': java.lang.NullPointerException
            at oracle.ideimpl.searchbar.ColorProvider.isFusionLAF(ColorProvider.java
    :29)
            at oracle.ideimpl.searchbar.ColorProvider.updateUIManager(ColorProvider.
    java:35)
            at oracle.ideimpl.searchbar.SearchBarAddin.initialize(SearchBarAddin.jav
    a:37)
            at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin(AddinManage
    rImpl.java:405)
            at oracle.ideimpl.extension.AddinManagerImpl.initializeAddins(AddinManag
    erImpl.java:214)
            at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins(Ad
    dinManagerImpl.java:128)
            at oracle.ide.IdeCore.initProductAndUserAddins(IdeCore.java:1804)
            at oracle.ide.IdeCore.startupImpl(IdeCore.java:1481)
            at oracle.ide.Ide.startup(Ide.java:662)
            at oracle.ideimpl.DefaultIdeStarter.startIde(DefaultIdeStarter.java:35)
            at oracle.ideimpl.Main.start(Main.java:110)
            at oracle.ideimpl.Main.main(Main.java:72)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at oracle.ide.boot.PCLMain.callMain(PCLMain.java:66)
            at oracle.ide.boot.PCLMain.main(PCLMain.java:58)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at oracle.classloader.util.MainClass.invoke(MainClass.java:128)
            at oracle.ide.boot.IdeLauncher.bootClassLoadersAndMain(IdeLauncher.java:
    190)
            at oracle.ide.boot.IdeLauncher.launchImpl(IdeLauncher.java:90)
            at oracle.ide.boot.IdeLauncher.launch(IdeLauncher.java:66)
            at oracle.ide.boot.IdeLauncher.main(IdeLauncher.java:55)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at oracle.ide.boot.Launcher.invokeMain(Launcher.java:729)
            at oracle.ide.boot.Launcher.launchImpl(Launcher.java:115)
            at oracle.ide.boot.Launcher.launch(Launcher.java:68)
            at oracle.ide.boot.Launcher.main(Launcher.java:57)
    Load: C:\Program Files\sqldeveloper\sqldeveloper\bin\jdev\extensions\GeoRaptorLi
    bs\Settings.xml
    java.io.FileNotFoundException: C:\Program Files\sqldeveloper\sqldeveloper\bin\jd
    ev\extensions\GeoRaptorLibs\Settings.xml (The system cannot find the path specif
    ied)
            at java.io.FileInputStream.open(Native Method)
            at java.io.FileInputStream.<init>(FileInputStream.java:106)
            at java.io.FileInputStream.<init>(FileInputStream.java:66)
            at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection
    .java:70)
            at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLCon
    nection.java:161)
            at java.net.URL.openStream(URL.java:1007)
            at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2590)
            at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:236)
            at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:208)
            at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:155)
            at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:172)
            at org.GeoRaptor.MainSettings.load(Unknown Source)
            at org.GeoRaptor.PreferenceAddin.initialize(Unknown Source)
            at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin(AddinManage
    rImpl.java:405)
            at oracle.ideimpl.extension.AddinManagerImpl.initializeAddins(AddinManag
    erImpl.java:214)
            at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins(Ad
    dinManagerImpl.java:128)
            at oracle.ide.IdeCore.initProductAndUserAddins(IdeCore.java:1804)
            at oracle.ide.IdeCore.startupImpl(IdeCore.java:1481)
            at oracle.ide.Ide.startup(Ide.java:662)
            at oracle.ideimpl.DefaultIdeStarter.startIde(DefaultIdeStarter.java:35)
            at oracle.ideimpl.Main.start(Main.java:110)
            at oracle.ideimpl.Main.main(Main.java:72)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at oracle.ide.boot.PCLMain.callMain(PCLMain.java:66)
            at oracle.ide.boot.PCLMain.main(PCLMain.java:58)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at oracle.classloader.util.MainClass.invoke(MainClass.java:128)
            at oracle.ide.boot.IdeLauncher.bootClassLoadersAndMain(IdeLauncher.java:
    190)
            at oracle.ide.boot.IdeLauncher.launchImpl(IdeLauncher.java:90)
            at oracle.ide.boot.IdeLauncher.launch(IdeLauncher.java:66)
            at oracle.ide.boot.IdeLauncher.main(IdeLauncher.java:55)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at oracle.ide.boot.Launcher.invokeMain(Launcher.java:729)
            at oracle.ide.boot.Launcher.launchImpl(Launcher.java:115)
            at oracle.ide.boot.Launcher.launch(Launcher.java:68)
            at oracle.ide.boot.Launcher.main(Launcher.java:57)
    Exception initializing 'org.GeoRaptor.MenuControler' in extension 'GeoRaptor': o
    racle.classloader.util.AnnotatedNoClassDefFoundError:
              Missing class: oracle.jdeveloper.cm.dt.browser.jdbc.TableNode
            Dependent class: org.GeoRaptor.MenuControler
                     Loader: main:11.0
                Code-Source: /C:/Program Files/sqldeveloper/sqldeveloper/extensions/
    org.GeoRaptor.jar
              Configuration: system property C:\Program Files\sqldeveloper\sqldevelo
    per\extensions\org.GeoRaptor.jar
    The missing class is not available from any code-source or loader in the system.
            at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClass
    Loader.java:2176) [/C:/Program%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by su
    n.misc.Launcher$AppClassLoader@9627532]
            at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLo
    ader.java:1729) [/C:/Program%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by sun.
    misc.Launcher$AppClassLoader@9627532]
            at oracle.classloader.PolicyClassLoader.access$000 (PolicyClassLoader.ja
    va:143) [/C:/Program%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by sun.misc.Lau
    ncher$AppClassLoader@9627532]
            at oracle.classloader.PolicyClassLoader$LoadClassAction.run (PolicyClass
    Loader.java:331) [/C:/Program%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by sun
    .misc.Launcher$AppClassLoader@9627532]
            at java.security.AccessController.doPrivileged (Native method) [unknown,
    by unknown]
            at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.jav
    a:1688) [/C:/Program%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by sun.misc.Lau
    ncher$AppClassLoader@9627532]
            at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.jav
    a:1670) [/C:/Program%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by sun.misc.Lau
    ncher$AppClassLoader@9627532]
            at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre b
    ootstrap, by jre.bootstrap:1.5.0_06]
            at org.GeoRaptor.MenuControler.initialize (Unknown source file) [/C:/Pro
    gram Files/sqldeveloper/sqldeveloper/extensions/org.GeoRaptor.jar (from system p
    roperty C:\Program Files\sqldeveloper\sqldeveloper\extensions\org.GeoRaptor.jar)
    , by main:11.0]
            at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin (AddinManag
    erImpl.java:405) [/C:/Program Files/sqldeveloper/ide/lib/ideimpl.jar (from syste
    m property PCLMain.createExtensionManagerLoader()), by main:11.0]
            at oracle.ideimpl.extension.AddinManagerImpl.initializeAddins (AddinMana
    gerImpl.java:214) [/C:/Program Files/sqldeveloper/ide/lib/ideimpl.jar (from syst
    em property PCLMain.createExtensionManagerLoader()), by main:11.0]
            at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins (A
    ddinManagerImpl.java:128) [/C:/Program Files/sqldeveloper/ide/lib/ideimpl.jar (f
    rom system property PCLMain.createExtensionManagerLoader()), by main:11.0]
            at oracle.ide.IdeCore.initProductAndUserAddins (IdeCore.java:1804) [/C:/
    Program Files/sqldeveloper/ide/extensions/oracle.ide.jar (from system property P
    CLMain.createExtensionManagerLoader()), by main:11.0]
            at oracle.ide.IdeCore.startupImpl (IdeCore.java:1481) [/C:/Program Files
    /sqldeveloper/ide/extensions/oracle.ide.jar (from system property PCLMain.create
    ExtensionManagerLoader()), by main:11.0]
            at oracle.ide.Ide.startup (Ide.java:662) [/C:/Program Files/sqldeveloper
    /ide/extensions/oracle.ide.jar (from system property PCLMain.createExtensionMana
    gerLoader()), by main:11.0]
            at oracle.ideimpl.DefaultIdeStarter.startIde (DefaultIdeStarter.java:35)
    [/C:/Program Files/sqldeveloper/ide/lib/ideimpl.jar (from system property PCLMa
    in.createExtensionManagerLoader()), by main:11.0]
            at oracle.ideimpl.Main.start (Main.java:110) [/C:/Program Files/sqldevel
    oper/ide/lib/ideimpl.jar (from system property PCLMain.createExtensionManagerLoa
    der()), by main:11.0]
            at oracle.ideimpl.Main.main (Main.java:72) [/C:/Program Files/sqldevelop
    er/ide/lib/ideimpl.jar (from system property PCLMain.createExtensionManagerLoade
    r()), by main:11.0]
            at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method) [unknown
    , by unknown]
            at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl
    .java:39) [unknown, by unknown]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcce
    ssorImpl.java:25) [unknown, by unknown]
            at java.lang.reflect.Method.invoke (Method.java:585) [unknown, by unknow
    n]
            at oracle.ide.boot.PCLMain.callMain (PCLMain.java:66) [/C:/Program%20Fil
    es/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@962753
    2]
            at oracle.ide.boot.PCLMain.main (PCLMain.java:58) [/C:/Program%20Files/s
    qldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@9627532]
            at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method) [unknown
    , by unknown]
            at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl
    .java:39) [unknown, by unknown]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcce
    ssorImpl.java:25) [unknown, by unknown]
            at java.lang.reflect.Method.invoke (Method.java:585) [unknown, by unknow
    n]
            at oracle.classloader.util.MainClass.invoke (MainClass.java:128) [/C:/Pr
    ogram%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by sun.misc.Launcher$AppClassL
    oader@9627532]
            at oracle.ide.boot.IdeLauncher.bootClassLoadersAndMain (IdeLauncher.java
    :190) [/C:/Program%20Files/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launch
    er$AppClassLoader@9627532]
            at oracle.ide.boot.IdeLauncher.launchImpl (IdeLauncher.java:90) [/C:/Pro
    gram%20Files/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoa
    der@9627532]
            at oracle.ide.boot.IdeLauncher.launch (IdeLauncher.java:66) [/C:/Program
    %20Files/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@
    9627532]
            at oracle.ide.boot.IdeLauncher.main (IdeLauncher.java:55) [/C:/Program%2
    0Files/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@96
    27532]
            at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method) [unknown
    , by unknown]
            at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl
    .java:39) [unknown, by unknown]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcce
    ssorImpl.java:25) [unknown, by unknown]
            at java.lang.reflect.Method.invoke (Method.java:585) [unknown, by unknow
    n]
            at oracle.ide.boot.Launcher.invokeMain (Launcher.java:729) [/C:/Program%
    20Files/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@9
    627532]
            at oracle.ide.boot.Launcher.launchImpl (Launcher.java:115) [/C:/Program%
    20Files/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@9
    627532]
            at oracle.ide.boot.Launcher.launch (Launcher.java:68) [/C:/Program%20Fil
    es/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@962753
    2]
            at oracle.ide.boot.Launcher.main (Launcher.java:57) [/C:/Program%20Files
    /sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@9627532]I also use a photo Web Site, which is unrelated to my Oracle work but for it's photo uploader also uses Java, and that is running slow, which is why I think the problem is Java based. I would say the problem occurred within the last couple of months but has got much worse in recently weeks. SQL Developer is also slow at times, mainly when I've used another application and it is just in the background.
    Kind regards
    Tim

    Hi there
    Thank you for taking the time to reply. I use GeoRaptor and for what I use it for, I have not come across any errors whilst using it.
    I had no reference to the JDK in my SQL Developer configuration file. I did a search on my system and could not located a copy of JDK, or one in my programs installed control panel, so I installed it again. However I then found a copy in the sqldeveloper folder. However that wasn't referenced in my control panel.
    However having added a reference to the JDK in my SQL Developer configuration file, pointing to C:\Program Files\Java\jdk1.6.0_16, it seems to be taken even longer to load.
    SQL Developer is using 98,608k once loaded and my system has 1.25GB of memory. Whilst loading I was using 1.38GB. For about a year I've had slightly less memory than I sometimes use. The reason for not having 2GB is due to a previous memory failure. However this did not cause a problem for SQL developer until more recently.
    Would it be worth reinstalling GeoRapter?
    Kind regards
    Tim
    Exception initializing 'oracle.ideimpl.searchbar.SearchBarAddin' in extension 'S
    earch Bar': java.lang.NullPointerException
            at oracle.ideimpl.searchbar.ColorProvider.isFusionLAF(ColorProvider.java
    :29)
            at oracle.ideimpl.searchbar.ColorProvider.updateUIManager(ColorProvider.
    java:35)
            at oracle.ideimpl.searchbar.SearchBarAddin.initialize(SearchBarAddin.jav
    a:37)
            at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin(AddinManage
    rImpl.java:405)
            at oracle.ideimpl.extension.AddinManagerImpl.initializeAddins(AddinManag
    erImpl.java:214)
            at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins(Ad
    dinManagerImpl.java:128)
            at oracle.ide.IdeCore.initProductAndUserAddins(IdeCore.java:1804)
            at oracle.ide.IdeCore.startupImpl(IdeCore.java:1481)
            at oracle.ide.Ide.startup(Ide.java:662)
            at oracle.ideimpl.DefaultIdeStarter.startIde(DefaultIdeStarter.java:35)
            at oracle.ideimpl.Main.start(Main.java:110)
            at oracle.ideimpl.Main.main(Main.java:72)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at oracle.ide.boot.PCLMain.callMain(PCLMain.java:66)
            at oracle.ide.boot.PCLMain.main(PCLMain.java:58)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at oracle.classloader.util.MainClass.invoke(MainClass.java:128)
            at oracle.ide.boot.IdeLauncher.bootClassLoadersAndMain(IdeLauncher.java:
    190)
            at oracle.ide.boot.IdeLauncher.launchImpl(IdeLauncher.java:90)
            at oracle.ide.boot.IdeLauncher.launch(IdeLauncher.java:66)
            at oracle.ide.boot.IdeLauncher.main(IdeLauncher.java:55)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at oracle.ide.boot.Launcher.invokeMain(Launcher.java:729)
            at oracle.ide.boot.Launcher.launchImpl(Launcher.java:115)
            at oracle.ide.boot.Launcher.launch(Launcher.java:68)
            at oracle.ide.boot.Launcher.main(Launcher.java:57)
    Load: C:\Program Files\sqldeveloper\sqldeveloper\bin\jdev\extensions\GeoRaptorLi
    bs\Settings.xml
    java.io.FileNotFoundException: C:\Program Files\sqldeveloper\sqldeveloper\bin\jd
    ev\extensions\GeoRaptorLibs\Settings.xml (The system cannot find the path specif
    ied)
            at java.io.FileInputStream.open(Native Method)
            at java.io.FileInputStream.<init>(FileInputStream.java:106)
            at java.io.FileInputStream.<init>(FileInputStream.java:66)
            at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection
    .java:70)
            at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLCon
    nection.java:161)
            at java.net.URL.openStream(URL.java:1010)
            at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2590)
            at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:236)
            at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:208)
            at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:155)
            at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:208)
            at org.GeoRaptor.MainSettings.load(Unknown Source)
            at org.GeoRaptor.PreferenceAddin.initialize(Unknown Source)
            at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin(AddinManage
    rImpl.java:405)
            at oracle.ideimpl.extension.AddinManagerImpl.initializeAddins(AddinManag
    erImpl.java:214)
            at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins(Ad
    dinManagerImpl.java:128)
            at oracle.ide.IdeCore.initProductAndUserAddins(IdeCore.java:1804)
            at oracle.ide.IdeCore.startupImpl(IdeCore.java:1481)
            at oracle.ide.Ide.startup(Ide.java:662)
            at oracle.ideimpl.DefaultIdeStarter.startIde(DefaultIdeStarter.java:35)
            at oracle.ideimpl.Main.start(Main.java:110)
            at oracle.ideimpl.Main.main(Main.java:72)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at oracle.ide.boot.PCLMain.callMain(PCLMain.java:66)
            at oracle.ide.boot.PCLMain.main(PCLMain.java:58)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at oracle.classloader.util.MainClass.invoke(MainClass.java:128)
            at oracle.ide.boot.IdeLauncher.bootClassLoadersAndMain(IdeLauncher.java:
    190)
            at oracle.ide.boot.IdeLauncher.launchImpl(IdeLauncher.java:90)
            at oracle.ide.boot.IdeLauncher.launch(IdeLauncher.java:66)
            at oracle.ide.boot.IdeLauncher.main(IdeLauncher.java:55)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at oracle.ide.boot.Launcher.invokeMain(Launcher.java:729)
            at oracle.ide.boot.Launcher.launchImpl(Launcher.java:115)
            at oracle.ide.boot.Launcher.launch(Launcher.java:68)
            at oracle.ide.boot.Launcher.main(Launcher.java:57)
    Exception initializing 'org.GeoRaptor.MenuControler' in extension 'GeoRaptor': o
    racle.classloader.util.AnnotatedNoClassDefFoundError:
              Missing class: oracle.jdeveloper.cm.dt.browser.jdbc.TableNode
            Dependent class: org.GeoRaptor.MenuControler
                     Loader: main:11.0
                Code-Source: /C:/Program Files/sqldeveloper/sqldeveloper/extensions/
    org.GeoRaptor.jar
              Configuration: system property C:\Program Files\sqldeveloper\sqldevelo
    per\extensions\org.GeoRaptor.jar
    The missing class is not available from any code-source or loader in the system.
            at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClass
    Loader.java:2176) [/C:/Program%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by su
    n.misc.Launcher$AppClassLoader@4687246]
            at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLo
    ader.java:1729) [/C:/Program%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by sun.
    misc.Launcher$AppClassLoader@4687246]
            at oracle.classloader.PolicyClassLoader.access$000 (PolicyClassLoader.ja
    va:143) [/C:/Program%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by sun.misc.Lau
    ncher$AppClassLoader@4687246]
            at oracle.classloader.PolicyClassLoader$LoadClassAction.run (PolicyClass
    Loader.java:331) [/C:/Program%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by sun
    .misc.Launcher$AppClassLoader@4687246]
            at java.security.AccessController.doPrivileged (Native method) [unknown,
    by unknown]
            at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.jav
    a:1688) [/C:/Program%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by sun.misc.Lau
    ncher$AppClassLoader@4687246]
            at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.jav
    a:1670) [/C:/Program%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by sun.misc.Lau
    ncher$AppClassLoader@4687246]
            at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:320) [jre b
    ootstrap, by jre.bootstrap:1.6.0_16]
            at org.GeoRaptor.MenuControler.initialize (Unknown source file) [/C:/Pro
    gram Files/sqldeveloper/sqldeveloper/extensions/org.GeoRaptor.jar (from system p
    roperty C:\Program Files\sqldeveloper\sqldeveloper\extensions\org.GeoRaptor.jar)
    , by main:11.0]
            at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin (AddinManag
    erImpl.java:405) [/C:/Program Files/sqldeveloper/ide/lib/ideimpl.jar (from syste
    m property PCLMain.createExtensionManagerLoader()), by main:11.0]
            at oracle.ideimpl.extension.AddinManagerImpl.initializeAddins (AddinMana
    gerImpl.java:214) [/C:/Program Files/sqldeveloper/ide/lib/ideimpl.jar (from syst
    em property PCLMain.createExtensionManagerLoader()), by main:11.0]
            at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins (A
    ddinManagerImpl.java:128) [/C:/Program Files/sqldeveloper/ide/lib/ideimpl.jar (f
    rom system property PCLMain.createExtensionManagerLoader()), by main:11.0]
            at oracle.ide.IdeCore.initProductAndUserAddins (IdeCore.java:1804) [/C:/
    Program Files/sqldeveloper/ide/extensions/oracle.ide.jar (from system property P
    CLMain.createExtensionManagerLoader()), by main:11.0]
            at oracle.ide.IdeCore.startupImpl (IdeCore.java:1481) [/C:/Program Files
    /sqldeveloper/ide/extensions/oracle.ide.jar (from system property PCLMain.create
    ExtensionManagerLoader()), by main:11.0]
            at oracle.ide.Ide.startup (Ide.java:662) [/C:/Program Files/sqldeveloper
    /ide/extensions/oracle.ide.jar (from system property PCLMain.createExtensionMana
    gerLoader()), by main:11.0]
            at oracle.ideimpl.DefaultIdeStarter.startIde (DefaultIdeStarter.java:35)
    [/C:/Program Files/sqldeveloper/ide/lib/ideimpl.jar (from system property PCLMa
    in.createExtensionManagerLoader()), by main:11.0]
            at oracle.ideimpl.Main.start (Main.java:110) [/C:/Program Files/sqldevel
    oper/ide/lib/ideimpl.jar (from system property PCLMain.createExtensionManagerLoa
    der()), by main:11.0]
            at oracle.ideimpl.Main.main (Main.java:72) [/C:/Program Files/sqldevelop
    er/ide/lib/ideimpl.jar (from system property PCLMain.createExtensionManagerLoade
    r()), by main:11.0]
            at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method) [unknown
    , by unknown]
            at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl
    .java:39) [unknown, by unknown]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcce
    ssorImpl.java:25) [unknown, by unknown]
            at java.lang.reflect.Method.invoke (Method.java:597) [unknown, by unknow
    n]
            at oracle.ide.boot.PCLMain.callMain (PCLMain.java:66) [/C:/Program%20Fil
    es/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@468724
    6]
            at oracle.ide.boot.PCLMain.main (PCLMain.java:58) [/C:/Program%20Files/s
    qldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@4687246]
            at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method) [unknown
    , by unknown]
            at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl
    .java:39) [unknown, by unknown]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcce
    ssorImpl.java:25) [unknown, by unknown]
            at java.lang.reflect.Method.invoke (Method.java:597) [unknown, by unknow
    n]
            at oracle.classloader.util.MainClass.invoke (MainClass.java:128) [/C:/Pr
    ogram%20Files/sqldeveloper/j2ee/home/lib/pcl.jar, by sun.misc.Launcher$AppClassL
    oader@4687246]
            at oracle.ide.boot.IdeLauncher.bootClassLoadersAndMain (IdeLauncher.java
    :190) [/C:/Program%20Files/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launch
    er$AppClassLoader@4687246]
            at oracle.ide.boot.IdeLauncher.launchImpl (IdeLauncher.java:90) [/C:/Pro
    gram%20Files/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoa
    der@4687246]
            at oracle.ide.boot.IdeLauncher.launch (IdeLauncher.java:66) [/C:/Program
    %20Files/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@
    4687246]
            at oracle.ide.boot.IdeLauncher.main (IdeLauncher.java:55) [/C:/Program%2
    0Files/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@46
    87246]
            at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method) [unknown
    , by unknown]
            at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl
    .java:39) [unknown, by unknown]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcce
    ssorImpl.java:25) [unknown, by unknown]
            at java.lang.reflect.Method.invoke (Method.java:597) [unknown, by unknow
    n]
            at oracle.ide.boot.Launcher.invokeMain (Launcher.java:729) [/C:/Program%
    20Files/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@4
    687246]
            at oracle.ide.boot.Launcher.launchImpl (Launcher.java:115) [/C:/Program%
    20Files/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@4
    687246]
            at oracle.ide.boot.Launcher.launch (Launcher.java:68) [/C:/Program%20Fil
    es/sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@468724
    6]
            at oracle.ide.boot.Launcher.main (Launcher.java:57) [/C:/Program%20Files
    /sqldeveloper/ide/lib/ide-boot.jar, by sun.misc.Launcher$AppClassLoader@4687246]

  • Problem with SQL,udfs & procedures

    I have couple of problems with my database. Please suggest solution.
    We are basically a web product With a Quite large Database
    1. I am using functions both User Defined and Built in Functions in
    SQL Statement. I want to optimize the query how do i do it.
    why the usage of function in sql statements suppresses,the
    usage of indexes internally. How to forceable make use of
    the index even though function is used.
    2. Whenver The Client makes a request to the Database server with a
    Sql Query What are the steps we can take at the
    client side to enhance the performance of the Query.
    (i.e the Data Request ). How to optimize the usage of CPU at
    client site?
    3. what is the increase in the performance ration by having
    separate table spaces for user data,system data and indexes.
    4. Why the procedures are getting invalided
    after some time. The procedure is
    not getting executed at the front end.
    Once the procedure is getting invalidated.
    However even though the status of the
    procedure is invalid the same is getting
    executed at the back end.
    Can anybody help me
    Request for reply ASAP.
    Regards
    Koshal
    null

    1. In Oracle 8i, one can create function-based indexes, where instead of indexing a column, one can index upper() of that column.
    2. Optimizing client performance is trickier. One can tune the queries being
    submitted by the client, but if getting the first row back -- which is how response time is generally perceived -- set the OPTIMIZER_MODE parameter in init.ora to FIRST_ROWS.
    3. There is minimal benefit to having data, index, rollback, and temp tablespaces all separated unless all the datafiles for each tablespace reside on different disks (data on disk 1, index on disk 2, etc). It's recommended regardless, but unless the files are on separate volumes, there won't be a great performance benefit.
    4. A procedure is invalidated whenever DDL is issued against any object that that procedure depends upon. For example, if you add a column to a table, any procedures which reference that table will be invalidated. Any procedures which reference views which reference that table will be invalidated, because the view will be invalidated. It's best to run a compile script which looks for and attempts to recompile any invalid objects on a daily basis.
    Adam

  • Confusion about SQL UDFs

    I created a user-defined scalar function in SQL Server Management Studio that takes two dates and calculates the minimum of the two.
    When I tried to use the function, I was initially getting an error that said "Cannot find either column "dbo" or the user-defined function or aggregate "dbo.MinDate", or the name is ambiguous."
    I finally got it to work by executing the function like:
    "CREATE FUNCTION dbo.MinDate..."
    (I was running into trouble because I hadn't added the "dbo")
    And I was using the function without any problem in a query that I saved.
    I shut down SQL Server and then created a new instance a couple days later in Management Studio.
    Now, if I open that saved query, it can run SELECT dbo.MinDate('2014-03-14 17:54:32.000','2014-03-14 17:06:01.000') without any problems, but if I open up a new query, and put in the SELECT statement above, I'm getting the error "Cannot find
    either column "dbo" or the user-defined function or aggregate "dbo.MinDate", or the name is ambiguous." again.
    So, do I have to "CREATE" the function every time?  Except if it's in a query I've already used before, then it has the capacity to remember the function.  It doesn't make sense to me that it would work this way.  Is that true, and
    is there a way to load a function more permanently?  For the end result, I'm trying to use these functions with SQLCommands in VB.NET and C# and that is ultimately where I'm running into the problem/need a solution.
    Thank you.

    I've just been hitting the "New Query" button each time in Management Studio.
    I just noticed at the bottom of what I would call the "status bar" (at the bottom of the query window where it displays servername/authentication/database_name/time_of_query/query_rows) in one it says "myDB" and the other says "master".  I have no idea
    how I would have made them different.  The query that works is "master" and the one that doesn't is "myDB", and now if I push "New Query" it opens up "master".
    Still not sure how that happened.
    Evidently the master db doesn't filter down to the other ones (but if I connect with the master, I seem to be able to access the data from the other ones).
    So, if I'm trying to use the query in VB.Net/C#, would the best method be to continue my connection in myDB, and find a way to CREATE my function in myDB OR connect to the master db in VB.Net/C# (System.Data.SqlClient.SqlConnection) where my query seems
    to be working?
    Thanks.

Maybe you are looking for