Modify the parameter file spfile and disable the database startup.

Source: Internet
Author: User

Modify the parameter file spfile and disable the database startup.

Since the parameter file spfile is a binary file, you cannot directly use a text editor to modify it. We can start the database and then use the SQL command to modify it: alter system parameter name = parameter value, scope = both | spfile | memory sid = * | 'orcl ', etc. For specific Authoritative parameters, see the official documentation.

 

1. The processes parameter cannot be modified,

 

Alter system procses = 2000 scope = spfile;

 

Show parameter dump allows you to view the path where the trace log file is stored.

 

The modification takes effect only after it is restarted. If you can modify parameters in the memory, the modification takes effect immediately. If it is scope = both, the value in the memory and the value in the spfile will be modified at the same time.

 

2. For which parameters can be directly modified in the memory, refer to each parameter value in the oracle official documentation. Modifiable = alter system or session can be directly modified.

 

3. There are several ways to close the database. In general, we only need to shutdown immediate. For shutdown abort, It is not clean to close. When starting, we need to refind the database, shutdown abort is used only when the database cannot be shut down normally.

 

4. Database startup process: it can be divided into nomount, mount, and open states. The nomount state is to allocate sga memory information and create a database instance. When the alter database is in the mount state, the database will be opened when the database is in the alter database open state to read the control file and other information.


5. Database shutdown Modes.

If it is shudown abort, the database will be closed directly. Data in the sga will not be written to the data file, and the database needs to be recovered at startup.

If it is shutdown immediate, the database will be closed, but the dirty data and redo log buffer in sga will be written to the data files and redo log files. Data is normal. unsubmitted data is directly rolled back, and existing connections are directly disconnected.

If shutdown trasactional is used, the connection is closed only after the existing session connection commits the transaction or rolls back the transaction. If a session link does not commit the transaction, the database remains in the waiting state.

If shutdown is normal, all existing database session links must be closed before the database is closed. If a connection is not closed, the database remains in the waiting state.




What can I do if the database cannot be started after the spfile in oracle is changed?

Spfile is a database binary file.
Back up data before modification ..

You can also use linux Strings to read this binary file and make it a pfile file to correct your modified parameters. Specify to load pfile to start the database

Which of the following parameter files is used to start a database under sqlplus? Pfile or spfile?

For Versions later than 9i, spfile is started by default. The default storage location is $ ORACLE_HOME/dbs (unix) or $ ORACLE_HOME \ database. The default name is spfilesid. ora, where sid is the sid of the database.
But you can also start the database by creating a pfile file.
Startup pfile = '$ ORACLE_HOME/dbs/pfilesid. ora;
In this case, the implicit parameter needs to be modified;

Check whether the current database uses spfile or pfile as follows:
Log on to the database as sysdba and run the show parameter spfile command. If there is a value, spfile is used; otherwise, pfile is used;

SQL> conn/as sysdba
Connected.
SQL> show parameter spfile;

NAME TYPE VALUE
-----------------------------------------------------------------------------
Spfile string? /Dbs/spfile @. ora
SQL>

Related Article

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.