ICode9

精准搜索请尝试: 精确搜索
首页 > 数据库> 文章详细

oracle中Alter system 命令的总结

2021-04-09 16:03:27  阅读:363  来源: 互联网

标签:log system alter Alter session command oracle archive


it is from http://www.adp-gmbh.ch/ora/sql/alter_system.html

this is a good personal blog website!

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

alter system kill session 'session-id,session-serial'

 

This command kills a   session. The   session-id and   session-serial parameters are found in the   v$session view (columns   sid and   serial#.

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:

 set events = 'immediate trace name flush_cache';

 

alter system flush shared_pool

alter system flush shared_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'   online 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 <initialization parameter> 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.


标签:log,system,alter,Alter,session,command,oracle,archive
来源: https://blog.51cto.com/lhrbest/2694815

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有