Use the ALTER LIBRARY command to change a user-defined shared library. You can use this command to change properties such as the loading method, dependencies, owner, and object files.
You cannot change the library name by using this command. To change a library name, you must drop the library and create a library with the new name.
ALTER LIBRARY library_name
[ AUTOMATIC LOAD | MANUAL LOAD ]
[NO DEPENDENCIES| DEPENDENCIES deplibs]
[ EXTERNAL HOST OBJECT 'host_object_filename' ]
[ EXTERNAL SPU OBJECT 'SPU_object_filename' ]
ALTER LIBRARY library_name OWNER TO name
| Input | Description |
|---|---|
| library_name | The name of the library that you want to change. You must be
connected to the database where the library is defined. You cannot
change the name by using this command. For systems that support multiple schemas, you can specify a name in the format schema.library to change a library in a different schema of the current database. You cannot change a library in a different database. |
| [AUTOMATIC LOAD | MANUAL LOAD] | Automatic load specifies that the IBM® Netezza® system automatically opens the library before any objects that depend on it is used. Manual load specifies that the UDX is responsible for opening and closing manual load libraries when they are needed. |
| DEPENDENCIES deplibs | Specifies an optional list of user-defined shared library dependencies for the UDX. You can specify one or a comma-separated list of library names. |
| NO DEPENDENCIES | Specifies that there are no dependencies for the UDX, which is the default if DEPENDENCIES deplibs is omitted. You can use this option to clear any previous dependencies declared for the UDX. |
| EXTERNAL HOST OBJECT 'host_object_filename' | Specifies the path name to the compiled host object file of the shared library. |
| EXTERNAL SPU OBJECT 'SPU_object_filename' | Specifies the path name to the compiled object file of the shared library for the Linux SPU environment. Specify the spu10 compiled object for Rev10 SPUs on IBM Netezza 100 and Netezza 1000 models. |
| Output | Description |
|---|---|
| ALTER LIBRARY | The message that is returned if the command is successful. |
| ERROR: Unable to calculate cksum for file filename | The message that is returned if the object file path name cannot be resolved to a file. |
| ERROR: lookupLibrary: library libname does not exist | The message that the system returns if the specified shared library does not exist in the current database. |
You cannot alter a user-defined library that is in use in an active query. After the active query transaction completes, the Netezza system processes the ALTER LIBRARY command to update the library.
ALTER LIBRARY library_name OWNER TO name
MYDB.SCHEMA(MYUSER)=> ALTER LIBRARY mylib MANUAL LOAD;