GetActiveInstances.sql 220 B

12345678
  1. CREATE PROCEDURE [dbo].[GetActiveInstances]
  2. @serverId INT
  3. AS
  4. -- Get all the running scripts for this server
  5. SELECT * FROM [Instances] i
  6. WHERE i.[ServerId] = @serverId AND i.[EndTime] IS NULL AND i.[IsActive] = 1