DBA Data[Home] [Help]

APPS.MSD_AW_RENAME dependencies on AD_ZD_LOG

Line 34: ad_zd_log.message('ODP','EVENT','Entered into RENAME_AW ');

30:
31:
32: begin
33:
34: ad_zd_log.message('ODP','EVENT','Entered into RENAME_AW ');
35:
36: v_stmt_str := 'select sid as session_id, serial# as serial_no, owner as session_owner from ' ||
37: 'all_aws daws,v$aw_olap vawo,v$session '||
38: ' where daws.aw_number=vawo.aw_number and sid=vawo.session_id '||

Line 51: ad_zd_log.message('ODP','EVENT','Entered into RENAME_AW - PATCH_EDITION_EXISTS');

47: v_stmt_str1:= 'select 1 from all_aws where AW_NAME=''' || patch_edition_name||'''';
48: execute immediate v_stmt_str1 into PATCH_EDITION_EXISTS;
49: if PATCH_EDITION_EXISTS = 1 then
50:
51: ad_zd_log.message('ODP','EVENT','Entered into RENAME_AW - PATCH_EDITION_EXISTS');
52: select user into current_user_name from dual;
53:
54: ad_zd_log.message('ODP','INFORMATION','Executing RENAME_AW as "'||current_user_name||'" user.');
55:

Line 54: ad_zd_log.message('ODP','INFORMATION','Executing RENAME_AW as "'||current_user_name||'" user.');

50:
51: ad_zd_log.message('ODP','EVENT','Entered into RENAME_AW - PATCH_EDITION_EXISTS');
52: select user into current_user_name from dual;
53:
54: ad_zd_log.message('ODP','INFORMATION','Executing RENAME_AW as "'||current_user_name||'" user.');
55:
56: -- Detach PATCH EDITION AW
57: begin
58: dbms_aw.aw_detach(patch_edition_name);

Line 64: ad_zd_log.message('ODP','EXCEPTION',err_msg);

60: when others then
61: --null;
62: if SQLCODE <> -34344 then
63: err_msg := 'Exception - '||aw_name||' - Detach Patch Edition - '||SQLCODE||' -ERROR- '||SQLERRM;
64: ad_zd_log.message('ODP','EXCEPTION',err_msg);
65: end if;
66: end;
67:
68: -- Detach RUN EDITION AW

Line 76: ad_zd_log.message('ODP','EXCEPTION',err_msg);

72: when others then
73: --null;
74: if SQLCODE <> -34344 then
75: err_msg := 'Exception -'||aw_name||' - Detach Run Edition - '||SQLCODE||' -ERROR- '||SQLERRM;
76: ad_zd_log.message('ODP','EXCEPTION',err_msg);
77: end if;
78: end;
79:
80: -- Delete the old backup of the AW

Line 89: ad_zd_log.message('ODP','INFORMATION',err_msg);

85: --null;
86: if SQLCODE = -33262
87: then
88: err_msg := 'Delete BackUp- Backup for the AW '||aw_name||' does not exist ';
89: ad_zd_log.message('ODP','INFORMATION',err_msg);
90: else
91: err_msg := 'Delete BackUp- '||aw_name||' - '||SQLCODE||' -ERROR- '||SQLERRM;
92: ad_zd_log.message('ODP','EXCEPTION',err_msg);
93: end if;

Line 92: ad_zd_log.message('ODP','EXCEPTION',err_msg);

88: err_msg := 'Delete BackUp- Backup for the AW '||aw_name||' does not exist ';
89: ad_zd_log.message('ODP','INFORMATION',err_msg);
90: else
91: err_msg := 'Delete BackUp- '||aw_name||' - '||SQLCODE||' -ERROR- '||SQLERRM;
92: ad_zd_log.message('ODP','EXCEPTION',err_msg);
93: end if;
94:
95: end;
96:

Line 102: ad_zd_log.message('ODP','EVENT','Entered into KILL SESSIONS LOOP ');

98: begin
99: OPEN Attached_aws FOR v_stmt_str;
100: loop
101:
102: ad_zd_log.message('ODP','EVENT','Entered into KILL SESSIONS LOOP ');
103: FETCH Attached_aws into session_id, serial_no, session_owner;
104: exit when Attached_aws%NOTFOUND;
105: alter_sql:='ALTER SYSTEM KILL SESSION '''||session_id||','||serial_no||'''';
106: ad_zd_log.message('ODP','EVENT','SESSION OWNER - '||session_owner);

Line 106: ad_zd_log.message('ODP','EVENT','SESSION OWNER - '||session_owner);

102: ad_zd_log.message('ODP','EVENT','Entered into KILL SESSIONS LOOP ');
103: FETCH Attached_aws into session_id, serial_no, session_owner;
104: exit when Attached_aws%NOTFOUND;
105: alter_sql:='ALTER SYSTEM KILL SESSION '''||session_id||','||serial_no||'''';
106: ad_zd_log.message('ODP','EVENT','SESSION OWNER - '||session_owner);
107: Execute immediate alter_sql;
108: ad_zd_log.message('ODP','EVENT','Killed session '||session_id);
109:
110: end loop;

Line 108: ad_zd_log.message('ODP','EVENT','Killed session '||session_id);

104: exit when Attached_aws%NOTFOUND;
105: alter_sql:='ALTER SYSTEM KILL SESSION '''||session_id||','||serial_no||'''';
106: ad_zd_log.message('ODP','EVENT','SESSION OWNER - '||session_owner);
107: Execute immediate alter_sql;
108: ad_zd_log.message('ODP','EVENT','Killed session '||session_id);
109:
110: end loop;
111:
112: close Attached_aws;

Line 118: ad_zd_log.message('ODP','EXCEPTION',err_msg);

114: exception
115: when others then
116: --null;
117: err_msg := 'Exception - '||aw_name||' - KILL SESSIONS - '||session_id ||'- '||SQLCODE||' -ERROR- '||SQLERRM;
118: ad_zd_log.message('ODP','EXCEPTION',err_msg);
119: end;
120:
121: -- Rename the AWs
122: begin

Line 124: ad_zd_log.message('ODP','EVENT','Backup Created - '||backup_name);

120:
121: -- Rename the AWs
122: begin
123: dbms_aw.aw_rename(aw_name,backup_name); -- Keep a backup of the RUN EDITION
124: ad_zd_log.message('ODP','EVENT','Backup Created - '||backup_name);
125: dbms_aw.aw_rename(patch_edition_name,aw_name); -- Rename the patch edition to RUN edition
126: ad_zd_log.message('ODP','EVENT','Executed rename for AW - '||aw_name);
127: exception
128: when others then

Line 126: ad_zd_log.message('ODP','EVENT','Executed rename for AW - '||aw_name);

122: begin
123: dbms_aw.aw_rename(aw_name,backup_name); -- Keep a backup of the RUN EDITION
124: ad_zd_log.message('ODP','EVENT','Backup Created - '||backup_name);
125: dbms_aw.aw_rename(patch_edition_name,aw_name); -- Rename the patch edition to RUN edition
126: ad_zd_log.message('ODP','EVENT','Executed rename for AW - '||aw_name);
127: exception
128: when others then
129: --null;
130: err_msg := 'Exception - '||aw_name||' -Rename Patch Edition - '||SQLCODE||' -ERROR- '||SQLERRM;

Line 131: ad_zd_log.message('ODP','EXCEPTION', err_msg);

127: exception
128: when others then
129: --null;
130: err_msg := 'Exception - '||aw_name||' -Rename Patch Edition - '||SQLCODE||' -ERROR- '||SQLERRM;
131: ad_zd_log.message('ODP','EXCEPTION', err_msg);
132: end;
133:
134: end if;
135:

Line 136: ad_zd_log.message('ODP','EVENT','Exit from RENAME_AW ');

132: end;
133:
134: end if;
135:
136: ad_zd_log.message('ODP','EVENT','Exit from RENAME_AW ');
137:
138: end rename_aw;
139:
140: END MSD_AW_RENAME;