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;

/


E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy