You create a database using the CREATE DATABASE command. To create a database from a client application, call the sqlecrea API.
It is important to plan your database, keeping in mind the contents, layout, potential growth, and how it will be used before you create it. Once it has been created and populated with data, changes can be made. However depending on how you set up the database initially, it will likely require more effort and make your data unavailable for use while the changes are being made.
The following database privileges are automatically granted to PUBLIC: CREATETAB, BINDADD, CONNECT, IMPLICIT_SCHEMA, and SELECT on the system catalog views. However, if the RESTRICTIVE option is present, no privileges are automatically granted to PUBLIC. For more information on the RESTRICTIVE option, see the CREATE DATABASE command.
db2set DB2_ENABLE_AUTOCONFIG_DEFAULT=NO
However,
if you specify the AUTOCONFIGURE parameter with
the CREATE DATABASE command, the setting of this
registry variable is ignored.See Automatic features for other features that are enabled by default when you create a database.
DROP EVENT MONITOR db2detaildeadlock
To limit the amount of disk space that this event monitor consumes, the event monitor deactivates, and a message is written to the administration notification log, once it has reached its maximum number of output files. Removing output files that are no longer needed allows the event monitor to activate again on the next database activation.
CREATE DATABASE database_name AT DBPARTITIONNUM options
In
this type of environment you can perform instance-level administration
against an instance other than your default instance, including remote
instances. For instructions on how to do this, see the db2iupdt (update
instance) command.By default, databases are created in the UTF-8 (Unicode) code set.
To override the default code page for the database, it is necessary to specify the desired code set and territory when creating the database. See the CREATE DATABASE command or the sqlecrea API for information on setting the code set and territory.