Week 2 Lecture 2 Data Dictionary Views and Control Files.

Slides:



Advertisements
Similar presentations
CHAPTER 4 Tablespaces and Datafiles. Introduction After installing the binaries, creating a database, and configuring your environment, the next logical.
Advertisements

INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
ITEC474 Control File Maintenance
Basic Storage Concepts and Settings
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.
Oracle Architectural Components
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
Database Backup and Recovery
INTRODUCTION TO ORACLE
RMAN Restore and Recovery
Backup and Recovery (2) Oracle 10g CAP364 1 Hebah ElGibreen.
Backup and Recovery Part 1.
ITEC474 Redo Log Files.
Chapter 5Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 5 User-Managed Incomplete Recovery.
CHAPTER 16 User-Managed Backup and Recovery. Introduction to User Managed Backup and Recovery Backup and recover is one of the most critical skills a.
CHAPTER 5 Managing Control Files, Online Redo Logs, and Archiving.
Oracle9i Database Administrator: Implementation and Administration
7 Maintaining Redo Log Files. 7-2 Objectives Explaining the use of online redo log files Obtaining log and archive information Controlling log switches.
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
Introduction to Oracle Backup and Recovery
Using RMAN to Perform Recovery
Adapted from Afyouni, Database Security and Auditing DB Auditing Examples (Ch. 9) Dr. Mario Guimaraes.
20 Copyright © 2004, Oracle. All rights reserved. Database Recovery.
13 Copyright © Oracle Corporation, All rights reserved. RMAN Complete Recovery.
PPOUG, 05-OCT-01 Agenda RMAN Architecture Why Use RMAN? Implementation Decisions RMAN Oracle9i New Features.
CHAPTER 23 Pluggable Databases. Oracle Multitenant (Pluggable Databases) New with Oracle Database 12c is Oracle Multitenant. This feature allows you to.
Database Administration TableSpace & Data File Management
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 9 Scripting RMAN. Background Authors felt that scripting was a topic not covered well Authors wanted to cover both Unix/Linux and Windows environments.
Week 6 Lecture 2 System and Object Privileges. Learning Objectives  Identify and manage system and object privileges  Grant and revoke privileges to.
16 Copyright © 2007, Oracle. All rights reserved. Performing Database Recovery.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
CHAPTER 5 Managing Control Files and Online Redo Logs.
A Guide to Oracle9i1 Database Instance startup and shutdown.
17 Copyright © Oracle Corporation, All rights reserved. Recovery Catalog Creation and Maintenance.
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 8 Complete Recovery with Recovery Manager.
Week 3 Lecture 1 The Redo Log Files and Diagnostic Files.
Database Administration 3.Using Administration Tools.
Oracle 10g Database Administrator: Implementation and Administration Chapter 3 Creating an Oracle Instance.
Week 3 Lecture 2 Basic Storage Concepts and Settings.
44 Creating a Database. 4-2 Objectives Preparing the operating system Preparing the parameter file Creating the database Preparing the operating system.
IT Database Administration SECTION 02. CREATING DATABASES Creating a Database: Overview 1. Plan the physical design and storage structures 2. Back.
Oracle 10g Database Administrator: Implementation and Administration Chapter 5 Basic Storage Concepts and Settings.
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
Week 2 Lecture 1 Creating an Oracle Instance. Learning Objectives  Learn the steps for creating a database  Understand the prerequisites for creating.
Creating an Oracle Database. Considerations before creating a DB Planning for Database Creation –Select the standard database block size. –Use an undo.
Managing Tablespaces and Data Files
10 Copyright © Oracle Corporation, All rights reserved. User-Managed Backups.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
Backup and Recovery Part 2. Online backup Online backup requirements: Backup all data files (file system copy) Backup all redo information produced during.
12 Copyright © Oracle Corporation, All rights reserved. User-Managed Complete Recovery.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
16 Copyright © 2005, Oracle. All rights reserved. Performing Database Recovery.
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
13 Copyright © 2007, Oracle. All rights reserved. Using the Data Recovery Advisor.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
8 Copyright © Oracle Corporation, All rights reserved. Managing Tablespaces and Data files.
Control File Information The database name The timestamp of database creation The names and locations of associated datafiles and redo log files Tablespace.
Recovery Catalog Creation and Maintenance
Maintaining Online Redo Log Files
Oracle 10g Database Administrator: Implementation and Administration
Oracle9i Database Administrator: Implementation and Administration
Maintaining the Control File
Performing Database Recovery
Chapter 5 The Redo Log Files.
Presentation transcript:

Week 2 Lecture 2 Data Dictionary Views and Control Files

Learning Objectives  Use the data dictionary components and views  List useful dynamic performance views  Manage and multiplex control files

Learning Objectives con’t.  Use OMF to manage control files  Create new control files  View control file data

Looking at Important Data Dictionary Components Data dictionary views: Use underlying tables owned by SYS Can be queried like other views Number in the hundreds

Looking at Important Data Dictionary Components The DICTIONARY view lists data dictionary views with a short description

Data dictionary views: Cannot be updated Are documented on otn.oracle.com Have a prefix that defines the scope: USER: Views focused on a user’s own objects ALL: Views about objects a user either owns or can query DBA: Views for DBAs only, showing information about all objects in the database Looking at Important Data Dictionary Components

Using Data Dictionary Views Uses for Data Dictionary Views Supply information to the Enterprise Manager console Help you build queries Help you review naming standards Help you find invalid views Much more…

Useful Dynamic Performance Views Dynamic performance views are similar to data dictionary views except: The contents of the views change with database activity They are used mostly for tuning and monitoring Dynamic performance views are prefixed with: V$: Standard dynamic performance view GV$: View spanning multiple instances

Useful Dynamic Performance Views Some useful views include: V$SYSSTAT: statistical details about all sessions running on the database V$SQL: Details on individual SQL statements running on the database V$SESSTAT: Information by session to help identify memory usage

Introduction to the Control File The control file contains current details about the database: Database name Data file and online redo log file names and locations Checkpoint information critical to recovery

Managing and Multiplexing the Control Files What you can do with control files: Add a new control file Rename or relocate an existing control file Delete an existing control file (so long as at least one remains) Replace a damaged control file Regenerate a control file

Adding a New Control File Steps in a nutshell: 1. Shut down the database 2. Copy a current control file 3. Edit the init.ora file 4. Start up the database

Renaming or Relocating an Existing Control File Steps in a nutshell: 1. Shut down the database 2. Rename or relocate a current control file 3. Edit the init.ora file 4. Start up the database

Replacing a Damaged Control File Steps in a nutshell: 1. Shut down the database 2. Delete the bad control file 3. Copy a good control file, naming the copy to match the old, bad control file 4. Start up the database

Using OMF to Manage Control Files OMF can create and manage control files Requires the use of initialization parameters when creating the database: CONTROL_FILES is blank DB_CREATE_ONLINE_LOG_DEST_n has valid directory name DB_CREATE_FILE_DEST can be used instead if no multiplexing is needed

Using OMF to Manage Control Files Example: Initialization parameters: CONTROL_FILES = ‘’ DB_CREATE_ONLINE_LOG_DEST_1=‘ C:\ora\oradata’ DB_CREATE_ONLINE_LOG_DEST_2=‘D:\ora\oradata’ CREATE DATABASE command: CREATE DATABASE TECHNO92 MAXDATAFILES 100 DATAFILE ‘C:\ora\oradata\system01.dbf' SIZE 325M AUTOEXTEND; Creates a database with OMF control files and OMF redo log files and user-managed data files

Creating a New Control File Needed when: All control files are lost or damaged Changing initialization parameters that affect the size of the control file Changing the database name How to create a new control file: Use manually created command Use generated script

Creating a New Control File The manually created command syntax: CREATE CONTROLFILE REUSE SET DATABASE LOGFILE GROUP n 'X/xxx/logfilename' SIZE, GROUP 2 'X/xxx/logfilename' SIZE NORESETLOGS DATAFILE ' / ',.... MAXLOGFILES MAXLOGMEMBERS MAXLOGHISTORY MAXDATAFILES MAXINSTANCES ARCHIVELOG CHARSET ; List all datafiles List all redo log groups and members

Creating a New Control File The generated script command: ALTER DATABASE BACKUP CONTROL FILES TO TRACE; You must be logged on as a DBA user such as SYSTEM You must use this command before the control files are lost or damaged, while the database is open

Creating a New Control File Example of a generated script

Viewing Control File Data The control file has record sections for: File identification Details needed for recovery Database activity and status Recovery checkpoints

Viewing Control File Data Use dynamic performance views to see control file information

Lecture Summary Data dictionary views and dynamic performance views are owned by SYS Use normal queries on these views Most data dictionary views have a prefix of USER, ALL, or DBA Most dynamic performance views have a prefix of V$ or GV$

Lecture Summary Control files track current information on: Datafiles and online redo log files Checkpoints and log group number By creating more than one control file, you multiplex the control files Add extra control files by copying others

Lecture Summary You can also rename or relocate existing control files You can replace damaged control files with copies of undamaged ones You can recreate a control file either manually or using a generated script

Lecture Summary The manual method requires building a CREATE CONTROLFILE command The generated method creates the CREATE CONTROLFILE command for you Several V$ views show information stored in the control file