Follow me. Windows Azure uses SQL Azure to create a database server, create a database, create a table

Source: Internet
Author: User
Tags sql server management

Log in to the Windows Azure Portal

Enter the account number and password that we registered in the last lesson and click Login.

Select SQL database, select Server

Select Create Database server

Set the login ID and password to access the database server

Click OK to complete the creation of the database server.

Then we select the database server that we created

Select Create DATABASE.

Enter our database name, here my database name is teacher, because is the trial account, I choose the service layer for the basic minimum standard bar.

Then click OK to complete the creation of the database.

Down we select the Database menu. You can see the database we just created.

Then we click on the database we just created.

Click Set Windows Azure Firewall rules for this IP address, that is, my native IP address can access my database server directly, while other IP addresses are not allowed. Allow Windows Azure Server to access my database server. So I will deploy the Web site and The Cloud service has access to my database server.

Then open my local SQL Server Management, enter the server address that you copied in Windows Azure, and connect with the account and password you created the server.

Once the connection is complete, we can see the teacher database we just created.

We right-click on the table, choose Create TABLE, this place and we use the SQL Server is not the same, here he is through the script to create a table, so we have to write a table to create scripts.

CREATE TABLE dbo. Teacher (

Teacherid int IDENTITY (*) is not NULL,

TeacherName nvarchar () not NULL,

Account nvarchar (+) is not NULL,

Password nvarchar () not NULL,

Sex int not NULL,

CONSTRAINT pk_teacher PRIMARY KEY (Teacherid)

)

GO

Then we click Execute.

Then we succeeded in creating a teacher's watch on our database in the cloud.

Follow me. Windows Azure uses SQL Azure to create a database server, create a database, create a table

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.