BIGSQL_AUTO_ANALYZE_STATUS stored procedure
The BIGSQL_AUTO_ANALYZE_STATUS stored procedure returns the status of auto-analyze tasks.
Authorization
Any user can run this SYSHADOOP procedure.
Syntax
Description
- schema
- Specifies a schema name to use when filtering the results. The name must be enclosed by single quotation marks. You can use the wild card character %. If the results are not to be filtered, specify the null value.
- table
- Specifies a table name to use when filtering the results. The name must be enclosed by single quotation marks. You can use the wild card character %. If the results are not to be filtered, specify the null value.
Usage notes
The BIGSQL_AUTO_ANALYZE_STATUS procedure returns only information about auto-analyze tasks. To see the status or history of other ATS tasks, query the SYSTOOLS.ADMIN_TASK_STATUS or SYSTOOLS.ADMIN_TASK_LIST views. These views show all ATS tasks. For more information, see ADMIN_TASK_STATUS, ADMIN_TASK_LIST, or ANALYZE command.
Example
- Get the status of all auto-analyze tasks. Successful auto-analyze tasks show a status of
COMPLETE
and SQLCODE 0. Tasks that are running show a status ofRUNNING
. Tasks that are waiting to run show a status andEND_TIME
value ofNULL
. If an error was encountered, theSQLCODE
,SQLSTATE
, andMESSAGE
columns contain information about the failure.CALL SYSHADOOP.BIGSQL_AUTO_ANALYZE_STATUS(NULL, NULL);
+------------+--------+---------------+----------+------------+------------+---------+----------+-------------------------+ | TASKNAME | TASKID | ANALYZE_INPUT | STATUS | BEGIN_TIME | END_TIME | SQLCODE | SQLSTATE | MESSAGE | +------------+--------+---------------+----------+------------+------------+---------+----------+-------------------------+ | Analyze | 102 | VALUES('BIGSQ | COMPLETE | 2016-03-25 | 2016-03-25 | 0 | | SQL0000W | | | | | | | | | | Statement processing | | 1458949355 | | L','HCOUNTRY_ | | 16:50:34.1 | 16:50:46.8 | | | was successful. | | 682 | | FILE',10, | | 12 | 31 | | | | | BIGSQL.HCO | | NULL) | | | | | | | | UNTRY_FILE | | | | | | | | | |-------------------------------------------------------------------------------------------------------------------------| | Analyze | 83 | VALUES('TEST' | COMPLETE | 2016-03-24 | 2016-03-24 | 0 | | SQL0000W | | | | | | | | | | Statement processing | | 1458912345 | | ,'GENDATA_1YR | | 18:09:18.3 | 18:10:23.7 | | | was successful. | | TEST.GENDA | | ',10,NULL) | | 84 | 58 | | | | | TA_1YR | | | | | | | | | |-------------------------------------------------------------------------------------------------------------------------| | Analyze | 42 | VALUES('UIUSE | COMPLETE | 2016-03-17 | 2016-03-17 | 0 | | SQL0000W | | | | | | | | | | Statement processing | | 1458912222 | | R','T_UIUSER' | | 11:17:39.2 | 11:18:37.9 | | | was successful. | | UIUSER.T_U | | ,10,NULL) | | 81 | 45 | | | | | IUSER | | | | | | | | | |-------------------------------------------------------------------------------------------------------------------------| | Analyze | 84 | VALUES('TEST' | COMPLETE | 2016-03-24 | 2016-03-24 | -4302 | 58040 | SQL4302N Procedure or | | 1458987654 | | ,'BAD',10,NUL | | 19:04:19.0 | 19:15:52.3 | | | user-defined function | | TEST.BAD | | L) | | 45 | 47 | | |"SYSHADOOP.BIGSQL_RUN_A",| | | | | | | | | | specific name | | | | | | | | | | "BIGSQL_RUN_ANALYZE" | | | | | | | | | |aborted with | | | | | | | | | | an exception | | | | | | | | | | "[BSL-0-48470644E] | | | | | | | | | | Error run". | +------------+--------+---------------+----------+------------+------------+---------+----------+-------------------------+