I have amazon EC2 instance on AWS where SQL server is installed. I want to migrate SQL Server data and SSIS packages to Azure VMs.
I can not effort any loss of information.
What would be the best way to do so ?
I would recommend to use Azure Blob Storage as the transport.
SQL Server out of the box can create backups and can restore databases directly to/from Azure Blob containers
For instance:
CREATE CREDENTIAL sql_backup_credential
--storage account name:
WITH IDENTITY='your-storage-account',
--storage account key from portal:
SECRET = 'pvv99UFQvuLadBEb7ClZhRsf9zE8/OA9B9E2ZV2kuoDXu7hy0YA5OTgr89tEAqZygH+3ckJQzk8a4+mpmjN7Lg=='
BACKUP DATABASE Test
TO URL = N'https://your-storage-account.blob.core.windows.net/your-container/test.bak'
WITH credential = 'sql_backup_credential';
So, this way all user databases + SSISDB can be transferred from one isolated box to another.
Of course, Firewall settings of SQL Server VMs to allow outbound and inbound connections for HTTPS.
Related
I'm trying to publish my web application (ASP.NET MVC) to Azure.
When I developed the system locally I used SQL Server as the database server.
Here I'm trying to use Azure SQL.
I want to enable Service Broker on the Azure database but it won't let me do it. I got an error that.
The operation cannot be performed on database "dbrngls" because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.
Is there any other way to do this in Azure SQL?
This is the code I tried to do to enable Broker
ALTER DATABASE [dbrngls] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE
Service broker is not available for Azure SQL Database, you'd need an Azure SQL Managed Instance.
If I use one of the methods to migrate a SQL server instance with several databases into a Azure Managed Instance, would the procedure also replicate any login accounts with access rights?
Particular interested in knowing how this handles Active Directory accounts
From what I know, it doesn't and you cannot use Windows Authentication but only SQL Server Authentication or Azure AD. I've migrated several times a local database of my local SQL Server instance to Azure and I've done it using Export Data-Tier to .bacpac (this is the extension of the DB in Azure) and then deploying it (both actions from SSMS):
However, please be aware that you have to drop any users that use for authentication Windows Authentication because you'll get an error at the moment of deploying it since it cannot inherit your server's active directory settings. Then, you can define your own AD in Azure and use it.
Managed instance is a new deployment option of Azure SQL Database, providing near 100% compatibility with the latest SQL Server on-premises (Enterprise Edition) Database Engine.
The migration only support replicate the login.
You could get this from this document: Tutorial: Migrate SQL Server to an Azure SQL Database managed instance offline using DMS:
By default, Azure Database Migration Service only supports migrating SQL logins. To enable support for migrating Windows logins, see the Prerequisites section of this tutorial.
That means you must re-create all the users and grant it access right(database roles) manually.
Hope this helps.
I'm trying to build a webservice that talks to a SQL database hosted on a server in our internal network. The service is hosted by Azure as a Web App. Is there a good way of doing this? Do I have to use Azure Sql databases, and if I do, is there a way to have the Azure database act as a proxy for our internal database?
There are already rules permitting connections to the ports on our database server, so I don't think that's the problem. I see a lot of questions regarding connecting to Azure hosted sql databases, but nothing about connecting Azure web apps to other kinds of databases.
The error occurs when I try to call a stored procedure (via generated entity framework code) and is as follows:
Error occurred: System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
Our database is configured to allow remote connections, so what I'm guessing the Web App is having difficulty connecting to our vpn.
Please let me know if you need any additional information.
Thanks,
Josh
You can leverage Azure Hybrid Connections which is a feature of App service. Within App Service, Hybrid Connections can be used to access application resources in other networks. It provides access from your app to an application endpoint and uses Azure Relay service to connect to on-premise.
Check out the below link for more details :
https://learn.microsoft.com/en-us/azure/app-service/app-service-hybrid-connections
First option is to look on azure app service hybrid connection but for you to do that you should have Windows server 2012 or above.
Azure App Service Hybrid
Azure App Service hybrid connection is good if you are pulling small amount of data.
If you are pulling large amount of data or your SQL server version is below server 2012 you have two options:
Azure Site to Site VPN
Azure SQL Data Sync
Azure SQL DB Sync is a feature that available on Azure SQL database. You can create a Azure SQL database on azure and sync your on-premise SQL database or SQL database table to Azure SQL database and you can connect your application to Azure SQL database instead of connecting to on-premise database server. This will increase your performance of your application.
We ended up adding the application to an Azure Virtual network that allowed connections to our on-prem servers. The remaining difficulties were due the wrong port numbers being open.
What was very helpful in debugging this was the Kudu console in Azure, under Advanced tools -> console. There you can run commands from the machine hosting your application like ping, or the below:
sqlcmd -S tcp:servername,1433 -U Username -d databasename -P password -q "SELECT * FROM tablename"
We would like to backup our on-premises SQL server to Azure Recovery Service Vault. We tried to use the Azure Backup Server but there is a domain dependency.
Is there a way to use Azure Backup Server or System Center 2016 without having your servers in a specific domain ? The SQL server has the default WORKGROUP domain.
What would be the best alternative solution to backup a SQL on-premises server to Azure Recovery Service without adding the server to a domain ?
We decided to use the build-in SQL BACKUP command to URL. This URL is in our case the Azure Storage account.
See documentation: https://msdn.microsoft.com/en-us/library/jj919148%28v=sql.110%29.aspx?f=255&MSPPError=-2147217396
The backup file is a blob type. But there is a restriction you can not use a "Blob purpose" Azure storage account because this gives you a 400 Bad Request. It is possible to backup your SQL database in a "General Purpose" Azure storage account.
my project requires me to use PHP and connect to the oracle database service hosted by our department. I want to use amazon ec2 to deploy the project. Is it able to connect to an external oracle database from amazon ec2 by PHP?
I've tried google app engine. It doesn't support external database connection. what a drawback!
Yes, it does. By default, Ec2 instances launched in EC2-Classic have full outbound access. So, the Ec2 instance can connect to your Oracle DB Provided your Oracle DB is accessible over the internet (in other words, your Oracle DB has a public IP address and you have firewall rules configured on your end to allow inbound access to Oracle DB).
If you Oracle DB is in a private network, then you need proxy server or SSH tunnel (or something similar) to connect to the instance.
Overall, there is no limitation on EC2 side.