MyAgilePLM's Profile
Agile Talent
200
Points

Questions
1

Answers
2

  • Code attached. Script can be found below as well:

     

    — DIRECTIONS :
    — 1) Put the counts script into a directory on the database server
    — 2) Open an SQL*Plus session and log into the Agile schema account
    — 3) Create a spool/log file for the script results SQL> SPOOL <directory>/agile_counts.LST
    — 4) Run this script SQL> START <directory>/Agile_Object_Counts_9x.sql.txt
    — 5) Close the spool/log file SQL> SPOOL OFF
    — 6) Exit the SQL*Plus session SQL> EXIT

    set echo off

    select count(*) “Parts” from item where class=10000;

    select count(*) “Part Revs” from rev where item in (select id from item where class=10000) and change > 0;

    select count(*) “Changes” from change where id > 0;

    select count(distinct item) “BOM Parents” from bom where item in (select id from item where class=10000);

    Select count(*) “Part BOM” from bom where item in (select id from item where class=10000);

    select count(*) “Ref Des” from refdesig where bom in
    (select id from bom where item in (select id from item where class=10000));

    select count(*) “Manufacturer” from manufacturers where id > 0;

    select count(*) “Mfr Parts” from manu_parts where id > 0;

    select count(*) “Part AML” from manu_by where agile_part in (select id from item where class=10000) and manu_part > 0;

    select count(*) “Documents” from item where class=9000;

    select count(*) “Doc Revs” from rev where item in (select id from item where class=9000) and change > 0;

    select count(*) “PSR” from psr where id > 0;

    select count(*) “PSR_AI” from psr_item where psr_id > 0;

    select count(*) “QCR” from qcr where id > 0;

    select count(*) “QCR_AI” from qcr_ai where qcr_id > 0;

    select count(*) “Customer” from customer where id > 0;

    select count(*) “MatlDecl” from material_declaration where id > 0;

    select count(*) “MD_Map” from material_declaration_map;

    select count(*) “PartGrp” from part_family where id > 0;

    select count(*) “PG_Map” from part_family_map;

    select count(*) “Spec” from regulation where id > 0;

    select count(*) “Spec_Map” from compliance;

    select count(*) “Substance” from substance where id > 0;

    select count(*) “Sub_Map” from substance_map;

    select count(*) “Supplier” from organization where org_pk > 0 and class is not null;

    select count(*) “Supl_Map” from asl_map;

    — Find out how many history records
    select count(*) “ITEM HISTORY” from item_history;

    select count(*) “CHANGE HISTORY” from change_history;

    select count(*) “SIGNOFF HISTORY” from signoff;

    select count(*) “WORKFLOW HISTORY” from workflow_process;

    create index am_pcl on attachment_map (parent_class);

    select count(distinct f.id) “Direct Files” from attachment_map am, files f
    where am.parent_class in (9000,10000,6000,7000,8000,11000,1450,1442,1483,11605,4878,4895,4928,4428,4983,2000002395,2000005977,2000005735,2000002423,2000002367,2000002882,2000002339,2000004409,2000001992,2000001018,2000001119,2000002445,2000002467,17570)
    and am.file_id > 0 and am.file_id = f.id;

    select count(distinct f.id) “Indirect Files” from attachment_map am, version_file_map vfm, files f
    where am.parent_class in (9000,10000,6000,7000,8000,11000,1450,1442,1483,11605,4878,4895,4928,4428,4983,2000002395,2000005977,2000005735,2000002423,2000002367,2000002882,2000002339,2000004409,2000001992,2000001018,2000001119,2000002445,2000002467,17570)
    and am.file_id = 0 and am.latest_vsn = vfm.version_id and vfm.file_id = f.id;

    drop index am_pcl;

    — now users and roles/privs
    select count(*) “CUST USERS” from agileuser where id not in
    (select id from agileuser where loginid in (‘admin’,’administrator’,’propagation’,’superadmin’,’agileuser’,’etluser’,’ifsuser’,’admin_save’));
    select count(*) “ACTIVE USERS” from agileuser where enabled = 1 and id not in
    (select id from agileuser where loginid in (‘admin’,’administrator’,’propagation’,’superadmin’,’agileuser’,’etluser’,’ifsuser’,’admin_save’));
    select count(*) “DELETE USERS” from agileuser where delete_flag is not null and delete_flag > 0 and id not in
    (select id from agileuser where loginid in (‘admin’,’administrator’,’propagation’,’superadmin’,’agileuser’,’etluser’,’ifsuser’,’admin_save’));
    select count(*) “ROLES” from nodetable where objtype = 21;
    select count(*) “PRIVS” from nodetable where objtype = 22;

    select propertyid, value from propertytable where parentid = 5001 and propertyid in (37, 726);

    spool off
    set echo on

    • 3550 views
    • 4 answers
    • 0 votes
  • We are using MS exchange on 365, meaning we don’t have local exchange server. We would like to connect MS 365 exchange to the Agile. How can we do this?

    • 5097 views
    • 4 answers
    • 0 votes