CREATE ACCOUNT

在您的组织中创建新账户。

See also:

DROP ACCOUNT, SHOW ACCOUNTS, UNDROP ACCOUNT

语法

CREATE ACCOUNT <name>
      ADMIN_NAME = '<string_literal>'
    { ADMIN_PASSWORD = '<string_literal>' | ADMIN_RSA_PUBLIC_KEY = '<string_literal>' }
    [ ADMIN_USER_TYPE = { PERSON | SERVICE | LEGACY_SERVICE | NULL } ]
    [ FIRST_NAME = '<string_literal>' ]
    [ LAST_NAME = '<string_literal>' ]
      EMAIL = '<string_literal>'
    [ MUST_CHANGE_PASSWORD = { TRUE | FALSE } ]
      EDITION = { STANDARD | ENTERPRISE | BUSINESS_CRITICAL }
    [ REGION_GROUP = <region_group_id> ]
    [ REGION = <snowflake_region_id> ]
    [ COMMENT = '<string_literal>' ]
    [ POLARIS = { TRUE | FALSE } ]

必填参数

name

Specifies the account_name substring in an account identifier.

This name should conform with all the requirements for account identifiers.

ADMIN_NAME = 'string_literal'

账户的初始管理用户的登录名。将在新账户中使用该用户名和密码创建一个新用户,并授予该账户中的 ACCOUNTADMIN 角色。

登录名可以是任何由字母、数字和下划线组成的字符串。登录名始终不区分大小写。

ADMIN_PASSWORD = 'string_literal'

账户初始管理用户的密码。用户的密码必须放在单引号或双引号中。

Optional if the ADMIN_RSA_PUBLIC_KEY parameter is specified.

For more information about passwords in Snowflake, see Snowflake-provided password policy.

ADMIN_RSA_PUBLIC_KEY = 'string_literal'

Assigns a public key to the initial administrative user of the account in order to implement key pair authentication for the user.

Optional if the ADMIN_PASSWORD parameter is specified.

EMAIL = 'string_literal'

账户初始管理用户的电子邮件地址。该电子邮件地址用于发送有关该账户的任何通知。

EDITION = { STANDARD | ENTERPRISE | BUSINESS_CRITICAL }

Snowflake Edition of the account.

可选参数

ADMIN_USER_TYPE = { PERSON | SERVICE | LEGACY_SERVICE | NULL }

Used for setting the type of the first user that is assigned the ACCOUNTADMIN role during account creation.

Note

The LEGACY_SERVICE type is being deprecated. Use the SERVICE type for services and applications. For a timeline of the deprecation of LEGACY_SERVICE, see Planning for the deprecation of single-factor password sign-ins.

Default: NULL (Same as PERSON).

FIRST_NAME = string ,
LAST_NAME = string

账户初始管理用户的名字和姓氏。

Default: NULL

MUST_CHANGE_PASSWORD = { TRUE | FALSE }

指定是否强制为管理账户而创建的新用户在首次登录账户时更改其密码。

Default: FALSE

REGION_GROUP = region_group_id

ID of the region group where the account is created. To retrieve the region group ID for existing accounts in your organization, execute the SHOW REGIONS command. For information about when you might need to specify region group, see Region groups.

默认:当前区域组。

REGION = snowflake_region_id

Snowflake Region ID of the region where the account is created. If no value is provided, Snowflake creates the account in the same Snowflake Region as the current account (i.e. the account in which the CREATE ACCOUNT statement is executed.)

To obtain a list of the regions that are available for an organization, execute the SHOW REGIONS command.

默认:当前 Snowflake 区域。

COMMENT = 'string_literal'

指定账户的注释。

默认:无值

POLARIS = { TRUE | FALSE }

Specifies whether to create a Snowflake Open Catalog account.

默认:FALSE

访问控制要求

Only organization administrators can execute this SQL command.

使用说明

  • 可以通过以下方式之一将账户与您的组织关联:

    • 使用当前主题中描述的 SQL 命令创建新账户。
    • Contact Snowflake Support to link an existing account to your organization.
  • 默认情况下,组织中账户的最大数量为 25。要提高此限制,请联系 Snowflake 支持部门。

  • It takes about 30 seconds for the DNS changes to propagate before you can access a newly created account. If the account is not accessible immediately, wait for approximately 30 seconds and try again.

  • 关于元数据:

    Attention

    Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata fields in Snowflake.

示例

Create a new Snowflake account in the aws_us_west_2 Snowflake Region on Amazon Web Services (AWS). The user who executes the CREATE ACCOUNT statement can be logged into an account in the same or a different Snowflake Region:

create account myaccount1
  admin_name = admin
  admin_password = 'TestPassword1'
  first_name = Jane
  last_name = Smith
  email = 'myemail@myorg.org'
  edition = enterprise
  region = aws_us_west_2;

在执行 CREATE ACCOUNT 语句的同一区域组和 Snowflake 区域中创建一个新 Snowflake 账户。新的账户管理员用户在首次登录时必须更改其密码:

create account myaccount2
  admin_name = admin
  admin_password = 'TestPassword1'
  email = 'myemail@myorg.org'
  edition = enterprise;

Create a new Open Catalog account in the aws_us_west_2 Snowflake Region on Amazon Web Services (AWS):

create account myaccount1
  admin_name = admin
  admin_password = 'TestPassword1'
  first_name = Jane
  last_name = Smith
  email = 'myemail@myorg.org'
  edition = enterprise
  region = aws_us_west_2
  polaris = true;