①.、以oracle用户登录系统,如果是root用户,使用su - oracle切换用户.
在oracle11g中,数据库的审计功能是默认开启的(这和oracle10g的不一样,10g默认是关闭的),
往aud$表里记录统计信息.
①如果审计不是必须的,可以关掉审计功能;
sql
show
parameter
audit_trail;
name
type
value
------------------------------------
-----------
------------------------------
audit_trail
string
db
alter
system
set
audit_trail=none
scope=spfile;
shut
immediate;
sqlstartup
可以直接truncate表aud$,
truncate
table
sys.aud$;
附:11g中有关audit_trail参数的设置说明:
property
description
syntax
=
{
none
|
os
[,
extended]
xml
}
default
modifiable
no
basic
enables
or
disables
database
auditing.
values:
standard
this
is
the
if
was
not
in
initialization
file
you
created
using
a
method
other
than
configuration
assistant.
assistant,
then
db.
directs
all
audit
records
to
an
operating
file.
oracle
recommends
that
use
setting,
particularly
are
ultra-secure
configuration.
trail
(the
sys.aud$
table),
except
for
always
written
trail.
setting
general
manageability.
started
read-only
mode
with
db,
internally
sets
os.
check
alert
log
details.
extended
performs
actions
of
audit_trail=db,
and
also
populates
bind
text
clob-type
columns
table,
when
available.
these
two
populated
only
specified.
extended,
writes
record
format.
elements
auditrecord
node
sql_text
sql_bind
xml,
audit_trail=xml,
wherever
possible.
can
statement
auditing
options
regardless
parameter.
在服务中直接停止即可.
①.、以windows10为例,右键"此电脑",选择"管理".
本文将介绍oracle 归档日志的关闭打开方法,需要了解的朋友可以参考下
查看oracle数据库是否为归档模式
SQL select name,log_mode from V$database;
NAME LOG_MODE
------------------ ------------------------
TEST NOARCHIVELOG
SQL archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
①改变非归档模式到归档模式:
①.)SQL conn / as sysdba (以DBA身份连接数据库)
做一次完全备份,因为非归档日志模式下产生的备份日志对于归档模式已经不可用了.这一步非非常重要!
①.)SQLSHUTDOWN NORMAL/IMMEDIATE;
archive log stop;
archive log start;
archive log list;
show parameters;
show parameters log_archive_start;
show parameters log_archive_max_process; #归档进程数
select * from v$bgprocess; #检察后台进程
可以在系统的服务管理中进行管理,也可以通过命令行进行数据库服务的启动和关闭
启动数据库服务
net
start
"OracleServiceORACLEORCL"
"OracleOraDb11g_home1TNSListener"
关闭数据库服务
stop
使用SQLPLUS也可以达到相同的效果
sqlplus
/
as
sysdba
startup
shutdown
immediate
通常数据库停止以后,对系统资源的占用基本可以忽略.
一般采用登录到服务系统上,运行sqlplus ,进行数据库的开启和关闭操作(非远程),如:
$?sqlplus?/nolog
启动
SQL?conn?/as?sysdba
SQL?startup
关闭
SQL?shutdown?immediate
以上就是土嘎嘎小编为大家整理的怎么开或关闭oracle相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!