Search notes:

Oracle SQL: ALTER DATABASE

Oracle apparently considers alter database to be a DDL statement.

alter database add standby logfile

alter database add standby logfile ('/path/to/file') size 500M;
alter database add standby logfile thread 2 size 500M;

alter database convert to physical standby

Converts a snapshot standby database to a physical standby database.
The database must be mounted, but not open.
It must have been mounted at least once in read-write mode.

alter database disable thread n

alter database drop logfile group n

alter database force logging

Forced logging prevents unlogged direct writes in a database.
The statement might take a bit of time to complete because it has to wait until all unlogged direct write I/O is flushed.
A primary database in a data guard environment must be running with forced logging.

alter database open …

Upgrade/migrate mode

The database can be opened in the very limited upgrade/migrate mode (which lacks package standard and dbms_output, among other things).
alter database open upgrade

alter database register logfile

alter database register logfile '/path/to/some/possibly/archived/logfile.arc';

alter database recover managed standby database

Enable Real-Time Apply on physical standby databases.
Compare with alter database start logical standby apply immediate
alter database recover managed standby database;

cancel

Stop application of Redo Apply on the physical standby DB.
alter database recover managed standby database cancel;

disconnect

Without using disconnect, a foreground session is started, that is, the session cannot be used to execute further SQL statements. With disconnect, a background session is started:
alter database recover managed standby database ~disconnect~;

alter database start logical standby apply immediate

Enable Real-Time Apply on logical standby databases.
Compare with alter database recover managed standby database

TODO

alter database open upgrade

Apparently, there is also an alter database open upgrade (See $ORACLE_HOME/rdbms/admin/dbms_registry_basic.sql].
This clause puts the database in the (limited) upgrade/migrate mode in which the some functionality is missing, such as dbms_output etc.

alter database property set

alter database property set upgrade_pdb_on_open='true';
See also props$ and $ORACLE_HOME/rdbms/admin/catappcontainer.sql

See also

alter database archivelog
alter database database
Compare alter database with alter system and alter session.

Index