exec sp_who
exec sp_who2
SELECT DB_NAME(dbid) AS DBName,
COUNT(dbid) AS NumberOfConnections,
loginame AS LoginName
FROM sys.sysprocesses
WHERE dbid > 0
GROUP BY dbid,
loginame;
SELECT net_transport
FROM sys.dm_exec_connections
WHERE session_id = @@SPID;
Testing a connection without installing any SQL tools...
Create an empty text file and give it a .udl extension
Double-click the file and the window shown on the right should appear.
Enter the login information you want to test
Select a database
Click "Test Connection"
TODO