Download presentation
Presentation is loading. Please wait.
1
Is 221: Database Administration
Information Systems Department Lecture 3: Oracle Database Instance Management Starting Up and Shutting Down
2
Oracle Database Instance Management
A parameter file: is a file that contains a list of initialization parameters and a value for each parameter. The properties of an Oracle instance are specified using instance initialization parameters. When the instance is started, an initialization parameter file is read, and the instance is configured accordingly. Managing an Oracle instance includes configuring parameters that affect the basic operation of the Oracle instance. These parameters are called initialization parameters. The Oracle instance reads initialization parameters from a file at startup. Information Systems Department
3
Oracle Database Instance Management
After being read from a file, initialization parameters are retained in memory, where the values for many of them can be changed dynamically. There are two types of parameter files. Parameter Files 1- Server Parameter File (SPFILE) 2- Text Initialization Parameter File (PFILE) Information Systems Department
4
:Parameter Files 1- Server Parameter File (SPFILE):
It is a binary file that can be written to and read by the database. Location: It is stored on the host computer on which Oracle Database is running. It must not be edited manually. Changes are made when you use Database Control to modify one or more initialization parameters, or when Oracle Database itself makes changes for self-tuning purposes. Information Systems Department
5
Parameter Files: 2- Text Initialization Parameter File (PFILE):
It is a text file that can be read by the Oracle instance. You can change a text initialization parameter file with a text editor, but changes do not take effect until you restart the Oracle instance. When you start the instance with this type of file, you can still change many initialization parameters dynamically with Database Control. The change is lost when you restart the database instance without saving your changes. Information Systems Department
6
Oracle Database Instance Startup
Stages for Starting Up a Database: NOMOUNT MOUNT OPEN When you start up a database, you create an instance of that database and you determine the state of the database. To start an instance, the database must read instance configuration parameters (the initialization parameters) from either a server parameter file (SPFILE) or a text initialization parameter file(PFILE). Information Systems Department
7
Oracle Database Instance Startup
You start up the instance using one of the following methods: 1- Oracle Enterprise Manager. 2- SQL Plus STARTUP command. Information Systems Department
8
Starting Up an Oracle Database Instance: NOMOUNT
Information Systems Department
9
Starting Up an Oracle Database Instance: NOMOUNT
In the platform-specific default location, Oracle Database locates your initialization parameter file by examining file names in the following order: 1. spfileORACLE_SID.ora 2. spfile.ora 3. initORACLE_SID.ora ( Allocating the SGA, Starting the background processes, Opening the alert<SID>.log file and the trace files. ) Information Systems Department
10
Starting Up an Oracle Database Instance: MOUNT
Information Systems Department
11
Starting Up an Oracle Database Instance: MOUNT
Mounting a database includes the following tasks: Associating a database with a previously started instance. Locating and opening the control files specified in the parameter file. Reading the control files to obtain the names and statuses of the data files and online redo log files. Information Systems Department
12
Starting Up an Oracle Database Instance: OPEN
Information Systems Department
13
Starting Up an Oracle Database Instance: OPEN
A normal database operation: means that an instance is started and the database is mounted and opened. With a normal database operation, any valid user can connect to the database and perform typical data access operations. Opening the database includes the following tasks: Opening the online data files. Opening the online redo log files. If any of the data files or online redo log files are not present when you attempt to open the database, then the Oracle server returns an error. Information Systems Department
14
Oracle Database Instance Startup
SQL Commands: STARTUP; = STARTUP OPEN; starts an instance, reads the initialization parameters from the default location, and then mounts and opens the database. STARTUP PFILE = $Oracle_Home/dbs/initdb01.ora Start up the instance pointing to this initialization parameter file. STARTUP NOMOUNT; STARTUP MOUNT; Information Systems Department
15
Additional Instance Startup Options
Two additional options for Starting up an Instance: Restrict access to the database. Force the instance to start. Information Systems Department
16
Restricted Access to the Database
Instance can be started in Restricted Mode so that the instance is available only to administrative personnel (not general database users). Only database administrators should have the RESTRICTED SESSION system privilege. HOW to access? when the instance is in restricted mode, a database administrator cannot access the instance remotely through an Oracle Net listener, but can only access the instance locally from the machine that the instance is running on. SQL Commands: ALTER SYSTEM ENABLE RESTRICTED SESSION; STARTUP RESTRICT; Information Systems Department
17
Forcing an Instance to Startup
In unusual circumstances, you might experience problems when attempting to start a database instance. Because a previous instance might not have been shutdown cleanly. For example, one of the instance's processes might not have terminated properly. In such situations, the database can return an error during normal instance startup. Information Systems Department
18
Forcing an Instance to Startup
Instance can be forced to start up using the Force option and that will terminate all remnant Oracle processes of the previous instance before starting the new instance. SQL Commands: STARTUP FORCE; Information Systems Department
19
Oracle Database Instance Shutdown
Modes for Shutting down a Database: ABORT IMMEDIATE TRANSACTIONAL NORMAL Information Systems Department
20
Oracle Database Instance Shutdown
If the instance is already started it can be Shutdown. Shutdown modes are progressively more accommodating of current activity in this order: ABORT: This is typically used: when no other form of shutdown works (NORMAL and IMMEDIATE), when there are problems when starting the instance, or when you need to shut down immediately because of an impending situation. IMMEDIATE: Uncommitted transactions are rolled back. TRANSACTIONAL: Allows transactions to finish. NORMAL: Waits for sessions to disconnect. If you consider the amount of time that it takes to perform the shutdown, you find that ABORT is the fastest and NORMAL is the slowest. Information Systems Department
21
Shutdown Modes Consistent database (clean database) On the way down:
Uncommitted changes rolled back, for IMMEDIATE. Database buffer cache written to data files. Resources released. During NORMAL or TRANSACTIONAL IMMEDIATE On the way up: No instance recovery. Consistent database (clean database) Information Systems Department
22
Inconsistent database
Shutdown Modes During ABORT or Instance failure STARTUP FORCE On the way down: Uncommitted changes not rolled back. Modified buffers not written to data files. On the way up: Online redo log files used to reapply changes. Undo segments used to roll back uncommitted changes. Resources released. Inconsistent database (dirty database) Information Systems Department
23
Managing Oracle instance through the Enterprise Manager
Information Systems Department
24
Startup step#1 Information Systems Department
25
Startup step#2 Information Systems Department
Starting the Oracle Database Instance If the database is currently not started when you go to the Enterprise Manager Database Control page, Click Startup to start the instance. Then the Startup/Shutdown: Specify Host and Target Database Credentials page is displayed. Enter the host credentials and database credentials. Select Save as Preferred Credentials. Click OK. Then the Startup/Shutdown: Confirmation page is displayed. Information Systems Department
26
Startup step#3 Information Systems Department
Starting the Oracle Database Instance (continued) Optionally, click the Advanced Options button, to choose the startup mode. To start an instance in restricted mode, select “ restrict access to database” option on the advanced startup options page. To force an instance to start up, select “ force the instance to start” option on the advanced startup options page. Click Yes to start the instance and open the database. Then the Startup/Shutdown: Activity page is displayed. After the instance is started and the database is open, the Login page is displayed. Information Systems Department
27
Startup step#4 Information Systems Department
28
Startup step#5 Information Systems Department
29
Startup step#6 Information Systems Department
30
Shutdown step#1 Information Systems Department
31
Shutdown step#2 Information Systems Department
32
Shutdown step#3 Information Systems Department
Starting the Oracle Database Instance (continued) Enter the username and password to log in to Enterprise Manager Database Control. Click Login. Then the Database home page is displayed. Information Systems Department
33
Shutdown step#4 Information Systems Department
Shutting the Oracle Database Instance (continued) Optionally, click the Advanced Options button, to select the mode of the shutdown: Normal, Transactional, Immediate, or Abort. Click Yes to perform the shutdown operation. The Startup/Shutdown: Activity Information page appears. Click Refresh. Then the Database home page is displayed. Information Systems Department
34
Shutdown step#5 Information Systems Department
Shutting the Oracle Database Instance (continued) After the instance is shutdown and the Database home page is displayed, you can restart your instance. Information Systems Department
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.