Active Session

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

Table Number: 2000000110

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 NameField CaptionClassTypeLengthSQL Column NameSQL DataType
1User SID SearchUser SIDNormalGUID16User SIDuniqueidentifier
Key to join to the User table.

Show/hide example query

SELECT
	       [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]
2Server Instance ID SearchServer Instance IDNormalInteger4Server Instance IDint
Key to join to the Server Instance table.

Show/hide example query

SELECT
	       [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]
3Session ID Primary Key SearchSession IDNormalInteger4Session IDint
4Server Instance Name Primary Key SearchServer Instance NameNormalText250Server Instance Namenvarchar(500)
5Server Computer Name SearchServer Computer NameNormalText250Server Computer Namenvarchar(500)
6User ID SearchUser IDNormalText132User IDnvarchar(264)
7Client Type SearchClient TypeNormalOption4Client Typeint
Available options are:
  • “Windows Client”
  • “SharePoint Client”
  • “Web Service”
  • “Client Service”
  • “NAS”
  • “Background”
  • “Management Client”
  • “Web Client”
  • “Unknown”
  • “Tablet”
  • “Phone”
  • “Desktop”
  • “Teams”
  • “Child Session”
8Client Computer Name SearchClient Computer NameNormalText250Client Computer Namenvarchar(500)
9Login Datetime SearchLogin DatetimeNormalDateTime8Login Datetimedatetime
10Database Name SearchDatabase NameNormalText250Database Namenvarchar(500)
11Session Unique ID SearchSession Unique IDNormalGUID16Session Unique IDuniqueidentifier
2000000000$systemId SearchSystem IDNormalGUID16$systemIduniqueidentifier
2000000001SystemCreatedAt SearchCreated AtNormalDateTime8$systemCreatedAtdatetime
2000000002SystemCreatedBy SearchCreated ByNormalGUID16$systemCreatedByuniqueidentifier
Key to join to the User table.

Show/hide example query

SELECT
	       [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]
2000000003SystemModifiedAt SearchModified AtNormalDateTime8$systemModifiedAtdatetime
2000000004SystemModifiedBy SearchModified ByNormalGUID16$systemModifiedByuniqueidentifier

Leave a Reply

Your email address will not be published. Required fields are marked *