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. matplotlib animation

    import numpy as np from matplotlib import pyplot as plt from matplotlib import animation fig, ax = p ...

  2. Springboot集成velocity

    1.加入maven包 <parent> <groupId>org.springframework.boot</groupId> <artifactId> ...

  3. pytest_BDD + allure 自动化测试框架

    一.项目结构 --driverAction ----Assessement.py ----basicPageAction.py ----BrowserDriver.py --drivers ----c ...

  4. Nginx配置重定向

    目录 一.简介 二.配置 访问a页面重定向到b页面 访问当前nginx,重定向到其他网址 一.简介 据相关变量重定向和选择不同的配置,从一个 location 跳转到另一个 location,不过这样 ...

  5. vue插槽理解

    1.插槽作用:父向子传递一段Html代码块 2.分类: (1)默认插槽:规则:父给子传,用父,不传,用子. (2)具名插槽:适用于一个页面有多个插槽时,需要做区分,使用name属性.给插槽取个名字 ( ...

  6. 简单的理解 Object.defineProperty()

    Object.defineProperty()的作用就是直接在一个对象上定义一个新属性,或者修改一个已经存在的属性. Object.defineProperty(obj,prop,descriptor ...

  7. QT QApplication干了啥?

    ------------恢复内容开始------------ QCoreApplicationPrivate 会取得current thread; 在windows平台创建TLS变量,记录线程信息,并 ...

  8. 保留重复项(Power Query 之 M 语言)

    数据源: "姓名""基数""个人比例""个人缴纳""公司比例""公司缴纳"&qu ...

  9. msfvenom生成payload命令

    msfvenom生成payload命令 windows: msfvenom -a x86 --platform Windows -p windows/meterpreter/reverse_tcp L ...

  10. java面向对象类的继承~ 匿名类 ;多态特性;强制类型转换

    类的继承 创建子类语法:     修饰符 class 子类名 extends 父类名{        } 匿名子类语法: 直接实例化,过程中通过匿名类 继承父类,在实例化过程中将子类匿名 <父类 ...