audit drop table為什麼不行
audit drop table為什麼不行
SQL> audit drop table;
audit drop table
*
ERROR at line 1:
ORA-00956: missing or invalid auditing option
SQL> audit table;
Audit succeeded.
我看AUDIT_ACTIONS表中有drop table呀
剛看了一個帖子,也講到這個事情。我的理解是這個帖子裡只是說了這種情況,也沒有給出原因。(英文的,看得比較吃力。如果理解有錯,大佬給解釋下)
帖子連結http://www.dbasupport.com/forums/showthread.php?t=20054
這是我看到的主要的幾個觀點:
Yes u cannot audit DROP TABLE.This is because when you create a table you are the owner of the table and so you have all the priveleges.If you want to audit CREATE,DROP and other DDL commands write a database trigger on it.The database trigger works fine on Oracle 8.1.5 and higher versions. 這個說的是原因嗎?實現這個功能可以用audit table(10.2.0.3),不知他的8.1.5不能嗎
I think you performed those DROPs and CREATEs on user's own schema, that is why it seemed that the first two are not working while the last one is.
There is one odd thing with DROP TABLE and TRUNCATE TABLE statement auditing. You can't specify any of those two actions to be audited explicitely (ORA-956), like you can with CRATE TABLE. So you can't use "AUDIT DROP TABLE;" command. You can only set auditing for DROP and TRUNCATE by isuing "AUDIT TABLE;", which incorporates CREATE, TRUNCATE and DROP. So by setting "AUDIT TABLE;" audit trial will be created whenever someone isues CREATE TABLE, DROP TABLE or TRUNCATE TABLE statement.
BTW, I just noticed one strange thing on my test DB (8.1.7.1.2). AUDIT_TRIAL is set to TRUE. When I started auditing logins/logoffs by isuing "AUDIT SESSION", every new session has been audited immediately. But if I use any other auditing command (like "AUDIT TABLE;"), the table statements ussage was not audited until I restarted the database. After that everything went normal and audit trail has started to reflect the changes. I found this to be true for every auditing statement, except for AUDIT SESSION. I haven't found anything regarding this unusual behaviour in the documentation, so I think this is a bug. Can anyone else reproduce this?
提到了ORA-956
it's working now, I changed audit_trail=db to audit_trail=true and connected as sys with sysdba to audit the statements and works
I thought audit_trail has to be none, db or os?
我看有資料介紹true和db是一樣的。我測試也是沒區別的。不知道這位的works指的是什麼
SQL> audit drop table;
audit drop table
*
ERROR at line 1:
ORA-00956: missing or invalid auditing option
SQL> audit table;
Audit succeeded.
我看AUDIT_ACTIONS表中有drop table呀
剛看了一個帖子,也講到這個事情。我的理解是這個帖子裡只是說了這種情況,也沒有給出原因。(英文的,看得比較吃力。如果理解有錯,大佬給解釋下)
帖子連結http://www.dbasupport.com/forums/showthread.php?t=20054
這是我看到的主要的幾個觀點:
Yes u cannot audit DROP TABLE.This is because when you create a table you are the owner of the table and so you have all the priveleges.If you want to audit CREATE,DROP and other DDL commands write a database trigger on it.The database trigger works fine on Oracle 8.1.5 and higher versions. 這個說的是原因嗎?實現這個功能可以用audit table(10.2.0.3),不知他的8.1.5不能嗎
I think you performed those DROPs and CREATEs on user's own schema, that is why it seemed that the first two are not working while the last one is.
There is one odd thing with DROP TABLE and TRUNCATE TABLE statement auditing. You can't specify any of those two actions to be audited explicitely (ORA-956), like you can with CRATE TABLE. So you can't use "AUDIT DROP TABLE;" command. You can only set auditing for DROP and TRUNCATE by isuing "AUDIT TABLE;", which incorporates CREATE, TRUNCATE and DROP. So by setting "AUDIT TABLE;" audit trial will be created whenever someone isues CREATE TABLE, DROP TABLE or TRUNCATE TABLE statement.
BTW, I just noticed one strange thing on my test DB (8.1.7.1.2). AUDIT_TRIAL is set to TRUE. When I started auditing logins/logoffs by isuing "AUDIT SESSION", every new session has been audited immediately. But if I use any other auditing command (like "AUDIT TABLE;"), the table statements ussage was not audited until I restarted the database. After that everything went normal and audit trail has started to reflect the changes. I found this to be true for every auditing statement, except for AUDIT SESSION. I haven't found anything regarding this unusual behaviour in the documentation, so I think this is a bug. Can anyone else reproduce this?
提到了ORA-956
it's working now, I changed audit_trail=db to audit_trail=true and connected as sys with sysdba to audit the statements and works
I thought audit_trail has to be none, db or os?
我看有資料介紹true和db是一樣的。我測試也是沒區別的。不知道這位的works指的是什麼
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/32939/viewspace-567198/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 為什麼Scrum不行?Scrum
- audit by user by table
- DROP PARTITION為什麼不進回收站
- 為什麼HashMap的鍵值可以為null,而ConcurrentHashMap不行?HashMapNull
- 直接登入資料庫使用drop table tablename;會是什麼情況?資料庫
- 為什麼程式設計那麼難?是我腦子不行嗎?程式設計
- drop table和truncate table的區別
- index為什麼可能會比table大很多Index
- flashback drop/query/table/database/archiveDatabaseHive
- How To Efficiently Drop A Table With Many Extents
- oracle 誤刪表 drop tableOracle
- 趣文:TCP 握手為什麼是 3 次,2 次或 4 次不行麼?TCP
- 明知精益生產有用,為什麼IT企業遲遲不行動?
- drop apply INSTANTIATION for one tableAPP
- Drop table cascade constraintsAI
- [doc]How To Efficiently Drop A Table With Many Extents
- QuestMobile:為什麼說小米不行了?看看流量資料就知道了
- Oracle10g 回收站及徹底刪除table : drop table xx purge 以及drop flashOracle
- 深入解析 oracle drop table內部原理Oracle
- DROP TABLE ** CASCADE CONSTRAINTS PURGEAI
- HashMap的table長度為什麼是2的n次HashMap
- MySQL資料災難挽救之drop tableMySql
- Drop Table Fails With ORA-600 [15264]AI
- Oracle中flashback table功能為什麼需要開啟row movement功能Oracle
- 為什麼為什麼為什麼為什麼為什麼你要做一名程式設計師?程式設計師
- [譯] 什麼是 WebAssembly table importsWebImport
- 為什麼win10工作列的圖示居中每次重啟後就不行了Win10
- 已知一個圖片的URL,怎麼在程式裡把它取出來??為什麼有時不行呢??
- MySQL 5.6 drop database時,table metadata lock等待MySqlDatabase
- Truncate table 詳解及與delete,drop 的區別delete
- Truncate table詳解及與delete,drop的區別delete
- 資料庫審計(create/alter/drop table、user、tablespace)資料庫
- 拆分Table 為Partition Table
- v$lock之alter table drop column與alter table set unused column區別系列五
- 什麼是Clustered Table,與其他型別的table有何不同型別
- 為什麼要虛擬化,為什麼要容器,為什麼要Docker,為什麼要K8S?DockerK8S
- MySQL DROP TABLE刪除表報錯'ERROR 1051 (42S02): Unknown table'MySqlError
- oracle drop table purge無備份bbed恢復(1/3)Oracle