DBA Data[Home] [Help]

APPS.AD_OBSOLETE_PRODUCTS SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 59

  select object_name,object_type
  bulk collect into obs_object_name, obs_object_type
  from AD_OBSOLETE_OBJECTS
  where APPLICATION_ID = x_appl_id
  and object_type not in ('TABLE', 'INDEX', 'SEQUENCE')
  and (UPPER(dropped) = 'N' or upper(dropped) is null);
Line: 78

      l_upd_statement :=  'update AD_OBSOLETE_OBJECTS set DROPPED = '
                         ||'''Y'''||' where APPLICATION_ID = '|| x_appl_id
                         ||' and OBJECT_NAME = '||''''||
                         obs_object_name(n)||''''||' and OBJECT_TYPE = '||
                         ''''||obs_object_type(n)||'''';
Line: 111

  select object_name,object_type
  bulk collect into obs_object_name, obs_object_type
  from AD_OBSOLETE_OBJECTS
  where APPLICATION_ID = x_appl_id
  and object_type in ('TABLE', 'INDEX', 'SEQUENCE')
  and (UPPER(dropped) = 'N' or upper(dropped) is null);
Line: 132

      l_upd_statement :=  'update AD_OBSOLETE_OBJECTS set DROPPED = '
                         ||'''Y'''||' where APPLICATION_ID = '|| x_appl_id
                         ||' and OBJECT_NAME = '||''''||
                         obs_object_name(n)||''''||' and OBJECT_TYPE = '||
                         ''''||obs_object_type(n)||'''';
Line: 177

  l_insert_statement       varchar2(500);
Line: 213

 select synonym_name
 bulk collect into ds_object_name
 from dba_synonyms
 where TABLE_OWNER = l_schema_name
 and synonym_name not in
   (select object_name
    from AD_OBSOLETE_OBJECTS
    where APPLICATION_ID = x_appl_id
    and OBJECT_TYPE = 'SYNONYM'
    and (UPPER(dropped) = 'N' or upper(dropped) is null));
Line: 235

      l_insert_statement := 'insert into AD_OBSOLETE_OBJECTS '||
                            '(APPLICATION_ID, OBJECT_NAME, '||
                            'OBJECT_TYPE, LAST_UPDATED_BY, '||
                            ' CREATED_BY, CREATION_DATE, '||
                            'LAST_UPDATE_DATE, DROPPED) values ('||x_appl_id||
                            ', '||''''||ds_object_name(n)||''''||', '||''''||
                            'SYNONYM'||''''||', '||'1, 1, '||
                            'sysdate, sysdate, '||''''||'Y'||''''||')';
Line: 248

      execute immediate l_insert_statement;
Line: 264

  select object_name,object_type
  bulk collect into obs_object_name, obs_object_type
  from DBA_OBJECTS DO, FND_APPLICATION fa
  where fa.APPLICATION_ID = x_appl_id
  --and fa.APPLICATION_SHORT_NAME = do.OWNER
  and do.OWNER = decode (fa.APPLICATION_SHORT_NAME,
                         'SQLGL', 'GL',
                         'SQLAP', 'AP',
                         'SQLSO', 'SO',
                         'OFA', 'FA',
                         fa.APPLICATION_SHORT_NAME)
  and do.OBJECT_TYPE <> 'LOB';
Line: 290

      l_insert_statement := 'insert into AD_OBSOLETE_OBJECTS '||
                            '(APPLICATION_ID, OBJECT_NAME, '||
                            'OBJECT_TYPE, LAST_UPDATED_BY, '||
                            ' CREATED_BY, CREATION_DATE, '||
                            'LAST_UPDATE_DATE, DROPPED) values ('||x_appl_id||
                            ', '||''''||obs_object_name(n)||''''||', '||''''||
                            obs_object_type(n)||''''||', '||'1, 1, '||
                            'sysdate, sysdate, '||''''||'Y'||''''||')';
Line: 308

                           l_insert_statement,
                           l_dropped);
Line: 315

                           l_insert_statement,
                           l_dropped);
Line: 319

          execute immediate l_insert_statement;
Line: 334

  delete from FND_ORACLE_USERID
  where oracle_id =
    ( select  oracle_id from FND_PRODUCT_INSTALLATIONS where application_id = x_appl_id)
   and oracle_username = l_schema_name;
Line: 342

  delete from FND_PRODUCT_INSTALLATIONS where application_id = x_appl_id;
Line: 347

  delete from FND_PRODUCT_DEPENDENCIES where required_application_id = x_appl_id;
Line: 374

    SELECT oracle_username
    INTO l_apps_oracle_name
    FROM fnd_oracle_userid
    WHERE oracle_id BETWEEN 900 and 999
    and read_only_flag = 'U';
Line: 393

  select aoo.object_name, aoo.object_type, aoo.dropped
  bulk collect into obs_object_name, obs_object_type, obs_object_flag
  from AD_OBSOLETE_OBJECTS aoo
  where aoo.APPLICATION_ID = x_appl_id
  and (UPPER(dropped) = 'N' or upper(dropped) is null)
  and aoo.object_type <> 'SYNONYM'
  and exists
       (select do.object_name from dba_objects do
        where do.owner = l_apps_oracle_name
        and do.OBJECT_NAME = aoo.OBJECT_NAME
        and do.object_type = aoo.object_type);
Line: 427

          l_upd_statement := 'update AD_OBSOLETE_OBJECTS set DROPPED = '
                             ||'''Y'''||' where APPLICATION_ID = '|| x_appl_id
                             ||' and OBJECT_NAME = '||''''||
                             obs_object_name(n)||''''||' and OBJECT_TYPE = '||
                             ''''||obs_object_type(n)||'''';
Line: 464

    /* Updates all object rows, but dropped is set to Y or N based on
       success or failure */
    FORALL n in obs_object_name.first .. obs_object_name.last
      update ad_obsolete_objects set dropped = obs_object_flag(n)
      where object_name = obs_object_name(n)
      and object_type = obs_object_type(n)
      and application_id = x_appl_id;
Line: 492

  select APPLICATION_SHORT_NAME
  into l_app_short_name
  from FND_APPLICATION
  where APPLICATION_ID = x_appl_id;
Line: 545

procedure undo_delete_object
     ( x_appl_id     in number,
       x_object_name in varchar2,
       x_object_type in varchar2) is
  l_delete_statement       varchar2(500);
Line: 551

      l_delete_statement := 'delete from AD_OBSOLETE_OBJECTS '||
                            'where APPLICATION_ID = '|| x_appl_id ||
                            ' and OBJECT_NAME = '''||x_object_name ||
                            ''' and OBJECT_TYPE = '''|| x_object_type
                            || '''';
Line: 556

      execute immediate l_delete_statement;
Line: 559

end undo_delete_object;