Oracle® Database SQL Language Reference 11g Release 2 (11.2) Part Number E10592-02 |
|
|
View PDF |
Purpose
Use the CREATE
LIBRARY
statement to create a schema object associated with an operating-system shared library. The name of this schema object can then be used in the call_spec
of CREATE
FUNCTION
or CREATE
PROCEDURE
statements, or when declaring a function or procedure in a package or type, so that SQL and PL/SQL can call to third-generation-language (3GL) functions and procedures.
See Also:
CREATE FUNCTION and Oracle Database PL/SQL Language Reference for more information on functions and proceduresPrerequisites
To create a library in your own schema, you must have the CREATE
LIBRARY
system privilege. To create a library in another user's schema, you must have the CREATE
ANY
LIBRARY
system privilege. To use the procedures and functions stored in the library, you must have the EXECUTE
object privilege on the library.
The CREATE
LIBRARY
statement is valid only on platforms that support shared libraries and dynamic linking.
Syntax
Libraries are defined using PL/SQL. Therefore, the syntax diagram in this book shows only the SQL keywords. Please refer to Oracle Database PL/SQL Language Reference for the PL/SQL syntax, semantics, and examples.
create_library::=
(plsql_source
: See Oracle Database PL/SQL Language Reference.)
Semantics
Specify OR
REPLACE
to re-create the library if it already exists. Use this clause to change the definition of an existing library without dropping, re-creating, and regranting object privileges granted on it.
Users who had previously been granted privileges on a redefined library can still access the library without being regranted the privileges.
plsql_source
See Oracle Database PL/SQL Language Reference for the syntax and semantics of the plsql_source
.