I develop a WebApi using a LocalDB, but I want to deploy it to Azure. I found out that you cant use a LocalDB, but you can use a SQL Server Compact.
Is there a way to migrate my old database including the EDMX and all the models to the SQL Server Compact or is there any other approach to upload the application to Azure?
Do the same, but for MSQL, and after use your Microsoft SQL Server Management Studio for your TSQL deployment on SQL Azure.
I found out that you cant use a LocalDB
We can connect to on-premises SQL Server from a WebApp in the Azure App Service using Hybrid connections. There are some snippet from the document. More detail info please refer to tutorial.
Hybrid Connections can connect Azure App Service Web Apps to on-premises resources that use a static TCP port. Supported resources include Microsoft SQL Server, MySQL, HTTP Web APIs, App Service, and most custom Web Services.
As matze supplied link mentioned, we also can publish database to SQL Azure.
Related
I am using access ODBC driver "provider=Microsoft.ACE.OLEDB.12.0;" in my ASP.NET Web application.
But I don't want to install the driver on each machine to use my Web App. Please suggest something to do to avoid installing the driver.
There seems to be some kind of misconceptions here.
The WHOLE idea of a web server? Well, you setup and install the required software and drivers and systems and software on the web server. Once done, then anything from a iPad to a smartphone to a computer ONLY requires a web browser. So client side software is simply a browser. Is that not why we like and use web applications?
However, if you going to use say SQL server on the web site? Then yes, you have to setup + install the appropriate SQL server drivers on that site.
And if you going to use MySQl on that web site? Then yes, you have to setup + install the appropriate MySQL server drivers on that server hosting the web site.
And lo and behold? If you going to use Excel, or MS Access on that web site? Take a wild guess here? Then once again you have to setup + install the MS-access drivers on that web site.
So it not clear really what you are asking here?
But to answer your question?
If you going to use some kind of database on your server hosting the web site? Well then you have to ensure that the correct drivers are installed. How this works for MS-access, Oracle, MySQL, SQL server or any database is the SAME.
You simple have to ensure that such database systems and drivers are available on that server hosting the web site.
And if you looking to have this application work on other servers and web sites? Then of course once again, be it Oracle, MySQL, MS-access or any other database system? Then you have to ensure the correct database drivers are setup and installed on that web server. How this works for ANY database system you plan to use is the same. MS-Access is not any kind of special exception here at all.
I have an Azure VM and a SQL DB on that VM - IAAS.
I want to get data from that DB using C#, but I'm unable to get how to connect to SQL of Azure VM using C#.
Any suggestions?
What would be the connection string I have to pass, and how can I get data from that SQL on Azure VM?
About connect to SQL Managed instance, it's located inside a Vnet.
The options to connect to it are :
From the Azure
Inside the same VNet (different subnet)
From different VNet using VNet peering / Site-to-Site VPN / Express
Route circuit (for cross-region connection)
From on-premises .
Using express Route or VPN
Then you can learn from this document:
Connect your application to Azure SQL Database managed instance:
You may choose to host application in the cloud either by using Azure App Service or some of Azure's virtual network (VNet) integrated options like Azure App Service Environment, Virtual Machine, Virtual Machine Scale Set. You could also take hybrid cloud approach and keep your applications on-premises.
Whatever choice you made, you can connect it to a Managed Instance.
After you configured these settings, you can reference Quickstart: Use .NET and C# in Visual Studio to connect to and query an Azure SQL database. This tutorial also include the Managed instance.
Hope this helps.
I have an asp website with a SQL server that for some reason doesn't get passed along when I publish the solution. How do I get a SQL server running on azure? I've looked it up and tried following a couple of tutorials but there doesn't seem to be a whole lot of information on it.
To get an SQL server running on Azure, you have two solutions :
PaaS solution with Azure SQL Database
IaaS solution by using an SQL server Instance on a dedicated virtual machine
Here is a nice link explaining benefits and limitations of both solution.
Regards
I have been searching for a way to connect my android application with SQL Server 2008 R2.
Previously I have worked on mysql-android base code which use php ... and have used json parser in android code.
I don't know how to connect with SQL Server via c# webservice.
Please reply with example for doing so.
Thanks in advance
Why your task is 'I have been searching for a way to connect my android application with SQL Server 2008 R2'? Your android application doesn't connect to any database, it connects to web service. But web service really connects to database. So in fact you need to connect your web service to SQL Server.
There are two obvious ways:
a) update your php web service to use SQL Server
b) redesign your web service using c#
Both ways need separate discussion after you make your decision.
I have a windows application which is uses SQL Server as its database. For this application I want to create a setup file for other desktops, but I don't want to install SQL Server on each and every client.
Can you please suggest how to create Windows application with local storage setup file without installing any databases or framework libraries?
You can use SQL Server Compact. The database is stored in a file that you carry with the product rather than requiring a database server.
If this is just for "settings" then consider storing it in the user's application data as a simple XML file.
You don't need to install SQL Server on each client - you can simply install it on a central server then all the clients can connect to and use the same instance.
If this is not a good option because each client must have its own storage locally then you can look to use something like SQL Server Compact, which is a very cut down version of SQL Server that doesn't require installation and runs inproc.