Tag: Database Connection
-
T-SQL Stored Procedure to Get the Number of Connections and Login Names per DB
[code language=”sql”] /* Script to get the number of connections and their login names on an instance Last modified by Nick Xu on 2014-03-05 Usage: EXEC sp__GetDBConnections ‘master’ EXEC sp__GetDBConnections */ –For generic setting USE master GO IF EXISTS(SELECT * FROM sysobjects WHERE name = ‘sp__GetDBConnections’ AND type = ‘P’) BEGIN DROP PROC sp__GetDBConnections END…
-
T-SQL Stored Procedure to Get the Number of DB Connections and Logins per Database
[sourcecode language=”text” wraplines=”false”] /* Script to get the number of connections and their login names on an instance Last modified by Nick Xu on 2013-08-17 Usage: exec sp__GetDBConnections ‘master’ */ –For generic setting use master go if exists (select * from sysobjects where name = ‘sp__GetDBConnections’ and type = ‘P’) begin drop proc sp__GetDBConnections end…