Hello,
You can try the steps below to execute the query:
- Launch SQL Server Management Studio and connect to WID. In SSMS, choose
Database Engine
as the server type. For server name, enter\\.\pipe\MICROSOFT##WID\tsql\query
. ChooseWindows Authentication
. - Open a new query window. Fall in the actual database name and execute the query.
Here’s an example query. Note that the exact table and column names can vary based on your specific configuration:
USE RDCbDB; -- Replace with your actual RDCB database name
GO
SELECT
Sessions.SessionID,
Sessions.UserName,
Connections.RemoteIPAddress,
Sessions.SessionState
FROM
Sessions
JOIN Connections ON Sessions.ConnectionID = Connections.ConnectionID
WHERE
Sessions.SessionState = 'Active'; -- filter by active sessions, if needed
Note: You need to require modification based on the actual schema of your RDCB database. Always ensure you have proper backups and access rights before making changes or running queries against critical databases. ———————————————————————————————————
If the Answer is helpful, please click "Accept Answer" and upvote it.