Oracle spfile example

Source: Internet
Author: User

Oracle spfile example

Oracle tips by Burleson Consulting
Don Burleson

From: http://www.dba-oracle.com/tips_oracle_spfile_example.htm

The following is from the bestselling bookOracle 10GGrid & Real Application Clusters-oracle10GGrid computing with RAC. You can order it directly and Save 30% here:

 

Http://www.rampant-books.com/book_2004_1_10g_grid.htm

The Oracle spfile is a binary representation of the text0based init. ora file. by default, a new Oracle9i database will be working on a pfile, so the spfile must be created from the pfile at the SQL prompt.

The spfile is created using the create spfile statement; this requires connecting as sysdba.

Connect system/manager as sysdba;

Create spfile from pfile;

This command creates an spfile in a non-default location ($ ORACLE_HOME/database). However, you can fully-qualigfy the path name is the specified reate spfile? Statement:

Create spfile = '/u01/admin/Prod/pfile/file_mydb.ora'

From

Pfile =/u01/admin/Prod/pfile/initprod. ora ';

Warning-after an spfile is created, When you bounce the database you may encounter an error. To get around this, you have to reconnect as sysdba and use the startup command.

The addition of the spfile has changed the search path for the Oracle startup deck. Oracle9i now uses the following path:

  • Search for the spfile $ oracle_sid.ora file in the default location,

  • Look for the spfile. ora; and

  • Search for the pfile by name init $ oracle_sid.ora.

Specifying scope in Parameters

Once you have an spfile, you can change any initialization parameter with the alter system? Command. However, there is an important scope parameter that you need to understand.

The scope parameter has three values memory, spfile and both. Let's look at an example of each:

Alter system set db_2k_cache_size = 100 m scope = spfile;

If you want to make a change to a parameter in the spfile without affecting the current instance, you can do so using the scope = spfile option of the alter System statement. this is useful when you want to make a change starting from the next startup and not for the current instance.

Alter system set db_2k_cache_size = 100 m scope = memory;

In the example above, the scope = memory tells Oracle9i to make the change for the life of the instance, and to change it back to the default value the next time the database is bounced.

Alter system set db_2k_cache_size = 100 m scope = both;

When you specify scope = both, the change will be made immediately, and Oracle will also make the change permanent, even after the database is bounced.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.