Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Semestr2 / 1 - Oracle / Oracle selected docs / SQL reference.pdf
Скачиваний:
24
Добавлен:
12.05.2015
Размер:
11.92 Mб
Скачать

DROP ROLE

DROP ROLE

Purpose

Use the DROP ROLE statement to remove a role from the database. When you drop a role, Oracle revokes it from all users and roles to whom it has been granted and removes it from the database. User sessions in which the role is already enabled are not affected. However, no new user session can enable the role after it is dropped.

See Also:

CREATE ROLE on page 14-79 for information on creating roles

ALTER ROLE on page 9-134 for information on changing the authorization needed to enable a role

SET ROLE on page 18-47 for information on disabling roles for the current session

Prerequisites

You must have been granted the role with the ADMIN OPTION or you must have the DROP ANY ROLE system privilege.

Syntax

drop_role::=

DROP ROLE role ;

Semantics

role

Specify the name of the role to be dropped.

Example

Dropping a Role: Example To drop the role dw_manager (created in "Creating a Role: Example" on page 14-81), issue the following statement:

DROP ROLE dw_manager;

SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT 16-97

DROP ROLLBACK SEGMENT

DROP ROLLBACK SEGMENT

Purpose

Use the DROP ROLLBACK SEGMENT to remove a rollback segment from the database. When you drop a rollback segment, all space allocated to the rollback segment returns to the tablespace.

Note: If your database is running in Automatic Undo Management mode, this is the only valid operation on rollback segments. In that mode, you cannot create or alter a rollback segment.

See Also:

CREATE ROLLBACK SEGMENT on page 14-82 for information on creating a rollback segment

ALTER ROLLBACK SEGMENT on page 9-136 for information on modifying a rollback segment

CREATE TABLESPACE on page 15-80

Prerequisites

You must have the DROP ROLLBACK SEGMENT system privilege.

Syntax

drop_rollback_segment::=

DROP ROLLBACK SEGMENT rollback_segment ;

Semantics

rollback_segment

Specify the name the rollback segment to be dropped.

16-98 Oracle9i SQL Reference

DROP ROLLBACK SEGMENT

Restrictions on Dropping Rollback Segments

You can drop a rollback segment only if it is offline. To determine whether a rollback segment is offline, query the data dictionary view DBA_ROLLBACK_ SEGS. Offline rollback segments have the value AVAILABLE in the STATUS column. You can take a rollback segment offline with the OFFLINE clause of the ALTER ROLLBACK SEGMENT statement.

You cannot drop the SYSTEM rollback segment.

Example

Dropping a Rollback Segment: Example The following statement drops the rollback segment rbs_ts:

DROP ROLLBACK SEGMENT rbs_ts;

SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT 16-99

DROP ROLLBACK SEGMENT

16-100 Oracle9i SQL Reference

Соседние файлы в папке Oracle selected docs