- From an administrative client, log on as user DBC.
- Create the database administrator as follows:
Field Description User Name Required. The name of the database administrator user. All administrative procedures in this publication use the name DBADMIN for the principal administrator.
Owner The owner of user DBADMIN, which is DBC. Permanent Space Required. The space in bytes that contains all objects that user DBADMIN creates or owns. Perm space can also be specified with a constant expression resulting in a numeric value in bytes. This allows you to specify perm space per AMP, which is useful when porting applications from a smaller test system to a production system. See the next example.
Because user DBADMIN creates and owns most databases and tables, assign DBADMIN the majority of space on the system.
Recommendation: 60-65% of available system (DBC) space.
Password Required. The temporary password for DBADMIN. Recommendation: Use any simple password that follows the default system password controls and site policy. Each user is prompted to change the temporary password to a permanent, private password at first logon.
Review the default password control values for conformance to your site security requirements.Spool Space Optional. The spool space specification is only a limit to the amount of space available for intermediate query results or formatted answer sets to queries and volatile tables. The system borrows spool space for a user from unused permanent space anywhere in the system. Spool space can also be specified with a constant expression resulting in a numeric value in bytes. This allows you to specify spool space per AMP, which is useful when porting applications from a smaller test system to a production system. See the following example.
Recommendation: Spool space specification is not typically needed. Spool is already allocated in AdminProfile.
Default Database Optional. The user or database containing the space in which Database Engine 20 stores or searches for new or target objects unless a different database is specified in the transaction SQL.
Recommendation: Specify DBADMIN.
FALLBACK Optional. Specification of FALLBACK automatically creates a duplicate of each table stored in the user space, in addition to the duplicates already created by disk mirroring, to which the system can revert in the event of a failure. For Object File System tables, NO FALLBACK is ignored.
You cannot use the NO FALLBACK option and the NO FALLBACK default on platforms optimized for fallback.Profile Required. The name of the profile in which the user has membership. A user can be a member of only one profile. Recommendation: Enter AdminProfile, the profile created for user DBADMIN in Creating the Database Administrator Profile.
For example:
CREATE USER "DBADMIN" FROM "DBC" AS PERM = 2e5 * (hashamp() + 1) PASSWORD = "temp" SPOOL = spool_space PROFILE = AdminProfile STARTUP = '' NO BEFORE JOURNAL NO AFTER JOURNAL;
The hashamp() function is a database built-in function that returns the highest AMP number in the system configuration. Because AMP numbers start from zero, (hashamp() + 1) returns the total number of AMPs in the system. The example expression: 2e5 * (hashamp() + 1) means allocate 200,000 bytes on each AMP for perm or spool space for the user or database.
Keep the client application open for use in the Granting Database Privileges to User DBADMIN.
Related Information
Reference topics are arranged according to the first step in which the topic appears.
| Step | Topic | Resource for Further Information |
|---|---|---|
| 2 | Syntax and options for the CREATE USER statement | CREATE USER |
| Guidelines for managing of space | Managing Space: Operational DBAs |