alter system的常用命令
来源:互联网 发布:单片机串口初始化程序 编辑:程序博客网 时间:2024/05/16 15:31
Alter system archive log [start|stop|all|...]
alter system archive log all;
alter system archive log next;
alter system archive log sequence 104;
alter system archive log current;
alter system archive log current noswitch;
The following command can be used to stop arch.
alter system archive log stop
Similarly, arch is started with
alter system archive log start
However, changing the archiver this way doesn't last when the database is restarted. When the database is started, it consults log_archive_start in the initialization file to determine if arch is started.
Alter system archive log all
This command is used to manually archive redo logs.
alter system disconnect session
alter system kill session
This command kills a session. The sid and serial parameters are found in the v$session view.
create or replace procedure kill_session(sid in number, serial in number) as
begin
execute immediate 'alter system kill session ''' || sid || ',' || serial || ''' immediate';
end;
/
Note: The alter system kill session statement will not make the session go away until it times out or it tries to issue another statement. However, pmon will rollback the work done by the session.
.
The server process waits then until the client tries to execute another statement to send it a ORA-03113 EOF on communication channel or "packet write failure". This is why killed sessions still show up in the v$session view.
However, if dead client detection (or is it dead connection detection?) is enabled, the session is removed as soon as the expiry time is reached.
To immediately release the locks (immediatly meaning: after the session's rollback), one should use kill -9 on unix or orakill on unix.
alter system checkpoint
Performs a checkpoint
alter system checkpoint
alter system dump datafile
This command can be used in order to dump one ore more blocks of a datafile. The following command dumps blocks 50 through 55 of file 5. Which file 5 is can be found out with v$datafile
alter system dump datafile 5 block min 50 block max 55;
Note: trace files are only readable by the Oracle account. If you want to change this, set the undocumented initialization parameter _trace_files_public to true. Doing so will, however, cause a big security risk.
alter system flush buffer_cache
alter system flush buffer_cache;
This command is not available prior to 10g. It flushes the buffer cache in the SGA.
9i had an undocumented command to flush the buffer cache:
alter session set events = 'immediate trace name flush_cache';
alter system flush buffer_pool
alter system flush buffer_pool;
This command flushed the shared pool.
alter system quiesce restricted
alter system suspend|resume
alter system switch logfile
Causes a redo log switch.
alter system switch logfile;
If the database is in archive log mode, but the ARCH process hasn't been startedm, the command might hang, because it waits for the archiving of the 'next' redo log.
alter system register
Forces the registration of database information with the listener.
alter system register
Alter system set timed_statistics
Setting timed_statistics=true might be usefule when using tk prof.
Alter system set sql_trace
Setting sql_trace=true is a prerequisite when using tk prof.
Alter system set .... deferred
Alter system can be used to change initialization parameters on system level. However, some parameters, when changed with alter system don't affect sessions that are already opened at the time when the statement is executet; it only affects sessions started later. These parameters must be changed with alter system set <init_param> DEFERRED, otherwise a ORA-02096: specified initialization parameter is not modifiable with this option error is returned.
These parameters can be identified as they have a DEFERRED in the isses_modifiable column of v$parameter.
Alter system reset <parameter_name>
Resets a parameter.
alter system reset some_param scope=both sid='*';
scope
scope=memory
Changes the parameter's value for the running instance only. As soon as the instance is stopped and started, this change will be lost.
scope=spfile
Alters an initialization parameter in the spfile
scope=both
Alters an initialization parameter in the spfile as well as in the running instance.
- alter system的常用命令
- alter database 与 alter system的区别
- alter system与alter database的区别
- alter database和alter system和alter session的区别
- alter database和alter system和alter session的区别
- alter system register的用法
- alter system register的用法
- alter system checkpoint的作用
- oracle alter session和alter system的参数详解
- alter system flush shared_pool的作用
- alter system set control_files的注意事项
- alter system flush shared_pool的作用 .
- [日记]alter system flush shared_pool的作用
- ALTER SYSTEM CHECKPOINT 影响数据文件的检查点
- alter system flush "oracle的缓存"
- alter system flush“oracle的缓存”
- alter system flush "oracle的缓存"
- ALTER SYSTEM CHECK DATAFILES命令的使用
- js计算器
- testFlight,ios测试解决方案
- JAVA自学-路线图明细
- 仿做google分页效果
- 多线程、同步
- alter system的常用命令
- 这几天将ucGUI移植到QT4下面了。
- infoQ专访HTML5版Clear应用作者尤雨溪
- Struts2实例1--------登录案例的实现
- 清华大学2007年复试上机题 解题报告
- 分享一个HTML5画布实现的超酷文字弹跳球效果
- 构建高性能javascript代码的几点意见
- malloc()和calloc()区别
- TinyOs无线消息收发问题