* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download What are the components of instance?
Survey
Document related concepts
Commitment ordering wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Serializability wikipedia , lookup
Microsoft Access wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Functional Database Model wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Ingres (database) wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Relational model wikipedia , lookup
Concurrency control wikipedia , lookup
Database model wikipedia , lookup
Clusterpoint wikipedia , lookup
Transcript
Instance An Oracle server is a database management system that provides an open, comprehensive, integrated approach to information management It consists of an Oracle instance and an Oracle database What is Oracle Instance? An Oracle instance is a means to access an Oracle database It always opens one and only one database An Oracle instance consists of the shared memory structures and background processes that run the Oracle database. Instance Management A) Instance memory structure It consists of SGA, PGA and Oracle Background Process SGA The SGA is a shared memory area that contains data and control information for the instance. SGA has several components: Data Buffer Cache: It stores copies of data blocks that have been retrieved from the data files which give great performance when you obtain and update data Redo log Buffer: It records all the changes made to the database which is used for recovery purpose Large Pool: This is an optional area that is used for buffering large I/O requests for various server processes. Java Pool: This is required for all java specific session services such as parsing requirements of java commands. PGA A program global area (PGA) is a memory area used by a single Oracle server process. The PGA is used to process SQL statements and to hold logon and other session information. The amount of PGA memory used and its content depends on the instance configuration, that is, whether the instance is running in dedicated server or shared server mode. B) Oracle Background Process Oracle creates a set of background processes for an instance that interact with each other and with the operating system to manage memory structure. Mandatory background processes: DBWn, PMON, CKPT, LGWR, SMON Optional background processes: ARCn, LMDn, QMNn, CJQ0, LMON, RECO, Dnnn, LMS, Snnn, LCKn, Pnnn C) Accessing the Database The database instance can be started only by an authorized database administrator who has a special type of connection privilege to the Oracle instance. After the database instance has been started, it is usually open for access by normal users for whom database user accounts have been created. How to start Oracle instance? The administrator who starts up the Oracle instance and database must connect to the instance with a special kind of connection privilege. The process of starting the instance and database is as follows: When you start up a database, you create an instance of that database and you determine the state of the database. Normally, you start up an instance by mounting and opening the database. Doing so makes the database available for any valid user to connect to and perform typical data access operations. Connect to Oracle Database as SYSDBA: CONNECT username/password AS SYSDBA Use the STARTUP statement using SQL*Plus. We can also start an instance using Oracle Enterprise Manager (OEM). Below is the steps to start an instance using OEM. There are three states of an Oracle Instance 1) NO-MOUNT 2) MOUNT 3) OPEN How to shutdown Oracle instance? It is reverse of startup process. To shutdown an instance Use the SHUTDOWN statement using SQL*Plus. We can also start an instance using Oracle Enterprise Manager (OEM). Below are the steps to shutdown an Oracle Instance using OEM The Oracle instance dismounts the database and updates relevant entries in the control file to record a clean shutdown. The control file is closed. The database is now closed and only the instance remains. The Oracle instance stops the background processes of the instance and deallocates the shared memory used by the SGA. Shutdown mode: • A = ABORT • I = IMMEDIATE • T = TRANSACTIONAL • N = NORMAL STARTUP & SHUTDOWN USING SQL*PLUS C:\> sqlplus sys/oracle as sysdba • SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. • SQL> startup ORACLE instance started. Total System Global Area 285212672 bytes Fixed Size 1218472 bytes Variable Size 250177624 bytes Database Buffers 33554432 bytes Redo Buffers 262144 bytes Database mounted. Database opened. D) Initialization Parameters Instance management involves configuring parameters that affect the basic operation of the database instance. These parameters are called initialization parameters. The Oracle database server reads these parameters at database startup and monitors them while the database is running. They are stored in memory, where many of them can be changed dynamically. These parameters are called initialization parameters. The Oracle instance reads initialization parameters from a file at startup. There are two types of parameter files, and whether these dynamic changes are persistent across database shutdown and startup depends upon the type of parameter file you are using. SERVERPARAMETER FILES (SPFILE): The server parameter file is the preferred form of initialization parameter file, and is a binary file that can be written to and read by the database. It must not be edited manually. It resides on the server side. PARAMETR FILES (PFILE): In Pfile text file can be edited using a text editor. When changes are made to the PFILE, the instance must be shut down and restarted before it takes effect. What are the components of instance? The Systems Global Area (SGA) and shared pool are memory structures. The process monitor is a background process (DBWn, LGWR, ARCn, PMON, and other process.). What are the Types of Process in Instance? An Oracle Instance consists of User Process, SGA and PGA. Below figure consists of types of Process in Instance.