关于如何在startup时 使用spfile(不在oracle指定的默认位置)
1.创建一个文本 *.ora 只写入
:spfile=/u01/oracle/dbs/test_spfile.ora<wbr><wbr><br><br> 2.在执行startup命令时只需:<br> sql>STARTUP PFILE = /u01/oracle/dbs/*_init.ora<br><br><br> editor's note:<br> SPFILEs provide the following advantages over PFILEs:<br><br> An SPFILE can be backed-up with RMAN (RMAN cannot backup PFILEs)<br> Reduce human errors. The SPFILE is maintained by the server. Parameters are checked before changes are accepted.<br> Eliminate configuration problems (no need to have a local PFILE if you want to start Oracle from a remote machine)<br> Easy to find - stored in a central location<br> What is the difference between a PFILE and SPFILE:<br><br> A PFILE is a static, client-side text file that must be updated with a standard text editor like "notepad" or "vi". This file normally reside on the server, however, you need a local copy if you want to start Oracle from a remote machine. DBA's commonly refer to this file as the INIT.ORA file.<br><br> An SPFILE (Server Parameter File), on the other hand, is a persistent server-side binary file that can only be modified with the "ALTER SYSTEM SET" command. This means you no longer need a local copy of the pfile to start the database from a remote machine. Editing an SPFILE will corrupt it, and you will not be able to start your database anymore.<br><br> How will I know if my database is using a PFILE or SPFILE:<br><br> Execute the following query to see if your database was started with a PFILE or SPFILE:<br><br> SQL> SELECT DECODE(value, NULL, 'PFILE', 'SPFILE') "Init File Type"<br><wbr><wbr><wbr><wbr><wbr><wbr> FROM sys.v_$parameter WHERE name = 'spfile';<br><br><br><br></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
1.创建一个文本 *.ora 只写入
:spfile=/u01/oracle/dbs/test_spfile.ora<wbr><wbr><br><br> 2.在执行startup命令时只需:<br> sql>STARTUP PFILE = /u01/oracle/dbs/*_init.ora<br><br><br> editor's note:<br> SPFILEs provide the following advantages over PFILEs:<br><br> An SPFILE can be backed-up with RMAN (RMAN cannot backup PFILEs)<br> Reduce human errors. The SPFILE is maintained by the server. Parameters are checked before changes are accepted.<br> Eliminate configuration problems (no need to have a local PFILE if you want to start Oracle from a remote machine)<br> Easy to find - stored in a central location<br> What is the difference between a PFILE and SPFILE:<br><br> A PFILE is a static, client-side text file that must be updated with a standard text editor like "notepad" or "vi". This file normally reside on the server, however, you need a local copy if you want to start Oracle from a remote machine. DBA's commonly refer to this file as the INIT.ORA file.<br><br> An SPFILE (Server Parameter File), on the other hand, is a persistent server-side binary file that can only be modified with the "ALTER SYSTEM SET" command. This means you no longer need a local copy of the pfile to start the database from a remote machine. Editing an SPFILE will corrupt it, and you will not be able to start your database anymore.<br><br> How will I know if my database is using a PFILE or SPFILE:<br><br> Execute the following query to see if your database was started with a PFILE or SPFILE:<br><br> SQL> SELECT DECODE(value, NULL, 'PFILE', 'SPFILE') "Init File Type"<br><wbr><wbr><wbr><wbr><wbr><wbr> FROM sys.v_$parameter WHERE name = 'spfile';<br><br><br><br></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>