Versions Compared

Key

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

...

Code Block
languagesql
themeMidnight
titleDatabase Credential outcome
SELECT c.Label
       , c.Username
       , o.Name as Outcome
       , c.Instance     -- Instance for MS SQL is less useful than for Oracle, but still interesting
       , ch.[IPAddress]
       , p.Name as [Project Name]
FROM [history].[t_ConnectionHistory] ch
    INNER JOIN config.t_Credential c ON ch.CredentialID = c.CredentialID
    INNER JOIN config.t_Outcome o ON ch.OutcomeID = o.OutcomeID 
    INNER JOIN jobs.t_JobLocationProjectIPRange AS jobProj ON jobProj.JobID = ch.JobID
    join config.t_Project p on jobProj.ProjectID =p.ProjectID
WHERE Connection = 'Oracle Database'
  AND p.ProjectID = '1'

...