rem
rem $Header: /s/rw/994/spam/precious/files/ACTIVE/srw253a.sql,v 1.1 1998/11/03 06:58:02 yxia Exp $
rem
rem  Copyright (c) Oracle Corporation 1995.  All Rights Reserved, Worldwide.
rem
rem  srw253a.sql
rem
rem  This script is to upgrade a database which is set up for earlier 
rem  2.5.3.x report storage to 2.5.3.6. To upgrade from before-2.5.3 
rem  versions, please run other upgrade scripts first.
rem 
rem  The change made by this script is to support the Oralce types
rem  used in Trusted Oracle and Trusted OS. People who are not using
rem  trusted environment may not need to run this script.
rem 
rem  After run this script, do not forget to run srw2grnt.sql to grant
rem  the Reports tables to necessary users again.
rem

rem  +-------------------------+
rem  |  Update to SRW2_COLUMN  |
rem  +-------------------------+

drop view srw2_column;
drop index srw2_column_idx;
drop public synonym srw2_column;

alter table srw2__column modify
(
  odata_type decimal(4)      /* Oracle datatype */
);

create unique index srw2_column_idx on srw2__column
(
  owner, modid, itemid
);

create view srw2_column as
  select * from srw2__column
  where owner = user or modid in
  (select modid from tool_accessible where product='SQL*ReportWriter')
  with check option;

create public synonym srw2_column for system.srw2_column;

rem  +-----------------------------+
rem  |  Update to SRW2_ELEMENT      |
rem  +-----------------------------+

drop view srw2_element;
drop index srw2_element_idx;
drop public synonym srw2_element;

alter table srw2__element modify
(
  odata_type decimal(4)      /* Oracle datatype */
);

create unique index srw2_element_idx on srw2__element
(
  owner, modid, itemid
);

create view srw2_element as
  select * from srw2__element
  where owner = user or modid in
  (select modid from tool_accessible where product='SQL*ReportWriter')
  with check option;

create public synonym srw2_element for system.srw2_element;

rem  +-----------------------------+
rem  |  To Commit                  |
rem  +-----------------------------+

commit;



