Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following queries will enable you to investigate database connection issues:

Warning

These queries work with iQSonar releases up to and including Fu R3.
They do NOT work with iQSonar Gwynn R1 or later due to changes to the history.t_ConnectionHistory table.


Note that the "Type" column is the Application Type, which is not the same as the Connection type in most of the other queries on this page. You can get a list of valid types in your environment with the following query:

Code Block
languagesql
themeConfluence
SELECT DISTINCT Type FROM [history].[v_DiagnosticsApplicationList]

In a large estate, we might need to know which database credentials are valid on which hosts, in order to contact the DB Owners and request new credentials. As with previous queries, the user does need to know the Project ID. The user also needs to know that Oracle Databases and clusters use the Connection type Connection = 'Oracle Database'  and Microsoft SQL Servers/Clusters have the connection type Connection = 'MS SQL server'.

Code Block
languagesql
themeMidnight
titleDatabase Info
SELECT [ProjectID]
      ,[TargetName]
      ,[IPAddressOrHostname]
      ,[FoundApplicationID]
      ,[Name]
      ,[Type]
      ,[Vendor]
      ,[ApplicationID]
      ,[Status]
      ,[DeviceID]
      ,[Reason]
      ,[scancount]
      ,[DeviceHostname]
      ,[TargetBinary]
  FROM [history].[v_DiagnosticsApplicationList]
  WHERE (Type = 'Oracle Database Server' or Type = 'SQL Server')
    AND ProjectID = '1'

...