this is a good personal blog website!
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.
This command is used to manually archive redo logs.
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#.
Performs a checkpoint
alter system checkpoint
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;
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;
This command flushed the shared pool.
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.
Forces the registration of database information with the listener.
alter system register
Setting timed_statistics=true might be usefule when using tk prof.
Setting sql_trace=true is a prerequisite when using tk prof.
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.
Resets a parameter.
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.
Alters an initialization parameter in the spfile
Alters an initialization parameter in the spfile as well as in the running instance.