123: apps_schema varchar2(30);
124: apps_mls_schema varchar2(30);
125: begin
126: ad_ddl.error_buf := null;
127: ad_apps_private.error_buf := null;
128: gbl_statement := statement;
129:
130: -- from the APPLSYS schema get an APPS schema so that we can access
131: -- the procedure FND_INSTALLATION that exists there
128: gbl_statement := statement;
129:
130: -- from the APPLSYS schema get an APPS schema so that we can access
131: -- the procedure FND_INSTALLATION that exists there
132: ad_apps_private.get_apps_schema_name( 0, applsys_schema,
133: apps_schema, apps_mls_schema);
134:
135:
136: if upper(application_short_name) not in ('INTERMEDIA','APPS') then
181: ad_ddl.error_buf := 'do_ddl('||applsys_schema||', '||
182: application_short_name||
183: ', '||statement_type||', $statement$, '||
184: object_name||'): '||
185: ad_ddl.error_buf||': '||ad_apps_private.error_buf||
186: ': substr($statement$,1,255)='''||
187: substr(gbl_statement,1,255)||'''';
188: raise;
189: end do_ddl;
208: rows_processed integer;
209: c integer;
210: begin
211:
212: if ad_apps_private.is_mls is null
213: or ad_apps_private.is_mc is null then
214: ad_apps_private.initialize(p_apps_schema);
215: end if;
216:
209: c integer;
210: begin
211:
212: if ad_apps_private.is_mls is null
213: or ad_apps_private.is_mc is null then
214: ad_apps_private.initialize(p_apps_schema);
215: end if;
216:
217: -- get the install_group_num from the oracle_schema that the object
210: begin
211:
212: if ad_apps_private.is_mls is null
213: or ad_apps_private.is_mc is null then
214: ad_apps_private.initialize(p_apps_schema);
215: end if;
216:
217: -- get the install_group_num from the oracle_schema that the object
218: -- is to be created in.
257:
258:
259: -- Check for APPS*DDL packages
260:
261: ad_apps_private.check_for_apps_ddl(p_apps_schema);
262: ad_apps_private.check_for_apps_ddl(oracle_schema);
263:
264:
265: if install_group_num <> -99 then
258:
259: -- Check for APPS*DDL packages
260:
261: ad_apps_private.check_for_apps_ddl(p_apps_schema);
262: ad_apps_private.check_for_apps_ddl(oracle_schema);
263:
264:
265: if install_group_num <> -99 then
266: --
264:
265: if install_group_num <> -99 then
266: --
267: --
268: if ad_apps_private.is_mls then
269: -- Get name of mls schema
270: ad_apps_private.get_apps_schema_name(install_group_num, p_applsys_schema,
271: l_apps_schema, l_mls_apps_schema);
272: -- check for APPS*DDL in mls schema
266: --
267: --
268: if ad_apps_private.is_mls then
269: -- Get name of mls schema
270: ad_apps_private.get_apps_schema_name(install_group_num, p_applsys_schema,
271: l_apps_schema, l_mls_apps_schema);
272: -- check for APPS*DDL in mls schema
273: ad_apps_private.check_for_apps_ddl(l_mls_apps_schema);
274: end if;
269: -- Get name of mls schema
270: ad_apps_private.get_apps_schema_name(install_group_num, p_applsys_schema,
271: l_apps_schema, l_mls_apps_schema);
272: -- check for APPS*DDL in mls schema
273: ad_apps_private.check_for_apps_ddl(l_mls_apps_schema);
274: end if;
275:
276: end if;
277:
347: elsif statement_type = ad_ddl.create_base_synonym
348: then do_at_tab_a_seq_acd_ind(p_apps_schema, oracle_schema, statement,
349: statement_type, object_name);
350: ---- added by vpalakur for ZD
351: ad_apps_private.do_apps_ddl_on_patch_edn(oracle_schema,object_name,
352: 'SYNONYM',statement,'TRUE');
353: elsif statement_type = ad_ddl.drop_base_synonym
354: then do_at_tab_a_seq_acd_ind(p_apps_schema, oracle_schema, statement,
355: statement_type, object_name);
353: elsif statement_type = ad_ddl.drop_base_synonym
354: then do_at_tab_a_seq_acd_ind(p_apps_schema, oracle_schema, statement,
355: statement_type, object_name);
356: ---- added by vpalakur for ZD
357: ad_apps_private.do_apps_ddl_on_patch_edn(oracle_schema, object_name,
358: 'SYNONYM', statement, 'TRUE');
359:
360: end if;
361: exception
378: is
379: l_ev_stmt varchar2(300);
380: begin
381:
382: ad_apps_private.do_apps_ddl(datasai_oracle_schema,datasai_statement, 'TRUE');
383:
384: if (datasai_statement_type = ad_ddl.alter_table and
385: ad_apps_private.is_edition_enabled = 'Y')
386: then
381:
382: ad_apps_private.do_apps_ddl(datasai_oracle_schema,datasai_statement, 'TRUE');
383:
384: if (datasai_statement_type = ad_ddl.alter_table and
385: ad_apps_private.is_edition_enabled = 'Y')
386: then
387: -- Bug 14471759 Only generate editioned view with the following commands.
388:
389: if ((regexp_instr(datasai_statement,'ADD',1,1,0,'i')>0) or
400: (regexp_instr(datasai_statement,'ADD PARTITION',1,1,0,'i')=0))
401: then
402: -- Table altered, Re-generate EV.
403: l_ev_stmt := 'begin '||'ad_zd_table.patch('''|| datasai_oracle_schema ||''','||''''|| datasai_object_name || '''); end;';
404: ad_apps_private.do_apps_ddl(datasai_apps_schema, l_ev_stmt, 'TRUE');
405: end if;
406: end if;
407: end if;
408:
424: l_apps_schema varchar2(30);
425: l_mls_apps_schema varchar2(30);
426: begin
427: -- get the apps_schema_names for this install group
428: ad_apps_private.get_apps_schema_name(dat_install_group_num,
429: dat_apps_schema, l_apps_schema, l_mls_apps_schema);
430:
431:
432: -- execute the trigger code in the apps schema
429: dat_apps_schema, l_apps_schema, l_mls_apps_schema);
430:
431:
432: -- execute the trigger code in the apps schema
433: ad_apps_private.do_apps_ddl(l_apps_schema,dat_statement, 'TRUE');
434:
435: exception
436: when success_with_comp_error then
437: --
438: -- Trap and ignore ORA-24344: success with compilation error
439: -- This only happens on ORACLE 8
440: --
441: -- reset main error buffer
442: ad_apps_private.error_buf := null;
443: when others then
444: ad_ddl.error_buf := 'do_acd_trigger('||dat_install_group_num||', '||
445: dat_apps_schema||', $statement$): '||ad_ddl.error_buf;
446: raise;
457: l_apps_schema varchar2(30);
458: l_mls_apps_schema varchar2(30);
459: begin
460: -- get the apps_schema_names for this install group
461: ad_apps_private.get_apps_schema_name(dat_install_group_num,
462: dat_apps_schema, l_apps_schema, l_mls_apps_schema);
463:
464:
465: -- execute the trigger code in the apps schema
462: dat_apps_schema, l_apps_schema, l_mls_apps_schema);
463:
464:
465: -- execute the trigger code in the apps schema
466: ad_apps_private.do_apps_ddl(l_apps_schema,dat_statement, 'TRUE');
467: ad_apps_private.do_apps_ddl_on_patch_edn(l_apps_schema,object_name,'TRIGGER',dat_statement,'TRUE'); ---- added by vpalakur for ZD
468:
469:
470: exception
463:
464:
465: -- execute the trigger code in the apps schema
466: ad_apps_private.do_apps_ddl(l_apps_schema,dat_statement, 'TRUE');
467: ad_apps_private.do_apps_ddl_on_patch_edn(l_apps_schema,object_name,'TRIGGER',dat_statement,'TRUE'); ---- added by vpalakur for ZD
468:
469:
470: exception
471: when success_with_comp_error then
473: -- Trap and ignore ORA-24344: success with compilation error
474: -- This only happens on ORACLE 8
475: --
476: -- reset main error buffer
477: ad_apps_private.error_buf := null;
478: when others then
479: ad_ddl.error_buf := 'do_acd_trigger('||dat_install_group_num||', '||
480: dat_apps_schema||', $statement$): '||ad_ddl.error_buf;
481: raise;
508: print_local_sql boolean;
509: begin
510:
511:
512: if ad_apps_private.is_mls is null
513: or ad_apps_private.is_mc is null then
514: ad_apps_private.initialize(davcsap_apps_schema);
515: end if;
516:
509: begin
510:
511:
512: if ad_apps_private.is_mls is null
513: or ad_apps_private.is_mc is null then
514: ad_apps_private.initialize(davcsap_apps_schema);
515: end if;
516:
517: if davcsap_install_group_num <> 0 then
510:
511:
512: if ad_apps_private.is_mls is null
513: or ad_apps_private.is_mc is null then
514: ad_apps_private.initialize(davcsap_apps_schema);
515: end if;
516:
517: if davcsap_install_group_num <> 0 then
518: -- if this is a non 0 install group then perform this only
519: -- for that apps account
520:
521: -- get the apps_schema_names for this install group
522: if davcsap_install_group_num <> -99 then
523: ad_apps_private.get_apps_schema_name(davcsap_install_group_num,
524: davcsap_apps_schema, l_apps_schema, l_mls_apps_schema);
525: else
526: l_apps_schema:='CTXSYS';
527: end if;
528:
529:
530: -- execute the alter view in the apps schema
531: begin
532: ad_apps_private.do_apps_ddl(l_apps_schema, davcsap_statement,
533: 'TRUE');
534: ad_apps_private.do_apps_ddl_on_patch_edn(l_apps_schema,object_name,'VIEW',davcsap_statement,'TRUE'); ---- added by vpalakur for ZD
535:
536: exception
530: -- execute the alter view in the apps schema
531: begin
532: ad_apps_private.do_apps_ddl(l_apps_schema, davcsap_statement,
533: 'TRUE');
534: ad_apps_private.do_apps_ddl_on_patch_edn(l_apps_schema,object_name,'VIEW',davcsap_statement,'TRUE'); ---- added by vpalakur for ZD
535:
536: exception
537: when success_with_comp_error then
538: --
539: -- Trap and ignore ORA-24344: success with compilation error
540: -- This only happens on ORACLE 8
541: --
542: -- reset main error buffer
543: ad_apps_private.error_buf := null;
544:
545: --
546: -- rkagrawa: Fixed bug 2823541. When dropping synonyms, trap and ignore
547: -- ORA-01434 error, so that even if the synonym does not exist in apps schema,
548: -- apps_mls_schema or apps_mrc_schema, the procedure call is successful in
549: -- dropping the synonym in other schemas
550: --
551: when synonym_does_not_exist then
552: ad_apps_private.error_buf := null;
553:
554: end;
555:
556: if davcsap_install_group_num <> -99 then
554: end;
555:
556: if davcsap_install_group_num <> -99 then
557:
558: if ad_apps_private.is_mls then
559: -- execute the alter view in the apps_mls schema
560: begin
561: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
562: davcsap_statement, 'TRUE');
557:
558: if ad_apps_private.is_mls then
559: -- execute the alter view in the apps_mls schema
560: begin
561: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
562: davcsap_statement, 'TRUE');
563: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,object_name,'VIEW',davcsap_statement,'TRUE'); ---- added by vpalakur for ZD
564:
565: exception
559: -- execute the alter view in the apps_mls schema
560: begin
561: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
562: davcsap_statement, 'TRUE');
563: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,object_name,'VIEW',davcsap_statement,'TRUE'); ---- added by vpalakur for ZD
564:
565: exception
566: when success_with_comp_error then
567: --
568: -- Trap and ignore ORA-24344: success with compilation error
569: -- This only happens on ORACLE 8
570: --
571: -- reset main error buffer
572: ad_apps_private.error_buf := null;
573:
574: --
575: -- rkagrawa: Fixed bug 2823541. When dropping synonyms, trap and ignore
576: -- ORA-01434 error, so that even if the synonym does not exist in apps schema,
577: -- apps_mls_schema or apps_mrc_schema, the procedure call is successful in
578: -- dropping the synonym in other schemas
579: --
580: when synonym_does_not_exist then
581: ad_apps_private.error_buf := null;
582:
583: end;
584: end if;
585:
608: print_local_sql := FALSE;
609: loop
610: if dbms_sql.fetch_rows(c) > 0 then
611: dbms_sql.column_value(c,1,l_install_group_num);
612: ad_apps_private.get_apps_schema_name(l_install_group_num,
613: davcsap_apps_schema, l_apps_schema, l_mls_apps_schema);
614: -- execute the alter view in the apps schema
615: begin
616: ad_apps_private.do_apps_ddl(l_apps_schema,
612: ad_apps_private.get_apps_schema_name(l_install_group_num,
613: davcsap_apps_schema, l_apps_schema, l_mls_apps_schema);
614: -- execute the alter view in the apps schema
615: begin
616: ad_apps_private.do_apps_ddl(l_apps_schema,
617: davcsap_statement, 'TRUE');
618: ad_apps_private.do_apps_ddl_on_patch_edn(l_apps_schema,object_name,'VIEW',davcsap_statement,'TRUE'); ---- added by vpalakur for ZD
619:
620: exception
614: -- execute the alter view in the apps schema
615: begin
616: ad_apps_private.do_apps_ddl(l_apps_schema,
617: davcsap_statement, 'TRUE');
618: ad_apps_private.do_apps_ddl_on_patch_edn(l_apps_schema,object_name,'VIEW',davcsap_statement,'TRUE'); ---- added by vpalakur for ZD
619:
620: exception
621: when success_with_comp_error then
622: --
623: -- Trap and ignore ORA-24344: success with compilation error
624: -- This only happens on ORACLE 8
625: --
626: -- reset main error buffer
627: ad_apps_private.error_buf := null;
628:
629: --
630: -- rkagrawa: Fixed bug 2823541. When dropping synonyms, trap and ignore
631: -- ORA-01434 error, so that even if the synonym does not exist in apps schema,
632: -- apps_mls_schema or apps_mrc_schema, the procedure call is successful in
633: -- dropping the synonym in other schemas
634: --
635: when synonym_does_not_exist then
636: ad_apps_private.error_buf := null;
637:
638: end;
639:
640: if ad_apps_private.is_mls then
636: ad_apps_private.error_buf := null;
637:
638: end;
639:
640: if ad_apps_private.is_mls then
641: -- execute the alter view in the apps_mls schema
642: begin
643: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
644: davcsap_statement, 'TRUE');
639:
640: if ad_apps_private.is_mls then
641: -- execute the alter view in the apps_mls schema
642: begin
643: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
644: davcsap_statement, 'TRUE');
645: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,object_name,'VIEW',davcsap_statement,'TRUE'); ---- added by vpalakur for ZD
646:
647: exception
641: -- execute the alter view in the apps_mls schema
642: begin
643: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
644: davcsap_statement, 'TRUE');
645: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,object_name,'VIEW',davcsap_statement,'TRUE'); ---- added by vpalakur for ZD
646:
647: exception
648: when success_with_comp_error then
649: --
650: -- Trap and ignore ORA-24344: success with compilation error
651: -- This only happens on ORACLE 8
652: --
653: -- reset main error buffer
654: ad_apps_private.error_buf := null;
655:
656: --
657: -- rkagrawa: Fixed bug 2823541. When dropping synonyms, trap and ignore
658: -- ORA-01434 error, so that even if the synonym does not exist in apps schema,
659: -- apps_mls_schema or apps_mrc_schema, the procedure call is successful in
660: -- dropping the synonym in other schemas
661: --
662: when synonym_does_not_exist then
663: ad_apps_private.error_buf := null;
664:
665: end;
666: end if;
667:
707: l_exist number;
708: l_evname varchar2(30);
709: begin
710:
711: if ad_apps_private.is_mls is null
712: or ad_apps_private.is_mc is null then
713: ad_apps_private.initialize(dctcs_apps_schema);
714: end if;
715: -- do statement in base schema
708: l_evname varchar2(30);
709: begin
710:
711: if ad_apps_private.is_mls is null
712: or ad_apps_private.is_mc is null then
713: ad_apps_private.initialize(dctcs_apps_schema);
714: end if;
715: -- do statement in base schema
716: if dctcs_statement_type = ad_ddl.drop_sequence then
709: begin
710:
711: if ad_apps_private.is_mls is null
712: or ad_apps_private.is_mc is null then
713: ad_apps_private.initialize(dctcs_apps_schema);
714: end if;
715: -- do statement in base schema
716: if dctcs_statement_type = ad_ddl.drop_sequence then
717: ad_apps_private.drop_object(dctcs_oracle_schema, dctcs_object_name,
713: ad_apps_private.initialize(dctcs_apps_schema);
714: end if;
715: -- do statement in base schema
716: if dctcs_statement_type = ad_ddl.drop_sequence then
717: ad_apps_private.drop_object(dctcs_oracle_schema, dctcs_object_name,
718: 'SEQUENCE');
719: elsif dctcs_statement_type = ad_ddl.drop_table then
720: ad_apps_private.drop_object(dctcs_oracle_schema, dctcs_object_name,
721: 'TABLE');
716: if dctcs_statement_type = ad_ddl.drop_sequence then
717: ad_apps_private.drop_object(dctcs_oracle_schema, dctcs_object_name,
718: 'SEQUENCE');
719: elsif dctcs_statement_type = ad_ddl.drop_table then
720: ad_apps_private.drop_object(dctcs_oracle_schema, dctcs_object_name,
721: 'TABLE');
722: if (ad_apps_private.is_edition_enabled = 'Y')
723: then
724: l_evname := ad_apps_private.get_evname(dctcs_object_name);
718: 'SEQUENCE');
719: elsif dctcs_statement_type = ad_ddl.drop_table then
720: ad_apps_private.drop_object(dctcs_oracle_schema, dctcs_object_name,
721: 'TABLE');
722: if (ad_apps_private.is_edition_enabled = 'Y')
723: then
724: l_evname := ad_apps_private.get_evname(dctcs_object_name);
725: SELECT count(1)
726: INTO l_exist
720: ad_apps_private.drop_object(dctcs_oracle_schema, dctcs_object_name,
721: 'TABLE');
722: if (ad_apps_private.is_edition_enabled = 'Y')
723: then
724: l_evname := ad_apps_private.get_evname(dctcs_object_name);
725: SELECT count(1)
726: INTO l_exist
727: FROM dba_editioning_views
728: where owner=dctcs_oracle_schema
730: and table_name=dctcs_object_name;
731:
732: if (l_exist > 0)
733: then
734: ad_apps_private.drop_object(dctcs_oracle_schema,
735: l_evname,
736: 'VIEW');
737: end if;
738: end if;
737: end if;
738: end if;
739: -- If ev exist, then drop ev too
740: else -- it is a create
741: ad_apps_private.do_apps_ddl(dctcs_oracle_schema, dctcs_statement,
742: 'TRUE');
743: end if;
744: -- now do the correct action in the apps schemas
745: if dctcs_install_group_num <> 0 then
746: -- if this is a non 0 install group then perform this only
747: -- for that apps account
748:
749: -- get the apps_schema_names for this install group
750: ad_apps_private.get_apps_schema_name(dctcs_install_group_num,
751: dctcs_apps_schema, l_apps_schema, l_mls_apps_schema);
752:
753: -- create/drop grant/synonym in apps schema
754: if dctcs_statement_type = ad_ddl.create_sequence then
751: dctcs_apps_schema, l_apps_schema, l_mls_apps_schema);
752:
753: -- create/drop grant/synonym in apps schema
754: if dctcs_statement_type = ad_ddl.create_sequence then
755: ad_apps_private.create_gs(dctcs_oracle_schema, l_apps_schema,
756: dctcs_object_name, TRUE, 'ALL');
757: elsif dctcs_statement_type = ad_ddl.create_table then
758: ad_apps_private.create_gs(dctcs_oracle_schema, l_apps_schema,
759: dctcs_object_name, TRUE, 'ALL', to_ev=>ad_apps_private.is_edition_enabled);
754: if dctcs_statement_type = ad_ddl.create_sequence then
755: ad_apps_private.create_gs(dctcs_oracle_schema, l_apps_schema,
756: dctcs_object_name, TRUE, 'ALL');
757: elsif dctcs_statement_type = ad_ddl.create_table then
758: ad_apps_private.create_gs(dctcs_oracle_schema, l_apps_schema,
759: dctcs_object_name, TRUE, 'ALL', to_ev=>ad_apps_private.is_edition_enabled);
760: else -- this is a drop table/sequence
761: ad_apps_private.drop_object(l_apps_schema,
762: dctcs_object_name,'SYNONYM');
755: ad_apps_private.create_gs(dctcs_oracle_schema, l_apps_schema,
756: dctcs_object_name, TRUE, 'ALL');
757: elsif dctcs_statement_type = ad_ddl.create_table then
758: ad_apps_private.create_gs(dctcs_oracle_schema, l_apps_schema,
759: dctcs_object_name, TRUE, 'ALL', to_ev=>ad_apps_private.is_edition_enabled);
760: else -- this is a drop table/sequence
761: ad_apps_private.drop_object(l_apps_schema,
762: dctcs_object_name,'SYNONYM');
763: end if;
757: elsif dctcs_statement_type = ad_ddl.create_table then
758: ad_apps_private.create_gs(dctcs_oracle_schema, l_apps_schema,
759: dctcs_object_name, TRUE, 'ALL', to_ev=>ad_apps_private.is_edition_enabled);
760: else -- this is a drop table/sequence
761: ad_apps_private.drop_object(l_apps_schema,
762: dctcs_object_name,'SYNONYM');
763: end if;
764:
765: if ad_apps_private.is_mls then
761: ad_apps_private.drop_object(l_apps_schema,
762: dctcs_object_name,'SYNONYM');
763: end if;
764:
765: if ad_apps_private.is_mls then
766: -- create/drop grant/synonym in apps_mls schema
767: if dctcs_statement_type = ad_ddl.create_sequence then
768: ad_apps_private.create_gs(dctcs_oracle_schema,
769: l_mls_apps_schema,
764:
765: if ad_apps_private.is_mls then
766: -- create/drop grant/synonym in apps_mls schema
767: if dctcs_statement_type = ad_ddl.create_sequence then
768: ad_apps_private.create_gs(dctcs_oracle_schema,
769: l_mls_apps_schema,
770: dctcs_object_name, TRUE, 'ALL');
771: elsif dctcs_statement_type = ad_ddl.create_table
772: then
769: l_mls_apps_schema,
770: dctcs_object_name, TRUE, 'ALL');
771: elsif dctcs_statement_type = ad_ddl.create_table
772: then
773: ad_apps_private.create_gs(dctcs_oracle_schema,
774: l_mls_apps_schema,
775: dctcs_object_name, TRUE, 'ALL', to_ev=>ad_apps_private.is_edition_enabled);
776: else -- this is a drop table/sequence
777: ad_apps_private.drop_object(l_mls_apps_schema,
771: elsif dctcs_statement_type = ad_ddl.create_table
772: then
773: ad_apps_private.create_gs(dctcs_oracle_schema,
774: l_mls_apps_schema,
775: dctcs_object_name, TRUE, 'ALL', to_ev=>ad_apps_private.is_edition_enabled);
776: else -- this is a drop table/sequence
777: ad_apps_private.drop_object(l_mls_apps_schema,
778: dctcs_object_name,'SYNONYM');
779: end if;
773: ad_apps_private.create_gs(dctcs_oracle_schema,
774: l_mls_apps_schema,
775: dctcs_object_name, TRUE, 'ALL', to_ev=>ad_apps_private.is_edition_enabled);
776: else -- this is a drop table/sequence
777: ad_apps_private.drop_object(l_mls_apps_schema,
778: dctcs_object_name,'SYNONYM');
779: end if;
780: end if;
781:
807: if dbms_sql.fetch_rows(c) > 0 then
808: dbms_sql.column_value(c,1,l_install_group_num);
809:
810: -- get the apps_schema_names for this install group
811: ad_apps_private.get_apps_schema_name(l_install_group_num,
812: dctcs_apps_schema, l_apps_schema, l_mls_apps_schema);
813:
814: -- create/drop grant/synonym in apps schema
815: if dctcs_statement_type = ad_ddl.create_sequence then
813:
814: -- create/drop grant/synonym in apps schema
815: if dctcs_statement_type = ad_ddl.create_sequence then
816:
817: ad_apps_private.create_gs(dctcs_oracle_schema,
818: l_apps_schema,
819: dctcs_object_name, TRUE, 'ALL');
820: elsif dctcs_statement_type = ad_ddl.create_table
821: then
818: l_apps_schema,
819: dctcs_object_name, TRUE, 'ALL');
820: elsif dctcs_statement_type = ad_ddl.create_table
821: then
822: ad_apps_private.create_gs(dctcs_oracle_schema,
823: l_apps_schema,
824: dctcs_object_name, TRUE, 'ALL', to_ev=>ad_apps_private.is_edition_enabled);
825:
826: else -- this is a drop table/sequence
820: elsif dctcs_statement_type = ad_ddl.create_table
821: then
822: ad_apps_private.create_gs(dctcs_oracle_schema,
823: l_apps_schema,
824: dctcs_object_name, TRUE, 'ALL', to_ev=>ad_apps_private.is_edition_enabled);
825:
826: else -- this is a drop table/sequence
827: ad_apps_private.drop_object(l_apps_schema,
828: dctcs_object_name,'SYNONYM');
823: l_apps_schema,
824: dctcs_object_name, TRUE, 'ALL', to_ev=>ad_apps_private.is_edition_enabled);
825:
826: else -- this is a drop table/sequence
827: ad_apps_private.drop_object(l_apps_schema,
828: dctcs_object_name,'SYNONYM');
829: end if;
830:
831: if ad_apps_private.is_mls then
827: ad_apps_private.drop_object(l_apps_schema,
828: dctcs_object_name,'SYNONYM');
829: end if;
830:
831: if ad_apps_private.is_mls then
832: -- create/drop grant/synonym in apps_mls schema
833: if dctcs_statement_type = ad_ddl.create_sequence then
834: ad_apps_private.create_gs(dctcs_oracle_schema,
835: l_mls_apps_schema, dctcs_object_name, TRUE, 'ALL');
830:
831: if ad_apps_private.is_mls then
832: -- create/drop grant/synonym in apps_mls schema
833: if dctcs_statement_type = ad_ddl.create_sequence then
834: ad_apps_private.create_gs(dctcs_oracle_schema,
835: l_mls_apps_schema, dctcs_object_name, TRUE, 'ALL');
836: elsif dctcs_statement_type = ad_ddl.create_table
837: then
838: ad_apps_private.create_gs(dctcs_oracle_schema,
834: ad_apps_private.create_gs(dctcs_oracle_schema,
835: l_mls_apps_schema, dctcs_object_name, TRUE, 'ALL');
836: elsif dctcs_statement_type = ad_ddl.create_table
837: then
838: ad_apps_private.create_gs(dctcs_oracle_schema,
839: l_mls_apps_schema, dctcs_object_name, TRUE, 'ALL', to_ev=>ad_apps_private.is_edition_enabled);
840: else -- this is a drop table/sequence
841: ad_apps_private.drop_object(l_mls_apps_schema,
842: dctcs_object_name,'SYNONYM');
835: l_mls_apps_schema, dctcs_object_name, TRUE, 'ALL');
836: elsif dctcs_statement_type = ad_ddl.create_table
837: then
838: ad_apps_private.create_gs(dctcs_oracle_schema,
839: l_mls_apps_schema, dctcs_object_name, TRUE, 'ALL', to_ev=>ad_apps_private.is_edition_enabled);
840: else -- this is a drop table/sequence
841: ad_apps_private.drop_object(l_mls_apps_schema,
842: dctcs_object_name,'SYNONYM');
843: end if;
837: then
838: ad_apps_private.create_gs(dctcs_oracle_schema,
839: l_mls_apps_schema, dctcs_object_name, TRUE, 'ALL', to_ev=>ad_apps_private.is_edition_enabled);
840: else -- this is a drop table/sequence
841: ad_apps_private.drop_object(l_mls_apps_schema,
842: dctcs_object_name,'SYNONYM');
843: end if;
844: end if;
845:
882: l_mrc_apps_schema varchar2(30);
883: print_local_sql boolean;
884: begin
885:
886: if ad_apps_private.is_mls is null
887: or ad_apps_private.is_mc is null then
888: ad_apps_private.initialize(dcv_apps_schema);
889: end if;
890: -- now do the correct action in the apps schemas
883: print_local_sql boolean;
884: begin
885:
886: if ad_apps_private.is_mls is null
887: or ad_apps_private.is_mc is null then
888: ad_apps_private.initialize(dcv_apps_schema);
889: end if;
890: -- now do the correct action in the apps schemas
891: if dcv_install_group_num <> 0 then
884: begin
885:
886: if ad_apps_private.is_mls is null
887: or ad_apps_private.is_mc is null then
888: ad_apps_private.initialize(dcv_apps_schema);
889: end if;
890: -- now do the correct action in the apps schemas
891: if dcv_install_group_num <> 0 then
892: -- if this is a non 0 install group then perform this only
892: -- if this is a non 0 install group then perform this only
893: -- for that apps account
894:
895: -- get the apps_schema_names for this install group
896: ad_apps_private.get_apps_schema_name(dcv_install_group_num,
897: dcv_apps_schema, l_apps_schema, l_mls_apps_schema);
898:
899: -- create/drop view in apps schema
900: if dcv_statement_type = ad_ddl.drop_view then
897: dcv_apps_schema, l_apps_schema, l_mls_apps_schema);
898:
899: -- create/drop view in apps schema
900: if dcv_statement_type = ad_ddl.drop_view then
901: log_message('1calling ad_apps_private.drop_object...');
902: ad_apps_private.drop_object(l_apps_schema,dcv_object_name,
903: 'VIEW');
904: log_message('1done calling ad_apps_private.drop_object...');
905: else -- create_view
898:
899: -- create/drop view in apps schema
900: if dcv_statement_type = ad_ddl.drop_view then
901: log_message('1calling ad_apps_private.drop_object...');
902: ad_apps_private.drop_object(l_apps_schema,dcv_object_name,
903: 'VIEW');
904: log_message('1done calling ad_apps_private.drop_object...');
905: else -- create_view
906: begin
900: if dcv_statement_type = ad_ddl.drop_view then
901: log_message('1calling ad_apps_private.drop_object...');
902: ad_apps_private.drop_object(l_apps_schema,dcv_object_name,
903: 'VIEW');
904: log_message('1done calling ad_apps_private.drop_object...');
905: else -- create_view
906: begin
907: log_message('2calling do_apps_ddl...');
908: ad_apps_private.do_apps_ddl(l_apps_schema, dcv_statement,
904: log_message('1done calling ad_apps_private.drop_object...');
905: else -- create_view
906: begin
907: log_message('2calling do_apps_ddl...');
908: ad_apps_private.do_apps_ddl(l_apps_schema, dcv_statement,
909: 'TRUE');
910: log_message('2done calling do_apps_ddl...');
911: log_message('3calling do_apps_ddl_on_patch_edn...');
912: ad_apps_private.do_apps_ddl_on_patch_edn(l_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
908: ad_apps_private.do_apps_ddl(l_apps_schema, dcv_statement,
909: 'TRUE');
910: log_message('2done calling do_apps_ddl...');
911: log_message('3calling do_apps_ddl_on_patch_edn...');
912: ad_apps_private.do_apps_ddl_on_patch_edn(l_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
913: log_message('3done calling do_apps_ddl_on_patch_edn...');
914:
915: exception
916: when success_with_comp_error then
918: -- Trap and ignore ORA-24344: success with compilation error
919: -- This only happens on ORACLE 8
920: --
921: -- reset main error buffer
922: ad_apps_private.error_buf := null;
923: end;
924:
925: end if;
926:
923: end;
924:
925: end if;
926:
927: if ad_apps_private.is_mls then
928: -- create/drop view in apps_mls schema
929: if dcv_statement_type = ad_ddl.drop_view then
930: log_message('4calling ad_apps_private.drop_object...');
931: ad_apps_private.drop_object(l_mls_apps_schema,
926:
927: if ad_apps_private.is_mls then
928: -- create/drop view in apps_mls schema
929: if dcv_statement_type = ad_ddl.drop_view then
930: log_message('4calling ad_apps_private.drop_object...');
931: ad_apps_private.drop_object(l_mls_apps_schema,
932: dcv_object_name,'VIEW');
933: log_message('4done calling ad_apps_private.drop_object...');
934:
927: if ad_apps_private.is_mls then
928: -- create/drop view in apps_mls schema
929: if dcv_statement_type = ad_ddl.drop_view then
930: log_message('4calling ad_apps_private.drop_object...');
931: ad_apps_private.drop_object(l_mls_apps_schema,
932: dcv_object_name,'VIEW');
933: log_message('4done calling ad_apps_private.drop_object...');
934:
935: else -- create_view
929: if dcv_statement_type = ad_ddl.drop_view then
930: log_message('4calling ad_apps_private.drop_object...');
931: ad_apps_private.drop_object(l_mls_apps_schema,
932: dcv_object_name,'VIEW');
933: log_message('4done calling ad_apps_private.drop_object...');
934:
935: else -- create_view
936: begin
937: log_message('5calling ad_apps_private.do_apps_ddl...');
933: log_message('4done calling ad_apps_private.drop_object...');
934:
935: else -- create_view
936: begin
937: log_message('5calling ad_apps_private.do_apps_ddl...');
938: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
939: dcv_statement, 'TRUE');
940: log_message('5done calling ad_apps_private.do_apps_ddl...');
941: log_message('6calling ad_apps_private.do_apps_ddl_on_patch_edn...');
934:
935: else -- create_view
936: begin
937: log_message('5calling ad_apps_private.do_apps_ddl...');
938: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
939: dcv_statement, 'TRUE');
940: log_message('5done calling ad_apps_private.do_apps_ddl...');
941: log_message('6calling ad_apps_private.do_apps_ddl_on_patch_edn...');
942: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
936: begin
937: log_message('5calling ad_apps_private.do_apps_ddl...');
938: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
939: dcv_statement, 'TRUE');
940: log_message('5done calling ad_apps_private.do_apps_ddl...');
941: log_message('6calling ad_apps_private.do_apps_ddl_on_patch_edn...');
942: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
943:
944: log_message('6done calling ad_apps_private.do_apps_ddl_on_patch_edn...');
937: log_message('5calling ad_apps_private.do_apps_ddl...');
938: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
939: dcv_statement, 'TRUE');
940: log_message('5done calling ad_apps_private.do_apps_ddl...');
941: log_message('6calling ad_apps_private.do_apps_ddl_on_patch_edn...');
942: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
943:
944: log_message('6done calling ad_apps_private.do_apps_ddl_on_patch_edn...');
945: exception
938: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
939: dcv_statement, 'TRUE');
940: log_message('5done calling ad_apps_private.do_apps_ddl...');
941: log_message('6calling ad_apps_private.do_apps_ddl_on_patch_edn...');
942: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
943:
944: log_message('6done calling ad_apps_private.do_apps_ddl_on_patch_edn...');
945: exception
946: when success_with_comp_error then
940: log_message('5done calling ad_apps_private.do_apps_ddl...');
941: log_message('6calling ad_apps_private.do_apps_ddl_on_patch_edn...');
942: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
943:
944: log_message('6done calling ad_apps_private.do_apps_ddl_on_patch_edn...');
945: exception
946: when success_with_comp_error then
947: --
948: -- Trap and ignore ORA-24344: success with compilation error
948: -- Trap and ignore ORA-24344: success with compilation error
949: -- This only happens on ORACLE 8
950: --
951: -- reset main error buffer
952: ad_apps_private.error_buf := null;
953: end;
954: end if;
955: end if;
956:
980: if dbms_sql.fetch_rows(c) > 0 then
981: dbms_sql.column_value(c,1,l_install_group_num);
982:
983: -- get the apps_schema_names for this install group
984: ad_apps_private.get_apps_schema_name(l_install_group_num,
985: dcv_apps_schema, l_apps_schema, l_mls_apps_schema);
986:
987: -- create/drop view in apps schema
988: if dcv_statement_type = ad_ddl.drop_view then
985: dcv_apps_schema, l_apps_schema, l_mls_apps_schema);
986:
987: -- create/drop view in apps schema
988: if dcv_statement_type = ad_ddl.drop_view then
989: log_message('7calling ad_apps_private.drop_object...');
990: ad_apps_private.drop_object(l_apps_schema,
991: dcv_object_name,'VIEW');
992: log_message('7done calling ad_apps_private.drop_object...');
993: else -- create_view
986:
987: -- create/drop view in apps schema
988: if dcv_statement_type = ad_ddl.drop_view then
989: log_message('7calling ad_apps_private.drop_object...');
990: ad_apps_private.drop_object(l_apps_schema,
991: dcv_object_name,'VIEW');
992: log_message('7done calling ad_apps_private.drop_object...');
993: else -- create_view
994: begin
988: if dcv_statement_type = ad_ddl.drop_view then
989: log_message('7calling ad_apps_private.drop_object...');
990: ad_apps_private.drop_object(l_apps_schema,
991: dcv_object_name,'VIEW');
992: log_message('7done calling ad_apps_private.drop_object...');
993: else -- create_view
994: begin
995: log_message('8calling ad_apps_private.do_apps_ddl...');
996: ad_apps_private.do_apps_ddl(l_apps_schema,
991: dcv_object_name,'VIEW');
992: log_message('7done calling ad_apps_private.drop_object...');
993: else -- create_view
994: begin
995: log_message('8calling ad_apps_private.do_apps_ddl...');
996: ad_apps_private.do_apps_ddl(l_apps_schema,
997: dcv_statement, 'TRUE');
998: log_message('8done calling ad_apps_private.do_apps_ddl...');
999: log_message('9calling ad_apps_private.do_apps_ddl_on_patch_edn...');
992: log_message('7done calling ad_apps_private.drop_object...');
993: else -- create_view
994: begin
995: log_message('8calling ad_apps_private.do_apps_ddl...');
996: ad_apps_private.do_apps_ddl(l_apps_schema,
997: dcv_statement, 'TRUE');
998: log_message('8done calling ad_apps_private.do_apps_ddl...');
999: log_message('9calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1000: ad_apps_private.do_apps_ddl_on_patch_edn(l_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
994: begin
995: log_message('8calling ad_apps_private.do_apps_ddl...');
996: ad_apps_private.do_apps_ddl(l_apps_schema,
997: dcv_statement, 'TRUE');
998: log_message('8done calling ad_apps_private.do_apps_ddl...');
999: log_message('9calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1000: ad_apps_private.do_apps_ddl_on_patch_edn(l_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
1001:
1002: log_message('9done calling ad_apps_private.do_apps_ddl_on_patch_edn...');
995: log_message('8calling ad_apps_private.do_apps_ddl...');
996: ad_apps_private.do_apps_ddl(l_apps_schema,
997: dcv_statement, 'TRUE');
998: log_message('8done calling ad_apps_private.do_apps_ddl...');
999: log_message('9calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1000: ad_apps_private.do_apps_ddl_on_patch_edn(l_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
1001:
1002: log_message('9done calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1003: exception
996: ad_apps_private.do_apps_ddl(l_apps_schema,
997: dcv_statement, 'TRUE');
998: log_message('8done calling ad_apps_private.do_apps_ddl...');
999: log_message('9calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1000: ad_apps_private.do_apps_ddl_on_patch_edn(l_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
1001:
1002: log_message('9done calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1003: exception
1004: when success_with_comp_error then
998: log_message('8done calling ad_apps_private.do_apps_ddl...');
999: log_message('9calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1000: ad_apps_private.do_apps_ddl_on_patch_edn(l_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
1001:
1002: log_message('9done calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1003: exception
1004: when success_with_comp_error then
1005: --
1006: -- Trap and ignore ORA-24344: success with compilation error
1006: -- Trap and ignore ORA-24344: success with compilation error
1007: -- This only happens on ORACLE 8
1008: --
1009: -- reset main error buffer
1010: ad_apps_private.error_buf := null;
1011: end;
1012: end if;
1013:
1014: if ad_apps_private.is_mls then
1010: ad_apps_private.error_buf := null;
1011: end;
1012: end if;
1013:
1014: if ad_apps_private.is_mls then
1015: -- create/drop view in apps_mls schema
1016: if dcv_statement_type = ad_ddl.drop_view then
1017: log_message('10calling ad_apps_private.drop_object...');
1018: ad_apps_private.drop_object(l_mls_apps_schema,
1013:
1014: if ad_apps_private.is_mls then
1015: -- create/drop view in apps_mls schema
1016: if dcv_statement_type = ad_ddl.drop_view then
1017: log_message('10calling ad_apps_private.drop_object...');
1018: ad_apps_private.drop_object(l_mls_apps_schema,
1019: dcv_object_name,'VIEW');
1020: log_message('10done calling ad_apps_private.drop_object...');
1021: else -- create_view
1014: if ad_apps_private.is_mls then
1015: -- create/drop view in apps_mls schema
1016: if dcv_statement_type = ad_ddl.drop_view then
1017: log_message('10calling ad_apps_private.drop_object...');
1018: ad_apps_private.drop_object(l_mls_apps_schema,
1019: dcv_object_name,'VIEW');
1020: log_message('10done calling ad_apps_private.drop_object...');
1021: else -- create_view
1022: begin
1016: if dcv_statement_type = ad_ddl.drop_view then
1017: log_message('10calling ad_apps_private.drop_object...');
1018: ad_apps_private.drop_object(l_mls_apps_schema,
1019: dcv_object_name,'VIEW');
1020: log_message('10done calling ad_apps_private.drop_object...');
1021: else -- create_view
1022: begin
1023: log_message('11calling ad_apps_private.do_apps_ddl...');
1024: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
1019: dcv_object_name,'VIEW');
1020: log_message('10done calling ad_apps_private.drop_object...');
1021: else -- create_view
1022: begin
1023: log_message('11calling ad_apps_private.do_apps_ddl...');
1024: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
1025: dcv_statement, 'TRUE');
1026: log_message('11done calling ad_apps_private.do_apps_ddl...');
1027: log_message('12calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1020: log_message('10done calling ad_apps_private.drop_object...');
1021: else -- create_view
1022: begin
1023: log_message('11calling ad_apps_private.do_apps_ddl...');
1024: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
1025: dcv_statement, 'TRUE');
1026: log_message('11done calling ad_apps_private.do_apps_ddl...');
1027: log_message('12calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1028: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
1022: begin
1023: log_message('11calling ad_apps_private.do_apps_ddl...');
1024: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
1025: dcv_statement, 'TRUE');
1026: log_message('11done calling ad_apps_private.do_apps_ddl...');
1027: log_message('12calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1028: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
1029:
1030: log_message('12done calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1023: log_message('11calling ad_apps_private.do_apps_ddl...');
1024: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
1025: dcv_statement, 'TRUE');
1026: log_message('11done calling ad_apps_private.do_apps_ddl...');
1027: log_message('12calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1028: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
1029:
1030: log_message('12done calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1031: exception
1024: ad_apps_private.do_apps_ddl(l_mls_apps_schema,
1025: dcv_statement, 'TRUE');
1026: log_message('11done calling ad_apps_private.do_apps_ddl...');
1027: log_message('12calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1028: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
1029:
1030: log_message('12done calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1031: exception
1032: when success_with_comp_error then
1026: log_message('11done calling ad_apps_private.do_apps_ddl...');
1027: log_message('12calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1028: ad_apps_private.do_apps_ddl_on_patch_edn(l_mls_apps_schema,dcv_object_name,'VIEW',dcv_statement,'TRUE'); ---- added by vpalakur for ZD
1029:
1030: log_message('12done calling ad_apps_private.do_apps_ddl_on_patch_edn...');
1031: exception
1032: when success_with_comp_error then
1033: --
1034: -- Trap and ignore ORA-24344: success with compilation error
1034: -- Trap and ignore ORA-24344: success with compilation error
1035: -- This only happens on ORACLE 8
1036: --
1037: -- reset main error buffer
1038: ad_apps_private.error_buf := null;
1039: end;
1040: end if;
1041: end if;
1042:
1090: ad_ddl.error_buf := 'create_package('||applsys_schema||', '||
1091: application_short_name||
1092: ', '||package_name||', '||is_package_body||', '||
1093: lb||', '||ub||'): '||
1094: ad_ddl.error_buf||': '||ad_apps_private.error_buf||
1095: ': substr($statement$,1,255)='''||
1096: substr(gbl_statement,1,255)||'''';
1097: raise;
1098: end create_package;
1159:
1160: -- initialize variables
1161:
1162: ad_ddl.error_buf := null;
1163: ad_apps_private.error_buf := null;
1164: gbl_statement := null;
1165:
1166: comp_error := 'FALSE';
1167: upper_obj_name := upper(object_name);
1189:
1190: -- from the APPLSYS schema get an APPS schema so that we can access
1191: -- the procedure FND_INSTALLATION that exists there
1192:
1193: ad_apps_private.get_apps_schema_name( 0, applsys_schema,
1194: apps_schema, apps_mls_schema);
1195:
1196: --
1197: -- compute effective user
1259:
1260:
1261: -- initialize global flags if required
1262:
1263: if ad_apps_private.is_mls is null
1264: or ad_apps_private.is_mc is null then
1265: ad_apps_private.initialize(apps_schema);
1266: end if;
1267:
1260:
1261: -- initialize global flags if required
1262:
1263: if ad_apps_private.is_mls is null
1264: or ad_apps_private.is_mc is null then
1265: ad_apps_private.initialize(apps_schema);
1266: end if;
1267:
1268: -- Get the name of the first apps schema
1261: -- initialize global flags if required
1262:
1263: if ad_apps_private.is_mls is null
1264: or ad_apps_private.is_mc is null then
1265: ad_apps_private.initialize(apps_schema);
1266: end if;
1267:
1268: -- Get the name of the first apps schema
1269:
1418: -- looking for a synonym because it gives us the required
1419: -- information easily
1420: --
1421:
1422: ad_apps_private.exact_synonym_match(current_apps_schema, upper_obj_name,
1423: current_apps_schema, upper_obj_name, obj_is_correct_synonym,
1424: obj_exists_in_schema, obj_type_in_schema);
1425:
1426: if obj_exists_in_schema
1467: -- barring data integrity issues, this means we've processed
1468: -- all of the APPS schemas (and corresponding MRC schemas)
1469:
1470: begin
1471: ad_apps_private.get_apps_schema_name(tmp_ign,
1472: first_apps_schema, tmp_apps_schema, tmp_mls_schema);
1473: exception
1474: when no_data_found then
1475: exit;
1476: end;
1477:
1478: -- Check for APPS*DDL
1479:
1480: ad_apps_private.check_for_apps_ddl(tmp_apps_schema);
1481:
1482: -- create grants
1483:
1484: ad_invoker.grant_a_package(first_apps_schema, upper_obj_name,
1539: -- the package spec doesn't exist
1540:
1541: -- Look for package spec in first APPS schema
1542:
1543: ad_apps_private.exact_synonym_match(first_apps_schema, upper_obj_name,
1544: first_apps_schema, upper_obj_name, obj_is_correct_synonym,
1545: obj_exists_in_schema, obj_type_in_schema);
1546:
1547: if obj_exists_in_schema then
1582: -- barring data integrity issues, this means we've processed
1583: -- all of the APPS schemas (and corresponding MRC schemas)
1584:
1585: begin
1586: ad_apps_private.get_apps_schema_name(tmp_ign,
1587: first_apps_schema, tmp_apps_schema, tmp_mls_schema);
1588: exception
1589: when no_data_found then
1590: exit;
1591: end;
1592:
1593: -- Check for APPS*DDL
1594:
1595: ad_apps_private.check_for_apps_ddl(tmp_apps_schema);
1596:
1597: -- create grants
1598:
1599: ad_invoker.grant_a_package(first_apps_schema, upper_obj_name,
1698: -- Create grants to other APPS schemas
1699:
1700: -- Check for APPS*DDL
1701:
1702: ad_apps_private.check_for_apps_ddl(first_apps_schema);
1703:
1704: -- Create package in first APPS schema
1705:
1706: begin
1718: -- dbms_output.put_line('success w comp error');
1719:
1720: -- reset main error buffer
1721:
1722: ad_apps_private.error_buf := null;
1723:
1724: -- record compilation error
1725:
1726: comp_error := 'TRUE';
1742: -- barring data integrity issues, this means we've processed
1743: -- all of the APPS schemas (and corresponding MRC schemas)
1744:
1745: begin
1746: ad_apps_private.get_apps_schema_name(tmp_ign,
1747: first_apps_schema, tmp_apps_schema, tmp_mls_schema);
1748: exception
1749: when no_data_found then
1750: exit;
1751: end;
1752:
1753: -- Check for APPS*DDL
1754:
1755: ad_apps_private.check_for_apps_ddl(tmp_apps_schema);
1756:
1757: -- create grants
1758:
1759: ad_invoker.grant_a_package(first_apps_schema, upper_obj_name,
1776:
1777: -- Check for APPS*DDL
1778:
1779:
1780: ad_apps_private.check_for_apps_ddl(current_apps_schema);
1781:
1782: -- Drop existing synonym, if any
1783:
1784: ad_apps_private.exact_synonym_match(current_apps_schema,
1780: ad_apps_private.check_for_apps_ddl(current_apps_schema);
1781:
1782: -- Drop existing synonym, if any
1783:
1784: ad_apps_private.exact_synonym_match(current_apps_schema,
1785: upper_obj_name, current_apps_schema, upper_obj_name,
1786: obj_is_correct_synonym, obj_exists_in_schema, obj_type_in_schema);
1787:
1788: if obj_exists_in_schema
1787:
1788: if obj_exists_in_schema
1789: and obj_type_in_schema = 'SYNONYM' then
1790:
1791: ad_apps_private.drop_object(current_apps_schema, upper_obj_name,
1792: 'SYNONYM');
1793:
1794: end if;
1795:
1801: exception
1802: when success_with_comp_error then
1803: -- reset main error buffer
1804:
1805: ad_apps_private.error_buf := null;
1806:
1807: -- record compilation error
1808:
1809: comp_error := 'TRUE';
1829: -- Check for APPS*DDL
1830:
1831:
1832:
1833: ad_apps_private.check_for_apps_ddl(first_apps_schema);
1834:
1835:
1836:
1837: -- Create package in first APPS schema
1843: exception
1844: when success_with_comp_error then
1845: -- reset main error buffer
1846:
1847: ad_apps_private.error_buf := null;
1848:
1849: -- record compilation error
1850:
1851: comp_error := 'TRUE';
1867: -- all of the APPS schemas (and corresponding MRC schemas)
1868:
1869: begin
1870:
1871: ad_apps_private.get_apps_schema_name(tmp_ign,
1872: first_apps_schema, tmp_apps_schema, tmp_mls_schema);
1873:
1874: exception
1875: when no_data_found then
1877: end;
1878:
1879: -- Check for APPS*DDL
1880:
1881: ad_apps_private.check_for_apps_ddl(tmp_apps_schema);
1882:
1883: -- compare source text in this APPS schema with text in
1884: -- first APPS schema, and (re)create if not identical
1885:
1914: if upper(current_apps_schema) = 'CTXSYS' then
1915: first_apps_schema:=current_apps_schema;
1916: end if;
1917:
1918: ad_apps_private.check_for_apps_ddl(first_apps_schema);
1919:
1920: -- Create package body in first APPS schema
1921:
1922:
1926: exception
1927: when success_with_comp_error then
1928: -- reset main error buffer
1929:
1930: ad_apps_private.error_buf := null;
1931:
1932: -- record compilation error
1933:
1934: comp_error := 'TRUE';
1945: -- no grants required
1946:
1947: -- Check for APPS*DDL
1948:
1949: ad_apps_private.check_for_apps_ddl(current_apps_schema);
1950:
1951: -- Create package body in current APPS schema
1952:
1953: begin
1956: exception
1957: when success_with_comp_error then
1958: -- reset main error buffer
1959:
1960: ad_apps_private.error_buf := null;
1961:
1962: -- record compilation error
1963:
1964: comp_error := 'TRUE';
1987: -- barring data integrity issues, this means we've processed
1988: -- all of the APPS schemas (and corresponding MRC schemas)
1989:
1990: begin
1991: ad_apps_private.get_apps_schema_name(tmp_ign,
1992: first_apps_schema, tmp_apps_schema, tmp_mls_schema);
1993: exception
1994: when no_data_found then
1995: exit;
1996: end;
1997:
1998: -- Check for APPS*DDL
1999:
2000: ad_apps_private.check_for_apps_ddl(tmp_apps_schema);
2001:
2002: -- Create package body in this APPS schema
2003:
2004: begin
2007: exception
2008: when success_with_comp_error then
2009: -- reset main error buffer
2010:
2011: ad_apps_private.error_buf := null;
2012:
2013: -- record compilation error
2014:
2015: comp_error := 'TRUE';
2143: ad_ddl.error_buf := 'create_plsql_object('||applsys_schema||', '||
2144: application_short_name||
2145: ', '||object_name||', '||
2146: lb||', '||ub||', '||insert_newlines||'): '||
2147: ad_ddl.error_buf||': '||ad_apps_private.error_buf||
2148: ': substr($statement$,1,255)='''||
2149: substr(gbl_statement,1,255)||'''';
2150: raise;
2151: end create_plsql_object;
2201: apps_schema varchar2(30);
2202: apps_mls_schema varchar2(30);
2203: begin
2204: ad_ddl.error_buf := null;
2205: ad_apps_private.error_buf := null;
2206: gbl_statement := null;
2207:
2208: -- from the APPLSYS schema get an APPS schema so that we can access
2209: -- the procedure FND_INSTALLATION that exists there
2206: gbl_statement := null;
2207:
2208: -- from the APPLSYS schema get an APPS schema so that we can access
2209: -- the procedure FND_INSTALLATION that exists there
2210: ad_apps_private.get_apps_schema_name( 0, applsys_schema,
2211: apps_schema, apps_mls_schema);
2212:
2213: if upper(application_short_name) not in ('INTERMEDIA','APPS') then
2214:
2260: ad_ddl.error_buf := 'do_array_ddl('||applsys_schema||', '||
2261: application_short_name||
2262: ', '||statement_type||', '||lb||', '||ub||', '||
2263: object_name||'): '||
2264: ad_ddl.error_buf||': '||ad_apps_private.error_buf||
2265: ': substr($statement$,1,255)='''||
2266: substr(gbl_statement,1,255)||'''';
2267: raise;
2268: end do_array_ddl;
2284: rows_processed integer;
2285: c integer;
2286: begin
2287:
2288: if ad_apps_private.is_mls is null
2289: or ad_apps_private.is_mc is null then
2290: ad_apps_private.initialize(p_apps_schema);
2291: end if;
2292:
2285: c integer;
2286: begin
2287:
2288: if ad_apps_private.is_mls is null
2289: or ad_apps_private.is_mc is null then
2290: ad_apps_private.initialize(p_apps_schema);
2291: end if;
2292:
2293: -- get the install_group_num from the oracle_schema that the object
2286: begin
2287:
2288: if ad_apps_private.is_mls is null
2289: or ad_apps_private.is_mc is null then
2290: ad_apps_private.initialize(p_apps_schema);
2291: end if;
2292:
2293: -- get the install_group_num from the oracle_schema that the object
2294: -- is to be created in.
2322: end;
2323:
2324: -- Check for APPS*DDL packages
2325:
2326: ad_apps_private.check_for_apps_ddl(p_apps_schema);
2327: ad_apps_private.check_for_apps_ddl(oracle_schema);
2328:
2329: if ad_apps_private.is_mls then
2330: -- Get name of mls schema
2323:
2324: -- Check for APPS*DDL packages
2325:
2326: ad_apps_private.check_for_apps_ddl(p_apps_schema);
2327: ad_apps_private.check_for_apps_ddl(oracle_schema);
2328:
2329: if ad_apps_private.is_mls then
2330: -- Get name of mls schema
2331: ad_apps_private.get_apps_schema_name(install_group_num, p_applsys_schema,
2325:
2326: ad_apps_private.check_for_apps_ddl(p_apps_schema);
2327: ad_apps_private.check_for_apps_ddl(oracle_schema);
2328:
2329: if ad_apps_private.is_mls then
2330: -- Get name of mls schema
2331: ad_apps_private.get_apps_schema_name(install_group_num, p_applsys_schema,
2332: l_apps_schema, l_mls_apps_schema);
2333: -- check for APPS*DDL in mls schema
2327: ad_apps_private.check_for_apps_ddl(oracle_schema);
2328:
2329: if ad_apps_private.is_mls then
2330: -- Get name of mls schema
2331: ad_apps_private.get_apps_schema_name(install_group_num, p_applsys_schema,
2332: l_apps_schema, l_mls_apps_schema);
2333: -- check for APPS*DDL in mls schema
2334: ad_apps_private.check_for_apps_ddl(l_mls_apps_schema);
2335: end if;
2330: -- Get name of mls schema
2331: ad_apps_private.get_apps_schema_name(install_group_num, p_applsys_schema,
2332: l_apps_schema, l_mls_apps_schema);
2333: -- check for APPS*DDL in mls schema
2334: ad_apps_private.check_for_apps_ddl(l_mls_apps_schema);
2335: end if;
2336:
2337: --
2338: -- Based on type of action determine what to do
2367: l_mrc_apps_schema varchar2(30);
2368: print_local_sql boolean;
2369: begin
2370:
2371: if ad_apps_private.is_mls is null
2372: or ad_apps_private.is_mc is null then
2373: ad_apps_private.initialize(dcv_apps_schema);
2374: end if;
2375: -- now do the correct action in the apps schemas
2368: print_local_sql boolean;
2369: begin
2370:
2371: if ad_apps_private.is_mls is null
2372: or ad_apps_private.is_mc is null then
2373: ad_apps_private.initialize(dcv_apps_schema);
2374: end if;
2375: -- now do the correct action in the apps schemas
2376: if dcv_install_group_num <> 0 then
2369: begin
2370:
2371: if ad_apps_private.is_mls is null
2372: or ad_apps_private.is_mc is null then
2373: ad_apps_private.initialize(dcv_apps_schema);
2374: end if;
2375: -- now do the correct action in the apps schemas
2376: if dcv_install_group_num <> 0 then
2377: -- if this is a non 0 install group then perform this only
2377: -- if this is a non 0 install group then perform this only
2378: -- for that apps account
2379:
2380: -- get the apps_schema_names for this install group
2381: ad_apps_private.get_apps_schema_name(dcv_install_group_num,
2382: dcv_apps_schema, l_apps_schema, l_mls_apps_schema);
2383:
2384: -- create view in apps schema
2385: array_assign_and_execute(l_apps_schema, dcv_lb, dcv_ub,dcv_object_name,'VIEW'); ---- vpalakur
2383:
2384: -- create view in apps schema
2385: array_assign_and_execute(l_apps_schema, dcv_lb, dcv_ub,dcv_object_name,'VIEW'); ---- vpalakur
2386:
2387: if ad_apps_private.is_mls then
2388: -- create view in apps_mls schema
2389: array_assign_and_execute(l_mls_apps_schema, dcv_lb, dcv_ub,dcv_object_name,'VIEW'); ---- vpalakur
2390: end if;
2391:
2415: if dbms_sql.fetch_rows(c) > 0 then
2416: dbms_sql.column_value(c,1,l_install_group_num);
2417:
2418: -- get the apps_schema_names for this install group
2419: ad_apps_private.get_apps_schema_name(l_install_group_num,
2420: dcv_apps_schema, l_apps_schema, l_mls_apps_schema);
2421:
2422: -- create view in apps schema
2423: array_assign_and_execute(l_apps_schema, dcv_lb, dcv_ub,dcv_object_name,'VIEW'); ---- vpalakur
2421:
2422: -- create view in apps schema
2423: array_assign_and_execute(l_apps_schema, dcv_lb, dcv_ub,dcv_object_name,'VIEW'); ---- vpalakur
2424:
2425: if ad_apps_private.is_mls then
2426: -- create view in apps_mls schema
2427: array_assign_and_execute(l_mls_apps_schema, ---- vpalakur
2428: dcv_lb, dcv_ub,dcv_object_name,'VIEW');
2429: end if;
2492: --
2493:
2494: for counter in p_lb..p_ub loop
2495: begin
2496: ad_apps_private.do_array_assignment(p_schema_name,
2497: ad_ddl.glprogtext(counter), counter);
2498: ad_apps_private.do_array_assignment_patch_edn(p_schema_name,
2499: ad_ddl.glprogtext(counter), counter);
2500: exception
2494: for counter in p_lb..p_ub loop
2495: begin
2496: ad_apps_private.do_array_assignment(p_schema_name,
2497: ad_ddl.glprogtext(counter), counter);
2498: ad_apps_private.do_array_assignment_patch_edn(p_schema_name,
2499: ad_ddl.glprogtext(counter), counter);
2500: exception
2501: when others then
2502: ad_ddl.error_buf := ' At line '||counter||' of array DDL text '||
2508: --
2509: -- Execute array DDL statement
2510: --
2511:
2512: ad_apps_private.do_apps_array_ddl(p_schema_name, p_lb, p_ub, add_newline); -----VENU chk this
2513: ad_apps_private.do_apps_array_ddl_on_patch_edn(p_schema_name, p_lb, p_ub, add_newline, object_name,object_type); -- vpalakur: made this change for ZD support.
2514:
2515:
2516: exception
2509: -- Execute array DDL statement
2510: --
2511:
2512: ad_apps_private.do_apps_array_ddl(p_schema_name, p_lb, p_ub, add_newline); -----VENU chk this
2513: ad_apps_private.do_apps_array_ddl_on_patch_edn(p_schema_name, p_lb, p_ub, add_newline, object_name,object_type); -- vpalakur: made this change for ZD support.
2514:
2515:
2516: exception
2517: when others then
2603: begin
2604: -- Initialize global variables
2605:
2606: ad_ddl.error_buf := null;
2607: ad_apps_private.error_buf := null;
2608: gbl_statement := ddl_text;
2609:
2610:
2611: uc_schema := null;
2620: uc_schema := substr(upper(schema_name),1,30);
2621: end if;
2622:
2623: -- Check for APPS*DDL in the schema
2624: ad_apps_private.check_for_apps_ddl(uc_schema);
2625:
2626: -- Execute create trigger statement using APPS_DDL
2627:
2628: begin
2625:
2626: -- Execute create trigger statement using APPS_DDL
2627:
2628: begin
2629: ad_apps_private.do_apps_ddl(uc_schema, ddl_text, 'TRUE');
2630:
2631: ad_apps_private.do_apps_ddl_on_patch_edn(uc_schema,object_name,'TRIGGER',ddl_text,'TRUE'); ---- added by vpalakur for ZD
2632:
2633: exception
2627:
2628: begin
2629: ad_apps_private.do_apps_ddl(uc_schema, ddl_text, 'TRUE');
2630:
2631: ad_apps_private.do_apps_ddl_on_patch_edn(uc_schema,object_name,'TRIGGER',ddl_text,'TRUE'); ---- added by vpalakur for ZD
2632:
2633: exception
2634: when success_with_comp_error then
2635: ad_apps_private.error_buf := null;
2631: ad_apps_private.do_apps_ddl_on_patch_edn(uc_schema,object_name,'TRIGGER',ddl_text,'TRUE'); ---- added by vpalakur for ZD
2632:
2633: exception
2634: when success_with_comp_error then
2635: ad_apps_private.error_buf := null;
2636: end;
2637:
2638: exception
2639: when others then
2637:
2638: exception
2639: when others then
2640: ad_ddl.error_buf := 'create_trigger_in_schema('||schema_name||
2641: ', $statement$): '||ad_ddl.error_buf||': '||ad_apps_private.error_buf||
2642: ': substr($statement$,1,255)='''||
2643: substr(gbl_statement,1,255)||'''';
2644: raise;
2645: end create_trigger_in_schema;