ADFS maintenance to SQL Server Instance - sql-server

I need to schedule a three hour of maintenance of our SQL Server cluster that contains also the ADFS database (AdfsConfiguration and AdfsArtifactStore) and during this period the databases will be unreachable.
During the maintenance the ADFS services (login, issuance of claim tokens, etc) will it continue to work with the configuration already loaded from the database or the ADFS services will stop working during the "unavailability" of the cluster?
Thanks for tour help

Related

Azure Site recovery for SQL Server Azure VM

If there is a need to set up Azure site recovery for Azure VMs (which has SQL Server installed with Always On availability group installed), then how we can do it?
For a normal Azure VM, I can set up ASR. But if we follow same steps for VMs which have SQL Server and AG group configured, then on DR server will it work same as Primary VM?
Please share any link or blog which help to set it up.
Happy to inform you that Azure provides the complete Disaster Recovery solution for your SQL Server VMs :)
Always On availability groups feature is a high-availability and disaster-recovery solution that provides an enterprise-level alternative to database mirroring. An availability group supports a failover environment for a discrete set of user databases, known as availability databases, that fail over together. Each set of availability database is hosted by an availability replica. Two types of availability replicas exist: a single primary replica. which hosts the primary databases, and one to eight secondary replicas, each of which hosts a set of secondary databases and serves as a potential failover targets for the availability group.
The primary replica makes the primary databases available for read-write connections from clients. The primary replica sends transaction log records of each primary database to every secondary database.
You can explore more Business Continuity and Disaster Recover (BCDR) technologies with Site Recovery options here.
To create an Always On availability group for SQL Server on Azure Virtual Machines (VMs), please follow Manually configure an availability group (SQL Server on Azure VMs) tutorial.

ADFS disaster recovery plan

What are the best practices for ADFS disaster recovery plan with specifications as below:
2 Different ADFS FarmsFarm
1 :- ADFS 2012 farm with SQLFarm
2 :- ADFS 2012 farm with WID database.
To setup ADFS Disaster Recovery Site
There are 2 options to do this, which will give some idea on your scenario.
Scenario: ADFS Farm (ADFS Servers, Proxy) setup on Azure, which need similar setup on another region to prepare for Disaster recovery.
Plan A : Create a ADFS server and WAP server in the DR site and join to the existing Farm.
Create 2 Azure VMs in the DR site
Make sure the 2 VMs are able to communicate over port 443
Make sure the server for ADFS is joined to the same domain and has a line of site to your domain controllers (TCP ports 80 & 443)
Make sure the server of ADFS is able to communicate with your existing primary ADFS server over TCP ports 80 & 443
Install the ADFS server role and configure it to join the existing ADFS farm
Install the WAP server role and complete the configuration wizard to build up the WAP trust with ADFS
In the DR failover drill, modify the internal/external DNS record to point to the DR site ADFS/WAP server and test if the authentication service is working.
You can shutdown the servers on DR site afterwards, please make sure to boot up the machines when there are configuration changes on your production servers to sync up
Plan B : Use ADFS Rapid Restore Script to back up existing ADFS server and quickly restore later
Install the MSI on your existing primary ADFS server
https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/operations/ad-fs-rapid-restore-tool
Backup the current ADFS service to a protected file system or even Azure Storage Container using PowerShell commands like below
Backup-ADFS -StorageType "FileSystem" -StoragePath "C:\Users\administrator\testExport" -EncryptionPassword "password" -BackupComment "Clean Install of ADFS (FS)" -BackupDKM
The backup file will be named to the pattern "adfsBackup_ID_Date-Time"
You can schedule a task to run this back up from time to time so there will always be an up to date back up
In case anything happens, create a new Windows Server with the same OS version, join it to the same domain and leverage the same PowerShell module to restore from back up
This tool can only back up ADFS service, you need to add another server, install the WAP role and re-configure the trust following the wizard.
Reference To Create and customize recovery plans : https://learn.microsoft.com/en-us/azure/site-recovery/site-recovery-create-recovery-plans

SQL Server - Migrate Agent Jobs to Azure

We're in the final phase of migrating our SQL Server on VM to Azure SQL Server. What is the most time-efficient approach to getting our existing SQL Server Agent Jobs out to Azure? I've noticed that inside of SSMS, when connected to an Azure SQL Server, the Agent does not exist - we were aware of this before migrating, but I have yet to have found whether there is an Azure service that replaces the SQL Server Agent Jobs functionality.
There are a number of options.
If you need timed execution of some data momement, Azure Data Factory can be a good replacement.
There is also an Azure Scheduler, that is often mentioned as an alternative. However, I believe that would work better on API's than directly on a database.
I think the best option is Azure automation and create a runbook that connects to your database and performs some action.
An interesting blog that details these options in more detail can be foond at: https://blogs.technet.microsoft.com/uktechnet/2016/02/05/is-sql-server-agent-missing-from-azure-sql-database/

Connection string for Sql Server in Azure VM

If I only have one VM in Azure I can get outtages at any time when Azure decides to reboot/reprovision my server. Therefor I have to at least two servers in an availability group to get a stable environment.
This is used by a web app (web roles) and an important aspect is that the databases are used for reading. They will get their data from sql replication from an on-premises database. The replication can be done separately to each database. Additionally using Azure Sql Database is not an option because we have not be able to implement a durable data sync solution (using Microsoft Sync Framework), Sql Database does not support sql replication, and constantly uploading the complete database would be too slow.
How should the database VMs be hosted and accessed to able to use Sql Server VMs?
One alternative is to use AlwaysOn Availability Groups. This however requires Sql Server Enterprise edition and the price is very high considering I need to have at least two servers. In this scenario I at least get one connection point behind which a sql server always should be answering. This is however beyond our reach because of the cost.
One alternative could be to use Traffic manager to round robin the connections. When the database server goes down we have to wait for TTL to expire before the webrole would refresh the ip address so that seems a big problem.
How should one host Sql Server VMs in Azure?
You can use FailoverPartner parameter in the connection string to specify the secondary replica address. You can see more in this article.

Replication advice for local SQL Server to hosted server

we're close to migrating our legacy MS Access app to SQL Server for our internal warehouse management system. Our customers are often asking us for access to the data for e-commerce integration and general reporting. Once the migration is complete I would like to provide open access to the data via web services and odata. However I don't want to host these services as we are on a slow ADSL connection which won't cope with the traffic.
My question is, can I replicate (one-way) to a remote DB hosted by shared-hosting companies such as Hostgator? I see they have shared windows hosting with unlimited MS SQL DBs. Are there any special requirements on the hosted-side? For instance do I need to explicitly set-up replication on hosting db or is it managed on the client-side?
If this is possible then I might be able to run all our web services and reporting apps on the host's servers, and only the replicated data need travel over WAN. What sort of control is there over replication? Such as bandwidth throttling, replication periods etc? For instance when & how often does replication take place?
I'm new to SQL Server in general and some of the topics are a little overwhelming.
Thanks for your help.
You could try setting up transactional replication with a push subscription with the distributor on your side. The relevant bit is how the distribution agent connects to the subscriber. distrib.exe supports both trusted and SQL authentication, so you should be good to go either way.

Resources