Version Control

The DBMS_XDB_VERSION and DBMS_XDB PL/SQL packages provide a way to create and manage a Version Controlled Resource (VCR) in XML DB Repository.

When an XML DB Repository resource is turned into a VCR, a flag is set to mark it as a VCR and the current resource becomes the initial version.

To make an XML DB Repository resource versioned, run the following command (create_vcr.sql):

Listing 3-13 Creating a VCR from an XML DB Repository Resource

declare

     v_resid DBMS_XDB_VERSION.RESID_TYPE;

begin

     v_resid := dbms_xdb_version.makeversioned(‘/public/chp03/john_smith.xml’);

end;

/

Commit;

You have to commit to complete the preceding operation.

Oracle XML DB Tip: Can I switch a VCR resource back to a non-VCR resource?

No, you ...

Get Oracle Database 11g Building Oracle XML DB Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.