The startup and shutdown of Oracle are two important procedures that need to be able to perform properly to ensure the operation of the DBMS itself, as well as the integrity of data managed by it. services (daemons within GNU / Linux) to boot before you can interact with the Oracle listener and one or more instances .
With Microsoft Windows, the services to which they refer are: *
OracleServiceSID: service bootstrap that allows the oracle instance starts, indicated by the string "SID". Once the service OracleServiceSID you can start / stop the instance manually
* OracleHOME_NAMETNSListener: is the service that is responsible to control the Oracle listener
For directors of Oracle on Microsoft Window recommend you take a look at this description (in English, but very clear) detailed and comprehensive services Oracle environment variables that you must set the registry key and fundamental to Oracle!
If you prefer the operating system GNU / Linux (as in my case;), Oracle provides the command "lsnrctl" for the management of the listener and the script "dbstart" for launching one or more instances. Both are located in the directory "$ ORACLE_HOME / bin". In order to automate
startup and shutdown of Oracle (listener instance + s, then), I use this simple script I found online and I called it "gestoracle.sh"
# / bin / bash #: (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = debiandb) (PORT = 1521)))
# Run-level Startup script for the Oracle Instance and Listener
# # chkconfig: 345 91 19
# description: Startup / Shutdown Oracle listener and instance
# ORA_OWNR = "oracle" # if
the executables do not exist - display error
if [! -F $ OH / bin / dbstart-o! -D $ OH]
then echo "Oracle startup: can not start" exit 1
fi # Depending on parameter - startup, shutdown, restart
# of the instance and listener or usage display
case "$1" in
start)
# Oracle listener and instance startup
echo -n "Starting Oracle: "
$OH/bin/lsnrctl start
$OH/bin/dbstart $ORACLE_HOME
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
$OH/bin/lsnrctl stop
$OH/bin/dbshut $ORACLE_HOME
echo "OK"
;;
reload start reserved.
Start / u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: wait ...
TNSLSNR for Linux: Version 10.2.0.4.0 - Production
The file system parameters is / u01/app/oracle/product/10.2.0/db_1/network /
admin / listener.ora Log messages recorded
in / u01/app/oracle/product/10.2.0/db_1 /
network / log / listener.log
Listening on: (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1))) Listening on
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1))) STATUS of the LISTENER
------------------------ Alias \u200b\u200bLISTENER VersionTNSLSNR for Linux: Version 10.2.0.4.0 - Production Start Date
02-APR-
2009 08:58:14 Uptime 0 days 0 hours 0 min. 0 sec.
trace level off
Security ON: Local OS Authentication SNMP OFFThe procedure of "openness" of a database consists of several levels: *
file parameters listener/u01/app/oracle/product/10.2.0/db_1/network/admin /
listener.ora Listener Log File / u01 / app/oracle/product/10.2.0/db_1/network/log /
listener.log
Summary table of the endpoints of listening ...
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = debiandb) (PORT = 1521))) Summary table
services ...
The "PLSExtProc" has 1 instances. The application
"PLSExtProc" was UNKNOWN, has 1 handler for this service ...
The command was OK
Now that the DBMS is running you can start the application you want (always make sure that the ORACLE_SID system variable is correctly set):
debiandb oracle @: ~ $ export ORACLE_SID = TEST
debiandb @ oracle: ~ $ sqlplus / nolog
SQL * Plus: Release 10.2.0.4.0 - Production on Thu
April 2 08:58:39 2009 Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
SQL> conn / as sysdba Connected to an instance
suspended.
SQL> startup ORACLE instance started
.
Total System Global Area 1174405120 bytes Fixed Size 1267116 bytes
Variable Size 620759636 bytes Database Buffers 536870912 bytes
Redo Buffers 15507456 bytes Database
MOUNT run. Database opened
LEVEL 0 - database closed:
instance is turned off and users can not perform login, access the data in db, etc..
*
LEVEL 1 - nomount:
running the command
SQL> startup nomount
Oracle reads the contents of the SPFILE, which contains essential information for the start of the specified by the ORACLE_SID system variable (for example, the size of the various areas RAM to be reserved for instance, the size of blocks of data, the character set, etc.), so is the start of the instance by allocating a certain amount of RAM and the start of
background processes.
The database is not yet accessible to users.
* LEVEL 2 - MOUNT:
accessible from level 0 with the command:
SQL> startup mount
or from level 1 with the command
SQL> alter database mount;
This level Oracle reads the contents of s control file, the file system whose position is indicated in the SPFILE, to determine the position, again on a file system, in the datafile, however, fails to open.
* LEVEL 3 - OPEN:
state open database can be accessed directly from level 0 with the command
SQL> startup or from levels 1 and 2 with the command
SQL> alter database open mounts in Oracle read-only or read / write the datafile, then the data contained in the database are accessible to users.
As usual, you can freely download the imagestart post as released under Creative Commons Attribution-Noncommercial 2.0 Generic
;)
0 comments:
Post a Comment