Error: ADFS Specify Configuration Database – An error occurred while checking if the database exist

Hello Readers

I have recently been playing with ADFS within my lab and ran into the following issue when specifying the Database instance I want to use for ADFS Data. The error I received was

An error occurred while checking if the database exists: Unable to connect to the database.

image

(1) have the SQL Administrator grant permissions to you to create the AD FS Configuration database in the specified SQL Server

(2) have the SQL Administator create the ADFS configuration database by running SQL scripts.

Option 1: Doesnt refer to the issue as I am using a service account with rights to the SQL Server.

Option 2: You can find out the full cmdlets here: http://technet.microsoft.com/en-us/library/dn479308.aspx

The command I will be using is

PS C:\> Export-AdfsDeploymentSQLScript -ScriptDestinationFolder “c:\script” -ServiceAccountName “lyncme\svc.adfs”

image

As you can see the Export was successful

image

You will now need to copy the files to your SQL Server and open SQL Management Studio

image

Connect to the SQL Instance you are trying to install ADFS Database to, in my case it is DB01\Core

image

Press New Query

You will need to open the sql script “Set Permissions” via notepad and copy and paste into the query

image

Press Execute

This command should complete successful and you will now need to return to the ADFS

image

Press OK to the Error and Press Next

image

Tick Overwrite existing ADFS Configuration Database Data and Press Next

You will now be able to successfully deploy ADFS on your server.

This concludes this post

Regards

Andrew Price

Leave a Reply

Your email address will not be published. Required fields are marked *