DBA Data[Home] [Help]

APPS.AD_ZD dependencies on AD_ZD

Line 1: package body AD_ZD as

1: package body AD_ZD as
2: /* $Header: ADZDXB.pls 120.52.12020000.23 2013/06/21 13:16:40 rputchak ship $ */
3:
4: C_PACKAGE CONSTANT VARCHAR2(80) := 'ad.plsql.ad_zd.';
5:

Line 4: C_PACKAGE CONSTANT VARCHAR2(80) := 'ad.plsql.ad_zd.';

1: package body AD_ZD as
2: /* $Header: ADZDXB.pls 120.52.12020000.23 2013/06/21 13:16:40 rputchak ship $ */
3:
4: C_PACKAGE CONSTANT VARCHAR2(80) := 'ad.plsql.ad_zd.';
5:
6:
7:
8: /*

Line 20: ad_zd_log.message(x_module, x_log_type, x_message);

16: ** log message
17: */
18: procedure LOG(X_MODULE varchar2, X_LOG_TYPE varchar2, X_MESSAGE varchar2) is
19: begin
20: ad_zd_log.message(x_module, x_log_type, x_message);
21: end;
22:
23: /*
24: ** log error message and raise exception

Line 28: ad_zd_log.message(x_module, 'ERROR', x_message);

24: ** log error message and raise exception
25: */
26: procedure ERROR(X_MODULE varchar2, X_MESSAGE varchar2) is
27: begin
28: ad_zd_log.message(x_module, 'ERROR', x_message);
29: raise_application_error(-20001, x_message);
30: end;
31:
32:

Line 115: ad_zd_parallel_exec.load(

111: ** x_sql - sql statement or pl/sql block to be executed.
112: */
113: procedure LOAD_DDL(X_PHASE in varchar2, X_SQL in varchar2) is
114: begin
115: ad_zd_parallel_exec.load(
116: x_phase => x_phase,
117: x_sql => to_clob(x_sql),
118: x_unique => true); -- check for uniqueness
119: end;

Line 160: sys.ad_zd_sys.alter_logon_trigger('DISABLE');

156: begin
157: log(c_module, 'EVENT', 'alter logon trigger : '|| x_status);
158: -- If anyone passes DISABLED or DISABLE or disable
159: if(upper(x_status) like 'DISABLE%') then
160: sys.ad_zd_sys.alter_logon_trigger('DISABLE');
161: elsif (upper(x_status) like 'ENABLE%') then
162: sys.ad_zd_sys.alter_logon_trigger('ENABLE');
163: else
164: error(c_module, 'The status: ' || x_status ||' is not a valid trigger status');

Line 162: sys.ad_zd_sys.alter_logon_trigger('ENABLE');

158: -- If anyone passes DISABLED or DISABLE or disable
159: if(upper(x_status) like 'DISABLE%') then
160: sys.ad_zd_sys.alter_logon_trigger('DISABLE');
161: elsif (upper(x_status) like 'ENABLE%') then
162: sys.ad_zd_sys.alter_logon_trigger('ENABLE');
163: else
164: error(c_module, 'The status: ' || x_status ||' is not a valid trigger status');
165: end if;
166: end ALTER_LOGON_TRIGGER;

Line 527: sys.ad_zd_sys.drop_covered_object(objrec.owner, objrec.object_name, objrec.object_type, objrec.edition_name);

523: log(c_module, 'STATEMENT', 'Dropping covered objects in '||objrec.edition_name);
524: l_last_edition := objrec.edition_name;
525: end if;
526: begin
527: sys.ad_zd_sys.drop_covered_object(objrec.owner, objrec.object_name, objrec.object_type, objrec.edition_name);
528: exception
529: when c_user_cancel then
530: error(c_module, 'Cleanup cancelled');
531: when others then

Line 568: if ad_zd.get_edition('PATCH') is not null then

564: L_DT_FMT varchar2(30) := 'YYYYMMDD_HH24MI';
565: begin
566:
567: -- must not be an existing patch edition
568: if ad_zd.get_edition('PATCH') is not null then
569: error(c_module, 'Patch Edition already exists');
570: end if;
571:
572: -- Generate new edition name

Line 573: l_cur_edition := ad_zd.get_edition('RUN');

569: error(c_module, 'Patch Edition already exists');
570: end if;
571:
572: -- Generate new edition name
573: l_cur_edition := ad_zd.get_edition('RUN');
574: l_edition := 'V_'||to_char(SYSDATE, l_dt_fmt);
575:
576: if greatest(l_edition,l_cur_edition) = l_cur_edition then
577: l_edition := 'V_'||to_char(to_date(substr(l_cur_edition,3),l_dt_fmt)+1/(24*60),l_dt_fmt);

Line 602: l_edition := ad_zd.get_edition(x_edition_type);

598: L_OWNER varchar2(30) := 'SYS';
599: begin
600:
601: -- get edition and validate
602: l_edition := ad_zd.get_edition(x_edition_type);
603: if (l_edition is null) then
604: error(c_module, 'Edition Type '||nvl(x_edition_type, 'NULL')||' does not exist.');
605: end if;
606: if (l_edition = get_edition('RUN')) then

Line 620: sys.ad_zd_sys.retire_edition(l_edition);

616: and table_name = l_edition
617: and grantee = 'PUBLIC';
618:
619: if (l_grantor = 'SYS') then
620: sys.ad_zd_sys.retire_edition(l_edition);
621: else
622: log(c_module, 'EVENT', 'Retire Edition: '||l_edition);
623: exec('revoke use on edition '||l_edition||' from PUBLIC', c_module);
624: end if;

Line 666: sys.ad_zd_sys.drop_edition(erec.edition_name);

662: exit when l_empty = 'N';
663:
664: -- drop empty old edition
665: begin
666: sys.ad_zd_sys.drop_edition(erec.edition_name);
667: exception
668: when others then
669: log(c_module, 'WARNING', 'Could not drop empty edition '||erec.edition_name);
670: exit;

Line 691: l_edition := ad_zd.get_edition(x_edition_type);

687: begin
688: log(c_module, 'PROCEDURE', 'begin: '||x_edition_type);
689:
690: -- get edition and validate
691: l_edition := ad_zd.get_edition(x_edition_type);
692: if (l_edition is null) then
693: error(c_module, 'Edition Type '||nvl(x_edition_type, 'NULL')||' does not exist.');
694: end if;
695: if (l_edition = get_edition('RUN')) then

Line 701: ad_zd.drop_old_editions;

697: end if;
698:
699: -- do it
700: if x_edition_type = 'OLD' then
701: ad_zd.drop_old_editions;
702: else
703: sys.ad_zd_sys.drop_edition(l_edition);
704: end if;
705:

Line 703: sys.ad_zd_sys.drop_edition(l_edition);

699: -- do it
700: if x_edition_type = 'OLD' then
701: ad_zd.drop_old_editions;
702: else
703: sys.ad_zd_sys.drop_edition(l_edition);
704: end if;
705:
706: log(c_module, 'PROCEDURE', 'end');
707: end;

Line 725: ad_zd_log.clear;

721: procedure PREPARE(X_MODE in varchar2 default NULL) is
722: C_MODULE varchar2(80) := c_package||'prepare';
723: begin
724: log(c_module, 'PROCEDURE', 'begin: '||x_mode);
725: ad_zd_log.clear;
726:
727: -- Clear ALL ddls
728: ad_zd_parallel_exec.cleanup;
729:

Line 728: ad_zd_parallel_exec.cleanup;

724: log(c_module, 'PROCEDURE', 'begin: '||x_mode);
725: ad_zd_log.clear;
726:
727: -- Clear ALL ddls
728: ad_zd_parallel_exec.cleanup;
729:
730: -- TODO: verify EBS_LOGON trigger exists and is enabled.
731:
732: -- Check freespace: does not work

Line 742: ad_zd.create_edition;

738:
739: log(c_module, 'EVENT', 'Prepare System');
740:
741: -- Create Patch Edition
742: ad_zd.create_edition;
743:
744: log(c_module, 'PROCEDURE', 'end');
745: -- commit;
746: end;

Line 767: ad_zd_table.finalize;

763:
764: log(c_module, 'EVENT', 'Finalize System');
765:
766: -- Finalize sub components
767: ad_zd_table.finalize;
768: ad_zd_mview.finalize;
769:
770: -- Get post-finalize stats
771: if (x_mode = 'FULL') then

Line 768: ad_zd_mview.finalize;

764: log(c_module, 'EVENT', 'Finalize System');
765:
766: -- Finalize sub components
767: ad_zd_table.finalize;
768: ad_zd_mview.finalize;
769:
770: -- Get post-finalize stats
771: if (x_mode = 'FULL') then
772: dbms_stats.gather_fixed_objects_stats;

Line 829: l_edition := ad_zd.get_edition('PATCH');

825: begin
826: log(c_module, 'PROCEDURE', 'begin: '||x_mode);
827:
828: -- If there is a Patch Edition, then we must be in it
829: l_edition := ad_zd.get_edition('PATCH');
830: if (l_edition is not null) and (l_edition <> sys_context('userenv', 'current_edition_name')) then
831: error(c_module, 'Cutover can only be run from the Patch Edition.');
832: end if;
833:

Line 841: ad_zd_parallel_exec.execute('CUTOVER', 1, 1, NULL);

837: if (x_mode is null) then
838: log(c_module, 'EVENT', 'Executing CUTOVER actions');
839:
840: -- Execute stored CUTOVER DDL
841: ad_zd_parallel_exec.execute('CUTOVER', 1, 1, NULL);
842:
843: -- Cutover sub-components
844: ad_zd_seed.cutover;
845: ad_zd_mview.cutover(x_execute => 1);

Line 844: ad_zd_seed.cutover;

840: -- Execute stored CUTOVER DDL
841: ad_zd_parallel_exec.execute('CUTOVER', 1, 1, NULL);
842:
843: -- Cutover sub-components
844: ad_zd_seed.cutover;
845: ad_zd_mview.cutover(x_execute => 1);
846: end if;
847:
848: -- switch default edition to patch edition

Line 845: ad_zd_mview.cutover(x_execute => 1);

841: ad_zd_parallel_exec.execute('CUTOVER', 1, 1, NULL);
842:
843: -- Cutover sub-components
844: ad_zd_seed.cutover;
845: ad_zd_mview.cutover(x_execute => 1);
846: end if;
847:
848: -- switch default edition to patch edition
849: if (l_edition is not null) then

Line 884: l_edition := ad_zd.get_edition('RUN');

880: L_EDITION varchar2(30);
881: begin
882: log(c_module, 'PROCEDURE', 'begin: '||x_mode);
883:
884: l_edition := ad_zd.get_edition('RUN');
885: if (l_edition <> sys_context('userenv', 'current_edition_name')) then
886: error(c_module, 'Cleanup can only be run from the Run Edition');
887: end if;
888:

Line 889: if (ad_zd.get_edition('PATCH') is not null) then

885: if (l_edition <> sys_context('userenv', 'current_edition_name')) then
886: error(c_module, 'Cleanup can only be run from the Run Edition');
887: end if;
888:
889: if (ad_zd.get_edition('PATCH') is not null) then
890: error(c_module, 'Cannot Cleanup while Patch Edition exists');
891: end if;
892:
893: log(c_module, 'EVENT', 'Cleanup System');

Line 902: ad_zd_parallel_exec.execute('CLEANUP', 1, 1, NULL);

898: drop_covered_objects;
899: end if;
900:
901: -- Execute stored CLEANUP DDL
902: ad_zd_parallel_exec.execute('CLEANUP', 1, 1, NULL);
903:
904: -- Cleanup sub-components
905: ad_zd_seed.cleanup;
906: ad_zd_table.cleanup(NULL, NULL, x_mode);

Line 905: ad_zd_seed.cleanup;

901: -- Execute stored CLEANUP DDL
902: ad_zd_parallel_exec.execute('CLEANUP', 1, 1, NULL);
903:
904: -- Cleanup sub-components
905: ad_zd_seed.cleanup;
906: ad_zd_table.cleanup(NULL, NULL, x_mode);
907:
908: ad_zd_parallel_exec.cleanup(ad_zd_parallel_exec.c_phase_cutover);
909: ad_zd_parallel_exec.cleanup(ad_zd_parallel_exec.c_phase_abort);

Line 906: ad_zd_table.cleanup(NULL, NULL, x_mode);

902: ad_zd_parallel_exec.execute('CLEANUP', 1, 1, NULL);
903:
904: -- Cleanup sub-components
905: ad_zd_seed.cleanup;
906: ad_zd_table.cleanup(NULL, NULL, x_mode);
907:
908: ad_zd_parallel_exec.cleanup(ad_zd_parallel_exec.c_phase_cutover);
909: ad_zd_parallel_exec.cleanup(ad_zd_parallel_exec.c_phase_abort);
910: if ( x_mode = 'FULL') then

Line 908: ad_zd_parallel_exec.cleanup(ad_zd_parallel_exec.c_phase_cutover);

904: -- Cleanup sub-components
905: ad_zd_seed.cleanup;
906: ad_zd_table.cleanup(NULL, NULL, x_mode);
907:
908: ad_zd_parallel_exec.cleanup(ad_zd_parallel_exec.c_phase_cutover);
909: ad_zd_parallel_exec.cleanup(ad_zd_parallel_exec.c_phase_abort);
910: if ( x_mode = 'FULL') then
911: ad_zd.drop_old_editions();
912: end if;

Line 909: ad_zd_parallel_exec.cleanup(ad_zd_parallel_exec.c_phase_abort);

905: ad_zd_seed.cleanup;
906: ad_zd_table.cleanup(NULL, NULL, x_mode);
907:
908: ad_zd_parallel_exec.cleanup(ad_zd_parallel_exec.c_phase_cutover);
909: ad_zd_parallel_exec.cleanup(ad_zd_parallel_exec.c_phase_abort);
910: if ( x_mode = 'FULL') then
911: ad_zd.drop_old_editions();
912: end if;
913: log(c_module, 'PROCEDURE', 'end');

Line 911: ad_zd.drop_old_editions();

907:
908: ad_zd_parallel_exec.cleanup(ad_zd_parallel_exec.c_phase_cutover);
909: ad_zd_parallel_exec.cleanup(ad_zd_parallel_exec.c_phase_abort);
910: if ( x_mode = 'FULL') then
911: ad_zd.drop_old_editions();
912: end if;
913: log(c_module, 'PROCEDURE', 'end');
914: end;
915:

Line 929: l_edition := ad_zd.get_edition('PATCH');

925: begin
926: log(c_module, 'PROCEDURE', 'begin: '||x_mode);
927:
928: -- Must have Patch Edition
929: l_edition := ad_zd.get_edition('PATCH');
930: if (l_edition is null) then
931: error(c_module, 'There is no Patch Edition to abort.');
932: end if;
933: -- Must be in Run Edition

Line 944: ad_zd_parallel_exec.cleanup('CUTOVER');

940: kill_sessions('PATCH');
941:
942: log(c_module, 'EVENT', 'Aborting Patch Edition');
943: -- Cleanup deferred DDLs that are no longer relevant
944: ad_zd_parallel_exec.cleanup('CUTOVER');
945: ad_zd_parallel_exec.cleanup('CLEANUP');
946:
947: -- Undo any effectively editioned changes
948: ad_zd_seed.abort;

Line 945: ad_zd_parallel_exec.cleanup('CLEANUP');

941:
942: log(c_module, 'EVENT', 'Aborting Patch Edition');
943: -- Cleanup deferred DDLs that are no longer relevant
944: ad_zd_parallel_exec.cleanup('CUTOVER');
945: ad_zd_parallel_exec.cleanup('CLEANUP');
946:
947: -- Undo any effectively editioned changes
948: ad_zd_seed.abort;
949: ad_zd_table.abort;

Line 948: ad_zd_seed.abort;

944: ad_zd_parallel_exec.cleanup('CUTOVER');
945: ad_zd_parallel_exec.cleanup('CLEANUP');
946:
947: -- Undo any effectively editioned changes
948: ad_zd_seed.abort;
949: ad_zd_table.abort;
950:
951: -- Add product specific APIs
952: exec('begin fnd_conc.cancel_patch_requests; end;', c_module, true);

Line 949: ad_zd_table.abort;

945: ad_zd_parallel_exec.cleanup('CLEANUP');
946:
947: -- Undo any effectively editioned changes
948: ad_zd_seed.abort;
949: ad_zd_table.abort;
950:
951: -- Add product specific APIs
952: exec('begin fnd_conc.cancel_patch_requests; end;', c_module, true);
953:

Line 955: ad_zd.retire_edition('PATCH');

951: -- Add product specific APIs
952: exec('begin fnd_conc.cancel_patch_requests; end;', c_module, true);
953:
954: -- Drop Pach Edition
955: ad_zd.retire_edition('PATCH');
956: -- per bug 16237350 - we need to kill again right before the drop edition
957: log(c_module, 'EVENT', 'Killing Patch Edition Sessions');
958: kill_sessions('PATCH');
959: -- end fix for bug 16237350

Line 960: ad_zd.drop_edition('PATCH');

956: -- per bug 16237350 - we need to kill again right before the drop edition
957: log(c_module, 'EVENT', 'Killing Patch Edition Sessions');
958: kill_sessions('PATCH');
959: -- end fix for bug 16237350
960: ad_zd.drop_edition('PATCH');
961:
962: log(c_module, 'PROCEDURE', 'end');
963: end;
964:

Line 982: and e.object_name = ad_zd.get_edition(x_edition_type)

978: , dba_objects_ae e
979: where s.type <> 'BACKGROUND'
980: and p.addr = s.paddr
981: and e.object_id = s.session_edition_id
982: and e.object_name = ad_zd.get_edition(x_edition_type)
983: and e.object_type = 'EDITION';
984: begin
985: log(c_module, 'PROCEDURE', 'begin: ');
986:

Line 994: end AD_ZD;

990:
991: log(c_module, 'PROCEDURE', 'end');
992: end;
993:
994: end AD_ZD;