使用PowerShell在Azure China创建Data Warehouse
微软的Azure Data Warehouse是基于MPP架构的分布式系统:
Control Node负责管理系统和接受用户的请求,Compute Node负责计算。
目前在国内Azure Data Warehouse已经落地了。可以使用新的Portal页面进行管理,也可以使用PowerShell进行管理。
本文将介绍用PowerShell的管理方式。包括创建、Scale out、Suspend和Resume。
1 环境准备
登陆Azure China,并创建Resource Group
$mycred = Get-Credential -UserName admin@xxxx.partner.onmschina.cn -Message hello
Login-AzureRmAccount -EnvironmentName AzureChinaCloud -Credential $mycred
New-AzureRmResourceGroup -Name hwdweast -Location "China East"
ResourceGroupName : hwdweast
Location : chinaeast
ProvisioningState : Succeeded
Tags :
ResourceId : /subscriptions/xxxx-xxxx-xxxx/resourceGroups/hwdweast
2 创建Azure SQL Server
创建的SQL Server是V12版本
$sqlcred = Get-Credential -UserName hengwei -Message hello
New-AzureRmSqlServer -ServerName hwdwsv -SqlAdministratorCredentials $sqlcred -ResourceGroupName hwdweast -Location "China East" -ServerVersion 12.0 ResourceGroupName : hwdweast
ServerName : hwdweast
Location : China East
SqlAdministratorLogin : hengwei
SqlAdministratorPassword :
ServerVersion : 12.0
Tags :
3 给新创建的Database server配置Firewall规则,本例子中因为是测试,添加了所有可用的地址段
new-AzureRmSqlServerFirewallRule -FirewallRuleName all -StartIpAddress 1.1.1.1 -EndIpAddress 223.255.255.254 -ServerName hwdweast -ResourceGroupName hwdweast
ResourceGroupName : hwdweast
ServerName : hwdweast
StartIpAddress : 1.1.1.1
EndIpAddress : 223.255.255.254
FirewallRuleName : all
4 创建Data WareHouse
New-AzureRmSqlDatabase -DatabaseName hwdwdbeast -RequestedServiceObjectiveName "DW100" -ServerName hwdwsv -ResourceGroupName hwdweast -Edition DataWarehouse -CollationName "SQL_Latin1_General_CP1_CI_AS" -MaxSizeBytes 10995116277760 ResourceGroupName : hwdweast
ServerName : hwdweast
DatabaseName : hwdwdbeast
Location : China East
DatabaseId : 3e5f4387-099d-4a7d-858d-0d663381663a
Edition : DataWarehouse
CollationName : SQL_Latin1_General_CP1_CI_AS
CatalogCollation :
MaxSizeBytes : 1099511627776
Status : Online
CreationDate : 2016/10/5 13:46:19
CurrentServiceObjectiveId : 4e63cb0e-91b9-46fd-b05c-51fdd2367618
CurrentServiceObjectiveName : DW100
RequestedServiceObjectiveId : 4e63cb0e-91b9-46fd-b05c-51fdd2367618
RequestedServiceObjectiveName :
ElasticPoolName :
EarliestRestoreDate : 0001/1/1 0:00:00
Tags :
ResourceId : /subscriptions/xxxx-xxxx-xxxx/resourceGroups/hwdweast/providers/Microsoft.Sql/servers/hwdw
east/databases/hwdwdbeast
CreateMode :
其中,
-Edition DataWarehouse 表明这个是Data Warehouse
-RequestedServiceObjectiveName "DW100" 指定Data Warehouse的大小,DW100表示有1个计算节点
-CollationName "SQL_Latin1_General_CP1_CI_AS" 指定字符集
-MaxSizeBytes 10995116277760 指定最大容量
几分钟的时间,一个Data Warehouse就创建好了。
4 更改Data Warehouse大小
set-azurermsqldatabase -DatabaseName hwdwdbeast -RequestedServiceObjectiveName "DW200" -ServerName hwdwsv -ResourceGroupName hwdweast
ResourceGroupName : hwdweast
ServerName : hwdweast
DatabaseName : hwdwdbeast
Location : China East
DatabaseId : 3e5f4387-099d-4a7d-858d-0d663381663a
Edition : DataWarehouse
CollationName : SQL_Latin1_General_CP1_CI_AS
CatalogCollation :
MaxSizeBytes : 1099511627776
Status : Online
CreationDate : 2016/10/5 13:46:19
CurrentServiceObjectiveId : 99e78a92-d724-4e1b-857b-2be661f3d153
CurrentServiceObjectiveName : DW200
RequestedServiceObjectiveId : 99e78a92-d724-4e1b-857b-2be661f3d153
RequestedServiceObjectiveName :
ElasticPoolName :
EarliestRestoreDate : 0001/1/1 0:00:00
Tags :
ResourceId : /subscriptions/xxxx-xxxx-xxxx/resourceGroups/hwdweast/providers/Microsoft.Sql/servers/hwdw
east/databases/hwdwdbeast
CreateMode :
5 暂停某个Data Warehouse的服务
Suspend-AzureRmSqlDatabase -DatabaseName hwdwdbeast -ServerName hwdweast -ResourceGroupName hwdweast
ResourceGroupName : hwdweast
ServerName : hwdweast
DatabaseName : hwdwdbeast
Location : China East
DatabaseId : 3e5f4387-099d-4a7d-858d-0d663381663a
Edition : DataWarehouse
CollationName : SQL_Latin1_General_CP1_CI_AS
CatalogCollation :
MaxSizeBytes : 1099511627776
Status : Paused
CreationDate : 2016/10/5 13:46:19
CurrentServiceObjectiveId : 4e63cb0e-91b9-46fd-b05c-51fdd2367618
CurrentServiceObjectiveName : DW100
RequestedServiceObjectiveId : 4e63cb0e-91b9-46fd-b05c-51fdd2367618
RequestedServiceObjectiveName :
ElasticPoolName :
EarliestRestoreDate : 0001/1/1 0:00:00
Tags :
ResourceId : /subscriptions/xxxx-xxxx-xxxx/resourceGroups/hwdweast/providers/Microsoft.Sql/servers/hwdw
east/databases/hwdwdbeast
CreateMode :
此时,数据还保留在Data Warehouse中,但计算单元已经停止计费了。
这种模式特别适合需要月末、季度末、年末进行报表统计的场景。
6 恢复某个Data Warehouse的服务
Resume-AzureRmSqlDatabase -DatabaseName hwdwdbeast -ServerName hwdweast -ResourceGroupName hwdweast
ResourceGroupName : hwdweast
ServerName : hwdweast
DatabaseName : hwdwdbeast
Location : China East
DatabaseId : 3e5f4387-099d-4a7d-858d-0d663381663a
Edition : DataWarehouse
CollationName : SQL_Latin1_General_CP1_CI_AS
CatalogCollation :
MaxSizeBytes : 1099511627776
Status : Online
CreationDate : 2016/10/5 13:46:19
CurrentServiceObjectiveId : 4e63cb0e-91b9-46fd-b05c-51fdd2367618
CurrentServiceObjectiveName : DW100
RequestedServiceObjectiveId : 4e63cb0e-91b9-46fd-b05c-51fdd2367618
RequestedServiceObjectiveName :
ElasticPoolName :
EarliestRestoreDate : 0001/1/1 0:00:00
Tags :
ResourceId : /subscriptions/xxxx-xxxx-xxxx/resourceGroups/hwdweast/providers/Microsoft.Sql/servers/hwdw
east/databases/hwdwdbeast
CreateMode :
目前Data Warehouse还只能通过PowerShell的方式进行创建,将来China 的Azure也会和Global的Azure一样,通过图形化界面完成上面所有的操作。
使用PowerShell在Azure China创建Data Warehouse的更多相关文章
- 使用Json Template在Azure China创建ARM类型的虚拟机
前面几篇文章介绍过Azure的两种VM的模式,包括ASM和ARM.并且介绍了如何用Azure CLI和PowerShell创建虚拟机.本文将介绍如何采用Json的Template来创建基于ARM的VM ...
- Azure China (8) 使用Azure PowerShell创建虚拟机,并设置固定Virtual IP Address和Private IP
<Windows Azure Platform 系列文章目录> 本文介绍的是由世纪互联运维的Windows Azure China. 相比于Global Azure (http://www ...
- Azure China (5) 管理Azure China Powershell
<Windows Azure Platform 系列文章目录> 本文介绍的是国内由世纪互联运维的Azure China Cloud Update 2015-09-01 发现一个新的命令,在 ...
- 在Azure China用自定义镜像创建Azure VM Scale Set
在Azure China用自定义镜像创建Azure VM Scale Set 在此感谢世纪互联的工程师Johnny Lee和Lan,你们给了我很大的帮助.因为Azure China的官网没有给出完整的 ...
- Azure SQL 数据库仓库Data Warehouse (3) DWU
<Windows Azure Platform 系列文章目录> 在笔者的上一篇文章中:Azure SQL 数据库仓库Data Warehouse (2) 架构 介绍了SQL DW的工作节点 ...
- Azure SQL Data Warehouse
Azure SQL Data Warehouse & AWS Redshift Amazon Redshift Amazon Redshift 是一种快速.完全托管的 PB 级数据仓库,可方便 ...
- Azure SQL 数据库仓库Data Warehouse (1) 入门
<Windows Azure Platform 系列文章目录> 在之前的项目中遇到了客户使用SQL数据仓库的场景,在这里记录一下 1.什么是SQL 数据库仓库 (SQL DW) SQL D ...
- Azure SQL 数据库仓库Data Warehouse (2) 架构
<Windows Azure Platform 系列文章目录> 在上一篇文章中,笔者介绍了MPP架构的基本内容 在本章中,笔者给大家介绍一下Azure SQL Data Warehouse ...
- Windows Azure HandBook (2) Azure China提供的服务
<Windows Azure Platform 系列文章目录> 对于传统的自建数据中心,从底层的Network,Storage,Servers,Virtualization,中间层的OS, ...
随机推荐
- Django源码剖析
一.Django底层剖析之一次请求到响应的整个流程 As we all know,所有的Web应用,其本质上其实就是一个socket服务端,而用户的浏览器就是一个socket客户端 #!/usr/bi ...
- Eclipse Task的使用
参考链接:http://blog.csdn.net/limb99/article/details/8881891; http://hi.baidu.com/jinxv1987/item/64496f6 ...
- C# 处理base64 以及base64的原理分析
base64的原理, http://www.cnblogs.com/diligenceday/p/6002382.html http://www.cnblogs.com/chengxiaohui/ar ...
- 【P3957】跳房子(单调队列+DP+二分)
终于把这个题缸出来了,话说这题也不是想的那么难... 因为最小的最大,所以二分,因为由前面推出后面,所以DP,因为输入单调,朴素DP会T,所以单调队列.要注意的是,这个题数据很大,要开LL,然后DP数 ...
- MapReduce-shuffle过程详解
Shuffle map端 map函数开始产生输出时,并不是简单地将它写到磁盘.这个过程很复杂,它利用缓冲的方式写到内存并出于效率的考虑进行预排序.每个map任务都有一个环形内存缓冲区用于存储任务输出. ...
- 关于选中的磁盘具有MBR分区表。在EFI系统上,Windows只能安装到GPT磁盘。问题解决
昨天在为一位学弟装系统的时候需要了这个问题,现在把解决问题的步骤写下来. 在此界面按shift+F10 启动cmd命令行模式 在cmd模式中输入diskpart,进入diskpart模式 此时,lis ...
- 3Sum,4Sum问题
//三数和为0的问题.要求去重,并且输出数字有序.public List<List<Integer>> threeSum(int[] nums) { Arrays.sort(n ...
- Codeforces Round #372 (Div. 2) A ,B ,C 水,水,公式
A. Crazy Computer time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...
- Mirantis OpenStack 7.0: NFVI Deployment Guide — NUMA/CPU pinning
https://www.mirantis.com/blog/mirantis-openstack-7-0-nfvi-deployment-guide-numacpu-pinning/ Compute ...
- wpf设置字体颜色渐变和字体阴影
<StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment=&quo ...