McGraw-Hill/Irwin Copyright © 2005 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 9: Database Administration All Powder Board and Ski.

Slides:



Advertisements
Similar presentations
1 All Powder Board and Ski Microsoft Access Workbook Chapter 10: Database Administration Jerry Post Copyright © 2007.
Advertisements

2 Copyright © 2005, Oracle. All rights reserved. Installing the Oracle Database Software.
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
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Backup The flip side of recovery. Types of Failures Transaction failure –Transaction must be aborted System failure –Hardware or software problem resulting.
Harvard University Oracle Database Administration Session 2 System Level.
Advanced Databases Basic Database Administration Guide to Oracle 10g 1.
Database Backup and Recovery
1 Chapter Overview Creating User and Computer Objects Maintaining User Accounts Creating User Profiles.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 3 Administration of Users.
Overview What is SQL Server? Creating databases Administration Security Backup.
Copyright © 2007 Quest Software The Changing Role of SQL Server DBA’s Bryan Oliver SQL Server Domain Expert Quest Software.
Getting Started with Oracle11g Abeer bin humaid. Create database user You should create at least one database user that you will use to create database.
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.
15 Copyright © 2004, Oracle. All rights reserved. Proactive Maintenance.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
SRUTHI NAGULAVANCHA CIS 764, FALL 2008 Department of Computing and Information Sciences (CIS) Kansas State University -1- Back up & Recovery Strategies.
CHAPTER 6 Users and Basic Security. Progression of Steps for Creating a Database Environment 1. Install Oracle database binaries (Chapter 1) 2. Create.
5 Copyright © 2004, Oracle. All rights reserved. Using Recovery Manager.
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 1 Third Edition Chapter 5 Windows XP Professional McGraw-Hill.
15 Copyright © 2005, Oracle. All rights reserved. Performing Database Backups.
9 Copyright © 2005, Oracle. All rights reserved. Administering User Security.
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.
Informix IDS Administration with the New Server Studio 4.0 By Lester Knutsen My experience with the beta of Server Studio and the new Informix database.
Oracle9i Performance Tuning Chapter 1 Performance Tuning Overview.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
7 Copyright © 2004, Oracle. All rights reserved. Administering Users.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
1 All Powder Board and Ski Oracle 9i Workbook Chapter 9: Database Administration Jerry Post Copyright © 2003.
Oracle9i Performance Tuning Chapter 12 Tuning Tools.
What is a schema ? Schema is a collection of Database Objects. Schema Objects are logical structures created by users to contain, or reference, their data.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
1 Chapter Overview Performing Configuration Tasks Setting Up Additional Features Performing Maintenance Tasks.
Introduction to Oracle. Oracle History 1979 Oracle Release client/server relational database 1989 Oracle Oracle 8 (object relational) 1999.
DATABASE TOOLS CS 260 Database Systems. Overview  Database accounts  Oracle SQL Developer  MySQL Workbench.
SQL Server 2000 Sys Admin Jeremiah Curtis Engineering Services
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Using Access Tools.
Advanced Databases DBA: Security and Backups Guide to Oracle 10g 1.
2. SQL Security Objectives –Learn SQL Server 2000 components Contents –Understanding the Authentication Process –Understanding the Authorization Process.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
1 All Powder Board and Ski Microsoft Access Workbook Chapter 9: Database Administration Jerry Post Copyright © 2003.
3 Copyright © 2006, Oracle. All rights reserved. Using Recovery Manager.
IT1001 – Personal Computer Hardware & system Operations Week7- Introduction to backup & restore tools Introduction to user account with access rights.
12 Copyright © Oracle Corporation, All rights reserved. User-Managed Complete Recovery.
SQL Server 2005 Implementation and Maintenance Chapter 6: Security and SQL Server 2005.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
Intro To Oracle :part 1 1.Save your Memory Usage & Performance. 2.Oracle Login ways. 3.Adding Database to DB Trees. 4.How to Create your own user(schema).
1 All Powder Board and Ski SQL Server Workbook Chapter 5: Advanced Queries Jerry Post Copyright © 2003.
19 Copyright © 2004, Oracle. All rights reserved. Database Backups.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
2 Copyright © 2008, Oracle. All rights reserved. Building the Physical Layer of a Repository.
15 Copyright © Oracle Corporation, All rights reserved. Managing Users.
McGraw-Hill/Irwin Copyright © 2005 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 10: Distributed Databases and the Internet All Powder.
Controlling User Access
Controlling User Access
Table spaces.
Chapter 5 : Designing Windows Server-Level Security Processes
Using Data Dictionary and Dynamic Performance Views
Creating an Oracle Database
Using SQL Server through Command Prompt
All Powder Board and Ski
Get Verified Oracle 1z0-062 Study Material - Oracle 1z0-062 Exam Dumps PDF Realexamdumps.com
Managing Privileges.
Chapter 11 Managing Databases with SQL Server 2000
Database Backup and Recovery
Presentation transcript:

McGraw-Hill/Irwin Copyright © 2005 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 9: Database Administration All Powder Board and Ski Designing & Building Business Applications Oracle 9i Jerry Post

2 Oracle System Tables (Synonyms): Metadata PrefixesSynonymDescription ALL_ DBA_ USER_ CONSTRAINTS IND_COLS MVIEWS SEQUENCES SYNONYMS TAB_COLUMNS TABLES TRIGGER_COLS TRIGGERS TYPES USERS VIEWS Table constraints and keys Indexed columns Materialized views Sequences Synonyms Table columns Tables Trigger columns Triggers User-defined data types Users Views (saved queries) SELECT Table_Name, Pct_Free FROM USER_TABLES

3 Disk Drive Oracle Data Storage Data Files Disk Drive Data Files Tablespace Table Data Tablespace Rollback segments Redo logs RAID drives automatically spread files across multiple drives. Even without RAID you can manually assign table data and rollback segments to different drives. Goal: Substantially improved performance and recovery in case of hardware failure.

4 Action Log in as a DBA and run the script: Exec DBMS_STATS.Gather_Database_Stats Start the enterprise manager and log into your schema In the Diagnostics Pack, start the Performance Overview monitor Open an SQL session and issue several queries while you monitor the database performance Run some reports or get several people to alter data at the same time

5 Gather Statistics Statistics about the data within each table tell Oracle how to optimize queries. The tuning system also uses the statistics to make recommendations about indexes to improve performance. The older command is: Analyze Table Customer compute statistics; Oracle now recommends that you use the DBMS_STATS package instead to analyze the entire database (or schema) at one time. Exec DBMS_STATS.Gather_Database_Stats Or Exec DBMS_STATS.Gather_Schema_Stats(‘powder’) Or Exec DBMS_STATS.Gather_Table_Stats (‘powder’, ‘Customer’) But, you might first have to run the catproc.sql script

6 Enterprise Manager Console Diagnostics Pack Tuning Pack Lock Manager Performance Tuner Performance Overview Top Sessions Top SQL Trace Data Viewer Oracle Expert Outline Manager SQL Analyze Tablespace Map

7 Performance Overview (Monitor)

8 Drill Down to Find Causes

9 Action Start the Oracle Expert and create a new repository if necessary Create a new tuning session and select all the options, including the comprehensive choices Under the Collect tab, use the Schema button to select the All Powder schema, then click the Collect button Under the Recommendations tab, click the Generate button Review the recommendations and create the indexes identified

10 Oracle Expert: Tuning Session Select all items Comprehensive

11 Tuning: Collect Statistics You might skip the Instance checks for now Use the schema options to select your schema

12 Select Schemas Be sure to include your schema that holds the All Powder tables Click the button to see a list of schemas

13 Expert Recommendations Specific table index recommendations Details on storage locations

14 Action Start SQL Analyze Create repository if asked Choose SQL/Create New SQL Enter the query into the top of the form Select Get Index Recommendations Run the SQL Tuning Wizard Explain all costs for the original query Explain all costs for the modified query

15 SQL Analyze SELECT Lastname, Firstname, Customer.CustomerID FROM Customer, Sale WHERE Customer.CustomerID = Sale.CustomerID AND Customer.CustomerID NOT IN (SELECT CustomerID FROM Rental) ORDER BY Lastname, Firstname; List customers who bought items but never rented anything. Note that the query analyzer does not support the newer INNER JOIN syntax

16 Index Recommendations Get index recommendations Virtual Index Wizard

17 SQL Tuning Wizard

18 Tuning Wizard Recommendation

19 Original Query Costs

20 Revised Query Costs Note the correlated subquery Note the two hash joins instead of one Substantially lower total costs

21 Backup and Recovery You could shut down the database and copy the data files and the control file Make sure the Oracle Management Server is installed and running. You might have to install it from the main install wizard Make sure the OracleOraHome92ManagementServer service is running (it is set to Manual start) Use the Enterprise Manager Console to log in. The initial username/password is: sysman/oem_temp You need Archive Log mode set to handle a running backup Select the database/Instance/Configuration in the tree view Under the Recovery tab, check the Archive Log mode This option will generate lots of data files since all changes to the database will be saved in these archive files Run or schedule the backup Tools/Database Tools/Backup Management/Backup

22 Action If necessary, set up and start the Oracle Management Server Start the Enterprise Manager and log in to the Management Server (use sysman/oem_temp for the initial login) Check the database recovery property to see if it is set to Log Archive mode Use Tools/Database Tools/Backup Management/Backup to configure a backup process If you have time, you can run the backup

23 Backup and Recovery Manager Channels are disk or tape locations to hold the backup copies

24 Schedule Backup

25 User-Level Security Database Application Form1Form 2Form 3Form 4 User 1User 2 Workgroup database Usernames and passwords Database Administrator login Assign permissions credentials

26 Action Identify the SalesClerk and SalesManagers roles and determine what permissions are needed on the basic Sale, SaleItem, Customer, and Inventory tables Create three new users and assign them simple passwords

27 User Groups Sales clerksSales Managers Sales table Customer table Item table Sales clerksS,U,I S Sales ManagersS,U,I,DS,U,IS Rental ManagersS,U,IS Individual users Assign permissions to groups or roles based on tasks, and assign users to groups. Permissions only have to be set once. Employee changes are handled by moving individuals into or out of groups.

28 Create New Users Internal or external authentication For many accounts at once, use SQL

29 Action Create the SalesClerk and SalesManager roles Assign appropriate table permissions to the new roles Assign one of the roles to each of the new users Use the Sales form to test the accounts and roles Test the roles by using SQL statements

30 Create New Roles Select table object Grant permissions

31 Assign Roles to Users

McGraw-Hill/Irwin Copyright © 2005 by The McGraw-Hill Companies, Inc. All rights reserved. End of Chapter 9 Designing & Building Business Applications Oracle 9i Jerry Post