EXECUTE SCRIPT
Purpose
Use this statement to execute a scripting program.
Prerequisites
-
You need either the system privilege
USE ANY SCHEMA
or the object privilegeUSAGE
on the target schema, or the schema must be owned by you or one of your assigned roles. - You need either the system privilege
EXECUTE ANY SCRIPT
or the object privilegeEXECUTE
on the scripting program, or the scripting program must be owned by you or one of your assigned roles.
Syntax
execute_script::=
script_param::=
Usage Notes
-
A scripting program can be created and dropped by using the statements CREATE SCRIPT and DROP SCRIPT.
For information about the script language, see Scripting.
-
Content and parameters of a scripting program are integrated in the corresponding system tables (for example, EXA_ALL_SCRIPTS).
For more information, see Metadata System Tables.
-
The return value of a scripting program can be a table or a rowcount. It is specified as option in the CREATE SCRIPT statement.
-
When specifying the option
WITH OUTPUT
, the return value of the scripting program is ignored. In this case always a result table is returned. The table contains all debug messages that are created through the functionoutput()
when the scripting program is executed.For more information, see Debug Output in Scripting.
-
Contrary to views, a scripting program is executed with the privileges of the executing user and not with the privileges of the owner of the scripting program.