OQL query to find empty maps

Hello,
I'm trying to find instances of a Map inside a heapdump using VisualVM's "OQL Console".
But I can't figure out how to access the size (or count) property of a map.
What I tried was the following:
select m from java.util.concurrent.ConcurrentHashMap m where m.count == 0But that didn't return anythong (although I know that there are empty maps in the heap by looking at the instances itself)
Then I found another example which used some kind of casting to ensure that m.count would be treated as a number:
select m from java.util.concurrent.ConcurrentHashMap m where m.count * 1 == 0That seemed to returned instances, but when I tried to find the non-empty ones using
select m from java.util.concurrent.ConcurrentHashMap m where m.count * 1 > 0I didn't return anything, and I know (again from looking at the instances) that there are non-empty maps in there.
I also tried replacing m.count with m.size in all examples, but still no go.
I'm sure I'm missing something obvious with the OQL syntax, but what?

Hello,
Just pass the user list you want to count and not admin users or other default users.
SELECT owner, table_name, num_rows
      FROM dba_tables
      WHERE owner IN ('MYUSER','OTHERUSER');or this
DECLARE
   CURSOR mycur
   IS
      SELECT owner, table_name, num_rows
      FROM dba_tables
      WHERE owner NOT IN ('SYS', 'SYSTEM', 'SYSMAN', 'OUTLN')
            AND iot_name IS NULL;
   v_sql     VARCHAR2 (100);
   v_count   NUMBER := 0;
BEGIN
   FOR cur IN mycur
   LOOP
      v_sql     := NULL;
      v_count   := 0;
      v_sql     :=
         'select count (*) from ' || cur.owner || '.' || cur.table_name;
      EXECUTE IMMEDIATE v_sql INTO v_count;
      IF (v_count = 0)
      THEN
         DBMS_OUTPUT.put_line(   'Table name = '
                              || cur.table_name
                              || ' rows '
                              || v_count);
      END IF;
   END LOOP;
END;Regards

Similar Messages

  • Need a query to find Grops mapped on Folders

    Hi ,
    I need a query builder query to find out the list  of folder and mapped groups to those folder.
    Would you please let me know if that is possible I triead but no luck .
    Regards,
    Neo

    Hi,
    This query sound goods but I get error 
    Select SI_NAME, SI_KIND From CI_APPOBJECTS, CI_INFOOBJECTS
    Where PARENTS("SI_NAME='Myfolder'",'CHILDREN(''SI_NAME=''UserGroup''')")
    Please let me know if I am giong in right direction becuse I never used Parents and child concept bit confused.
    All I need is when I put in my folder name it has to show me all the groups mapped to it.
    If this query gives  the result , it will be the great logic I would say
    Thanks a ot.
    Neo A

  • How to find out Mapping Loading type using db query

    Is there a way to find out mapping loading type using a database query.
    Is there a table in database which stores loading type information?
    Thanks,
    Niranjan

    hi,
    i found the below
    select
            comp.map_name
           ,comp.map_component_id             comp_map_component_id
           ,comp.operator_type                comp_operator_type
           ,comp.data_entity_id               comp_data_entity
           ,comp.data_entity_name             comp_data_ename
           ,comp.data_entity_type             comp_data_etype
           ,param.map_component_name          param_comp_name
           ,param.parameter_id                param_par_id
           ,param.parameter_name              param_par_name
           ,param.parameter_group_name        param_par_gr_name
           ,param.parameter_type              param_par_type
           ,param.position                    param_position
           ,param.data_type                   param_data_type
           ,param.transformation_expression   param_transform
           ,param.data_item_id                param_data_item_id
           ,param.data_item_name              param_data_item_name
           ,param.source_parameter_name       param_src_parameter
           ,nvl2(param.source_parameter_name,'TARGET','SOURCE') param_INFO
           ,param.map_component_id             param_map_component_id
           ,md.map_component_id                md_map_component_id
           ,md.map_component_name              md_map_component_name
           ,md.parameter_name                  md_parameter_name
           ,md.parameter_id                    md_parameter_id
           ,md.position                        md_position
           ,md.transformation_expression       md_transformation
           ,md.description                     md_description
           ,md.source_expression               md_source_expression
           ,mp.MAP_COMPONENT_ID                    mp_map_component_id
           ,mp.MAP_COMPONENT_NAME                  mp_map_component_name
           ,mp.PROPERTY_ID                        mp_property_id
           ,mp.PROPERTY_NAME                      mp_property_name
           ,mp.PROPERTY_GROUP_NAME                mp_property_group_name
           ,mp.BUSINESS_NAME                      mp_business_name
           ,mp.PROPERTY_VALUE                  mp_property_value
           ,mp.DESCRIPTION                     mp_description
    from all_iv_xform_map_components comp,
         all_iv_xform_map_parameters param,
         ALL_IV_XFORM_MAP_DETAILS md,
         ALL_IV_XFORM_MAP_PROPERTIES mp
    where  mp.business_name                  = 'DATAENTITY.PARMETERS.LOADTYPE'
    and  param.map_component_id           = comp.map_component_id
    and  param.map_component_id           = md.map_component_id(+)
    and  param.parameter_id               = md.parameter_id (+)
    and  md.map_component_id              = mp.map_component_id (+)i think it contains what we require;
    can you check on your side?
    rgds

  • Query to find out controls displayed as in UI for an applet,along with view

    Hi,
    I am looking for a query to find out list of all the controls as displayed in UI applet along with applet's view.
    Please note that in the query only mapped controls (those displayed in UI ) should come up.
    Regards,
    Kunal

    Hi,
    If the EUL is an apps mode (EBS) EUL then the eu_username column is the apps user id or apps resp id. If you want to show only the responsibilities and convert those ids to names then you need to use the EUL5_GET_APPS_USERRESP function like this:
    select ba_name, ba_developer_key, EUL5_GET_APPS_USERRESP(eu.eu_username, 'R') responsibility_name
    from eul5_bas ba
       , eul5_access_privs ap
       , eul5_eul_users eu
    where ba.ba_id = ap.gba_ba_id
    and ap.ap_type = 'GBA'
    and ap.ap_eu_id = eu.eu_id
    and eu.eu_role_flag=1
    order by 1,2,3Rod West

  • Query to find out license products installed

    hai dba
    tell me the query to find out what r hte products installed r licensed??
    regards
    dba

    1) From OAM: Oracle Applications Manager > Site Map > License Manager > Reports > License Products/Shared Products
    2) Use $AD_TOP/sql/adutconf.sql
    3) Use the following query:
    SQL> select fa.APPLICATION_SHORT_NAME, fpi.PATCH_LEVEL, DECODE(fpi.STATUS, 'I','Installed',
    'S','Shared', 'N', 'Inactive', fpi.STATUS) Status , fpi.DB_STATUS
    from fnd_product_installations fpi,FND_APPLICATION fa
    where fpi.APPLICATION_ID in (
    select APPLICATION_ID from FND_APPLICATION)
    and fa.APPLICATION_ID=fpi.APPLICATION_ID;

  • Zero suppression is set active for rows & columns - but find empty rows

    hi,
    In the query properties i set zero suppression active for all rows and columns, but in the workbook, when i execute the report i still find empty rows. i refreshed the query from the workbook, and have done everything, but still i find empty rows.
    Can anyone help me in this regard?
    thanks,
    rani

    Hi,
    you found empty rows in WorkBook, what about the Query Output ?
    please check the below: 
    Re: Suppressing result rows when KF values are zero?
    Hope this helps you
    Regards
    ReddY A

  • Query to find and Update

    hi,
    Can anyone please provide me a query to find out names having " , " commas like servi,ce actually I have a service name column in a table where i need to find names with commas "," and remove by update.
    I appreciate, if anyone provide me query to find those services having commas in between and a separate update statement to remove them
    Thanks in advance for your cooperation
    Regards,
    ahon

    hello
    used the sql command REPLACE & INSTR function
    example :
    Query :
    select service_name
    from YOURTABLE
    where instr(service_name,',') > 0 -- This return those with ',' char
    to update :
    update YOURTABLE
    set service_name = replace(service_name,',','') -- to replace the ',' char to null values
    where instr(service_name,',') > 0
    But before doing that back up your table or do it in a copy of that..
    Syntax
    REPLACE ( string_expression , string_pattern , string_replacement )
    Arguments
    string_expression
    Is the string expression to be searched. string_expression can be of a character or binary data type.
    string_pattern
    Is the substring to be found. string_pattern can be of a character or binary data type. string_pattern cannot be an empty string (''), and must not exceed the maximum number of bytes that fits on a page.
    string_replacement
    Is the replacement string. string_replacement can be of a character or binary data type.
    charles.
    if this find helpful or correct then mark it accordingly

  • Query Many to Many Mapping

    Thanks for looking at my question.
    How do I write a query to find values in a many to many relationship?
    My tables are normalized similarly to this:
    http://download.oracle.com/docs/cd/B25221_05/web.1013/b13593/relmapun008.htm#CHDFDIHC
    How can i write a query for 'Jane Smith' that would return all of the projects ('Java Developer', 'Magazine') he is working on? Or, vise versa a query for a project that would return all of the employees mapped to it by the relationship table?
    Edited by: 869021 on Jun 28, 2011 4:00 PM

    Thanks for the reply. I think it is a little beyond me. I am four weeks into a beginning Data modeling class. I will definitely come back and look at it again later.
    I came up with this solution. Just nesting selects until I can query across the relationships.
    DROP TABLE Stock;
    DROP TABLE Model;
    DROP TABLE Dealer;
    CREATE TABLE Dealer(
         DealerID               NUMBER,
         DealerName          VARCHAR2(20),
         CONSTRAINT pk_Dealership PRIMARY KEY (DealerID)
    CREATE TABLE Model(
         ModelNumber     NUMBER,
         ModelName          VARCHAR2(20),
         CONSTRAINT pk_Model PRIMARY KEY (ModelNumber)
    CREATE TABLE Stock(
         StockKey               NUMBER,
         ModelNumber     NUMBER,
         DealerID               NUMBER,
         CONSTRAINT pk_Stock PRIMARY KEY (StockKey),
         CONSTRAINT fk_ModelNumber FOREIGN KEY (ModelNumber) REFERENCES Model (ModelNumber),
         CONSTRAINT fk_DealerID FOREIGN KEY (DealerID) REFERENCES Dealer (DealerID)
    INSERT INTO Dealer VALUES(1, 'Midnight Movers');
    INSERT INTO Dealer VALUES(2, 'Bubbas Imports');
    INSERT INTO Dealer VALUES(3, 'Import Motors');
    INSERT INTO Model VALUES(1, 'Buick Skylark');
    INSERT INTO Model VALUES(2, 'H2 Hummer');
    INSERT INTO Model VALUES(3, 'Chevy Suburban');
    INSERT INTO Model VALUES(4, 'BMW Z3');
    INSERT INTO Model VALUES(5, 'BMW 328i');
    INSERT INTO Model VALUES(6, 'Jeep Wrangler');
    INSERT INTO Model VALUES(7, 'Ford Focus');
    INSERT INTO Model VALUES(8, 'Range Rover');
    INSERT INTO Model VALUES(9, 'Toyota Supera');
    INSERT INTO Model VALUES(10, 'Ferrari Testarosa');
    INSERT INTO Model VALUES(11, 'Jaguar X12');
    INSERT INTO Model VALUES(12, 'Ford Fairmont');
    INSERT INTO Stock VALUES(1, 1, 1);
    INSERT INTO Stock VALUES(2, 2, 1);
    INSERT INTO Stock VALUES(3, 3, 1);
    INSERT INTO Stock VALUES(4, 4, 1);
    INSERT INTO Stock VALUES(5, 5, 1);
    INSERT INTO Stock VALUES(6, 6, 1);
    INSERT INTO Stock VALUES(7, 1, 2);
    INSERT INTO Stock VALUES(8, 2, 2);
    INSERT INTO Stock VALUES(9, 1, 2);
    INSERT INTO Stock VALUES(10, 4, 2);
    INSERT INTO Stock VALUES(11, 5, 2);
    INSERT INTO Stock VALUES(12, 6, 2);
    INSERT INTO Stock VALUES(13, 7, 3);
    INSERT INTO Stock VALUES(14, 8, 3);
    INSERT INTO Stock VALUES(15, 9, 3);
    INSERT INTO Stock VALUES(16, 10, 3);
    INSERT INTO Stock VALUES(17, 11, 3);
    INSERT INTO Stock VALUES(18, 12, 3);
    --find all stock at Import Motors
    SELECT * FROM Model
    WHERE ModelNumber IN
         (SELECT DISTINCT Stock.ModelNumber
         FROM Stock WHERE Stock.DealerID = (
              SELECT Dealer.DealerID
              FROM Dealer WHERE Dealer.DealerName = 'Import Motors'
    --find all dealers with BMW Z3
    SELECT * FROM Dealer
    WHERE DealerID IN
         (SELECT DISTINCT Stock.DealerID
         FROM Stock WHERE Stock.ModelNumber = (
              SELECT Model.ModelNumber
              FROM Model WHERE Model.ModelName = 'BMW Z3'
         );

  • Query to find out the time used by an user for an application

    Hello All,
    I want to know the query to find out the whole time used by the user for an application. Please view the below data
    Employee:
    SNO EMP_ID EMP_NAME EMP_DATE LOGIN_TIME LOGOUT_TIME
    1 10 Visu 21-Nov-2010 06:30:00 07:30:00
    2 10 Visu 21-Nov-2010 06:40:00 07:20:00
    3 10 Visu 21-Nov-2010 06:50:00 07:50:00
    4 10 Visu 21-Nov-2010 07:30:00 08:30:00
    5 10 Visu 21-Nov-2010 09:30:00 10:30:00
    By checking the above data we can say that the total time Visu used the application is
    8.30 - 6.30 (From 1,2,3,4 records) = 2hrs
    10.30 - 9.30 (Based on 5th rec) = 1hr
    So the total time Visu used the application would be 3 hrs = 180 mins.
    Could you please help me in getting the result from that data using a query?

    odie_63 wrote:
    I think it may be solved with analytics too.
    with t1 as (
                select 1 sno,10 emp_id,'Visu' emp_name,'21-Nov-2010' emp_date,'06:30:00' login_time,'07:30:00' logout_time from dual union all
                select 2,10,'Visu','21-Nov-2010','06:40:00','07:20:00' from dual union all
                select 3,10,'Visu','21-Nov-2010','06:50:00','07:50:00' from dual union all
                select 4,10,'Visu','21-Nov-2010','07:30:00','08:30:00' from dual union all
                select 5,10,'Visu','21-Nov-2010','09:30:00','10:30:00' from dual
         t2 as (
                select  emp_id,
                        emp_name,
                        emp_date,
                        to_date(emp_date || login_time,'DD-MON-YYYYHH24:MI:SS') login_time,
                        to_date(emp_date || logout_time,'DD-MON-YYYYHH24:MI:SS') logout_time
                  from  t1
         t3 as (
                select  t2.*,
                        case
                          when login_time < max(logout_time) over(
                                                                  partition by emp_id,emp_date
                                                                  order by login_time
                                                                  rows between unbounded preceding
                                                                           and 1 preceding
                            then 0
                          else 1
                        end start_of_group
                  from  t2
         t4 as (
                select  t3.*,
                        sum(start_of_group) over(partition by emp_id,emp_date order by login_time) grp
                  from  t3
         t5 as (
                select  emp_id,
                        emp_date,
                        min(login_time) login_time,
                        max(logout_time) logout_time
                  from  t4
                  group by emp_id,
                           emp_date,
                           grp
    select  emp_id,
            numtodsinterval(sum(logout_time - login_time),'day') time_spent
      from  t5
      group by emp_id
      order by emp_id
        EMP_ID TIME_SPENT
            10 +000000000 03:00:00.000000000
    SQL> SY.

  • Can not find the MAP in 0CO_PC_ACT_05

    dear experts,
    when i extract data from 0CO_PC_ACT_05, find some material have no the movemetn average price in some specific periods. why the period is not in series? how can i get the right MAP?
    another question, in r/3 side, in MBEW, our currenct period is 2007-006, but when i extract data via rsa3, i find the MAP about period 2009-002, why ? it's very strange!
    many thanks.
    brgds/steve
    Edited by: Steve Duan on Feb 23, 2009 7:46 AM
    Edited by: Steve Duan on Feb 23, 2009 8:52 AM

    ??

  • How to use ONE query to find out tree structure?

    ID------------upperID----------Name------------------------isFolder
    1------------ 0---------- Folder
    1------------------------------------1
    2------------ 1------------ Folder 1- Sub
    Folder--------------------1
    3------------ 2------------
    Folder1-Item1-A--------------------------0
    4------------ 1------------ Folder 1- Sub
    Item-----------------------0
    Hi all, if I have a table like above to demonstrate the
    folders and item relationship. This structure allows the user to
    create unlimited folders and items.
    Now I would like to use one query to find out the tree
    structure of this table, how could I do the query.
    Any help on this will be highly appreciated!
    Thanks,
    ez

    Also, see this thread:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=12 55788&enterthread=y

  • Looking for a query to find first/last dates in overlapping dates...

    Hi,
    I'm looking for a query to find the first dates and last dates in a table conaining overlapping dates.
    I have a subscription table which has for each Customer start and end date for different subscriptions.
    I want to know the different ranges of date where there is subscriptions active.
    so if the table has this:
    CustID, Start date, end date
    1, 2008-01-01, 2012-06-06
    1 ,2009-01-01, 2011-01-01
    1, 2011-01-01, 2013-02-02
    1, 2013-01-01, 2013-08-08
    1, 2014-01-01, 2014-04-04
    I want to produce this result:
    custid, range start, range end
    1, 2008-01-01, 2013-08-08
    1, 2014-01-01, 2014-04-04
    the first row is the range identified from the 4 rows in my subscription table.
    thanks :)

    I think I found it...
    http://stackoverflow.com/questions/5213484/eliminate-and-reduce-overlapping-date-ranges
    let me try this method
    Hi,
    m writing to follow up with you on this post. Thanks for you posting a reply to share your workground. Was the problem resolved after performing the above link? If you are satisfied with the above solution, I’d like to mark this issue as "Answered".
    Please also feel free to unmark the issue, with any new findings or concerns you may have.
    Thanks,
    Sofiya Li
    If you have any feedback on our support, please click here.
    Sofiya Li
    TechNet Community Support

  • Query to find the list of users having access to a particular scenario

    Hi,
    I am learning Hyperion Planning 9.2 x version. I wanted to know the query to find the list of users having access to Plan Iteration - 1 scenarion.
    As I am new to Hyperion Essbase and Hyperion Planning, I am assuming these ideas work out to get the desired result.
    1) As Hyperion Planning uses Relational DB to store the User Security information, we can query the list of users who is having access to Plan Iteration - 1 Scenario.
    I am not sure if this solution works. Please correct me If I am wrong.
    2) We can also query from the essbase editor to find out who all having access to this scenario.
    If the above is correct, can you please provide me the query.
    I am really need of this and I will be happy if any one provide the solution.
    Thanks & Regards,
    Upendra. Bestha

    Hi,
    If you are looking for some SQL to retrieve the access rights by member then you can use something like (SQL Server code though can easily be modified for Oracle)
    SELECT usr.object_name as Username,mem.object_name as Member,
    'Access Rights' = CASE acc.access_mode
    WHEN -1 THEN 'None'
    WHEN 1 THEN 'Read'
    WHEN 2 THEN 'Write'
    WHEN 3 THEN 'Write'
    ELSE 'Unknown' END,
    'Relation' = CASE acc.flags
    WHEN 0 THEN 'Member'
    WHEN 5 THEN 'Children'
    WHEN 6 THEN 'Children (inclusive)'
    WHEN 8 THEN 'Descendants'
    WHEN 9 THEN 'Descendants (inclusive)'
    ELSE 'Unknown' END
    FROM
    hsp_access_control acc, hsp_object mem, hsp_object usr
    WHERE acc.object_id = mem.object_id
    AND acc.user_id = usr.object_id
    AND mem.object_name = 'Plan Iteration - 1'
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Query to find out which workflow(s) use a particular message ? wf_messages

    Hi guys
    Hoping someone can help.
    I've a list of particular notfication messages, which are stored in the WF_MESSAGES_TL and WF_MESSAGES table, and I need to find out which workflows use them.
    Can anyone tell me what table I can query to find this out ?
    There's no referential integrity which I can use to find this out, and google has turned up nothing so far.
    Any ideas ?
    Thanks a lot
    Scott

    You can use this and tweak it around:
    select p.process_item_type, p.process_name, p.activity_name, a.message
    from wf_process_activities p, wf_activities a
    where p.process_item_type=a.item_type and
    p.activity_name=a.name and
    a.end_date is null;-- means the active/current activity
    Regards,
    Alejandro

  • Query to find out the list of user who have delete access

    Hi,
    I need a query to find out the list of users who have delete access on perticular folder/universe/ reports  in infoview.
    Please advice.
    Regards,
    Neo.

    orton607 wrote:
    thanks for replying guys. But the thing is i am using dynamic sql execute immediate in my package, so i want those tables also and the schema name.
    thanks,
    ortonThis is not possible. The best you could do is to have a good guess.
    Or how would you parse some dynamic statement as this:
       v_suffix := 'loyees';
       v_sql := 'Select count(*) from (select ''nonsense'' col1 from emp'||v_suffix||') where col1 = ''Y'''';
       execute_immediate(v_sql);
    ...What is the table name? How do you want to parse that?
    Better rewrite all dynamic SQL statements into non dynamic ones. Or do the source control logic for those dynamic parts in an extra module. For example implement your own dependency table and force every developer to add there all dynamic parts.

Maybe you are looking for

  • EJB Deployment error in Weblogic 8.1 very urgent

    Hi Mark I forgot to send my error message. So I am sending again. Sorry for the trouble. Murali [weblogicerr1.txt]

  • Problem to Upload 10MB file to Collaboration server

    We are unlable to upload 10MB file collaboration server, even after changing the maxfilezise in collab config file to 20 MB. Is there any specific change we need to do or will it depend on any other factors. Thanks in Advance Ramesh

  • WP App crash: e8010014 captureserviceclient!FilterErrorsForPublicInterface

    WP developer dashboard reports app crashes with e8010014 captureserviceclient!FilterErrorsForPublicInterface there is no app code on the stack, so i don't know what goes wrong. OS: 8.1 Problem function: captureserviceclient!FilterErrorsForPublicInter

  • Exception "NO AUTHORIZATION" in FM "RH_INSERT_INFTY"

    Hi all,           My requirement is to create the Infotypes by simulating the PP01 transaction. I used the FM RH_INSERT_INFTY. I am able to create the OBJECT Infotype and ADDRESS Infortype. But, When i am trying to create the Reletionship Infotype wi

  • Updating to 10.6.8 broke my installer

    When I attempted to update my little pile of Macs to OS X 10.6.8, one of them, my Macbook (Early 2009), for unknown reasons came up not installing, after a lot of time on the phone trying everything else, finally had to reinstall OS 10.6(.0) and re-u