Steps to shut down oracle database

How to start and shutdown ORCALE database under linux?

1.start oraclex0asu-oraclex0asqlplus/nologx0aconn/assysdbax0astartupx0aexitx0alsnrctlstartx0aexitx0a2.shutdown under linux oraclex0asu-oraclex0asqlplus/nologx0aconn/assysdbax0ashutdownimmediatex0aexitx0alsnrctlstopx0aexitx0a3. start listenerx0aoracle@suse92:~> lsnrctlstartx0a4, stop listenerx0aoracle@suse92:~>lsnrctlstopx0a5, check listener statusx0aoracle@suse92:~>lsnrctlx0aLSNRCTL>statusx0aLSNRCTL> exitx0a6.#setup can set the firewall and other informationx0a7.install listenerx0aRun the netca commandx0alsnrctlstartx0alsnrctlstopx0areloadlistenerreloadx0aservicelistenerx0ahelp help x0aquit exitx0avietc/hostsx0aAdd 192.168.0.100chsylinuxx0aDatabase shutdown dead also STARTUPFORCEx0a, and then worse case with SHUTDOWNABORT.

oracle database open when it is the first to open the listening or the first to open the main service, shut down the database when it?

[Answer]: It doesn’t matter what order you start it in, if you close it 1. the first thing is to close the listening (so that the remote client can’t be connected in again); 2. issue a system checkpoint, so that the system modification number of the datafiles and the control files are unified; (altersystemcheckpoint;) 3. shutdownimmediate&amp ;shutdowntransactional; if it is a relatively busy database, may be executing a lot of transactions, issue a shutdown command, there will be a rollback, which is likely to wait for a long time, you can generally kill these sessions before the 2 steps, you can kill inside the database, but also at the system level (if it is a linux, unix system) For example: ps-ef|grepLOCAL=NO|grep-vgrep|awk'{print$2}’|xargskill-9

Starting and Shutting Down a Database

For most OracleDBAs, the most common way to start and shut down an Oracle database is to use ServerManager from the command line, and since Oracle8i, the system has centralized any ServerManager functionality into SQL*Plus, which means that since 8i, starting and shutting down a database can be done directly through SQL*Plus and no longer requires ServerManager. Plus, that is to say, from 8i onwards, the startup and shutdown of the database can be accomplished directly through SQL*Plus, and no longer need ServerManager, but the system still retains the ServerManager tool in order to maintain backward compatibility. In addition, you can also image the user tools (GUI) OracleEnterpriseManager to complete the startup and shutdown of the system, the image user interface InstanceManager is very simple, and will not be described in detail here.

To start and shut down the database, it is necessary to have Oracle administrator privileges to the user login, usually with SYSDBA privileges to the user login. In general, we often use the INTERNAL user to start and shut down the database (the INTERNAL user is actually a SYS user with SYSDBA connection synonym). the new version of the Oracle database will be gradually phased out the INTERNAL internal user, so it is best for us to configure the DBA user to have SYSDBA privileges.

Two, the database startup (STARTUP)

Starting a database requires three steps:

1, create an Oracle instance (non-installation phase)

2, by the instance to install the database (installation phase)

3, to open the database (open phase)

In the Startup command, you are able to control the different startup steps of the database with different options.

1. STARTUPNOMOUNT

The NONOUNT option simply creates an Oracle instance. It reads the init.ora initialization parameters document, starts background processes, and initializes the system global area (SGA).The init.ora document defines the configuration of the instance, including the size of the memory structure and the number and type of background processes to start. The instance name is configured according to Oracle_SID and does not have to be the same as the name of the open database. When the instance is opened, the system displays a list of SGA memory structures and sizes, as follows:

SQL>startupnomount

The ORACLE routine is started.

TotalSystemGlobalArea35431692bytes

FixedSize70924bytes

VariableSize18505728bytes

DatabaseBuffers16777216bytes

RedoBuffers77824bytes

2. STARTUPMOUNT

This command creates an instance and installs the database, but does not open the database.The Oracle system reads the control document about the data document and the redo log document, but does not open the database. The Oracle system reads the contents of the control document on the data file and the redo log file, but does not open the file. This type of opening is often used in database maintenance operations, such as renaming data files, changing the redo log, and opening archives. In this way of opening, in addition to being able to see the SGA system list, the system will also give the “database loaded” prompt.

3, STARTUP

This command completes the creation of instances, install instances and open any three steps of the database. At this time, the database so that the data file and redo log file online, usually also request one or more rollback section. At this point, the system will see a “database open” prompt in addition to any prompts from the previous StartupMount method. At this point, the database system is in working order and can accept user requests.

If you use the STARTUPNOMOUNT or STARTUPMOUNT database open command, you must use the ALTERDATABASE command to open the database. For example, if you open the database as STARTUPNOMOUNT, that is, the instance is created, but the database is not installed and opened. This is where the following two commands must be run for the database to start correctly.

ALTERDATABASEMOUNT;

ALTERDATABASEOPEN;

And if you start the database with STARTUPMOUNT, you only need to run the following command to be able to open the database:

ALTERDATABASEOPEN.

4, other ways to open

In addition to the three database open options introduced earlier, there are some other options.

(1)STARTUPRESTRICT

This way, the database will be successfully opened, but only allows some privileged users (with the DBA role of the user) to be able to use the database. This approach is often used for database maintenance, such as import/export operations where you don’t want other users to connect to the database to manipulate the data.

(2)STARTUPFORCE

This command is in fact a forced shutdown of the database (shutdownabort) and start the database (startup) a combination of two commands. This command is used only when there is a problem shutting down the database and the database cannot be shut down.

(3)ALTERDATABASEOPENREADONLY;

This command opens the database in a read-only manner after the instance is created and the database is installed. For those product databases that only provide query functionality can be opened in this way.

Three, the closure of the database (SHUTDOWN)

For the closure of the database, there are four different shutdown options, which are described below.

1, SHUTDOWNNORMAL

This is the database shutdown SHUTDOWN command does save options. That is, if you issue SHUTDOWN such a command, that is, SHUTDOWNNORNAL means.

After this command is issued, any new connections will no longer be allowed to connect to the database. Before the database is shut down, Oracle will wait until any users who are now connected are logged out of the database before it begins to shut down the database. Shutting down the database in this manner eliminates the need for any instance recovery at the next startup. However, it is important to note that with this approach, it may take several days, perhaps longer, to shut down a database.

2, SHUTDOWNIMMEDIATE

This is a common way to shut down a database, you want to shut down the database very quickly, but also want to make the database cleanly shut down, often use this way.

The SQL statement currently being processed by Oracle is immediately interrupted, and any uncommitted transactions in the system are rolled back. If there is a very long uncommitted transaction on the system, it takes a while to shut down the database in this way (the time it takes for that transaction to roll back). The system does not wait for any user connected to the database to exit the system, forcibly rolls back any currently active transactions, and then disconnects any connected users.

3. SHUTDOWNTRANSACTIONAL

This option is available only after Oracle8i. This command is often used to plan the shutdown of the database, he makes the current connection to the system and the active transaction execution is complete, after running this command, any new connections and transactions are not allowed. After any active transactions are completed, the database is shut down in the same manner as SHUTDOWNIMMEDIATE.

4, SHUTDOWNABORT

This is the last move to shut down the database, but also in the absence of any way to shut down the database only have to use the way, generally do not use. If the following situations occur, you can consider using this way to close the database.

1, the database is in a non-normal state of work, can not be shut downnormal or shutdownimmediate such a command to shut down the database;

2, the need to immediately shut down the database;

3, in the start of the database instance encountered problems;

Starting and shutting down the Oracle database process on Windows

The startup of Oracle on Windows is usually accompanied by the automatic startup and shutdown of Windows, but if you kill the Oracle process with the Task Manager and if you open Oracle from the command line, it will report an error message

. The solution is as follows

MicrosoftWindowsXP[Version]

(C)CopyrightMicrosoftCorp

C:/DocumentsandSettings/ wangbao>cd/

C:/>netstopOracleServiceWBQ

TheOracleServiceWBQserviceisstopping

TheOracleServiceWBQservicecouldnotbestopped

C:/>netstartOracleServiceWBQ

TheOracleServiceWBQserviceisstarting

TheOracleServiceWBQservicewasstartedsuccessfully

C:/>lsnrctlstop

LSNRCTLforbitWindows:VersionProctiononMAR::

Copyright(c)OracleCorporationAllrightsreserved

Connectingto(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC))

Themandpletedsuccessfully

C:/> lsnrctlstart

LSNRCTLforbitWindows:VersionProctiononMAR::

Copyright(c). OracleCorporationAllrightsreserved

Startingtnslsnr:pleasewait

TNSLSNRforbitWindows:VersionProction

SystemparameterfileisC:/UserDefine/oracle/ora/neork/admin/listenerora

LogmessageswrittentoC:/UserDefine/oracle/ora/neork/ log/listenerlog

Listeningon:(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=///pipe/EXTPROCipc

)))

Listeningon:( DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=scnasiapacifichpqc

)(PORT=)))

Connectingto(DESCRIPTION=(ADDRESS=( PROTOCOL=IPC)(KEY=EXTPROC)))

STATUSoftheLISTENER

AliasLISTENER

VersionTNSLSNRforbitWindows:VersionProc

tion

StartDateMAR::

Uptimedayshrminsec

TraceLeveloff

SecurityOFF

SNMPOFF

ListenerParameterFileC:/UserDefine/oracle/ora/neork/admin/listenerora

ListenerLogFileC:/UserDefine/oracle/ora/neork/log/ listenerlog

ListeningEndpointsSummary

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=///pipe/EXTPROCipc)))

( DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=scnasi)(POR

T=)))

ServicesSummary

ServicePLSExtProchasinstance(s)

InstancePLSExtProcstatusUNKNOWNhashandler(s)forthisservice

Servicewbqhasinstance(s)

InstancewbqstatusUNKNOWNhashandler(s)forthisservice

Themandpletedsuccessfully

C:/>sqlplus/nolog

SQL*Plus:ReleaseProctiononThuMar::

Copyright(c)OracleCorporationAllrightsreserved

SQL>connectsys/ change_on_installassysdba

Connected

SQL>

lishixin/Article/program/Oracle/201311/17222

Startup and shutdown of oracle database under linux

One startup

Three commands

sqlplux/nolog

connect/assysdba

startup

Two shutdown

shutdownimmediate;

[oracle@zhao~]$sqlplus/nolog

SQL*Plus:ReleaseProctiononSunNov::

Copyright(c)OracleCorporation Allrightsreserved

SQL>connect/assysdba

Connectedtoanidleinstance

SQL>startup

ORACLEinstancestarted

TotalSystemGlobalAreabytes

FixedSizebytes

VariableSizebytes

DatabaseBuffersbytes

RedoBuffersbytes

Databasemounted

Databaseopened

SQL>

The exclamation point is in SQL>! Enter to exit the sql command line

See the processes started by oracle database run

SQL>!

[oracle@zhao~]$psef|greporacle

root:pts/::suoracle

oracle:pts/::bash

oracle:pts/::sqlplus

oracle 😕 ::ora_pmon_lx

oracle 😕 ::ora_dbw_lx

oracle 😕 ::ora_lgwr_lx

oracle 😕 ::ora_ckpt_lx

oracle 😕 ::ora_***on_lx

oracle 😕 ::ora_reco_lx

oracle 😕 ::ora_cjq_lx

oracle 😕 ::ora_qmn_lx

oracle 😕 ::ora_s_lx

oracle 😕 ::ora_d_lx

oracle 😕 ::oraclelx(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))

oracle:pts/::/bin/bash

oracle:pts/::psef

oracle:pts/. ::greporacle

[oracle@zhao~]$exit

exit

SQL>shutdownimmediate;

DatabaseclosedDatabasedi*** ountedORACLEinstanceshutdown

SQL>

SQL>exit

DisconnectedfromOracleiEnterpriseEditionReleaseProction

WiththePartitioningOLAPandOracleDataMiningoptions

JServerReleaseProction

[oracle@zhao~]$

[oracle@zhao~]$psef| greporacle

root:pts/::suoracle

oracle:pts/::bash

oracle:pts/::psef

oracle:pts/::greporacle

lishixin/ Article/program/Oracle/201311/17259