From Metalink note: 602111.1

-----------------------

connect scott/tiger

CREATE TABLE "SCOTT"."DS_CONFIG" (
"ID" NUMBER NOT NULL, 
"TITLE" VARCHAR2(100 byte) NOT NULL, 
"MENU" VARCHAR2(50 byte) NOT NULL, 
"DESCRIPTION" VARCHAR2(200 byte), 
"CODE" VARCHAR2(3 byte) NOT NULL, 
"LOB_TABLE" VARCHAR2(1024 byte) NOT NULL, 
"LOB_FIELD" VARCHAR2(100 byte) NOT NULL, 
"ISBLOB" CHAR(1byte) NOT NULL, 
"DOC_TYPE" VARCHAR2(4 byte), 
"TYPE_FIELD" VARCHAR2(100 byte), 
"ROLE" VARCHAR2(50 byte), 
"KEY_FIELD" VARCHAR2(100 byte) NOT NULL, 
"KEY_TYPE" CHAR(1 byte) NOT NULL,
"BROWSE_TABLE" VARCHAR2(1024 byte) NOT NULL, 
"BROWSE_ORDER" VARCHAR2(250 byte), 
"ISPROD" CHAR(1 byte), 
CONSTRAINT "DS_CONFIG_PK" PRIMARY KEY("ID") 
USING INDEX 
TABLESPACE "USERS" 
STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS 
2147483645 PCTINCREASE 0) PCTFREE 10 INITRANS 2 MAXTRANS 255 
NOVALIDATE, 
CONSTRAINT "DS_CONFIG__ISBLOB" CHECK("ISBLOB" IN ('T','F'))) 
TABLESPACE "USERS" PCTFREE 10 PCTUSED 0 INITRANS 1 
MAXTRANS 255 
STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS 
2147483645 PCTINCREASE 0);

connect / as sysdba

CREATE OR REPLACE VIEW "SCOTT"."DS_ROLES" ("ROLE","GRANTEE",
"CODE","MENU") AS 
SELECT DISTINCT c1.ROLE, p1.GRANTEE,c1.CODE, c1.menu 
FROM SYS.DBA_ROLE_PRIVS p1 
LEFT JOIN DBA_ROLE_PRIVS p2 ON p1.granted_role = p2.grantee 
LEFT JOIN DBA_ROLE_PRIVS p3 ON p2.granted_role = p3.grantee 
LEFT JOIN DBA_ROLE_PRIVS p4 ON p3.granted_role = p4.grantee 
LEFT JOIN DBA_ROLE_PRIVS p5 ON p4.granted_role = p5.grantee 
LEFT JOIN SCOTT.DS_CONFIG c1 ON c1.role = p1.granted_role OR c1.role = p2.granted_role OR 
c1.role = p3.granted_role OR c1.role = p4.granted_role OR c1.role = p5.granted_role 
WHERE p1.GRANTEE LIKE 'OPS$%' AND c1.ID IS NOT NULL;
