sys.aud $删除了如何重建它

我已启用了Oracle 12.2C的审核功能,并错误地删除了sys.aud $表。 无论如何,是否有使用我尝试再次创建的相同列来重新创建相同内容的信息,但它与以前的不相同,因此无法将审核日志写入其中 请让我知道解决方案

weijinyang9 回答:sys.aud $删除了如何重建它

定义存储在您的安装中。前往:

$ORACLE_HOME/rdbms/admin/dsec.bsq

,您将找到所需的create table命令。 Oracle(Doc 316452.1)支持提取并重新运行相关的创建表脚本。

这是我的12.2实例中的一个:

create table aud$                                       /* audit trail table */
( sessionid     number not null,/* server session id */
  entryid       number not null,/* serial number to audit records */
  statement     number not null,/* sql statement number */
  timestamp#    date,/* OBSOLETE: 10iR1 and above: time of query */
  userid        varchar2("M_IDEN"),/* database username */
  userhost      varchar2("M_HOST"),/* client host machine name */
  terminal      varchar2("M_TERM"),/* client terminal id */
  action#       number not null,/* action responsible for auditing */
  returncode    number not null,/* return code for the action */
  obj$creator   varchar2("M_IDEN"),/* schema where object resides */
  obj$name      varchar2("M_XDBI"),/* name of the object */
  auth$privileges varchar2(32),/* granted privileges */
  auth$grantee  varchar2("M_IDEN"),/* grantee username */
  new$owner     varchar2("M_IDEN"),/* schema of the dependent object */
  new$name      varchar2("M_XDBI"),/* name of the dependent object */
  ses$actions   varchar2("S_ACFL"),/* success/failure of each action */
  ses$tid       number,/* object id */
  logoff$lread  number,/* number of logical reads in the session */
  logoff$pread  number,/* number of physical reads in the session */
  logoff$lwrite number,/* number of logical writes in the session */
  logoff$dead   number,/* number of deadlocks in the session */
  logoff$time   date,/* session duration */
  comment$text  varchar2("M_VCSZ"),/* type authentication/trigger/protocol */
  clientid      varchar2(128),/* user defined client identifier */
  spare1        varchar2(255),/* OS user name */
  spare2        number,/* whether this table (aud$) is modified */
  obj$label     raw(255),/* OBSOLETE: 8.0 and above */
  ses$label     raw(255),/* OBSOLETE: 8.0 and above */
  priv$used     number,/* system privlege used */
  sessioncpu    number,/* total cpu time for the session */
  ntimestamp#   timestamp,/* new timestamp (in UTC) of query */
  proxy$sid     number,/* proxy session serial number */
  user$guid     varchar2(32),/* global user identifier */
  instance#     number,/* instance number */
  process#      varchar2("M_PIDL"),/* OS process id */
  xid           raw(8),/* transaction identifier */
  auditid       varchar2(64),/* audit operation id */
  scn           number,/* SCN of the query */
  dbid          number,/* database identifier for source db */
  sqlbind       clob,/* bind variables for the query */
  sqltext       clob,/* sql text of the query */
  obj$edition   varchar2("M_IDEN"),/* Object edition name */
  rls$info      clob,/* RLS related info */
  current_user  varchar2("M_IDEN")                           /* Current User */
)
/
本文链接:https://www.f2er.com/3156032.html

大家都在问