rem
rem  $Id: debild.sql,v 1.1 1998/01/08 01:40:17 yxia Exp $
rem
rem  Copyright (c) Oracle Corporation 1991.  All Rights Reserved, Worldwide.
rem 
rem  debild.sql
rem
rem  This script installs the DE product specific  tables in a
rem  central location (usually SYSTEM) and builds views and public
rem  synonyms that allow the tables to be shared, yet guarantee security.
rem
rem  Note that this file must be loaded AFTER toolicen.sql has been
rem  loaded to install the TOOLS COMMON SCHEMA.
rem

rem  +-----------------------------------------------+
rem  |  DE_ATTACHED_LIBS - PL/SQL Context Attributes |
rem  +-----------------------------------------------*/

create table de__attached__libs
(
  owner      varchar(30),   /* Module Owner                       */
  modid      decimal(10),   /* Module ID                          */
  itemid     decimal(10),   /* Library number (order in list)     */
  libname    varchar(255),  /* Library Name                       */
  location   varchar(30)    /* Library Liocation (FILESYSTEM, DB) */
);

create unique index de_attached_libs_idx on de__attached__libs
(
  owner, modid, itemid
);

create view de_attached_libs as
  select * from de__attached__libs
  where owner = user or modid in (select modid from tool_accessible)
  with check option;

create public synonym de_attached_libs for system.de_attached_libs;

