2 марта 2011 г.

oracle: параметры инициализации, pfile, spfile

Создать pfile из spfile
create pfile='/oracle/product/9.2.0/dbs/initSID.ora' from spfile;
create pfile='/oracle/product/9.2.0/dbs/initSID.ora' from spfile='/oracle/product/9.2.0/dbs/spfileSID.ora';

Создать spfile из pfile
create spfile='/oracle/product/9.2.0/dbs/spfileSID.ora' from pfile; 
create spfile='/oracle/product/9.2.0/dbs/spfileSID.ora' from pfile='/oracle/product/9.2.0/dbs/initSID.ora'; 

Стартовать базу с определённым pfile
sql> startup pfile='/oracle/product/9.2.0/dbs/initSID.ora';

Изменить параметры:

ALTER SYSTEM SET  parameter=value <comment='text'> <deferred>
<scope=memory|spfile|both> <sid='sid|*'>

* comment='text' is an optional comment you can associate with this setting of the
parameter. The comment will appear in the UPDATE_COMMENT field of the
V$PARAMETER view.

* deferred (отложенный) specifies whether the system change takes place for subsequent sessions
only (not currently established sessions, including the one making the change).

* sid='sid|*' для кластера


Удалить параметры:

ALTER SYSTEM RESET parameter <scope=memory|spfile|both> <sid='sid|*'>


Примечание. In prior releases, specifically in Oracle 10g Release 2 and earlier, the SID= clause was not optional as it is now. In those releases, you’d include SID='*' on the end of the ALTER SYSTEM command to reset the parameter for all instances in the SPFILE. Or you’d specify SID='some_sid' to reset it for a single instance.