Audit Log

本节将介绍使用audit日志来追踪datashare的变更记录。

使用svl_datashare_change_log视图,从生产端和消费端都能追踪到相关的变更记录

etl-redshift-cluster上执行:

select username, share_name, recordtime, action,
share_object_type, share_object_name
from svl_datashare_change_log
order by recordtime desc;

image-20230820195030820


切换到bi-redshift-cluster,由于上一节使用了sam用户,先把连接改回成awsuser

image-20230820195152083

然后执行:

select username, share_name, recordtime, action,
share_object_type, share_object_name
from svl_datashare_change_log
order by recordtime desc;

image-20230820195219830

查看数据访问记录

etl-redshift-cluster执行:

Select * from svl_datashare_usage_producer;

image-20230820195336427

字段说明见 https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_DATASHARE_USAGE_PRODUCER.html

bi-redshift-cluster执行:

Select * from svl_datashare_usage_consumer;

image-20230820195414098