Alter system 命令汇总
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 stoparch.
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 consultslog_archive_startin the initialization file to determine ifarchis started.
Alter system archive log all
alter system disconnect session
alter system kill session
alter system kill session 'session-id,session-serial'
This command kills asession. Thesession-idandsession-serialparameters are found in thev$sessionview (columnssidandserial#.
alter system checkpoint
alter system dump datafile
alter system dump datafile 5 block min 50 block max 55;
Note:trace filesare only readable by the Oracle account. If you want to change this, set the undocumented initialization parameter_trace_files_publicto true. Doing so will, however, cause abig security risk.
alter system flush buffer_cache
alter system flush buffer_cache;
9i had an undocumented command to flush the buffer cache:
alter system flush shared_pool
alter system flush shared_pool;
alter system quiesce restricted
alter system suspend|resume
alter system switch logfile
alter system switch logfile;
alter system register
Alter system set timed_statistics
Setting timed_statistics=true might be usefule when usingtk prof.
Alter system set sql_trace
Setting sql_trace=true is a prerequisite when usingtk prof.
Alter system set .... deferred
Alter system can be used to changeinitialization parameterson 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 withalter system set DEFERRED, otherwise aORA-02096: specified initialization parameter is not modifiable with this option error is returned.
These parameters can be identified as they have a DEFERRED in theisses_modifiablecolumn ofv$parameter.
Alter system reset
alter system reset some_param scope=both sid='*';
Changes the parameter's value for the running instance only. As soon as the instance is stopped and started, this change will be lost.
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/14999074/viewspace-591080/，如需转载，请注明出处，否则将追究法律责任。