Skip Headers
Oracle® Database Administrator's Guide
11g Release 2 (11.2)

Part Number E10595-04
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

Managing Editions

Application developers who are upgrading their applications using edition-based redefinition may ask you to perform edition-related tasks that require DBA privileges.

In this section:

About Editions and Edition-Based Redefinition

Edition-based redefinition enables you to upgrade an application's database objects while the application is in use, thus minimizing or eliminating down time. This is accomplished by changing (redefining) database objects in a private environment known as an edition. Only when all changes have been made and tested do you make the new version of the application available to users.

See Also:

Oracle Database Advanced Application Developer's Guide for a complete discussion of edition-based redefinition

DBA Tasks for Edition-Based Redefinition

Table 17-1 summarizes the edition-related tasks that require privileges typically granted only to DBAs. Any user that is granted the DBA role can perform these tasks.

Table 17-1 DBA Tasks for Edition-Based Redefinition

Task See

Grant or revoke privileges to create, alter, and drop editions

The CREATE EDITION and DROP EDITION commands in Oracle Database SQL Language Reference

Enable editions for a schema

Oracle Database Advanced Application Developer's Guide

Set the database default edition

"Setting the Database Default Edition"


Setting the Database Default Edition

There is always a default edition for the database. This is the edition that a database session initially uses if it does not explicitly indicate an edition when connecting.

To set the database default edition: 

  1. Connect to the database as a user with the ALTER DATABASE privilege.

  2. Enter the following statement:

    ALTER DATABASE DEFAULT EDITION = edition_name;
    

Querying the Database Default Edition

The database default edition is stored as a database property.

To query the database default edition: 

  1. Connect to the database as any user.

  2. Enter the following statement:

    SELECT PROPERTY_VALUE FROM DATABASE_PROPERTIES WHERE 
       PROPERTY_NAME = 'DEFAULT_EDITION';
    
    PROPERTY_VALUE
    ------------------------------
    ORA$BASE
    

Note:

The property name DEFAULT_EDITION is case sensitive and must be supplied as upper case.

Using an Edition

If you want to view or modify objects in a particular edition, you must use the edition first. You can specify an edition to use when you connect to the database. If you do not specify an edition, your session starts in the database default edition. To use a different edition, submit the following statement:

ALTER SESSION SET EDITION=edition_name;

The following statements first set the current edition to e2 and then to ora$base:

ALTER SESSION SET EDITION=e2;
...
ALTER SESSION SET EDITION=ora$base;

See Also:

Editions Data Dictionary Views

There are several data dictionary views that aid with managing editions. The following table lists three of them. For a complete list, see Oracle Database Advanced Application Developer's Guide.

View Description
*_EDITIONS Lists all editions in the database. (Note: USER_EDITIONS does not exist.)
*_OBJECTS Describes every object in the database that is visible (actual or inherited) in the current edition.
*_OBJECTS_AE Describes every actual object in the database, across all editions.