--
--  Copyright (c) Oracle Corporation 1998.  All Rights Reserved, Worldwide.
--

-- 
-- XRB public schema object setup for Reports Express support
--

--
-- Drop existing objects
--
DROP SEQUENCE XRB_report_id;
DROP PUBLIC SYNONYM XRB_report_id;
DROP PUBLIC SYNONYM XRB_lib;
DROP LIBRARY  XRB_lib;

--
-- Create the add-in library
--
CREATE LIBRARY XRB_lib AS 'XRB60.DLL';
/

--
-- Create public synonym for XRB_lib
--
CREATE PUBLIC SYNONYM XRB_lib for XRB_lib;

-- 
-- Grant execute to PUBLIC
--
GRANT EXECUTE ON XRB_lib TO PUBLIC;

--
-- Report id sequence generator
--
CREATE SEQUENCE XRB_report_id
       START WITH 0
       INCREMENT BY 1
       MINVALUE 0
       MAXVALUE 2147483647  -- Maximum +ve value of a NATURAL number
       CYCLE;

--
-- Create public synonym for sequence
--
CREATE PUBLIC SYNONYM XRB_report_id for XRB_report_id;


--
-- Grant synonym to PUBLIC
--
GRANT SELECT ON XRB_report_id TO PUBLIC;





