IT 21003 Database Administration SECTION 01. Starting Up and Shutting Down the Database Database Administration Facilities – A number of tools are available.

Slides:



Advertisements
Similar presentations
ITEC474 INTRODUCTION.
Advertisements

4 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
1 Auditing the DBA: What non-technical managers and auditors should know. Presented By Cam Larner Cam Larner President President Absolute Technologies,
Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
3 Managing an Oracle Instance. Objectives Setting up operating system and password file authentication Creating the parameter file Starting up an instance.
Oracle Architecture. Instances and Databases (1/2)
ITEC474 Control File Maintenance
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 12 System and Object Privileges.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Installation – Lecture 2 Copyright System Managers LLC 2007 all rights reserved.
Backup and recovery Basics of Backup and restoration Types of recovery Defining strategy Starting up and shutting down 80/20 rule SLA’s.
Chapter 9 Auditing Database Activities
1 - Oracle Server Architecture Overview
Harvard University Oracle Database Administration Session 2 System Level.
Managing an Oracle Instance
Advanced Databases Basic Database Administration Guide to Oracle 10g 1.
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.
Database Backup and Recovery
INTRODUCTION TO ORACLE
Backup and Recovery Part 1.
Chapter 12 Performing Incomplete Recovery. Background Viewed as one of the more difficult chapters to write Thought it was important to put in material.
Introduction to Oracle Backup and Recovery
IS 4510 – Database Administration Module – 2 Database Backup 10/24/20141Compiled by: Zafar Iqbal Khan.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 3 Administration of Users.
Oracle Database Administration
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.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 3 Administration of Users.
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.
CHAPTER 6 Users and Basic Security. Progression of Steps for Creating a Database Environment 1. Install Oracle database binaries (Chapter 1) 2. Create.
1Introduction Objectives 1-2 Course Objectives 1-3 Oracle Products 1-4 Relational Database Systems 1-5 How the Data Is Organized 1-6 Integrity Constraints.
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
5 Copyright © 2004, Oracle. All rights reserved. Controlling the Database.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
A Guide to Oracle9i1 Database Instance startup and shutdown.
7 Copyright © 2004, Oracle. All rights reserved. Recovering from Noncritical Losses.
Introduction to Oracle. Oracle History 1979 Oracle Release client/server relational database 1989 Oracle Oracle 8 (object relational) 1999.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 9 Auditing Database Activities.
Oracle 10g Database Administrator: Implementation and Administration Chapter 3 Creating an Oracle Instance.
IT Database Administration Section 09. Backup and Recovery Backup: The available options Full Consistent (cold) Backup Database shutdown, all files.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
Database Security. Multi-user database systems like Oracle include security to control how the database is accessed and used for example security Mechanisms:
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
IT Database Administration SECTION 02. CREATING DATABASES Creating a Database: Overview 1. Plan the physical design and storage structures 2. Back.
Week 2 Lecture 1 Creating an Oracle Instance. Learning Objectives  Learn the steps for creating a database  Understand the prerequisites for creating.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
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.
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.
19 Managing Privileges Objectives Identifying system and object privileges Granting and revoking privileges Controlling operating system or password.
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.
Oracle 10g Administration Database Control and Storage Structures Copyright ©2006 Custom Training Institute.
 Database Administration Oracle Database Instance Management Starting Up and Shutting Down أ. ندى الغامدي, أ. ندى الطوالة.
3 Copyright © Oracle Corporation, All rights reserved. 管理数据库事例.
Managing an Oracle Instance
Is 221: Database Administration
Recovering from Noncritical Losses
Managing Privileges.
Performing Database Recovery
Oracle 12c Multitenant Database
Presentation transcript:

IT Database Administration SECTION 01

Starting Up and Shutting Down the Database Database Administration Facilities – A number of tools are available for DBAs to connect to an Oracle database Enterprise Manager Enterprise Manager SQL Worksheet SQL Worksheet SQL Plus SQL Plus Third Party Tools Third Party Tools

Starting Up and Shutting Down the Database Connecting as DBA – To perform startup and shutdown activity, DBAs need to connect to the database with SYSDBA or SYSOPER system privileges SYSDBA allows startup and shutdown and full access to all database objects SYSDBA allows startup and shutdown and full access to all database objects SYSOPER allows startup, shutdown, and access to dictionary object definitions only SYSOPER allows startup, shutdown, and access to dictionary object definitions only – Useful to give to others instead of SYSDBA

Starting Up and Shutting Down the Database Connecting as DBA –To connect via SQL CONNECT “username/password” AS SYSDBA/SYSOPER CONNECT “username/password” AS SYSDBA/SYSOPER

Starting Up and Shutting Down the Database Connecting as SYS or SYSTEM – Oracle databases are created with two accounts that have DBA privileges – SYS owns the data dictionary tables and views – Has a password of CHANGE_ON_INSTALL on creation of a database

Starting Up and Shutting Down the Database - SYSTEM is an account with DBA privileges and owns any tables required for any of the Oracle development tools – Has a database password of MANAGER on creation of a database

Starting Up and Shutting Down the Database By default, only SYS can be used for startup and shutdown commandsBy default, only SYS can be used for startup and shutdown commands SYS is able to connect as SYSDBA or SYSOPERSYS is able to connect as SYSDBA or SYSOPER This is not possible by default from SYSTEMThis is not possible by default from SYSTEM

Starting Up and Shutting Down the Database Connecting as SYSDBA to the DatabaseConnecting as SYSDBA to the Database When using SYS to connect as SYSDBA, you will need to use a special password (not CHANGE_ON_INSTALL)When using SYS to connect as SYSDBA, you will need to use a special password (not CHANGE_ON_INSTALL) An INTERNAL connection also requires this passwordAn INTERNAL connection also requires this password The “Special” password is held encrypted in a password file (PWD.ORA) by the operating systemThe “Special” password is held encrypted in a password file (PWD.ORA) by the operating system Oracle provides a utility (ORAPWD) that creates the password file and sets the initial value for the passwordOracle provides a utility (ORAPWD) that creates the password file and sets the initial value for the password

Starting Up and Shutting Down the Database DBA Password Management – The parameter REMOTE_LOGIN_PASSWORDFILE can be used to define the mode of the password file EXCLUSIVE EXCLUSIVE – The password file can be used with only one database – Users other than SYS and INTERNAL may be given SYSDBA or SYSOPER privileges

Starting Up and Shutting Down the Database SHARED SHARED – For use with multiple databases – Only logins by SYS and INTERNAL are recognized by a shared password file NONE NONE – No privileged connections over non- secured networks – Allows remote connections from accounts that are able to activate OSOPER and/or OSDBA roles (This is OS authentication)

Starting Up and Shutting Down the Database Use the ORAPWD facility toUse the ORAPWD facility to – Set the name of the password file to be created – Set the initial password for INTERNAL and SYS

Starting Up and Shutting Down the Database Controlling Availability of a Database – An INSTANCE is used to access and manipulate database data and storage structures – An INSTANCE can be Started Up - This builds the SGA in memory and starts the background processes Started Up - This builds the SGA in memory and starts the background processes Shut Down - Closes the database and stops the INSTANCE Shut Down - Closes the database and stops the INSTANCE – Removes memory structures

Starting Up and Shutting Down the Database Remember: There are, in essence, two quite different entities: the DATABASE and the Oracle INSTANCE (System) The system (INSTANCE) undergoes STARTUP and SHUTDOWN The system (INSTANCE) undergoes STARTUP and SHUTDOWN The Database may be OPEN, CLOSED, or MOUNTED The Database may be OPEN, CLOSED, or MOUNTED

Starting Up and Shutting Down the Database Database Startup States STARTUP OPEN 6. Opens datafiles and redo logs 7. Acquires Rollback Segments 8. Calls SMON if needed 9. Makes Data Dictionary available STARTUP MOUNT 3. Links the INSTANCE to a database 4. Reads Control Files 5. Checks Datafiles and Redo Log Files STARTUP NOMOUNT 1. Reads init.ora (pfile) 2. Creates and starts INSTANCE Starting Up

Starting Up and Shutting Down the Database Database Startup States Cont’d – Oracle supports moving UP the stairs, not back down the stairs To move from OPEN to MOUNT state, the INSTANCE must first be shut down To move from OPEN to MOUNT state, the INSTANCE must first be shut down

Starting Up and Shutting Down the Database –Altering the Database States Oracle supports altering the database only in the upward direction and only one step at a time Oracle supports altering the database only in the upward direction and only one step at a time – ALTER DATABASE MOUNT; – ALTER DATABASE OPEN;

Starting Up and Shutting Down the Database Database Startup SQL: STARTUP [FORCE}|[NOMOUNT | MOUNT | OPEN] – STARTUP (by itself) Starts up the INSTANCE, oracle_sid_name, using parameters found in the pfile Starts up the INSTANCE, oracle_sid_name, using parameters found in the pfile If PFILE is omitted, it uses the init.ora found in the Oracle_Home directory/folder If PFILE is omitted, it uses the init.ora found in the Oracle_Home directory/folder

Starting Up and Shutting Down the Database Startup Options – FORCE Shuts down an INSTANCE before starting it up in the specified mode Shuts down an INSTANCE before starting it up in the specified mode Same as performing SHUTDOWN ABORT followed by a STARTUP Same as performing SHUTDOWN ABORT followed by a STARTUP

Starting Up and Shutting Down the Database Startup Options –NOMOUNT Starts up the INSTANCE without mounting the database Starts up the INSTANCE without mounting the database – Activities are limited – creating a database The database is inaccessible The database is inaccessible

Starting Up and Shutting Down the Database Startup Options – MOUNT Starts up the INSTANCE and MOUNTS the database Starts up the INSTANCE and MOUNTS the database Allows restricted use of the database for DBA tasks Allows restricted use of the database for DBA tasks – Perform file management and database restructuring No normal user access is possible No normal user access is possible

Starting Up and Shutting Down the Database Startup Options – OPEN Starts the INSTANCE, mounts and then opens the database in shared or exclusive mode Starts the INSTANCE, mounts and then opens the database in shared or exclusive mode Many file management activities are available Many file management activities are available – Manipulating log files – Taking datafiles offline – Backing up control files – But normal user processing is allowed

Starting Up and Shutting Down the Database Startup Options – RECOVER – Forces automatic recovery procedures on startup

Starting Up and Shutting Down the Database Startup Options – RESTRICT Limits access to the database to users who have been granted both the CREATE SESSION and RESTRICTED SESSION system privileges Limits access to the database to users who have been granted both the CREATE SESSION and RESTRICTED SESSION system privileges – EXAMPLE: STARTUP OPEN RESTRICT;

Starting Up and Shutting Down the Database Startup Options – Restrict is useful for performing database exports while there is no activity on the database – Database must be open for export of data – The limit can be removed while the database is open » ALTER SYSTEM DISABLE RESTRICTED SESSION;

End

Starting Up and Shutting Down the Database Shutting Down the Database – SHUTDOWN [NORMAL | IMMEDIATE | ABORT | TRANSACTIONAL[n]] – This command primarily relates to a running instance

Starting Up and Shutting Down the Database Shutting Down the Database – Closes the database, dismounts the database, and shuts down the instance – Before an open database can be placed in the NOMOUNT or MOUNT state it must first be shut down – Oracle databases can be suspended and resumed ALTER SYSTEM SUSPEND | RESUME; ALTER SYSTEM SUSPEND | RESUME;

Starting Up and Shutting Down the Database Shutdown Options – SHUTDOWN NORMAL Database will not shut down until all users have logged off and all work is committed (or rolled back) Database will not shut down until all users have logged off and all work is committed (or rolled back) – No new connections are allowed

Starting Up and Shutting Down the Database Shutdown Options – SHUTDOWN IMMEDIATE Disconnects all users and performs rollback on all uncommitted data by using PMON Disconnects all users and performs rollback on all uncommitted data by using PMON Terminates all current SQL statements Terminates all current SQL statements

Starting Up and Shutting Down the Database Shutdown Options – SHUTDOWN ABORT Shuts down without tidying up; akin to a system failure and requires recovery on startup Shuts down without tidying up; akin to a system failure and requires recovery on startup – No roll back of uncommitted transactions

Starting Up and Shutting Down the Database Shutdown Options – SHUTDOWN TRANSACTIONAL [n] Prevents new transactions from starting and shutting down after all pending transactions have finished Prevents new transactions from starting and shutting down after all pending transactions have finished The optional [n] specifies a timeout period for pending transactions The optional [n] specifies a timeout period for pending transactions

Starting Up and Shutting Down the Database Altering the Database Mode – ALTER DATABASE [ db_name ] [MOUNT [ SHARED | EXCLUSIVE ] [OPEN] [CLOSE [ NORMAL | IMMEDIATE ]

Starting Up and Shutting Down the Database Altering the Database Mode –This previous SQL statement can be used after the STARTUP command to move a database “forward” to a MOUNT or OPEN state – NOMOUNT MOUNT OPEN In reality there are only two useful forms of this statement In reality there are only two useful forms of this statement ALTER DATABASE db_name MOUNT; ALTER DATABASE db_name MOUNT; ALTER DATABASE db_name OPEN;ALTER DATABASE db_name OPEN;

Starting Up and Shutting Down the Database Automatic Startup – DBAs can utilize Database Event Triggers Can specify LOGON, LOGOFF, STARTUP, SHUTDOWN triggers Can specify LOGON, LOGOFF, STARTUP, SHUTDOWN triggers – Issues relating to shutdown If a system undergoes shutdown without first shutting down Oracle, an instance recovery is necessary on startup If a system undergoes shutdown without first shutting down Oracle, an instance recovery is necessary on startup – Only happens when the DBAs are lazy

Starting Up and Shutting Down the Database Checking the Database and Oracle_SID Names – In SQL Worksheet Plus Find the name of the database in v$database (must be mounted or open) Find the name of the database in v$database (must be mounted or open) – SELECT name FROM v$database; Find the name of the Oracle Instance Find the name of the Oracle Instance – SELECT instance_name, version FROM v$instance;

Starting Up and Shutting Down the Database Questions?