Database
List databases¶
For more information
Go to the SQL command page to view more information about arguments, options, privileges requirements, and usage guidelines.
Query Parameters¶
| Parameter | Description |
|---|---|
| like string | Query parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. |
| startsWith string | Query parameter to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. |
| showLimit integer | Query parameter to limit the maximum number of rows returned by a command. |
| fromName string | Query parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. |
| history boolean | Optionally includes dropped databases that have not yet been purged. |
Response¶
| Code | Description |
|---|---|
| 200 | Successful request. |
| 202 | Successfully accepted the request, but it is not completed yet. |
Create a database¶
For more information
Go to the SQL command page to view more information about arguments, options, privileges requirements, and usage guidelines.
Query Parameters¶
| Parameter | Description |
|---|---|
| createMode string | Query parameter allowing support for different modes of resource creation. Possible values include:
|
| kind string | Type of database to create. Currently, Snowflake supports only `transient` and `permanent` (also represented by the empty string). |
Response¶
| Code | Description |
|---|---|
| 200 | Successful request. |
| 202 |
Clone a database¶
For more information
Go to the SQL command page to view more information about arguments, options, privileges requirements, and usage guidelines.
Query Parameters¶
| Parameter | Description |
|---|---|
| kind string | Type of database to create. Currently, Snowflake supports only `transient` and `permanent` (also represented by the empty string). |
Response¶
| Code | Description |
|---|---|
| 200 | |
| 202 |
Fetches a database¶
For more information
Go to the SQL command page to view more information about arguments, options, privileges requirements, and usage guidelines.
Path Parameters¶
| Parameter | Description |
|---|---|
| name | Identifier (i.e. name) for the resource. |
Response¶
| Code | Description |
|---|---|
| 200 | successful |
| 202 |
Create a new, or alters an existing, database¶
For more information
Go to the SQL command page to view more information about arguments, options, privileges requirements, and usage guidelines.
Response¶
| Code | Description |
|---|---|
| 200 | |
| 202 |
Delete a database¶
For more information
Go to the SQL command page to view more information about arguments, options, privileges requirements, and usage guidelines.
Query Parameters¶
| Parameter | Description |
|---|---|
| ifExists boolean | Query parameter that specifies how to handle the request for a resource that does not exist:
|
| restrict boolean | Whether to drop the database if foreign keys exist that reference any tables in the database.
|
Response¶
| Code | Description |
|---|---|
| 200 | |
| 202 |
Undrop a database¶
Enable database replication¶
For more information
Go to the SQL command page to view more information about arguments, options, privileges requirements, and usage guidelines.
Query Parameters¶
| Parameter | Description |
|---|---|
| ignore_edition_check boolean | Whether to allow replicating data to accounts on lower editions. Default: `true`.
For more information, see the <a href=https://docs.snowflake.com/en/sql-reference/sql/alter-database> ALTER DATABASE</a> reference. |
Response¶
| Code | Description |
|---|---|
| 200 | |
| 202 |
Disable database replication¶
For more information
Go to the SQL command page to view more information about arguments, options, privileges requirements, and usage guidelines.
Response¶
| Code | Description |
|---|---|
| 200 | |
| 202 |
Refresh database replications¶
For more information
Go to the SQL command page to view more information about arguments, options, privileges requirements, and usage guidelines.
Response¶
| Code | Description |
|---|---|
| 200 | |
| 202 |
Enable database failover¶
For more information
Go to the SQL command page to view more information about arguments, options, privileges requirements, and usage guidelines.
Response¶
| Code | Description |
|---|---|
| 200 | |
| 202 |
Disable database failover¶
For more information
Go to the SQL command page to view more information about arguments, options, privileges requirements, and usage guidelines.
Response¶
| Code | Description |
|---|---|
| 200 | |
| 202 |
Set a primary database¶
For more information
Go to the SQL command page to view more information about arguments, options, privileges requirements, and usage guidelines.
Response¶
| Code | Description |
|---|---|
| 200 | |
| 202 |