<budget_ name>!SET_ CYCLE_ START_ ACTION¶
Associates a stored procedure with a budget so that the procedure is called when the budget cycle restarts. The procedure must be associated by reference.
For more information, see Cycle-start actions for budgets.
语法
实参
'stored_procedure_reference'The serialized string representation that resolves to a procedure. This string is the output of the SYSTEM$REFERENCE function.
reference_statementA SYSTEM$REFERENCE statement that creates a reference for the procedure to be associated with the budget.
array_of_arguments要传递给存储过程的实参数组。
array_construct_statementAn ARRAY_CONSTRUCT statement that returns an array constructed from zero, one, or more inputs.
返回
返回一个 VARCHAR 值,用于指明过程是否已成功与预算相关联。
如果无法将过程与预算关联,该方法将返回一条错误消息。
访问控制要求
要为预算调用此方法,需要具备以下权限和角色:
- ADMIN instance role for the budget instance.
- 对包含预算实例的数据库和架构的 USAGE 权限。
- 对包含存储过程的数据库和架构的 USAGE 权限。
- 对存储过程的 USAGE 权限。
For more information, see Budgets roles and privileges.
使用说明
Calling this method does not return the object. Because of this, you can’t use method chaining to call another method on the return value of this method. Instead, call each method in a separate SQL statement.
示例
Associate the reset_resources stored procedure with the budget_db.sch1.my_budget budget so that it is
called when the budget cycle restarts:
Associate the enable_access stored procedure with the budget_db.sch1.my_budget budget so that it is called when
the budget cycle restarts: