Module 4 - Azure SQL
1) Migrate AdventureWorks database from SQL Server instance to Azure SQL using DMA.
2) Update WebApp connection strings to use Azure SQL.
Links:
· How to create Database project;
· https://www.youtube.com/watch?v=K1BJ43GAPQk
https://docs.microsoft.com/en-us/azure/devops-project/azure-devops-project-sql-database
1. 在本地PC安装 SQL Server 2017 Developer 或 Express 版
2. 在本地PC下载和安装 数据迁移助手 Overview of Data Migration Assistant
3. 在本地PC下载和安装 Download SQL Server Management Studio (SSMS)
4. 按照 AdventureWorks Installation and configuration 中的 "Install to SQL Server",通过“恢复备份”的方式在本地 SQL Server 安装数据库 AdventureWorks。
5. 通过在 SSMS 等处执行 “select @@Version” 可以查看 SQL Server 的具体版本。在SQL Server中怎么查看版本号?
6. 怎样解决问题 A network-related or instance-specific error occurred while establishing a connection to SQL Server
Open "SQL Server Configuration Manager" Now Click on "SQL Server Network Configuration" and Click on "Protocols for Name" Right Click on "TCP/IP" (make sure it is Enabled) Click on Properties Now Select "IP Addresses" Tab -and- Go to the last entry "IP All" Enter "TCP Port" 1433. Now Restart "SQL Server .Name." using "services.msc" (winKey + r)
7. SQL Server的起步 Getting Started with SQL Server
8. 参照 Move Local SQL Server Database to SQL Azure or Move SQL Azure Database to Local SQL Server,可以完成任务1)。
9. 通过 Data Migration Assistant,一样可以完成任务1)。
A)

B)

C)

D)

E)

F)

10. 其实我们公司的 Tutor 已经提供 https://github.com/epam-lab/adventure-forks/tree/initial ,需要把解决方案下的项目 AdventureWorks.Web 里的 Web.config 里的 connectionStrings 进行修改。
<connectionStrings>
<add name="AdventureWorks" connectionString="Data Source=chenjo0503.database.windows.net;Initial Catalog=AdventureWorks;Integrated Security=False;User ID=dbadmin;Password=**********;" providerName="System.Data.SqlClient" />
<add name="Entities" connectionString="metadata=res://*/;provider=System.Data.SqlClient;provider connection string="data source=chenjo0503.database.windows.net;initial catalog=AdventureWorks;integrated security=False;User ID=dbadmin;Password=**********;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
特别需要注意的是,需要把 integrated security 设置为 False,否则会遇到“SqlException: Windows logins are not supported in this version of SQL Server”。

Module 4 - Azure SQL的更多相关文章
- PowerShell 操作 Azure SQL Active Geo-Replication 实战
<Azure SQL Database Active Geo-Replication简介>一文中,我们比较全面的介绍了 Azure SQL Database Active Geo-Repl ...
- PowerShell 操作 Azure SQL Active Geo-Replication
前文中我们比较全面的介绍了 Azure SQL Database Active Geo-Replication 的主要特点和优势.接下来我们将从自动化的角度介绍如何通过 PowerShell 在项目中 ...
- 使用Automation将Azure SQL DB容灾到本地
前段时间有个客户有如下需求,将Azure SQL Database数据库容灾到本地(备份频率1小时/次). 那么对于这样的需求,我们可以使用Azure Automation来实现自动化备份到本地. 大 ...
- pymssql连接Azure SQL Database
使用pymssql访问Azure SQL Database时遇到"DB-Lib error message 20002, severity 9:\nAdaptive Server conne ...
- 迁移 SQL Server 数据库到 Azure SQL 实战
最近有个维护的项目需要把 SQL Server 2012 的数据库迁移到 Azure SQL 上去,迁移过程可谓一波三折,故在此分享这次迁移中碰到的点点滴滴,希望对朋友们有所帮助. 文章来源:葡萄城产 ...
- Azure SQL Database (19) Stretch Database 概览
<Windows Azure Platform 系列文章目录> Azure SQL Database (19) Stretch Database 概览 Azure SQL Da ...
- Azure SQL Database (20) 使用SQL Server 2016 Upgrade Advisor
<Windows Azure Platform 系列文章目录> Azure SQL Database (19) Stretch Database 概览 Azure SQL Da ...
- Azure SQL Database (21) 将整张表都迁移到Azure Stretch Database里
<Windows Azure Platform 系列文章目录> Azure SQL Database (19) Stretch Database 概览 Azure SQL Da ...
- Azure SQL Database (22) 迁移部分数据到Azure Stretch Database
<Windows Azure Platform 系列文章目录> Azure SQL Database (19) Stretch Database 概览 Azure SQL Da ...
随机推荐
- mysq中char,varchar,text的区别
mysql5.0.3以后,n都表示字符数(varchar(n)) 检索效率 char > varchar > text 当varchar长度超过255之后,跟text一致,但是设置varc ...
- 使用Spring JDBC连接数据库(以SQL Server为例)
一.配置Spring JDBC 1.导入相关jar包 (略) 2.配置文件applicationContext.xml <?xml version="1.0" encodin ...
- 解决“该Jenkins实例似乎已离线”
在jenkins/pluginManager/advanced最下面 把:https://updates.jenkins-ci.org/update-center.json 换成: 1.http:// ...
- 下载requests库
下载requests库 第一步:找到python的安装位置,可以从下面的图中找到 第二步:复制scripts文件夹的位置 第三步:win+r打开cmd cd 到scripts文件夹的位置 第四步:运行 ...
- 降低制作门槛,人人都是3D“模”术师
12月14日,HDD(Huawei Developer Day)深圳站圆满举办.国内3D扫描类开发团队看书击水为大家分享了与HMS Core 3D建模服务的合作之旅,讲述了如何通过3D物体建模能力为其 ...
- xml数据结构处理
<data> <country name="Liechtenstein"> <rank updated="yes">2< ...
- TURN协议初识及turnserver实践
WebRTC协议栈 图一 WebRTC stack TURN的全称为Traversal Using Relays around NAT,是STUN/RFC5389的一个拓展,主要添加了Relay功能. ...
- 网站高可用架构之BASE原理
BASE理论是eBay架构师提出的. BASE定理来源:是CAP中一致性和可用性的权衡结果,它来自大规模互联网分布式系统的总结,是基于CAP定理逐步演化而来的. BASE定理的核心思想:即使无法做到强 ...
- C# 使用TimeSpan秒数转化为时分秒的写法
1.TimeSpan的生成方法 // 参数: // ticks: // A time period expressed in 100-nanosecond units. public TimeSpan ...
- JAVA字符串繁体简体相互转换
引入maven依赖 <!-- https://mvnrepository.com/artifact/com.github.stuxuhai/jpinyin --> <dependen ...