Categories:

Account & Session DDL

CREATE MANAGED ACCOUNT

Creates a new managed account. Currently used by data providers to create reader accounts for their consumers. For more details, see Managing Reader Accounts.

See also:

DROP MANAGED ACCOUNT , SHOW MANAGED ACCOUNTS

Syntax

CREATE MANAGED ACCOUNT <name>
    ADMIN_NAME = <username> , ADMIN_PASSWORD = <user_password> ,
    TYPE = READER ,
    [ COMMENT = '<string_literal>' ]

Required Parameters

name

Identifier for the managed account; must be unique for your account.

In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (e.g. "My object").

For more details, see Identifier Syntax.

Important

The identifier for the managed account is not the same as the account name, which is required to access the account. The account name, also known as the locator, is assigned by Snowflake.

ADMIN_NAME = username

Identifier, as well as login name, for the initial user in the managed account. This user serves as the account administrator for the account (i.e. this user is automatically created when the account is created and is assigned the ACCOUNTADMIN role).

Once the account is created, you will log into the account as this user to configure (i.e. “bootstrap”) the account.

ADMIN_PASSWORD = user_password

Password for the initial user in the managed account. The password is a string literal that must be enclosed in single or double quotes and must conform to the Snowflake Password Policy.

TYPE = READER

Specifies the type of managed account. Currently, the only type supported is READER (i.e. reader accounts used for data sharing).

Optional Parameters

COMMENT = 'string_literal'

Specifies a comment for the managed account.

Usage Notes

  • This command can be executed by users with the ACCOUNTADMIN role (or a role that has been granted the CREATE ACCOUNT global privilege).

  • The number of managed accounts that can be created per account is limited to 20. If you reach the limit and require creating additional accounts, please contact Snowflake Support.

  • If the command completes successfully, it returns a JSON object containing the account name/locator and the URL for accessing the account.

Examples

CREATE MANAGED ACCOUNT reader_acct1
    ADMIN_NAME = user1 , ADMIN_PASSWORD = 'Sdfed43da!44' ,
    TYPE = READER;

+-------------------------------------------------------------------------------+
| status                                                                        |
|-------------------------------------------------------------------------------|
| {"accountName":"RE47190","loginUrl":"https://re47190.snowflakecomputing.com"} |
+-------------------------------------------------------------------------------+