SQL Search and Cross Domain SQL Server

vinodjvinodj Posts: 11 New member
Our SQL Server is on a different domain and I connect using the RunAs executable in SSMS in order to connect to the SQL Server over SSMS 
However SQL Search is not working as it is getting the following error as shown below. I think that the SQL Search is using the current logged in user and not the run as user.
Is there anyway to fix this and be able to use the great tool that is SQL Search?

Thanks,

07 May 2019 03:53:34.595 [SessionStartedUsageApiClient] ERROR RedGate.SQLSearch.UsageReporting.ApplicationUsageHelper - Error during collection of environmental data for usage reporting
System.Security.Authentication.AuthenticationException: Logon failure: unknown user name or bad password.
 ---> System.Runtime.InteropServices.COMException: Logon failure: unknown user name or bad password.

   at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
   at System.DirectoryServices.DirectoryEntry.Bind()
   at System.DirectoryServices.DirectoryEntry.get_AdsObject()
   at System.DirectoryServices.PropertyValueCollection.PopulateList()
   at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName)
   at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
   at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName)
   --- End of inner exception stack trace ---
   at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName)
   at System.DirectoryServices.ActiveDirectory.Domain.GetDomain(DirectoryContext context)
   at System.DirectoryServices.ActiveDirectory.Domain.GetComputerDomain()
   at RedGate.Usage.Client.Payload.SessionStarted.SecurityDataSource.IsJoinedToADomain()
   at RedGate.Usage.Client.Payload.PayloadDataSourceBase.GetDataSafely[T](Func`1 getData)
07 May 2019 03:53:34.807 [Redgate.Usage.AsynchronousUsageApiClient] INFO  RedGate.SQLSearch.UsageReporting.ApplicationUsageHelper - Sending 1 event:
[
  {
    "eventType": "session.started",
    "headers": {
      "productId": "sql-search",
      "productVersion": "3.2.6.2313",
      "eventUuid": "5816f913-4f31-4a9b-9786-b3c3dea1d8f4",
      "usageUserId": "b2ae0b0e-a9e1-4f58-b555-ba2876894b29",
      "sessionUuid": "164c930b-1dc1-4a4c-a76d-abcec018314d",
      "createdTimeUtc": "2019-05-07T07:53:34Z"
    },
    "payload": {
      "hostMachine": {
        "software": {
          "operatingSystem": {
            "name": "Microsoft Windows 7 Professional ",
            "is64Bit": true,
            "platform": "Win32NT",
            "servicePack": "Service Pack 1",
            "compatibilityVersion": "6.1.7601.65536",
            "kernelVersion": "6.1.7601.17965"
          },
          "dotNet": {
            "current": {
              "clrVersion": "4.0.30319.42000",
              "csharpVersion": "4.7.3353.0",
              "is64Bit": false
            },
            "frameworks": {
              "2.0": {
                "isInstalled": true,
                "version": "2.0.50727.5420",
                "servicePack": 2,
                "release": null
              },
              "3.0": {
                "isInstalled": true,
                "version": "3.0.30729.5420",
                "servicePack": 2,
                "release": null
              },
              "3.5": {
                "isInstalled": true,
                "version": "3.5.30729.5420",
                "servicePack": 1,
                "release": null
              },
              "4.0": {
                "isInstalled": true,
                "version": "4.7.03062",
                "servicePack": null,
                "release": 461814
              }
            },
            "powerShell": {
              "version": "5.0.10586.117"
            }
          },
          "localization": {
            "currentCulture": {
              "name": "en-US",
              "lcid": 1033
            },
            "currentUiCulture": {
              "name": "en-US",
              "lcid": 1033
            },
            "installedUiCulture": {
              "name": "en-US",
              "lcid": 1033
            },
            "localTimeZone": {
              "id": "Eastern Standard Time",
              "utcOffset": "-04:00"
            }
          },
          "processInformation": {
            "filename": "Ssms.exe",
            "fileVersion": "2017.0140.17289.00 ((SSMS_Rel_17_4).181117-0805)",
            "productVersion": "14.0.17289.0"
          }
        },
        "hardware": {
          "processors": [
            {
              "numberOfLogicalProcessors": 4,
              "maxClockSpeedInMHz": 2401
            }
          ],
          "memory": {
            "totalPhysicalMemoryInBytes": 8079618048,
            "errorCorrection": "None"
          },
          "display": {
            "basicDpi": {
              "x": 96,
              "y": 96
            },
            "screens": [
              {
                "isPrimary": true,
                "bounds": {
                  "width": 1920,
                  "height": 1080
                }
              },
              {
                "isPrimary": false,
                "bounds": {
                  "width": 1920,
                  "height": 1080
                }
              },
              {
                "isPrimary": false,
                "bounds": {
                  "width": 1920,
                  "height": 1080
                }
              }
            ]
          },
          "virtualizationInfo": {
            "computerManufacturer": "LENOVO",
            "computerModel": "20JTS0QD00",
            "biosVersion": "LENOVO - 1300",
            "biosBIOSVersion": [
              "LENOVO - 1300",
              "N1WET51W (v1.30 )",
              "Phoenix BIOS SC-T v2.1"
            ],
            "biosSerialNumber": "PC0RZKST"
          }
        }
      }
    }
  }
]
Tagged:

Answers

  • Eddie DEddie D Posts: 1,780 Rose Gold 5
    Hi, Thank you for your forum post.

    I agree with your suspicion that SQL Search is attempting to connect as the logged in user and not the Run as user.

    I quote from your post:  I connect using the RunAs executable in SSMS.  I cannot find this option, can you please advise how you select the RunAS option?

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • vinodjvinodj Posts: 11 New member
    it is done by creating a shortcut on the desktop to the RunAs command in Windows and then providing the path to SSMS Executable 
    Here is the shortcut path
    "C:\Windows\System32\runas.exe /netonly /user:STELLARISHEALTH.NET\VJACOB1 "C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe"

  • vinodjvinodj Posts: 11 New member
    So is there anyway to specify what user to use with SQL Search or I am unable to use the software?
  • vinodjvinodj Posts: 11 New member
    Hi - just checking to see if there are any updates to this
    I like the RedGate products in fact we have a license for SQL Source Control and SQL Prompt which I love
    But wanted to also use the search tool - thanks
Sign In or Register to comment.