日志管理Journal management

Journal 包含有关 Azure 数据资源管理器数据库中执行的元数据操作的信息。Journal contains information about metadata operations that are done on the Azure Data Explorer database.

元数据操作可由用户执行的控制命令或系统执行的内部控制命令(例如按保留设置放置盘区)产生。The metadata operations can result from a control command that a user executed, or internal control commands that the system executed, such as drop extents by retention.

备注

  • 包含“添加新盘区”(例如 .ingest.append.move 等)的元数据操作不会在 Journal 中显示匹配事件。Metadata operations that encompass adding new extents, such as .ingest, .append, .move and others, will not have matching events shown in the Journal.
  • 结果集各列中的数据及其显示格式不是协定的。The data in the columns of the result-set, as well as the format in which it's presented, isn't contractual. 不建议依赖于它们。Taking a dependency on them isn't recommended.
事件Event EventTimestampEventTimestamp 数据库Database EntityNameEntityName UpdatedEntityNameUpdatedEntityName EntityVersionEntityVersion EntityContainerNameEntityContainerName
CREATE-TABLECREATE-TABLE 2017-01-05 14:25:072017-01-05 14:25:07 InternalDbInternalDb MyTable1MyTable1 MyTable1MyTable1 v7.0v7.0 InternalDbInternalDb
RENAME-TABLERENAME-TABLE 2017-01-13 10:30:012017-01-13 10:30:01 InternalDbInternalDb MyTable1MyTable1 MyTable2MyTable2 v8.0v8.0 InternalDbInternalDb
OriginalEntityStateOriginalEntityState UpdatedEntityStateUpdatedEntityState ChangeCommandChangeCommand 主体Principal
.. 姓名:MyTable1,属性:名称=“[MyTable1].[col1]”,类型=“I32”Name: MyTable1, Attributes: Name='[MyTable1].[col1]', Type='I32' .create table MyTable1 (col1:int).create table MyTable1 (col1:int) imike@fabrikam.com
.. 数据库属性(太长,无法在此处显示)The database properties (too long to be displayed here) .create database TestDB persist(@“https://imfbkm.blob.core.chinacloudapi.cn/md 、@“https://imfbkm.blob.core.chinacloudapi.cn/data ).create database TestDB persist (@"https://imfbkm.blob.core.chinacloudapi.cn/md", @"https://imfbkm.blob.core.chinacloudapi.cn/data") Azure AD 应用 ID=76263cdb-abcd-545644e9c404Azure AD app id=76263cdb-abcd-545644e9c404
姓名:MyTable1,属性:名称=“[MyTable1].[col1]”,类型=“I32”Name: MyTable1, Attributes: Name='[MyTable1].[col1]', Type='I32' 姓名:MyTable2,属性:名称=“[MyTable1].[col1]”,类型=“I32”Name: MyTable2, Attributes: Name='[MyTable1].[col1]', Type='I32' .rename table MyTable1 to MyTable2.rename table MyTable1 to MyTable2 rdmik@fabrikam.com
ItemItem 说明Description
事件Event 元数据事件名称The metadata event name
EventTimestampEventTimestamp 事件时间戳The event timestamp
数据库Database 事件发生后,此数据库的元数据已更改Metadata of this database was changed following the event
EntityNameEntityName 更改之前对其执行操作的实体名称The entity name that the operation was executed on, before the change
UpdatedEntityNameUpdatedEntityName 更改后的新实体名称The new entity name after the change
EntityVersionEntityVersion 更改后的新元数据版本(db/群集)The new metadata version (db/cluster) following the change
EntityContainerNameEntityContainerName 实体容器名称(实体=列,容器=表)The entity container name (entity=column, container=table)
OriginalEntityStateOriginalEntityState 更改前的实体状态(实体属性)The state of the entity (entity properties) before the change
UpdatedEntityStateUpdatedEntityState 更改后的新状态The new state after the change
ChangeCommandChangeCommand 所执行的触发了元数据更改的控制命令The executed control command that triggered the metadata change
主体Principal 执行该控制命令的主体(用户/应用)The principal (user/app) that executed the control command

.show journal.show journal

.show journal 命令返回用户对其具有管理员访问权限的数据库或群集上的元数据更改的列表。The .show journal command returns a list of metadata changes on databases or the cluster that the user has admin access to.

权限Permissions

所有人(群集访问)都可以执行该命令。Everyone (cluster access) can execute the command.

返回的结果将包括:Results returned will include:

  • 执行该命令的用户的所有日志条目。All journal entries of the user executing the command.
  • 执行命令的用户对其具有管理员访问权限的数据库的所有日志条目。All journal entries of databases that the user executing the command has admin access to.
  • 如果执行该命令的用户是群集管理员,则将返回所有群集日志条目。All cluster journal entries if the user executing the command is a cluster admin.

.show database DatabaseName 日志.show database DatabaseName journal

.show database DatabaseName journal 命令返回特定数据库元数据更改的日志。The .show database DatabaseName journal command returns journal for the specific database metadata changes.

权限Permissions

所有人(群集访问)都可以执行该命令。Everyone (cluster access) can execute the command. 返回的结果包括:Results returned include:

  • 如果执行命令的用户是 DatabaseName 中的数据库管理员,会返回数据库 DatabaseName 的所有日志条目 。All journal entries of database DatabaseName if the user executing the command is a database admin in DatabaseName.
  • 否则,将返回数据库 DatabaseName 和执行命令的用户的所有日志条目。Otherwise, all the journal entries of database DatabaseName and of the user executing the command.