SQL Administration API Overview
Use the SQL administration API to remotely administer HCL OneDB™ through SQL statements.
The SQL administration API consists of two functions: admin() and task(). These functions perform the same operations, but return results in different formats. These functions take one or more arguments that define the operation. Many of the operations are ones that you can also complete with command line utilities. The advantage of using the SQL administration API functions is that you can run them remotely from other database servers; whereas you must be directly connected to the database server on which to run command line utility commands.
You can invoke the admin() and task() functions within SQL statements that can include an expression, or you can use the EXECUTE FUNCTION statement to call them. Run the admin() or task() function within a transaction that does not include any other statements.
The SQL administration API functions are defined in the sysadmin database. You must be connected to the sysadmin database, either directly or remotely, to run these functions.
The SQL administration API functions can be run only by the following users:
- The user informix
- The root user, if Connect privilege on the sysadmin database is granted to the user
- The DBSA group members, if Connect privilege on the sysadmin database is granted to the role
- Users granted privileges to SQL administration API commands by the admin() and task() functions with grant admin argument.
You can generate SQL administration API commands for reproducing the storage spaces, chunks, and logs that exist in a file. To do this, run the dbschema utility with the -c option.