4 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.

Slides:



Advertisements
Similar presentations
18 Copyright © Oracle Corporation, All rights reserved. Transporting Data Between Databases.
Advertisements

2 Copyright © 2005, Oracle. All rights reserved. Installing the Oracle Database Software.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Oracle High Availability Solutions RAC and Standby Database Copyright System Managers LLC 2008.
Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Chapter 9 Auditing Database Activities
1 - Oracle Server Architecture Overview
Managing an Oracle Instance
9 Copyright © 2009, Oracle. All rights reserved. Managing Data Concurrency.
10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data.
Advanced Databases Basic Database Administration Guide to Oracle 10g 1.
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
A Guide to Oracle9i1 Introduction to Oracle9i Database Administration Chapter 11.
Oracle Database Instance Management Oracle 10g. Ebtisam Alabdulqader Outline Management Framework. Managing Oracle instance through the Enterprise Manager.
Backup and Recovery Part 1.
Using RMAN to Perform Recovery
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
20 Copyright © 2004, Oracle. All rights reserved. Database Recovery.
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
Oracle Database Administration
Managing the Oracle RDBMS Today you will look at the basics, including: –Setting up Enterprise Manager –Using Enterprise Manager –Using Server Manager.
4 Copyright © 2004, Oracle. All rights reserved. Database Interfaces.
CHAPTER 2 Implementing a Database. Introduction to Creating Databases After you’ve installed the Oracle software, the next logical step is to create a.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
9 Copyright © 2005, Oracle. All rights reserved. Administering User Security.
DBMS Transactions and Rollback Recovery Helia / Martti Laiho.
16 Copyright © 2007, Oracle. All rights reserved. Performing Database Recovery.
5 Copyright © 2004, Oracle. All rights reserved. Controlling the Database.
2 Copyright © 2004, Oracle. All rights reserved. Running a Forms Developer Application.
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Copyright  Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
16 Copyright © Oracle Corporation, All rights reserved. Managing Privileges.
IT Database Administration SECTION 01. Starting Up and Shutting Down the Database Database Administration Facilities – A number of tools are available.
8 Copyright © 2005, Oracle. All rights reserved. Managing Data.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 9 Auditing Database Activities.
7 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
4 Copyright © 2007, Oracle. All rights reserved. Managing the Oracle Instance.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
10 Copyright © Oracle Corporation, All rights reserved. User-Managed Backups.
12 Copyright © Oracle Corporation, All rights reserved. User-Managed Complete Recovery.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
QUIZ DATABASE ADMINISTRATOR. LESS 3 LESS 5 LESS 6 LESS 7.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
8 Copyright © 2007, Oracle. All rights reserved. Using RMAN to Duplicate a Database.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
2 Copyright © 2004, Oracle. All rights reserved. Running a Forms Developer Application.
6 Copyright © Oracle Corporation, All rights reserved. Backup and Recovery Overview.
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
6 Copyright © 2006, Oracle. All rights reserved. Monitoring Grid Control.
9 Copyright © 2004, Oracle. All rights reserved. Incomplete Recovery.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
5 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
Oracle Database Architectural Components
Oracle 10g Administration Database Control and Storage Structures Copyright ©2006 Custom Training Institute.
9 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
10 Copyright © 2007, Oracle. All rights reserved. Managing Undo Data.
 Database Administration Oracle Database Instance Management Starting Up and Shutting Down أ. ندى الغامدي, أ. ندى الطوالة.
3 Copyright © Oracle Corporation, All rights reserved. 管理数据库事例.
Running a Forms Developer Application
Is 221: Database Administration
Performing Database Recovery
Presentation transcript:

4 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance

4-2 Copyright © 2005, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Start and stop the Oracle database and components Use Enterprise Manager (EM) Access a database with SQL*Plus and i SQL*Plus Modify database initialization parameters Describe the stages of database startup Describe the database shutdown options View the alert log Access dynamic performance views

4-3 Copyright © 2005, Oracle. All rights reserved. Management Framework The three components of the Oracle Database 10g management framework are: Database instance Listener Management interface –Database Control –Management agent (when using Grid Control) Listener Database Control Management agent Management interface -or- >Components SQL*Plus Init Params DB Startup DB Shutdown Alert Log Perf Views

4-4 Copyright © 2005, Oracle. All rights reserved. Starting and Stopping Database Control $ emctl start dbconsole TZ set to US/Pacific Oracle Enterprise Manager 10g Database Control Release Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. Starting Oracle Enterprise Manager 10g Database Control started Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/edrsr9p1.us.oracle.com_orcl/sys man/log $ emctl stop dbconsole TZ set to US/Pacific Oracle Enterprise Manager 10g Database Control Release Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. Stopping Oracle Enterprise Manager 10g Database Control Stopped.

4-5 Copyright © 2005, Oracle. All rights reserved. Oracle Enterprise Manager

4-6 Copyright © 2005, Oracle. All rights reserved. Accessing Oracle Enterprise Manager

4-7 Copyright © 2005, Oracle. All rights reserved. Database Home Page Property pages

4-8 Copyright © 2005, Oracle. All rights reserved. Using SQL*Plus and i SQL*Plus to Access Your Database SQL*Plus and i SQL*Plus provide additional interfaces to your database to: Perform database management operations Execute SQL commands to query, insert, update, and delete data in your database Components >SQL*Plus Init Params DB Startup DB Shutdown Alert Log Perf Views

4-9 Copyright © 2005, Oracle. All rights reserved. Using i SQL*Plus 1 2 3

4-10 Copyright © 2005, Oracle. All rights reserved. Setting Up i SQL*Plus for SYSDBA and SYSOPER Access For a user to login to i SQL*Plus as SYSDBA or SYSOPER you must set up the user in the OC4J user manager by performing the following steps: 1.Create a user 2.Grant the webDba role to the user $ cd $ORACLE_HOME/oc4j/j2ee/isqlplus/\ > application-deployments/isqlplus $JAVA_HOME/bin/java \ > -Djava.security.properties=\ > $ORACLE_HOME/oc4j/j2ee/home/config/jazn.security.props \ > -jar $ORACLE_HOME/oc4j/j2ee/home/jazn.jar \ > -user "iSQL*Plus DBA/admin" -password welcome -shell JAZN> adduser "iSQL*Plus DBA" username password JAZN> grantrole webDba "iSQL*Plus DBA" username

4-11 Copyright © 2005, Oracle. All rights reserved. Using i SQL*Plus Full Notes Page

4-12 Copyright © 2005, Oracle. All rights reserved. Using SQL*Plus SQL*Plus is: A command-line tool Used interactively or in batch mode $ sqlplus hr/hr SQL*Plus: Release Production on Mon Jul 25 12:37: Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release Production With the Partitioning, OLAP and Data Mining options SQL> select last_name from employees; LAST_NAME Abel Ande Atkinson

4-13 Copyright © 2005, Oracle. All rights reserved. Calling SQL*Plus from a Shell Script $./batch_sqlplus.sh SQL*Plus: Release Production on Mon Jul 25 12:47: Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release Production With the Partitioning, OLAP and Data Mining options SQL> COUNT(*) SQL> 107 rows updated. SQL> Commit complete. SQL> Disconnected from Oracle Database 10g Enterprise Edition Release Production With the Partitioning, OLAP and Data Mining options oracle]$ # Name of this file: batch_sqlplus.sh # Count employees and give raise. sqlplus hr/hr <<EOF select count(*) from employees; update employees set salary = salary*1.10; commit; quit EOF exit Output

4-14 Copyright © 2005, Oracle. All rights reserved. Calling a SQL Script from SQL*Plus $ sqlplus SQL*Plus: Release Production on Mon Jul 25 12:57: Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release Production With the Partitioning, OLAP and Data Mining options DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID IT Disconnected from Oracle Database 10g Enterprise Edition Release Production With the Partitioning, OLAP and Data Mining options $ select * from departments where location_id = 1400; quit script.sql Output

4-15 Copyright © 2005, Oracle. All rights reserved. spfileorcl.ora Initialization Parameter Files Components SQL*Plus >Init Params DB Startup DB Shutdown Alert Log Perf Views

4-16 Copyright © 2005, Oracle. All rights reserved. Simplified Initialization Parameters DB_CACHE_SIZE DB_FILE_MULTIBLOCK _READ_COUNT SHARED_POOL_SIZE … Advanced CONTROL_FILES DB_BLOCK_SIZE PROCESSES UNDO_MANAGEMENT … Basic

4-17 Copyright © 2005, Oracle. All rights reserved. Initialization Parameter Examples Full Notes Page

4-18 Copyright © 2005, Oracle. All rights reserved. Viewing and Modifying Initialization Parameters

4-19 Copyright © 2005, Oracle. All rights reserved. Database Startup and Shutdown or Components SQL*Plus Init Params >DB Startup DB Shutdown Alert Log Perf Views

4-20 Copyright © 2005, Oracle. All rights reserved. Starting Up an Oracle Database Instance

4-21 Copyright © 2005, Oracle. All rights reserved. Starting Up an Oracle Database Instance: NOMOUNT OPEN MOUNT NOMOUNT SHUTDOWN Instance started STARTUP

4-22 Copyright © 2005, Oracle. All rights reserved. Starting Up an Oracle Database Instance: MOUNT OPEN MOUNT NOMOUNT SHUTDOWN Control file opened for this instance Instance started STARTUP

4-23 Copyright © 2005, Oracle. All rights reserved. Starting Up an Oracle Database Instance: OPEN OPEN MOUNT NOMOUNT SHUTDOWN All files opened as described by the control file for this instance Control file opened for this instance Instance started STARTUP

4-24 Copyright © 2005, Oracle. All rights reserved. Shutting Down an Oracle Database Instance Components SQL*Plus Init Params DB Startup >DB Shutdown Alert Log Perf Views

4-25 Copyright © 2005, Oracle. All rights reserved. Shutdown Modes A No T No Yes I No Yes Shutdown Mode Allows new connections Waits until current sessions end Waits until current transactions end Forces a checkpoint and closes files N No Yes Shutdown mode: A = ABORT I = IMMEDIATE T = TRANSACTIONAL N = NORMAL

4-26 Copyright © 2005, Oracle. All rights reserved. SHUTDOWN Options During SHUTDOWN NORMAL or SHUTDOWN TRANSACTIONAL or SHUTDOWN IMMEDIATE Consistent database (clean database) On the way down: Uncommitted changes rolled back, for IMMEDIATE Database buffer cache written to data files Resources released On the way up: No instance recovery

4-27 Copyright © 2005, Oracle. All rights reserved. Full Notes Page

4-28 Copyright © 2005, Oracle. All rights reserved. SHUTDOWN Options During SHUTDOWN ABORT or Instance failure or STARTUP FORCE Inconsistent database (dirty database) On the way down: Modified buffers not written to data files Uncommitted changes not rolled back On the way up: Online redo log files used to reapply changes Undo segments used to roll back uncommitted changes Resources released

4-29 Copyright © 2005, Oracle. All rights reserved. Using SQL*Plus to Start Up and Shut Down oracle]$ sqlplus dba1/oracle as sysdba SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area bytes Fixed Size bytes Variable Size bytes Database Buffers bytes Redo Buffers bytes Database mounted. Database opened. SQL>

4-30 Copyright © 2005, Oracle. All rights reserved. Viewing the Alert Log Database Home page > Related Links region > Alert Log Content Components SQL*Plus Init Params DB Startup DB Shutdown >Alert Log Perf Views

4-31 Copyright © 2005, Oracle. All rights reserved. Viewing the Alert History

4-32 Copyright © 2005, Oracle. All rights reserved. Dynamic Performance Views Dynamic performance views provide access to information about changing states and conditions in the database. Session data Wait events Memory allocations Running SQL UNDO usage Open cursors Redo log usage And so on Oracle instance Components SQL*Plus Init Params DB Startup DB Shutdown Alert Log >Perf Views

4-33 Copyright © 2005, Oracle. All rights reserved. Dynamic Performance Views: Usage Examples SQL> SELECT sql_text, executions FROM v$sql WHERE cpu_time > ; SQL> SELECT * FROM v$session WHERE machine = 'EDRSR9P1' and logon_time > SYSDATE - 1; SQL> SELECT sid, ctime FROM v$lock WHERE block > 0; a b c

4-34 Copyright © 2005, Oracle. All rights reserved. Dynamic Performance Views: Considerations These views are owned by the SYS user. Different views are available at different times: –The instance has been started. –The database is mounted. –The database is open. You can query V$FIXED_TABLE to see all the view names. These views are often referred to as “v-dollar views.” Read consistency is not guaranteed on these views because the data is dynamic.

4-35 Copyright © 2005, Oracle. All rights reserved. Summary In this lesson, you should have learned how to: Start and stop the Oracle database and components Use Enterprise Manager and describe its high- level functionality Access a database with SQL*Plus and i SQL*Plus Modify database initialization parameters Describe the stages of database startup Describe the database shutdown options View the alert log Access dynamic performance views

4-36 Copyright © 2005, Oracle. All rights reserved. Practice Overview: Managing the Oracle Instance This practice covers the following topics: Navigating in Enterprise Manager Viewing and modifying initialization parameters Stopping and starting the database instance Viewing the alert log Connecting to the database by using SQL*Plus and i SQL*Plus