1、shutdown normal (从字面就可理解这是一个用正常的方式来关闭数据库。)
) 当执行shutdown immediate时,数据库并不立即关闭,而是在Oracle执行完内部的必要的工作后才关闭,shutdown immediate可以完成shutdown不能对数据库关闭的 *** 作。建议DBA们常用此方法关闭数据库 3、shutdown abort (直接关闭数据库) 这个停止的方法不推荐,因为对于正在访问数据库的会话会被突然终止,可能会造成数据库的数据丢失,并且如果数据库中有大量 *** 作正在执行,这时执行shutdown abort后,重新启动数据库需要很长时间。 举例说明: 1、停Oracle # su – oracle $ lsnrctl stop $ svrmgrl >connectinternal >shutdown immediate >exit 相应的启动Oracle的方法如下: # su – oracle 以ORACLE用户身份进入 $ svrmgrl 打开ORACLE的管理器 >connectinternal 建立库的连接 >startup 启动数据库 >exit 退出管理器 $ lsnrctl start 启动监听 $lsnrctl status 查看监听的状态
在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;
SQL>startup
2删除已有的审计信息
可以直接truncate表aud$,
truncate table SYSAUD$;
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 SYSAUD$ 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 SYSAUD$ 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 SYSAUD$ 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数据库、如何关闭Oracle11g数据库的审计功能、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)