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

ALTER INDEXTYPE

ALTER INDEXTYPE

Purpose

Use the ALTER INDEXTYPE statement to add or drop an operator of the indextype or to modify the implementation type or change the properties of the indextype.

Prerequisites

To alter an indextype in your own or another schema, you must have the ALTER ANY INDEXTYPE system privilege.

To add a new operator, you must have the EXECUTE object privilege on the operator.

To change the implementation type, you must have the EXECUTE object privilege on the new implementation type.

Syntax

alter_indextype::=

 

 

schema

.

 

 

 

ALTER

INDEXTYPE

 

 

indextype

 

 

 

 

 

,

 

 

 

ADD

schema

.

 

 

 

using_type_clause

 

 

 

operator

(

parameter_types

)

DROP

 

 

 

 

;

 

 

 

 

 

 

COMPILE

 

 

 

 

 

 

using_type_clause::=

schema .

USING

implementation_type

Semantics

schema

Specify the name of the schema in which the indextype resides. If you omit schema, Oracle assumes the indextype is in your own schema.

SQL Statements: ALTER CLUSTER to ALTER SEQUENCE 9-85

ALTER INDEXTYPE

indextype

Specify the name of the indextype to be modified.

ADD | DROP

Use the ADD or DROP clause to add or drop an operator.

For schema, specify the schema containing the operator. If you omit schema, Oracle assumes the operator is in your own schema.

For operator, specify the name of the operator supported by the indextype. All the operators listed in this clause should be valid operators.

For parameter_type, list the types of parameters to the operator.

USING Clause

The USING clause lets you specify a new type to provide the implementation for the indextype.

COMPILE

Use this clause to recompile the indextype explicitly. This clause is required only after some upgrade operations, because Oracle normally recompiles the indextype automatically.

Examples

Altering an Indextype: Example The following example adds another operator binding to the TextIndexType indextype created in the CREATE INDEXTYPE statement. TextIndexType can now support a new operator lob_contains with the bindings(CLOB, CLOB):

ALTER INDEXTYPE TextIndexType ADD lob_contains(CLOB, CLOB);

9-86 Oracle9i SQL Reference

ALTER JAVA

ALTER JAVA

Purpose

Use the ALTER JAVA statement to force the resolution of a Java class schema object or compilation of a Java source schema object. (You cannot call the methods of a Java class before all its external references to Java names are associated with other classes.)

See Also: Oracle9i Java Stored Procedures Developer’s Guide for more information on resolving Java classes and compiling Java sources

Prerequisites

The Java source or class must be in your own schema, or you must have the ALTER ANY PROCEDURE system privilege. You must also have the EXECUTE object privilege on Java classes.

Syntax

alter_java::=

 

SOURCE

schema

.

ALTER

JAVA

 

object_name

 

CLASS

 

 

,schema_name

RESOLVER

(

(

match_string

)

)

COMPILE

 

 

 

 

 

 

 

 

RESOLVE

 

 

 

 

 

 

 

;

 

 

 

 

 

 

 

 

 

 

 

 

 

invoker_rights_clause

 

invoker_rights_clause::=

CURRENT_USER

AUTHID

DEFINER

SQL Statements: ALTER CLUSTER to ALTER SEQUENCE 9-87

ALTER JAVA

Semantics

JAVA SOURCE

Use ALTER JAVA SOURCE to compile a Java source schema object.

JAVA CLASS

Use ALTER JAVA CLASS to resolve a Java class schema object.

object_name

Specify a previously created Java class or source schema object. Use double quotation marks to preserve loweror mixed-case names.

RESOLVER

The RESOLVER clause lets you specify how schemas are searched for referenced fully specified Java names, using the mapping pairs specified when the Java class or source was created.

See Also: CREATE JAVA on page 13-98 and "Resolving a Java

Class: Example" on page 9-89

RESOLVE | COMPILE

RESOLVE and COMPILE are synonymous keywords. They let you specify that Oracle should attempt to resolve the primary Java class schema object.

When applied to a class, resolution of referenced names to other class schema objects occurs.

When applied to a source, source compilation occurs.

invoker_rights_clause

The invoker_rights_clause lets you specify whether the methods of the class execute with the privileges and in the schema of the user who defined it or with the privileges and in the schema of CURRENT_USER.

This clause also determines how Oracle resolves external names in queries, DML operations, and dynamic SQL statements in the member functions and procedures of the type.

9-88 Oracle9i SQL Reference

ALTER JAVA

AUTHID CURRENT_USER Specify CURRENT_USER if you want the methods of the class to execute with the privileges of CURRENT_USER. This clause is the default and creates an "invoker-rights class."

This clause also specifies that external names in queries, DML operations, and dynamic SQL statements resolve in the schema of CURRENT_USER. External names in all other statements resolve in the schema in which the methods reside.

AUTHID DEFINER Specify DEFINER if you want the methods of the class to execute with the privileges of the user who defined it.

This clause also specifies that external names resolve in the schema where the methods reside.

See Also:

Oracle9i Database Concepts and Oracle9i Application Developer’s Guide - Fundamentals for information on how CURRENT_USER is determined

Oracle9i Java Stored Procedures Developer’s Guide

Example

Resolving a Java Class: Example The following statement forces the resolution of a Java class:

ALTER JAVA CLASS "Agent"

RESOLVER (("/home/java/bin/*" pm)(* public))

RESOLVE;

SQL Statements: ALTER CLUSTER to ALTER SEQUENCE 9-89

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