exec sp_configure 'clr enabled' not working on Azure SQL DB - database

How can I disable clr and remote access on Azure Paas DB that was migrated from Azure SQL on IaaS?
exec sp_configure 'clr enables' not working on SQL PaaS DB and I need to disabled clr and remote access.

CLR is not supported on Azure SQL Database as explained here, so you don't need to disable CLR on Azure SQL. In PaaS, only Azure Managed Instance supports CLR.
About configuring "Remote Access", that is a deprecated feature on SQL Server and is not available on Azure SQL PaaS as explained here.

Related

Only members of the sysadmin fixed server role can perform this operation. Azure SQL Server Database vs SQL Server Database

I am moving from the "Classic" SQL Server Database On-Premise to Azure SQL Server Database, Unfortunately, One of the procedures that I used to execute is not working for Azure SQL Server Database:
EXEC sp_removedbreplication "Database Name"
Got the following error using the SQL ADMIN user:
Only members of the sysadmin fixed server role can perform this
operation.
However, I tried grant the "sysadmin" role via proc, but no success.
EXEC sp_addrolemember 'sysadmin', 'sqladmin';
Cannot alter the role 'sysadmin', because it does not exist or you do
not have permission.
I could not find any Server Role directory via SQL SERVER Management studio
If you check out the docs for sp_removedbreplication you will see that only boxed SQL Server editions and Azure SQL Managed Instance supports that stored procedure, not Azure SQL Database.
You can see in this table what types of replications Azure SQL Database supports.

How to migrate Logins from SQL Server to Azure SQL DB

I want to migrate SQL Server logins to Azure SQL.
I tried using SQL Server Integration Service "Transfer Logins Links" but it throws "Keyword or statement option 'default_database' is not supported in this version of SQL Server."
create a user in master database and set new password for the login.
No matter which ways migrate SQL Server to Azure SQL(single database), DMA or DMS, they all don't support migrate the logins or uses.
We must re-create the logins/users manually in the new Azure SQL database. There isn't a way can achieve that for now.
If you migrate SQL Server to SQL Server on Azure Virtual Machines(managed instance), you can reference this documnet: Migrate SQL Server logins with Data Migration Assistant.
Hope this helps.

Setting up Ongoing Replication using AWS DMS and RDS

I'm trying to use AWS Database Migration Service (DMS) to setup "ongoing replication" from an AWS RDS hosted SQL Server 2016 database to an EC2 hosted SQL Server 2016 database. When I create a DMS task to do this, I get an error:
2018-01-17T12:13:24 [SOURCE_CAPTURE ]E: RetCode: SQL_ERROR SqlState: 42000 NativeError: 21089 Message: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Only members of the sysadmin fixed server role can perform this operation. Line: 1 Column: -1 [1022502] (ar_odbc_stmt.c:4406)
According to the documentation, both users used to connect need to be sysadmins. However, it's not possible to do this with AWS RDS SQL Server databases but the documentation suggests that this is a supported scenario. How can I get this to work?
You can use Microsoft SQL Server as a replication source to RDS, but you cannot use SQL Server as the destination.
To setup replication, one side is the distributor and the other the subscriber. For RDS you do not have sysadmin rights, therefore you cannot setup the distribution.
Security Requirements for Replication
You can achieve this with Cloudbasic's RDS SQL Server HA/DR tool available on the AWS Marketplace: https://aws.amazon.com/marketplace/pp/B00OU0PE5M
Launch it in the same AWS VPC as your RDS SQL Server source instance. In the New Replication setup section, ensure to select SQL Server-to-SQL Server replication (as the tool also streams data from SQL Server to Redshift and S3 data lakes).

How do I add my Azure Sql Server Admin User to 'Sysadmin' Server Role?

I'm attempting to migrate a Sql Db from a local server to Azure using the new Data Migration Assistant v2.0 (announced here).
It seems to have connected to my source (a local SQL 2014 server, Windows Auth) and destination (Azure V12 SQL, server admin username and password) servers correctly, but gives the following error when attempting to get to the 'Add Database' step.
Provided credentials for target server
'fooserver.database.windows.net' have insufficient server-level
permissions to perform migration. The credentials used to connect to
the target server must be a member of the sysadmin server role.
How do I add my Azure Sql Server admin user to the 'sysadmin' server role? I couldn't see anything related to this in the Azure Portal.
I do not believe that Data Migration Assistant is the right tool for the job. If you original database is Microsoft SQL one you could either use The Microsoft SQL Server 2016 Upgrade Advisor Preview or The Export Data Tier application wizard in SQL Server Management Studio. I have used both approaches many times and they work very well.
The following article is probably the best one our there that lists and explains all available options - SQL Server database migration to SQL Database in the cloud.
Let me know if you have any questions.
Update 1 - #Ted has contacted Microsoft and they have said that Data Migration Assistant does not support migrating to Azure at the moment. This scenario will be supported in a future version.
Nov 2017 Update
The MS Data Migration Assistant now absolutely does support migrating on premises SQL databases to Azure SQL, as well assessing your DB for compatibility, and providing / applying suggestions for fixes if required.

Need to select best Azure service to access on-premises sql database

I have a business scenario where web site and SQL database will be on cloud and after some operations want to save the cloud SQL data to the SQL database which is on-premises and not exposed to the internet.
What would be the best architecture for this scenario?
Need suggestions.
you can either setup a VNET to connect your Website to your on-premises SQL Server or you can configure Azure Hybrid Connect. (see this link)
If the website does not use local resources you can always go for azure websites. Choose the tier based on the requirement.
As far as the database is concerned you choose azure sql database. ( tier based on requirement-size and performance) . You can set up azure sql sync (in preview) to sync between sql azure and local sql server. Or you can take a back up of sql azure db - bacpac. and then restore it local sql server using sql management studio.

Resources