<h2>Troubleshooting the credential issue while discovering MSSQL Database</h2><br/><div style="overflow-x:auto"><article><div ><h3 >Issue </h3><section><style type="text/css"><!-- div.margin{ padding: 10px 40px 40px 30px; } table tr td { padding: 15px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } .title { color: #D1232B; font-weight:normal; font-size:28px; } .spanColor { color: #646464; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } hr{ border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc; } ul { list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --></style> <div class="margin"> <p class="title"><span class="title">Troubleshooting the credential issue while discovering MSSQL Database</span></p> <h1>Issue</h1> <hr style="border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc;" /> <div>When attempting to discover an MSSQL server, the MSSQL Probe will fail with Error: <em>Authentication failure with the local MID server service credential.</em></div> <div> </div> <div>In this scenario, you can run the following PowerShell script from the MID Server to verify the credentials.</div> <div> </div> <div>If the credentials are successful, it should list the databases available on the SQL server.</div> <h1>Solution</h1> <hr style="border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc;" /> <div> <br /> <div style="background: #ffffff; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em; white-space: pre-wrap;"> <pre style="margin: 0; line-height: 125%;"> script start ###### [reflection.assembly]::LoadWithPartialName('Microsoft.SqlServer.Smo');[reflection.assembly]::LoadWithPartialName('Microsoft.SqlServer.SqlWmiManagement'); #Please change password below with password for "<username@domain.com>" $password = "" $dbinstance = "\," $server = New-Object Microsoft.SqlServer.Management.Smo.Server($dbinstance) $server.ConnectionContext.LoginSecure = $true $server.ConnectionContext.ConnectAsUser = $true $server.ConnectionContext.ConnectAsUsername = "<username@domain.com>" $server.ConnectionContext.ConnectAsUserPassword = $password $server.Databases | select name script End ###### </pre> </div> </div> </div></section></div></article></div>