The unloaddb interface will unload a database server.
| Key | Description |
|---|---|
| task | task name |
| token | token string encrypted. |
| dbname | a name of the database |
| targetdir | PATH of output directory |
| usehash | whether use hash file, (yes/no), if yes, hashdir is valid. |
| hashdir | FILE for hash; default: generate by tmpnam() |
| target | unload schema/object or both |
| class | unload class list |
| classname | unload class name |
| ref | include referenced tables; |
| classonly | include specified class only |
| as-dba | extract the same schema file as the DBA |
| split-schema-files | split schema information by object |
| delimit | use '"' where an identifier begins and ends; default: don't use |
| estimate | estimated NUMBER of instances; default: auto computed |
| prefix | PREFIX for output files; default: the database name |
| cache | NUMBER of cached pages; default: 100 |
| lofile | lo file COUNT per a directory; default: 0 |
| dbuser | database user id |
| dbpasswd | the password of the database user |
| async | default "no", if "yes" run the task in asynchronous mode |
- The status of a task running in asynchronous mode can be checked using the 'gettaskstatus' api
- Only one of these database tasks — addvoldb, backupdb, checkdb, compactdb, copydb, createdb, deletedb, loaddb, optimizedb, renamedb, restoredb, startdb, stopdb, unloaddb — can run against the same
dbnameat a time, whether or notasyncis used; a request is rejected immediately if another one of them is already running on that database
{
"task": "unloaddb",
"token": "cdfb4c5717170c5e34919b640249979f8375a218acf865b0b8100f0f25c069587926f07dd201b6aa",
"dbname": "demodb",
"targetdir": "$CUBRID_DATABASES/demodb",
"usehash": "no",
"hashdir": "none",
"target": "both",
"class": [
{
"classname": "code"
}
],
"ref": "no",
"classonly": "no",
"delimit": "no",
"estimate": "none",
"prefix": "none",
"cach": "none",
"lofile": "none",
"async":"yes"
}
{
"job-status" : "running",
"note" : "none",
"status" : "success",
"uuid" : "1877908931382247367"
}
{
"job-status" : "rejected",
"note" : "database 'xyz' is busy with another task ('createdb')",
"status" : "failure",
"task" : "unloaddb"
}
| Key | Description |
|---|---|
| task | task name |
| status | execution result, success or failed. |
| note | if failed, a brief description will be given here |
| result | the files which have been created by the unload |
The same information is returned later by unloadinfo.
{
"__EXEC_TIME" : "99 ms",
"note" : "none",
"result" : [
{
"public.code" : "6 (100%/100%)"
}
],
"status" : "success",
"task" : "unloaddb"
}