I have a .Net Core application that is using a SQL Server Database. I know how to deploy a project or application to Azure that's not using a database. But what if I want to deploy an application that is using a sql server database. Do I create a SQL Server
Database on Azure and then connect to it? If so what happens to all of my existing connectionstring settings in the web.config file? Thanks !
Do I create a SQL Server Database on Azure and then connect to it?
Yes. You will have a server address available in the Azure portal that you use in SSMS on your local machine to connect to SQL Server on Azure. You can either backup your database and restore it to Azure or script it all and run that script on Azure.
rkrex
If so what happens to all of my existing connectionstring settings in the web.config file?
EDIT: Right-click the Web.config file in your project and you will see the choice "Add Config Transform" on the popup menu.
Mark all posts that give the desired result the answer. If you only mark the last that gave you clarification because you misread an earlier post others will be confused. Some of us are here to help others and our point to post ratio matters.
Member
282 Points
298 Posts
SQL Server Database
Jun 28, 2018 06:23 PM|rkrex|LINK
I have a .Net Core application that is using a SQL Server Database. I know how to deploy a project or application to Azure that's not using a database. But what if I want to deploy an application that is using a sql server database. Do I create a SQL Server Database on Azure and then connect to it? If so what happens to all of my existing connectionstring settings in the web.config file? Thanks !
Contributor
7048 Points
2189 Posts
Re: SQL Server Database
Jun 28, 2018 07:46 PM|ryanbesko|LINK
Yes. You will have a server address available in the Azure portal that you use in SSMS on your local machine to connect to SQL Server on Azure. You can either backup your database and restore it to Azure or script it all and run that script on Azure.
Use Web.config transforms: https://msdn.microsoft.com/en-us/library/dd465326%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
EDIT: Right-click the Web.config file in your project and you will see the choice "Add Config Transform" on the popup menu.
Member
282 Points
298 Posts
Re: SQL Server Database
Jun 28, 2018 09:22 PM|rkrex|LINK
Thanks very Much !