In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Start-up is divided into three steps:
1. Nomount stage, this stage is the instance start, according to the parameter file for system allocation of memory, start background process.
2. Mount stage, according to the control file to check the name and location of the data file and log file, the instance and database connected.
3. Open stage, is the database open stage, open is to check whether the file is normal, there is no file loss or inconsistency, loss is an error, inconsistent instance recovery.
Stop database:
sysdba & sysoper can only start and stop the database!
View the current state of the database:
select status from v$instance;
Stop database:
shutdown normal = shutdown
1. New connections are not allowed
2. Wait for the query to end
3. Wait for transaction completion
4. Checkpoints are generated (dirty data in buffer cache is written to disk)
5. Close the data file
6. Close control file
7. Close instance (stop all daemons, free shared memory segments)
shutdown transactional
1. New connections are not allowed
*2. Do not wait for the query to end
3. Wait for transaction completion
4. Checkpoints are generated (dirty data in buffer cache is written to disk)
5. Close the data file
6. Close control file
7. Close instance (stop all daemons, free shared memory segments)
shutdown immediate (the most common option)
1. New connections are not allowed
1. New connections are not allowed
*2. Do not wait for the query to end
*3. Transactions are rolled back
4. Checkpoints are generated (dirty data in buffer cache is written to disk)
5. Close the data file
6. Close control file
7. Close instance (stop all daemons, free shared memory segments)
For the first three shutdown parameters, the database is clean, and no instance recovery is required when restarting!
shutdown abort
Instance recovery is required when restarting! --> smon
ps -ef | grep pmon
ipcs -sm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Start database:
in three phases
1. Assign instance nomount:
Parameter file required
Directory where trace files need to be saved (instance managed directory)
ps -ef | grep pmon
ipcs -sm
2. Load control file mount
All you need is control files.
3. Load online logs and data files open
Online logs and data files required
startup = startup open
Three steps to start continuously
Start the database in stages:
Start the database to phase one: nomount
startup nomount --> Start instances only (shared memory segments and daemons)
SQL> select status from v$instance;
STATUS
------------
STARTED
Start database to stage 2: mount
Data if shutdown status:
startup mount
If the data is in STARTED state: you cannot use the startup command, only use the command to modify the database
alter database mount;
SQL> select status from v$instance;
STATUS
------------
MOUNTED
Start the database to stage 3: open
Data if shutdown status:
startup
Data If STARTED Status:
alter database mount;
alter database open;
alter database open read only;
Data If Mounted Status:
alter database open;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
startup command:
startup nomount
startup mount
startup open = startup
startup pfile='/home/oracle/initdemo.ora'
startup restrict
*startup force = shut abort + startup --> Force restart (caution)
conn / as sysdba
alter system enable restricted session;
alter system disable restricted session;
alter database mount;
alter database open;
alter database open read only; --> only query cannot dml, can write locally managed temp table space
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.