Creates a database only on the node that calls the API. This API is not intended for general use. For example, it should be used with sqlurestore - Restore Database if the database partition at a node was damaged and must be recreated. Improper use of this API can cause inconsistencies in the system, so it should only be used with caution.
Note: | If this API is used to recreate a database partition that was dropped (because it was damaged), the database at this node will be in the restore-pending state. After recreating the database partition, the database must immediately be restored on this node. |
Scope
This API only affects the node on which it is called.
Authorization
One of the following:
Required Connection
Instance. To create a database at another node, it is necessary to first attach to that node. A database connection is temporarily established by this API during processing.
Version
sqlenv.h
C API Syntax
/* File: sqlenv.h */ /* API: Create Database at Node */ /* ... */ SQL_API_RC SQL_API_FN sqlecran ( char * pDbName, void * pReserved, struct sqlca * pSqlca); /* ... */ |
Generic API Syntax
/* File: sqlenv.h */ /* API: Create Database at Node */ /* ... */ SQL_API_RC SQL_API_FN sqlgcran ( unsigned short reservedLen, unsigned short dbNameLen, struct sqlca * pSqlca, void * pReserved, char * pDbName); /* ... */ |
API Parameters
REXX API Syntax
This API can be called from REXX through the SQLDB2 interface. See How the API Descriptions are Organized, or the Application Development Guide. For a description of the syntax, see the Command Reference.
Usage Notes
When the database is successfully created, it is placed in restore-pending state. The database must be restored on this node before it can be used.
See Also
sqledpan - Drop Database at Node.