DBA Data[Home] [Help]

APPS.AD_UTIL SQL Statements

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

Line: 13

procedure update_column
           (p_old_oid  in number,
            p_new_oid  in number,
            p_tab_name in varchar2,
            p_col_name in varchar2,
            p_option   in varchar2)
is
  p_cnt number;
Line: 29

    select upper(oracle_username) into p_apps_username
      from fnd_oracle_userid
      where oracle_id between 900 and 999
        and read_only_flag = 'U';
Line: 40

    select upper(table_owner) into p_tab_owner
      from dba_synonyms
      where synonym_name = upper(p_tab_name)
        and table_name   = upper(p_tab_name)
        and owner        = upper(p_apps_username);
Line: 53

    select 1 into p_cnt
      from all_tables
      where table_name = upper(p_tab_name)
        and owner      = upper(p_tab_owner);
Line: 65

    select 1 into p_cnt
      from all_tab_columns
      where table_name  = upper(p_tab_name)
        and column_name = upper(p_col_name)
        and owner       = upper(p_tab_owner);
Line: 79

  statement := 'update '||p_tab_name||' set '||p_col_name||' = '||
               p_new_oid||' where '||p_col_name||' = '||p_old_oid;
Line: 90

  dbms_output.put_line('  '||rows_processed||' rows updated.');
Line: 98

end update_column;
Line: 126

  update_column(p_old_oid, p_new_oid, 'AD_MERGED_TABLES',
                                      'ORACLE_ID', p_option);
Line: 128

  update_column(p_old_oid, p_new_oid, 'ALR_ACTION_SET_CHECKS',
                                      'ORACLE_ID', p_option);
Line: 130

  update_column(p_old_oid, p_new_oid, 'ALR_ALERT_INSTALLATIONS',
                                      'ORACLE_ID', p_option);
Line: 132

  update_column(p_old_oid, p_new_oid, 'ALR_ORACLE_MAIL_ACCOUNTS',
                                      'ORACLE_ID', p_option);
Line: 134

  update_column(p_old_oid, p_new_oid, 'ALR_RESPONSE_ACTION_HISTORY',
                        'ORACLE_ID', p_option);
Line: 136

  update_column(p_old_oid, p_new_oid, 'FND_AUDIT_SCHEMAS',
                                      'ORACLE_ID', p_option);
Line: 138

  update_column(p_old_oid, p_new_oid, 'FND_CONCURRENT_COMPLEX_LINES',
                       'TYPE_ID', p_option);
Line: 140

  update_column(p_old_oid, p_new_oid, 'FND_CONCURRENT_QUEUE_CONTENT',
                       'TYPE_ID', p_option);
Line: 146

  update_column(p_old_oid, p_new_oid, 'FND_CONCURRENT_COMPLEX_LINES',
                       'ORACLE_ID', p_option);
Line: 148

  update_column(p_old_oid, p_new_oid, 'FND_CONCURRENT_QUEUE_CONTENT',
                       'ORACLE_ID', p_option);
Line: 150

  update_column(p_old_oid, p_new_oid, 'FND_RESPONSIBILITY',
                       'ORACLE_ID', p_option);
Line: 152

  update_column(p_old_oid, p_new_oid, 'FND_RESPONSIBILITY',
                       'READ_ONLY_ORACLE_ID', p_option);
Line: 156

  update_column(p_old_oid, p_new_oid, 'FND_CONCURRENT_REQUESTS',
                                      'ORACLE_ID', p_option);
Line: 158

  update_column(p_old_oid, p_new_oid, 'FND_DATA_GROUP_UNITS',
                                      'ORACLE_ID', p_option);
Line: 160

  update_column(p_old_oid, p_new_oid, 'FND_DATA_GROUP_UNITS',
                                      'READ_ONLY_ORACLE_ID', p_option);
Line: 162

  update_column(p_old_oid, p_new_oid, 'FND_DOC_SEQUENCE_ACCESS',
                                      'ORACLE_ID', p_option);
Line: 164

  update_column(p_old_oid, p_new_oid, 'FND_ORACLE_USERID',
                                      'READ_ONLY_ORACLE_ID', p_option);
Line: 166

  update_column(p_old_oid, p_new_oid, 'FND_REGRESSION_SUITES',
                                      'ORACLE_ID', p_option);
Line: 168

  update_column(p_old_oid, p_new_oid, 'FND_REGRESSION_TESTS',
                                      'ORACLE_ID', p_option);
Line: 175

  update_column(p_old_oid, p_new_oid, 'FND_MODULE_INSTALLATIONS',
                                      'ORACLE_ID', p_option);
Line: 177

  update_column(p_old_oid, p_new_oid, 'FND_PRODUCT_INSTALLATIONS',
                                      'ORACLE_ID', p_option);
Line: 179

  update_column(p_old_oid, p_new_oid, 'FND_PRODUCT_DEPENDENCIES',
                                      'ORACLE_ID', p_option);
Line: 181

  update_column(p_old_oid, p_new_oid, 'FND_PRODUCT_DEPENDENCIES',
                                      'REQUIRED_ORACLE_ID', p_option);
Line: 183

  update_column(p_old_oid, p_new_oid, 'FND_ORACLE_USERID',
                                      'ORACLE_ID', p_option);
Line: 196

procedure update_oracle_id
           (p_release in varchar2,
            p_old_oid in number,
            p_new_oid in number,
            p_option  in varchar2)
is
begin

  up_oid(p_release, p_old_oid, p_new_oid, p_option);
Line: 206

end update_oracle_id;
Line: 208

procedure update_oracle_id
           (p_release in varchar2,
            p_old_oid in number,
            p_new_oid in number)
is
begin

  update_oracle_id(
      p_release => p_release,
      p_old_oid => p_old_oid,
      p_new_oid => p_new_oid,
      p_option => 'N');
Line: 221

end update_oracle_id;
Line: 232

procedure update_oracle_id
           (p_release in varchar2,
            p_old_oid in number,
            p_option  in varchar2)
is
  p_new_oid number;
Line: 240

  dbms_output.put_line('-- select fnd_oracle_userid_s.nextval from dual;');
Line: 242

  select fnd_oracle_userid_s.nextval into p_new_oid
    from dual;
Line: 247

end update_oracle_id;
Line: 249

procedure update_oracle_id
           (p_release in varchar2,
            p_old_oid in number)
is
begin

  update_oracle_id(
      p_release => p_release,
      p_old_oid => p_old_oid,
      p_option => 'N');
Line: 260

end update_oracle_id;
Line: 273

  select application_id into p_apps_id
    from fnd_application
    where application_short_name = upper(p_apps_short_name);
Line: 309

    select oracle_id, db_status, status, install_group_num
      from fnd_product_installations
      where application_id = appl_id;
Line: 333

        errmsg := 'update fnd_product_installations for oracle_id '||
                  x_oracle_id;
Line: 336

        update fnd_product_installations
          set status = 'S',
              last_update_date = sysdate
          where application_id = appid
            and oracle_id = x_oracle_id;
Line: 344

              ' row updated in fnd_product_installations.');
Line: 347

              ' rows updated in fnd_product_installations.');
Line: 363

            insert into fnd_data_group_units
             (application_id,
              data_group_id,
              last_update_date,
              last_updated_by,
              creation_date,
              created_by,
              last_update_login,
              oracle_id
             )
            select distinct appid,
                   dg.data_group_id,
                   sysdate,
                   1,
                   sysdate,
                   1,
                   0,
                   decode(substr(p_release, 1, 4), '10.6', decode(appid,
                                                           0,  0,
                                                           1,  0,
                                                           3,  0,
                                                           50, 0,
                                                           160,0,
                                                           u.oracle_id),
                          u.oracle_id)
            from fnd_data_groups dg,
                 fnd_data_group_units du,
                 fnd_oracle_userid u
            where du.data_group_id = dg.data_group_id
              and du.created_by = 1
              and dg.created_by = 1
              and du.oracle_id = u.oracle_id
              and u.oracle_id between 900 and 999
              and not exists
                ( select 'x'
                    from fnd_data_group_units u2
                    where u2.data_group_id = dg.data_group_id
                      and u2.application_id = appid
                );
Line: 405

              ' row inserted into fnd_data_group_units.');
Line: 408

              ' rows inserted into fnd_data_group_units.');
Line: 420

        errmsg := 'insert into fnd_data_group_units';
Line: 422

        insert into fnd_data_group_units
          (application_id, data_group_id, last_update_date, last_updated_by,
           creation_date, created_by, last_update_login, oracle_id)
            select distinct appid,
                   dg.data_group_id,
                   sysdate,
                   1,
                   sysdate,
                   1,
                   0,
                   u.oracle_id
            from fnd_data_groups dg,
                 fnd_data_group_units du,
                 fnd_oracle_userid u
            where du.data_group_id = dg.data_group_id
              and du.created_by = 1
              and dg.created_by = 1
              and du.oracle_id = u.oracle_id
              and u.install_group_num = x_ign
              and u.oracle_id between 900 and 999
              and not exists
                ( select 'x'
                    from fnd_data_group_units u2
                    where u2.data_group_id = dg.data_group_id
                      and u2.application_id = appid
                );
Line: 451

              ' row inserted into fnd_data_group_units.');
Line: 454

              ' rows inserted into fnd_data_group_units.');