Create a SQL database

An Azure SQL database is created with a defined set of compute and storage resources. The database is created within an Azure resource groupand in an Azure SQL Database logical server.

Follow these steps to create a SQL database containing the Adventure Works LT sample data.

  1. Click the New button found on the upper left-hand corner of the Azure portal.

Select Databases from the New page, and select Create under SQL Database on the New page.

Fill out the SQL Database form with the following information, as shown on the preceding image:

Setting       Suggested value Description 
Database name mySampleDatabase For valid database names, see Database Identifiers.
Subscription Your subscription For details about your subscriptions, see Subscriptions.
Resource group myResourceGroup For valid resource group names, see Naming rules and restrictions.
Source source Sample (AdventureWorksLT) Loads the AdventureWorksLT schema and data into your new database
Important

You must select the sample database on this form because it is used in the remainder of this quick start.

Under Server, click Configure required settings and fill out the SQL server (logical server) form with the following information, as shown on the following image:

Setting       Suggested value Description 
Server name Any globally unique name For valid server names, see Naming rules and restrictions.
Server admin login Any valid name For valid login names, see Database Identifiers.
Password Any valid password Your password must have at least 8 characters and must contain characters from three of the following categories: upper case characters, lower case characters, numbers, and and non-alphanumeric characters.
Subscription Your subscription For details about your subscriptions, see Subscriptions.
Resource group myResourceGroup For valid resource group names, see Naming rules and restrictions.
Location Any valid location For information about regions, see Azure Regions.
Important

The server admin login and password that you specify here are required to log in to the server and its databases later in this quick start. Remember or record this information for later use.

  1. When you have completed the form, click Select.

  2. Click Pricing tier to specify the service tier, the number of DTUs, and the amount of storage. Explore the options for the amount of DTUs and storage that is available to you for each service tier.

    Important

    * Storage sizes greater than the amount of included storage are in preview and extra costs apply. For details, see SQL Database pricing.

    * In the Premium tier, more than 1 TB of storage is currently available in the following regions: US East2, West US, US Gov Virginia, West Europe, Germany Central, South East Asia, Japan East, Australia East, Canada Central, and Canada East. See P11-P15 Current Limitations.

For this quick start tutorial, select the Standard service tier and then use the slider to select 100 DTUs (S3) and 400 GB of storage.

  1. Accept the preview terms to use the Add-on Storage option.

    Important

    * Storage sizes greater than the amount of included storage are in preview and extra costs apply. For details, see SQL Database pricing.

    * In the Premium tier, more than 1 TB of storage is currently available in the following regions: US East2, West US, US Gov Virginia, West Europe, Germany Central, South East Asia, Japan East, Australia East, Canada Central, and Canada East. See P11-P15 Current Limitations.

  2. After selecting the server tier, the number of DTUs, and the amount of storage, click Apply.

  3. Now that you have completed the SQL Database form, click Create to provision the database. Provisioning takes a few minutes.

On the toolbar, click Notifications to monitor the deployment process.

Create a server-level firewall rule

The SQL Database service creates a firewall at the server-level that prevents external applications and tools from connecting to the server or any databases on the server unless a firewall rule is created to open the firewall for specific IP addresses. Follow these steps to create a SQL Database server-level firewall rule for your client's IP address and enable external connectivity through the SQL Database firewall for your IP address only.

Note

SQL Database communicates over port 1433. If you are trying to connect from within a corporate network, outbound traffic over port 1433 may not be allowed by your network's firewall. If so, you cannot connect to your Azure SQL Database server unless your IT department opens port 1433.

  1. After the deployment completes, click SQL databases from the left-hand menu and then click mySampleDatabase on the SQL databases page. The overview page for your database opens, showing you the fully qualified server name (such as mynewserver-20170824.database.windows.net) and provides options for further configuration.

Copy this fully qualified server name for use to connect to your server and its databases in subsequent quick starts.

Click Set server firewall on the toolbar as shown in the previous image. The Firewall settings page for the SQL Database server opens.

  1. Click Add client IP on the toolbar to add your current IP address to a new firewall rule. A firewall rule can open port 1433 for a single IP address or a range of IP addresses.

  2. Click Save. A server-level firewall rule is created for your current IP address opening port 1433 on the logical server.

  3. Click OK and then close the Firewall settings page.

You can now connect to the SQL Database server and its databases using SQL Server Management Studio or another tool of your choice from this IP address using the server admin account created previously.

Important

By default, access through the SQL Database firewall is enabled for all Azure services. Click OFF on this page to disable for all Azure services.

Query the SQL database

Now that you have created a sample database in Azure, let’s use the built-in query tool within the Azure portal to confirm that you can connect to the database and query the data.

On the SQL Database page for your database, click Tools on the toolbar and then click Query editor (preview).

  1. Click , click the Preview terms checkbox, and then click OK. The Query editor page opens.

Click Login, review the login information, and then click OK to log in using SQL server authentication with the server admin login and password that you created earlier.

  1. Click OK to log in.

  2. After you are authenticated as ServerAdmin, type the following query in the query editor pane.

    SQLCopy
    SELECT TOP 20 pc.Name as CategoryName, p.name as ProductName
    FROM SalesLT.ProductCategory pc
    JOIN SalesLT.Product p
    ON pc.productcategoryid = p.productcategoryid;

Click Run and then review the query results in the Results pane.

  1. Close the Query editor page, click OK to discard your unsaved edits, and then close the Tools page.

Clean up resources

Save these resources if you want to go to Next steps and learn how to connect and query your database using a number of different methods. If, however, you wish to delete the resources that you created in this quick start, use the following steps.

  1. From the left-hand menu in the Azure portal, click Resource groups and then click myResourceGroup.
  2. On your resource group page, click Delete, type myResourceGroup in the text box, and then click Delete.

Create an Azure SQL database in the Azure portal的更多相关文章

  1. [Windows Azure] Guidelines for Connecting to Windows Azure SQL Database

    Guidelines for Connecting to Windows Azure SQL Database 6 out of 12 rated this helpful - Rate this t ...

  2. [转]Azure 表存储和 Windows Azure SQL Database - 比较与对照

    本文转自:https://msdn.microsoft.com/library/azure/jj553018 更新时间: 2014年10月 作者:Valery Mizonov 和 Seth Manhe ...

  3. [Windows Azure] How to Create and Configure SQL Database

    How to Create and Configure SQL Database In this topic, you'll step through logical server creation ...

  4. Azure SQL Database (21) 将整张表都迁移到Azure Stretch Database里

    <Windows Azure Platform 系列文章目录>  Azure SQL Database (19) Stretch Database 概览      Azure SQL Da ...

  5. Azure SQL Database (22) 迁移部分数据到Azure Stretch Database

    <Windows Azure Platform 系列文章目录>  Azure SQL Database (19) Stretch Database 概览      Azure SQL Da ...

  6. How to Use Lucene.NET with Windows Azure SQL Database

    http://social.technet.microsoft.com/wiki/contents/articles/2367.how-to-use-lucene-net-with-windows-a ...

  7. Azure SQL Database (23) Azure SQL Database Dynamic Data Masking动态数据掩码

    <Windows Azure Platform 系列文章目录> 我们在使用关系型数据的时候,有时候希望: - 管理员admin,可以查看到所有的数据 - 普通用户,某些敏感字段,比如信用卡 ...

  8. Azure SQL Database (25) Azure SQL Database创建只读用户

    <Windows Azure Platform 系列文章目录> 本文将介绍如何在Azure SQL Database创建只读用户. 请先按照笔者之前的文章:Azure SQL Databa ...

  9. Azure SQL Database (22) Azure SQL Database支持中文值

    <Windows Azure Platform 系列文章目录> 在笔者之前的文章里,已经介绍了如何使Azure SQL Database支持中文: SQL Azure(七) 在SQL Az ...

随机推荐

  1. Feature Extractor[batch normalization]

    1 - 背景 摘要:因为随着前面层的参数的改变会导致后面层得到的输入数据的分布也会不断地改变,从而训练dnn变得麻烦.那么通过降低学习率和小心地参数初始化又会减慢训练过程,而且会使得具有饱和非线性模型 ...

  2. CF960G Bandit Blues 第一类斯特林数、NTT、分治/倍增

    传送门 弱化版:FJOI2016 建筑师 由上面一题得到我们需要求的是\(\begin{bmatrix} N - 1 \\ A + B - 2 \end{bmatrix} \times \binom ...

  3. Elicpse使用技巧-打开选中文件文件夹或者包的当前目录

    很多时候,我们需要在eclipse那里打开选中文件(文件夹,包)的当前目录,在资源管理器那里显示这个目录,这个时候,我们又不想采用“选中文件/文件夹/包名--右击--Properties--Locat ...

  4. Ajax跨越问题原因分析与解决思路

    1.什么是AJAX跨域问题 简单来说,就是前端调用后端服务接口时 如果服务接口不是同一个域,就会产生跨域问题 2.AJAX跨域场景 前后端分离.服务化的开发模式 前后端开发独立,前端需要大量调用后端接 ...

  5. .NetCore简单学习图谱

    一.学习途径 学习.netcore的最佳途径在哪里,无疑是微软官方.netCore指南.它覆盖十分全面,就目前网上经常看到的各种文章都能在微软处找到类似文章,堪称.netcore的百科全书.所以我利用 ...

  6. Python Revisited Day 02 (数据类型)

    目录 Python 关键字 整数 整数转换函数 整数位逻辑操作符 浮点类型 math模块函数与常量 复数 精确的十进制数字 decimal 字符串 str.format() 格式规约 Python 关 ...

  7. 543A - Writing Code(二维动态规划)

    题意:现在要写m行代码,总共有n个文件,现在给出第i个文件每行会出现v[i]个bug,问你在bug少于b的条件下有多少种安排 分析:定义dp[i][j][k],i个文件,用了j行代码,有k个bug 状 ...

  8. Array Division CodeForces - 808D (构造+实现)

    Vasya has an array a consisting of positive integer numbers. Vasya wants to divide this array into t ...

  9. Average Sleep Time CodeForces - 808B (前缀和)

    It's been almost a week since Polycarp couldn't get rid of insomnia. And as you may already know, on ...

  10. p68理想的性质

    1.如何由2.2.4推出后面的结论? 2.为什么A可以等于R? 3.如何证明3? π:R->R/M套用定理2.2.4(2)和(1) R2是R/M,I是R/M的理想也就是R2的理想,所以f^(-1 ...