alter database in Oracle

season0891發表於2010-07-16



url:

Whenever the database is altered, the should be backed up.

alter database datafile

This is the way how the characteristics of can be changed.

alter database datafile 'DF' end backup

This command can be used for a
Note:There is no alter database datafile 'DF' begin backup command.

alter database datafile offline drop

This command is not meant to .
It is meant to offline the datafile with the intention of dropping the .

alter database archivelog

alter database 
alter database
alter database
Alter database archivelog is simply an instruction to oracle not to overwrite an that has not yet been . Either you archive those manually or have do it.
See and .
See also .

alter database backup controlfile to ['filename' | trace]

This command comes in two versions. One backs up the in a binary format while the other backs it up in a human readable form. It is required if the database is running in and a .
Backing it up in a binary format:
alter database backup controlfile to '/some/arbitrary/path';
alter database backup controlfile to '/some/arbitrary/path' reuse;
Backing it up in a human readable format:
alter database backup controlfile to trace;
alter database backup controlfile to trace as '/some/arbitrary/path';
alter database backup controlfile to trace as '/some/arbitrary/path' reuse;
If the human readable form. is chosen, the file can be made usable if the comments at the beginning are removed and replaced with a . If the file is not at its default location, it has to be appended with a pfile=.... in the line containing a startup.

alter database flashback on | off

alter database flashback on;
alter database flashback off;

alter database [no] force logging

If a database is in force logging mode, all changes, except those in , will be logged, independently from any .
It is also possible to put arbitrary tablespaces into force logging mode: .
A force logging might take a while to complete because it waits for all unlogged direct I/O operations to finish.

alter database open

.. yet to be finished ..

alter database open resetlogs

are re-created . The log sequence is reset to 1.
If the databaseis running in , the archived redo logs should then be deleted. Otherwise, chances are, that Oracle will eventually try to create an archived redo log whose filename already exists.

alter database open read only

Standby database

The following alter database commands are used for a .

alter database ACTIVATE [phisical|locigal] standby database [skip [standby logfile]]

Changes a database to an active database. This is a preprationlal step for the database to become a . The database must be .
and specify what kind of database is going to be activated.

alter database SET STANDBY DATABASE TO MAXIMIZE [protection| availablity | performance]

alter database SET STANDBY DATABASE TO MAXIMIZE ;
alter database SET STANDBY DATABASE TO MAXIMIZE ;
alter database SET STANDBY DATABASE TO MAXIMIZE ;

alter database REGISTER [or replace] [physical | logical] logfile [ redo_log_file_spec [, ...]]

alter database MOUNT STANDBY database

alter database CREATE STANDBY CONTROLFILE

alter database create standby controlfile as '/some/path/to/a/file';
See creating physical standby databases:

commit switchover clause

Yet to be do

alter database START LOGICAL STANDBY APPLY [ new primary dblink | initial [scn_value]]

alter database [STOP | ABORT] logical standby apply

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-668186/,如需轉載,請註明出處,否則將追究法律責任。

相關文章