|
Code Listing 4: Code to create a folder for storing CD XML documents
BEGIN
IF DBMS_XDB.CREATEFOLDER('/CD') THEN
DBMS_OUTPUT.PUT_LINE ('Success!');
ELSE
DBMS_OUTPUT.PUT_LINE ('Failure!');
END IF;
Grant all privileges to owner, and read privs to PUBLIC
dbms_xdb.setAcl('/CD','/sys/acls/bootstrap_acl.xml');
Change ownership of the new folder from SYSTEM to GENNICK
update resource_view
set res = updateXml(res,'/Resource/Owner/text()','GENNICK')
where any_path = '/CD';
It's vital to commit, or you won't see the folder
COMMIT;
END;
/
|