Skip to main content

CREATE DATABASE (bSQL) | Blockpoint Docs

Creates a user-defined database. For examples, see Examples.

bSQL Syntax Conventions

Syntax​

CREATE DATABASE database_name;

Arguments​

database_name
The name of the database to be created. Database names must be unique within an instance of MDB.

Permissions​

MANAGEMENT permissions required on the master database.

MANAGEMENT permissions default to members of the admin fixed database role. Members of the admin fixed database role can transfer permissions to logins and users.

Remarks​

  • The master database should be backed up whenever a user-defined database is created.

  • The CREATE DATABASE command must be run in autocommit mode and can't be rolled back.

    MDB implements the CREATE DATABASE statement by using the following steps:

  1. MDB creates the database objects and stores it's specified configuration in the master database.
  2. A unique ID is assigned to the database.
  3. The master login that created the database assumes ownership of the new database and inherits CONTROL over the database.

Examples​

Creating a new database.​

The following example creates a user-defined database called financials. The master login assumes ownership of the new database and inherits CONTROL on financials.

CREATE DATABASE financials;

See Also​