Amazonrds 简明教程

Amazon RDS - MS SQL Creating DB

AWS 作为一个云平台,它能用非常少的步骤在 RDS 中设置一个数据库。创建 MSSQL 有三种方法。使用 AWS 管理控制台、AWS CLI 或 AWS API。我们将逐一查看每种操作方法。

As a cloud platform AWS gives you very minimal number of steps to setup a DB in RDS. Creating a MSSQL DB can be done in three ways. Using AWS management console, AWS CLI or AWS API. We will look at each of these approaches one by one.

Using AWS management Console

AWS 管理控制台是使用 RDS 的最方便的方法。使用 AWS 账户详细信息登录 AWS 控制台,找到 RDS 服务,然后按照以下所示步骤创建 MSm SQL DB 实例。

AWS management console is the most convenient way to get started with RDS. You login to the AWS console using your AWS account details, locate the RDS service and then follow the steps shown below to create a MSm SQL DB instance.

Step-1

从控制台上选择 MySQL db 引擎。

Select the MySQL db Engine form the console.

create mssql step 1

Step-2

指定所需的数据库详细信息。

Specify the required DB details.

specify db details step 2

Step-3

在本步骤中,您确定数据库实例类型、分配的存储量、设置主密码以及其他一些详细信息。

In this step you decide on the db instance class, amount of storage allocated also set the master password along with few other details.

db settings step 3

Stpe—4

这是最后一步,您在此处提到 vpc、安全设置、加密、备份选项以及日志导出等。为简短起见,屏幕快照已经缩短,仅显示重要选项。

This is the final step when you mention the vpc and security settings, encryption, backup options and log export etc. For brevity the screen shot has been shortened showing only the important options.

mssql creation complete

Using CLI

要使用 AWS CLI 创建 MSSQL DB 实例,请用以下参数调用 create-db-instance 命令。

To create a MSSQL DB instance by using the AWS CLI, call the create-db-instance command with the parameters below.

aws rds create-db-instance
    --engine sqlserver-se \
    --db-instance-identifier mymsftsqlserver \
    --allocated-storage 250 \
    --db-instance-class db.m1.large \
    --db-security-groups mydbsecuritygroup \
    --db-subnet-group mydbsubnetgroup \
    --master-user-name masterawsuser \
    --master-user-password masteruserpassword \
    --backup-retention-period 3

Using API

要使用 Amazon RDS API 创建 MSSQL DB 实例,我们用以下所示参数调用 CreateDBInstance 操作。

To create a MSSQL DB instance by using the Amazon RDS API, we call the CreateDBInstance action with the parameters as shown below.

https://rds.amazonaws.com/
    ?Action=CreateDBInstance
    &AllocatedStorage=250
    &BackupRetentionPeriod=3
    &DBInstanceClass=db.m1.large
    &DBInstanceIdentifier=mydbinstance
    &DBSecurityGroups.member.1=mysecuritygroup
    &DBSubnetGroup=mydbsubnetgroup
    &Engine=sqlserver-se
    &MasterUserPassword=masteruserpassword
    &MasterUsername=masterawsuser
    &SignatureMethod=HmacSHA256
    &SignatureVersion=4
    &Version=2014-10-31
    &X-Amz-Algorithm=AWS4-HMAC-SHA256
    &X-Amz-Credential=AKIADQK/20140305/us-west-1/rds/aws4_request
    &X-Amz-Date=20140305T185838Z
    &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date
    &X-Amz-Signature=d445654615b1522c5b2b37c13bsseb7575hdh45e209d4b3a064a3