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=&quot;data source=chenjo0503.database.windows.net;initial catalog=AdventureWorks;integrated security=False;User ID=dbadmin;Password=**********;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>

特别需要注意的是,需要把 integrated security 设置为 False,否则会遇到“SqlException: Windows logins are not supported in this version of SQL Server”。

Module 4 - Azure SQL的更多相关文章

  1. PowerShell 操作 Azure SQL Active Geo-Replication 实战

    <Azure SQL Database Active Geo-Replication简介>一文中,我们比较全面的介绍了 Azure SQL Database Active Geo-Repl ...

  2. PowerShell 操作 Azure SQL Active Geo-Replication

    前文中我们比较全面的介绍了 Azure SQL Database Active Geo-Replication 的主要特点和优势.接下来我们将从自动化的角度介绍如何通过 PowerShell 在项目中 ...

  3. 使用Automation将Azure SQL DB容灾到本地

    前段时间有个客户有如下需求,将Azure SQL Database数据库容灾到本地(备份频率1小时/次). 那么对于这样的需求,我们可以使用Azure Automation来实现自动化备份到本地. 大 ...

  4. pymssql连接Azure SQL Database

    使用pymssql访问Azure SQL Database时遇到"DB-Lib error message 20002, severity 9:\nAdaptive Server conne ...

  5. 迁移 SQL Server 数据库到 Azure SQL 实战

    最近有个维护的项目需要把 SQL Server 2012 的数据库迁移到 Azure SQL 上去,迁移过程可谓一波三折,故在此分享这次迁移中碰到的点点滴滴,希望对朋友们有所帮助. 文章来源:葡萄城产 ...

  6. Azure SQL Database (19) Stretch Database 概览

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

  7. Azure SQL Database (20) 使用SQL Server 2016 Upgrade Advisor

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

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

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

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

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

随机推荐

  1. Mysql配置 主主同步

    目录 一.准备 二.操作 A数据库操作 B数据库操作 A数据库操作 一.准备 1.两个数据库版本最好一致 2.两个数据库内数据保持一致,若不一致,可手动调整,比如A比B多一个库,那将这个库导入到B库, ...

  2. 去除爬虫采集到的\xa0、\u3000等字符

    \xa0表示不间断空白符,爬虫中遇到它的概率不可谓不小,而经常和它一同出现的还有\u3000.\u2800.\t等Unicode字符串.单从对\xa0.\t.\u3000等含空白字符的处理来说,有以下 ...

  3. [BUUCTF]REVERSE——相册

    相册 附件 步骤: apk文件,习惯用apkide打开,看它反编译成了jar,就换jadx-gui打开,题目提示找邮箱,因此在导航栏里搜索mail 看到了sendMailByJavaMail(java ...

  4. ctfshow 红包题 武穆遗书

    偶然见看到这道题,就下载了看了看.确实是我自己的逆向能力不够,逆不动.但是我似乎找到了非预期... 下载程序,ida打开,发现不对.后来发现是加了upx壳,拿软件去一下.再次ida打开. 其中buff ...

  5. 第四届“传智杯”全国大学生IT技能大赛题解

    目录 A B C D E F G 今年题目难度普遍偏低.只有 D,F 还好. A 按题目给的公式计算即可.注意应在最后的答案中去掉小数部分. B 按照题意模拟即可.注意答案要与 \(0\) 取 \(\ ...

  6. SDP 格式解析

    一.SDP协议介绍 SDP 完全是一种会话描述格式 ― 它不属于传输协议 ― 它只使用不同的适当的传输协议,包括会话通知协议(SAP).会话初始协议(SIP).实时流协议(RTSP).MIME 扩展协 ...

  7. react 结合gitte 创建项目(详情步骤)

    ​ 创建项目第一步 基本搭建 在创建之前,需要有一个git 仓库,我们要把项目搭建到git 中 目录介绍 cd 到某个盘 mkdir workspace 创建workspace文件夹 cd works ...

  8. reducer在react使用

    ​ 编写store.js 小state reducer 怎么来 纯函数 state+action 生成新的state actions type return{ } state action === s ...

  9. 【手把手教程】uniapp + vue 从0搭建仿斗鱼虎牙直播App:腾讯云MLVB移动直播实践连麦PK+带货

    基于uniapp + vue 实现仿斗鱼虎牙腾讯云移动直播应用实践,实现以下功能 1: 用户登陆 2: 房间管理 3: 房间聊天 4: 直播美颜 5: Svga礼物动画 6: 一对一连麦观众 项目开发 ...

  10. Hibernate 限制查询数目,使用limit功能

    在hql语句中,不能使用limit来限制显示的条数. 如果要限制查询的数目,要使用setMaxResults(e)方法来解决. query.setFirstResult(e);  //e是int值,要 ...