The following lines contain the word 'select', 'insert', 'update' or 'delete':
select db_column_name,periodicity_id,periodicity_type,source from bsc_sys_periodicities where calendar_id=p_calendar
and periodicity_type not in (11,12);
g_commands.delete;
bsc_aw_utility.add_g_commands(g_commands,'sql declare c1 cursor for select --');
l_lower_periodicities.delete;
l_upper_periodicities.delete;
bsc_aw_utility.add_g_commands(g_commands,'sql declare c1 cursor for select --');
bsc_aw_utility.add_g_commands(g_commands,'from (select * from bsc_db_calendar where calendar_id='||p_calendar.calendar_id||
' order by calendar_year desc,calendar_month desc,calendar_day desc) where rownum=1');
l_lower_periodicities.delete;
l_source.delete;
bsc_aw_md_api.delete_calendar(p_calendar);
cursor c1 is select current_year from bsc_sys_calendars_b where calendar_id=p_calendar;
bsc_aw_utility.g_options.delete;
cursor c1 is select min(calendar_year)-1,max(calendar_year)+1 from bsc_db_calendar where calendar_id=p_calendar;
l_bsc_olap_object.delete;
bsc_aw_md_api.update_olap_object(l_dim,'dimension',l_dim,'dimension',null,null,'operation_flag','loaded');
bsc_aw_dbms_aw.execute('maintain '||l_olap_object(i).object||' delete all');
bsc_aw_dbms_aw.execute('maintain '||l_olap_object(i).object||' delete all');
bsc_aw_md_api.update_olap_object(l_dim,'dimension',l_dim,'dimension',null,null,'operation_flag','purged');
bsc_aw_dbms_aw.execute('maintain '||l_level_name_dim||' delete '''||l_oor(j).relation_object||'.'||l_oor(j).object||'''');
l_pc.delete;
bsc_aw_utility.delete_aw_object(l_bsc_olap_object(i).olap_object);
bsc_aw_utility.delete_aw_object(l_bsc_olap_object(i).olap_object);
bsc_aw_utility.delete_aw_object(l_bsc_olap_object(i).olap_object);
bsc_aw_utility.delete_aw_object(l_bsc_olap_object(i).olap_object);
l_missing_levels.delete;
l_missing_levels.delete;
l_missing_levels.delete;
l_missing_levels.delete;
we have to acquire locks and update in a certain order . else we get
ORA-37023: (XSMLTUPD01) Object workspace object cannot be updated without dimension workspace object.
we cannot update a relation before a dim. so when we get locks, we first get dim, then relations, then variables
*/
procedure get_calendar_objects_to_lock(p_calendar number,p_lock_objects out nocopy dbms_sql.varchar2_table) is
l_dim varchar2(300);
bsc_aw_md_api.update_olap_object(l_dim,'dimension',l_dim,'dimension',null,null,'operation_flag','empty');