The following lines contain the word 'select', 'insert', 'update' or 'delete':
updated back, released and commit is issued. this is like db releasing locks on commit
*/
/*
get object lock (10g)
g_locked_objects.delete; happens when commit_aw happens
g_locked_objects.delete;
g_locked_objects.delete;
g_locked_objects.delete;
even if we have attached objects in multi mode, we can simply use update instead of update multi
--
from olap doc:
When you do not specify any parameters, the command updates all analytic
workspaces that are attached in read/write non-exclusive and read/write exclusive
modes and all acquired objects (that is, all acquired variables, relations, valuesets,
and dimensions) in all analytic workspaces that are attached in multiwriter mode.
--
*/
procedure commit_aw is
Begin
commit_aw(p_options=>null);
g_locked_objects.delete;
update_aw;
this procedure will update and commit selected objects
this is called from kpi loading just before measures are aggregated in parallel. the main process
will still lock the limit cubes, but must release the measure cubes
*/
procedure commit_aw(p_locked_objects dbms_sql.varchar2_table) is
Begin
commit_aw(p_locked_objects=>p_locked_objects,p_options=>null);
when we aggregate measures in parallel, just prior to aggregating the measures, we would like to update all the objects
so far, but we would not like the lock to be released
*/
procedure commit_aw(p_locked_objects dbms_sql.varchar2_table,p_options varchar2) is
Begin
commit_aw_multi(p_locked_objects);
when we update object by object, for dim, interdependency is complex. a child level cannot be updated without
the parent. so we will loop and update
this does not work. we have to try and create 1 stmt with all objects and see if that works
we got errors like
update multi BSC_CCDIM_100_101_102_103.levels (S: 04/13/2005 18:30:06 ,E: 04/13/2005 18:30:07 )
update multi BSC_D_BUG_COMPONENTS_AW (S: 04/13/2005 18:30:07
Exception in execute update multi BSC_D_BUG_COMPONENTS_AW ORA-37023: Object BSC_AW!BSC_D_BUG_COMPONENTS_AW
cannot be updated without dimension BSC_AW!BSC_D_MANAGER_AW.
*/
procedure commit_aw_multi is
Begin
commit_aw_multi(g_locked_objects);
l_update_stmt varchar2(5000);
l_multi_update boolean;
l_multi_update:=false;
l_update_stmt:='update multi ';
l_multi_update:=true;
if length(l_update_stmt||' '||p_locked_objects(i))<4000 then
l_update_stmt:=l_update_stmt||' '||p_locked_objects(i);
l_multi_update:=false;
if l_multi_update then
bsc_aw_dbms_aw.execute(l_update_stmt);
update_aw;
g_locked_objects.delete;
bsc_aw_utility.g_options.delete;
g_locked_objects.delete;
bsc_aw_dbms_aw.execute('aw delete '||p_name);
g_lock_set(p_set_name).locked_objects.delete;
procedure update_aw is
Begin
bsc_aw_utility.add_sqlerror(-34684,'ignore',null);--ignore if the ws is not alreay attached and there are no objects to update
bsc_aw_dbms_aw.execute('update');
log_n('Exception in update_aw '||sqlerrm);