Following is the steps to connect to the Windows internal database on Windows 2012 machine.
· Download Microsoft® SQL Server® 2012 Express from the link
o Microsoft® SQL Server® 2012 Express
https://www.microsoft.com/en-us/download/details.aspx?id=29062
· Install Microsoft® SQL Server® 2012 Express on the ADFS server ( This is because the WAP configuration is stored in the ADFS configuration database)
o Microsoft® SQL Server® 2012 Express requires NetFx3 feature (.Net Framework 3.5) to be enable on the Windows 2012 sever, if you face issue enabling .net feature follow the steps in the link
· Once installation is completed launch the SQL management studio.
· For server name enter \\.\pipe\MICROSOFT##WID\tsql\query in case if we are connecting to Windows Server 2012 internal database.
o If we are connecting to windows 2003 and 2008 windows internal DB then we ne use \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
· Then click on connect and now we can access the Windows internal database and execute SQL queries as required.