oracle审计怎么清理,oracle账务处理

oracle数据库怎么清除用户下所有表

1.首先使用ORACLE系统用户登录PL/SQL管理工具。

10年的山阳网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。成都营销网站建设的优势是能够根据用户设备显示端的尺寸不同,自动调整山阳建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联从事“山阳网站设计”,“山阳网站推广”以来,每个客户项目都认真落实执行。

2.在SQL脚本中,编写和执行SQL语句来删除表空间的表空间名称。

3.如果希望清理用户下的所有数据库表,可以执行以下语句,删除用户名cascade。

4.当执行上述语句时,它将显示在它正在执行的级别以下。

5.执行之后,可以使用删除的用户登录PL/SQL。

6.如果有弹出提示,说明删除成功。

oracle 11g开审计 文件过大怎么管理

Oracle 的审计实在是鸡肋,审计日志增加猛速,而且加大系统负荷,降低系统性能。

依我们在生产系统的作法就是禁用审计,禁用后清除审计日志。

处理方法:

1、查看审计功能是否开启

sqlplus "/as sysdba"

SQL show  parameter  audit;

NAME          TYPE    VALUE

--------------------     -------    --------------------------------

audit_file_dest         string   /u01/app/oracle/admin/ORCL/adump

audit_sys_operations   boolean   TRUE

audit_syslog_level    string

audit_trail       string   DB

说明:表明审计功能为开启的状态

2、关闭oracle的审计功能

SQL alter  system  set audit_sys_operations=FALSE  scope=spfile;

System altered.

SQL alter system set  audit_trail=NONE  scope=spfile;

System altered.

3、重启数据库

SQL shutdown immediate;

SQL startup;

4、验证审计是否已经被关闭

SQL show parameter audit;

NAME          TYPE    VALUE

--------------------     -------    --------------------------------

audit_file_dest         string   /u01/app/oracle/admin/ORCL/adump

audit_sys_operations   boolean   FALSE

audit_syslog_level    string

audit_trail       string   NONE

说明:表明审计功能为关闭的状态

5、清空审计表数据

SQL  truncate  table SYS.AUD$;

如何彻底清理oracle数据文件

Oracle提供了删除数据库的指令:drop database。

需要数据库处于mount状态,然后alter system enable restricted session;,网上有帖子说还需要exclusive,由于我是VM装的,用户只有我一个,所以不用可以。由于当前处于open状态,需要改为mount,执行:

SQL alter database close;

alter database close

*

ERROR at line 1:

ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected

原因是有个session仍连接,退出后再次执行,

SQL alter database close;

Database altered.

SQL select status from v$instance;

STATUS

------------

MOUNTED

SQL alter system enable restricted session;

System altered.

SQL select status from v$instance;

STATUS

------------

MOUNTED

SQL drop database;

Database dropped.

此时alert.log记录信息:

Create Relation ADR_CONTROL

Create Relation ADR_INVALIDATION

Create Relation INC_METER_IMPT_DEF

Create Relation INC_METER_PK_IMPTS

USER (ospid: 8748): terminating the instance

Instance terminated by USER, pid = 8748

Deleted Oracle managed file /opt/app/ora11g/oradata/BISAL/controlfile/o1_mf_9x4fgq77_.ctl

Deleted Oracle managed file /opt/app/ora11g/flash_recovery_area/BISAL/controlfile/o1_mf_9x4fgypb_.ctl

Completed: drop database

Shutting down instance (abort)

License high water mark = 2

Fri Jul 25 19:09:26 2014

Instance shutdown complete

到oradata路径下看已经没有任何文件了,那么认为这个数据库已经被删除。

但再次执行dbca,企图创建相同实例的库时报错:

虽然和bisal实例关联的数据文件、日志文件等已经物理删除了,但和这实例相关的配置文件没有删除,因此不能再次创建相同实例的库。

此时需要手工删除实例相关的配置:

1、删除$ORACLE_BASE/admin/$ORACLE_SID所有目录。

2、删除$ORACLE_HOME/dbs下和SID相关的文件和参数文件,包括hc_bisal.dat,init.ora,lkBISAL,orapwbisal。

3、删除/etc/oratab中和实例相关的部分。

4、可以在$ORACLE_HOME中执行find . -name bisal,删除所有和实例相关的文件。

再次执行dbca,就可以创建相同实例名称的数据库了。

如何将oracle彻底卸载干净

卸载Oracle总体分为三步 1.主程序的卸载 2.残留文件的删除 3.注册表清理

1.主程序卸载只要运行 Oracle OraDB11g_home1--Oracle安装产品--Universal Installerd

程序运行起来后 ,选择卸载产品进去下面的页子

如上图选择,如果你安装了Client 也将client文件夹选中。

然后就是等待 当进度走完后我们的第一步就完成了。

2.硬板上残留文件的卸载。

Oracle在安装时会安装到你的系统盘和你安装时所选的主程序安装盘,以我的系统为例Oracle分别安装在我的C盘和G盘。

C:\Program Files (x86)\Oracle 与 G:\app 这两个文件夹及其子文件全部删除。中间会提示,有的文件程序正在使用无法删除,我们稍后再来管它。

到此删除残留文件就大部分完成了。

3.删除注册表

在 开始--搜索中输入regedit 打开注册表编辑器

如上所示 所有 services 文件夹下 所有带“Oracle”的文件全部删除。重新启动计算机,在去删除 第二步中没有删除的残留文件。

到此Oracle已经彻底的从你的计算机上删除了

oracle数据库怎么清空

我觉得还是概念不清析,问题不太明白呀。

所果只是简单的清空表的话,还是很容易的。

drop table TABLE_NAME ; //连表结构都删了。

要是清空内容,留着表结构,就是:

truncate tablename; // 就可以了。

如果是数据库表文件要删的话,就不和你说了。

如何关闭Oracle11g数据库的审计功能

在oracle11g中,数据库的审计功能是默认开启的(这和oracle10g的不一样,10g默认是关闭的),

oracle11gR2的官方文档上写的是错的,当上说default是none,而且是审计到DB级别的,这样就会

往aud$表里记录统计信息。

1.如果审计不是必须的,可以关掉审计功能;

SQL show parameter audit_trail;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

audit_trail string DB

SQL alter system set audit_trail=none scope=spfile;

SQL shut immediate;

SQLstartup

2.删除已有的审计信息

可以直接truncate表aud$,

truncate table SYS.AUD$;

3.或者将aud$表移到另外一个表空间下,以减少system表空间的压力和被撑爆的风险。

附:11g中有关audit_trail参数的设置说明:

AUDIT_TRAIL

Property Description

Parameter type String

Syntax AUDIT_TRAIL = { none | os | db [, extended] | xml [, extended] }

Default value none

Modifiable No

Basic No

AUDIT_TRAIL enables or disables database auditing.

Values:

none

Disables standard auditing. This value is the default if the AUDIT_TRAIL parameter was not set

in the initialization parameter file or if you created the database using a method other than

Database Configuration Assistant. If you created the database using Database Configuration

Assistant, then the default is db.

os

Directs all audit records to an operating system file. Oracle recommends that you use the os

setting, particularly if you are using an ultra-secure database configuration.

db

Directs audit records to the database audit trail (the SYS.AUD$ table), except for records

that are always written to the operating system audit trail. Use this setting for a general

database for manageability.

If the database was started in read-only mode with AUDIT_TRAIL set to db, then Oracle Database

internally sets AUDIT_TRAIL to os. Check the alert log for details.

db, extended

Performs all actions of AUDIT_TRAIL=db, and also populates the SQL bind and SQL text CLOB-type

columns of the SYS.AUD$ table, when available. These two columns are populated only when this

parameter is specified.

If the database was started in read-only mode with AUDIT_TRAIL set to db, extended, then Oracle

Database internally sets AUDIT_TRAIL to os. Check the alert log for details.

xml

Writes to the operating system audit record file in XML format. Records all elements of the

AuditRecord node except Sql_Text and Sql_Bind to the operating system XML audit file.

xml, extended

Performs all actions of AUDIT_TRAIL=xml, and populates the SQL bind and SQL text CLOB-type columns

of the SYS.AUD$ table, wherever possible. These columns are populated only when this parameter

is specified.

You can use the SQL AUDIT statement to set auditing options regardless of the setting of this

parameter.

分享题目:oracle审计怎么清理,oracle账务处理
标题路径:https://www.cdcxhl.com/article12/dsejigc.html

成都网站建设公司_创新互联,为您提供域名注册做网站网站内链网页设计公司企业网站制作品牌网站设计

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都做网站