Easily find this page again using the shortlink: https://bct.azrcrv.co.uk/2000000110
Table Type: System
Table Name: Active Session
Database Table Name: Active Session
Due to how Dynamics BC tables and columns are named, square brackets need to be wrapped around the table name and column names. Below are example queries showing how Active Session can be queried.
Show/hide an example select of all columns
SELECT
*
FROM
[Active Session]
Show/hide an example select of all columns by name
SELECT
[User SID]
,[Server Instance ID]
,[Session ID]
,[Server Instance Name]
,[Server Computer Name]
,[User ID]
,[Client Type]
,[Client Computer Name]
,[Login Datetime]
,[Database Name]
,[Session Unique ID]
,[$systemId]
,[$systemCreatedAt]
,[$systemCreatedBy]
,[$systemModifiedAt]
,[$systemModifiedBy]
FROM
[Active Session]
Show/hide an example select of all columns including those from all joined tables
SELECT
*
FROM
[Active Session] AS [Active Session]
LEFT JOIN
[User] AS [User]
ON
[Active Session].[User SID] = [User].[User Security ID]
LEFT JOIN
[User] AS [User]
ON
[Active Session].[SystemCreatedBy] = [User].[User Security ID]
LEFT JOIN
[User] AS [User]
ON
[Active Session].[SystemModifiedBy] = [User].[User Security ID]
Show/hide columns in Active Session table
Field No. | Field Name | Field Caption | Class | Type | Length | SQL Column Name | SQL DataType |
---|---|---|---|---|---|---|---|
1 | User SID | User SID | Normal | GUID | 16 | User SID | uniqueidentifier |
Key to join to the User table.Show/hide example querySELECT [Active Session].[User SID] ,[User].[User Security ID] FROM [Active Session] AS [Active Session] LEFT JOIN [User] AS [User] ON [Active Session].[User SID] = [User].[User Security ID] | |||||||
2 | Server Instance ID | Server Instance ID | Normal | Integer | 4 | Server Instance ID | int |
Key to join to the Server Instance table.Show/hide example querySELECT [Active Session].[Server Instance ID] ,[Server Instance].[Server Instance ID] FROM [Active Session] AS [Active Session] LEFT JOIN [] AS [Server Instance] ON [Active Session].[Server Instance ID] = [Server Instance].[Server Instance ID] | |||||||
3 | Session ID | Session ID | Normal | Integer | 4 | Session ID | int |
4 | Server Instance Name | Server Instance Name | Normal | Text | 250 | Server Instance Name | nvarchar(500) |
5 | Server Computer Name | Server Computer Name | Normal | Text | 250 | Server Computer Name | nvarchar(500) |
6 | User ID | User ID | Normal | Text | 132 | User ID | nvarchar(264) |
7 | Client Type | Client Type | Normal | Option | 4 | Client Type | int |
Available options are:
| |||||||
8 | Client Computer Name | Client Computer Name | Normal | Text | 250 | Client Computer Name | nvarchar(500) |
9 | Login Datetime | Login Datetime | Normal | DateTime | 8 | Login Datetime | datetime |
10 | Database Name | Database Name | Normal | Text | 250 | Database Name | nvarchar(500) |
11 | Session Unique ID | Session Unique ID | Normal | GUID | 16 | Session Unique ID | uniqueidentifier |
2000000000 | $systemId | System ID | Normal | GUID | 16 | $systemId | uniqueidentifier |
2000000001 | SystemCreatedAt | Created At | Normal | DateTime | 8 | $systemCreatedAt | datetime |
2000000002 | SystemCreatedBy | Created By | Normal | GUID | 16 | $systemCreatedBy | uniqueidentifier |
Key to join to the User table.Show/hide example querySELECT [Active Session].[$systemCreatedBy] ,[User].[User Security ID] FROM [Active Session] AS [Active Session] LEFT JOIN [User] AS [User] ON [Active Session].[$systemCreatedBy] = [User].[User Security ID] | |||||||
2000000003 | SystemModifiedAt | Modified At | Normal | DateTime | 8 | $systemModifiedAt | datetime |
2000000004 | SystemModifiedBy | Modified By | Normal | GUID | 16 | $systemModifiedBy | uniqueidentifier |