Toad® Database Administration Best Practices

Slides:



Advertisements
Similar presentations
ITEC474 INTRODUCTION.
Advertisements

SQL Tuning Briefing Null is not equal to null but null is null.
Chapter 9. Performance Management Enterprise wide endeavor Research and ascertain all performance problems – not just DBMS Five factors influence DB performance.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Oracle 11g R1 Top Features for Developers & DBA’s August 2008.
2 Copyright © 2005, Oracle. All rights reserved. Installing the Oracle Database Software.
17 Copyright © 2005, Oracle. All rights reserved. Performing Flashback.
Copyright © 2006 Quest Software Toad Tips & Tricks for DBA’s Bert Scalzo, Domain Expert, Oracle Solutions
Always Start With The Database Browser
Copyright © 2011 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture. SQL Workshop Day 4.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
Chapter 9 Auditing Database Activities
Harvard University Oracle Database Administration Session 2 System Level.
Oracle 10g Database Administrator: Implementation and Administration Chapter 14 Proactive Maintenance.
10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQL Developer For the DBA Jeff Smith
DATABASE DEVELOPMENT STRATEGIES TOP DOWNTOP DOWN –Large scale application driven by strategic objectives –General  Specific –Organization-wide (“data.
Project Implementation for COSC 5050 Distributed Database Applications Lab1.
Adapted from Afyouni, Database Security and Auditing DB Auditing Examples (Ch. 9) Dr. Mario Guimaraes.
Copyright © 2007 Quest Software The Changing Role of SQL Server DBA’s Bryan Oliver SQL Server Domain Expert Quest Software.
Module 8: Server Management. Overview Server-level and instance-level resources such as memory and processes Database-level resources such as logical.
7 Copyright © 2006, Oracle. All rights reserved. Dealing with Database Corruption.
Maintaining a Microsoft SQL Server 2008 Database SQLServer-Training.com.
® Enterprise Manager/Management Packs Conference Call Phone Number: 1(888) Pass Code: CYBER.
2 Copyright © 2006, Oracle. All rights reserved. Performance Tuning: Overview.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 6 Virtual Private Databases.
1 Oracle Database 11g – Flashback Data Archive. 2 Data History and Retention Data retention and change control requirements are growing Regulatory oversight.
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.
1 Robert Wijnbelt Health Check your Database A Performance Tuning Methodology.
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.
Oracle Tuning Considerations. Agenda Why Tune ? Why Tune ? Ways to Improve Performance Ways to Improve Performance Hardware Hardware Software Software.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
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.
Chapter 2: SQL – The Basics Objectives: 1.The SQL execution environment 2.SELECT statement 3.SQL Developer & SQL*Plus.
1 Copyright © 2004, Oracle. All rights reserved. Introduction.
1 All Powder Board and Ski Oracle 9i Workbook Chapter 9: Database Administration Jerry Post Copyright © 2003.
Anton TopurovIT-DB 23 April 2013 Introduction to Oracle2.
Oracle9i Performance Tuning Chapter 12 Tuning Tools.
16 Copyright © 2004, Oracle. All rights reserved. Undo Management.
CERN - IT Department CH-1211 Genève 23 Switzerland t DB Development Tools Benthic SQL Developer Application Express WLCG Service Reliability.
Database weekly reports Zbigniew Baranowski Carlos Fernando Gamboa.
Kako razvijate PL/SQL pakete? File based PL/SQL development Mitja Golouh SIOUG 2006,
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 9 Auditing Database Activities.
7 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Troubleshooting 11i issues Adam Janbolat
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
Module 6: Data Protection. Overview What does Data Protection include? Protecting data from unauthorized users and authorized users who are trying to.
The Self-managing Database: Proactive Space and Schema Object Management Amit Ganesh Director, Data, Space and Transaction Processing Oracle Corporation.
Chapter 6 Virtual Private Databases
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Introduction to Utilities for New DBAs Session #332 4/19/2008 Erik Hobbs Introduction to Utilities for New DBAs.
6 Copyright © Oracle Corporation, All rights reserved. Backup and Recovery Overview.
13 Copyright © 2007, Oracle. All rights reserved. Using the Data Recovery Advisor.
1 Copyright © 2006, Oracle. All rights reserved. Introduction.
ORACLE DBA INTRODUCTION: Undo Introduction offline status Pending Rollback segments Features of Flashback Flashback Table Flashback query Flashback Version.
23 Copyright © 2004, Oracle. All rights reserved. Preferring the Past: Flashback.
Oracle Database Architectural Components
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
Feature Overview Oracle Explorer – browse and alter schema Wizards and Designers Automatic code generation PL/SQL Editor with IntelliSense Oracle Data.
9 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
10 Copyright © 2007, Oracle. All rights reserved. Managing Undo Data.
McGraw-Hill/Irwin Copyright © 2005 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 9: Database Administration All Powder Board and Ski.
Building Enterprise Applications Using Visual Studio®
Data, Space and Transaction Processing
Maximum Availability Architecture Enterprise Technology Centre.
How to Thrive as a DBA in an Oracle10g World
Index Index.
Presentation transcript:

Toad® Database Administration Best Practices Title side – introduce yourself and determine what the roles are of the people in the room so you can tweak your presentation accordingly. Presenter

Production Database Pressure Points End Users Developers A discussion around this topic is important as it focuses on the issues which will eventually impact the Production database if nothing is done. Database developers have two types of change that are escalated into the production environment: new development and tuning existing code. New development consists of new functions and features that are pushed into production. Tuning existing code arises if the development process breaks down or the changes are not tested well enough. This will cause performance issues to arise in production. Untuned or poor quality code from Development will also compromise what the DBA is trying to do to mitigate risk to the database and maintain acceptable levels of uptime and performance and so enable them to plan more accurate upgrade strategies. The big unknown is increased user activity which could be a result of natural organic growth or due to mergers or acquisitions. DBAs

What is “Best Practice” ? A set of guiding principles proposed by industry leading experts Acknowledgement that the application is part of an evolving lifecycle which will continue to iterate over a period of time Determination to deliver a quality product or what we used to call “taking pride in your work” ! Why use it ? Involve the customer in what Best Practice means to them. They will probably already know what some of it is or understand its concept Why do we need Database Development Best Practices? The development cycle is carefully planned so when issues arise in production, it causes a reactive process to occur. Depending on the severity of the performance issues, future development cycles can be impacted, productivity lost and the bottom line affected. When these issues arise, it is usually due to problematic code and therefore it is the responsibility of the developers to identify and resolve this poorly performing code. In an age of outsourcing, and multi-skilled developers, whose core focus may not be on database development, there is a pressing need for a process to ensure that code being deployed to production is of the highest quality. Management needs to be certain that the investments that they have made to lower the cost of development are indeed paying off by ensuring they have a process which is both repeatable and measurable via effective reporting.

Administration Best Practices Now we’re going to introduce to you Quest’s methodology for implementing and maintaining Development Best Practices into your organisation’s development process using some of the technology you may already have (if already a Toad for Oracle customer).

Toad Database Administration Best Practices Oracle SQL Server DB2

Challenges to implementing Best Practice Resistance to use tools Already have scripts Yada yada…. The customer may already be aware that they are challenged by implementing and following what development processes and procedures they already have. This is where we can help. Think about code reviews, code testing, version control, etc, etc. The slide shows some examples but ask the customer what they think – can they think of any more (this will also help us refine our presentations)

Design Access to data model Ensures development matches business requirements Ensures data model is correctly optimized Ensures model integrity is maintained Version history

Deploy (1) DDL Scripts automatically generated from data model Alter Script generation based on data model updates Version History retained for auditing Application scalability testing

SQL statement or PL/SQL code scalability profile Deploy (2) Will the application work correctly and adequately under production conditions ? SQL statement or PL/SQL code scalability profile This final stage of the process will enable management or senior developers/DBAs to assess whether qualifying SQL and PL/SQL code can pass the final scrutiny of scalability testing. At this stage, rather than assume the customer understands why we are doing this and what it entails, explain the process and why we’re going it now. When or if SQL or PL/SQL is tuned in development, there is no guarantee it will perform the same in a Production environment with many more users, more data and different Oracle environment. Many applications fail to deliver desired performance for this very reason. Scalability testing involves simulation of anticipated concurrent userload against a given SQL statement in order that we can measure the change in Response Time as userload increases. If a tuned (re-written) SQL statement performs better compared to it’s original, we can assess whether the same performance is achived when 100s or 1000s of users execute the same statement and graph the outcome. Re-writes with lower Response Times than others at high user loads are much more likely to scale well in a production environment than those which don’t. To demo, go back to your previous SQL Optimizer demo window and unselect all re-write scenarios. Now select the top 5 and initiate the SQL Scalability Testing. After it launches, click the Review Results button and review a pre-prepared test (know which one it is) and discuss the graphs. Does not scale well Scales well

Detect/Discover Environment (O/S and Database) Instance Performance Instance Manager UNIX Monitor Windows Service Manager Instance Performance Database Browser (all instances) Database Monitor Database Probe SQL Performance SQL Trace/Optimization ASH Report Index Monitoring Space Management Database Browser Segment Advisor Database Browser (all instances) Database Monitor Oracle Alert Log analysis (FTP and Telnet windows) Database Health Check Session Browser ADDM/AWR StatsPack Top Session Finder SQL Monitor SQL Scan/SQL Detective (Xpert/Dev Suite) Space/IO History Undo Advisor

Diagnose Instance Performance SQL Performance Space Management Database Probe Database Monitor Session Browser Health Check SQL Performance Top Session Finder SQL Trace/Optimization SQL Optimization (Xpert or Dev Suite) Space Management Segment Advisor Tablespace Map Identify Space Deficits Log Switch Frequency Map Undo Advisor

Resolve Instance Performance Schema/Data Integrity SQL Performance Oracle Parameters Schema/Data Integrity Log Miner (access to Undo SQL) - Flashback Table Schema Compare Data Compare Data Duplicates SQL Performance Explain Plan SQL Optimization (Xpert or Dev Suite) Space Management Rebuild Multiple Objects Analyze Objects Repair Chained Rows Segment Shrink Advisor DBMS Redefinition Wizard

SQL Optimization - How hard can it be to rewrite SQL ? How many different ways can you write this query? SELECT EMP_NAME,DPT_NAME,GRD_DESC FROM EMPLOYEE, DEPARTMENT DEPARTMENT1, GRADE WHERE EMP_GRADE = GRD_ID AND EMP_DEPT = DPT_ID AND EXISTS (SELECT 'X' FROM DEPARTMENT DEPARTMENT2 WHERE DPT_AVG_SALARY IN (SELECT MIN(DPT_AVG_SALARY) FROM DEPARTMENT DEPARTMENT3) AND DPT_ID = EMPLOYEE.EMP_DEPT); 30,491 !!! Teach Yourself SQL in 30,420 Minutes By Gabriel F. Gargiulo

Optimize SQL Proactively identify problematic SQL directly from the source code Thorough transformation of SQL producing every possible semantically equivalent rewrite Optimize SQL in batch in context of source code Generate replacement script Automatic ranking of best alternatives Minimal involvement which can save hours of time This topic covers an area most developers don’t get anywhere near unless they are senior or experienced. The main things to talk about here must be : business related (such as reminding about the cost of under-performing applications to the business and how it’s impossible to expect DBAs to tune all SQL and PL/SQL code from development – they just don’t have the bandwidth) and, to a limited extent : technical. Explain what optimization is and how it’s important for developers because it performs automatically in seconds what a developer could only hope to accomplish in hours, which is re-writing the statement (and even re-writing the rewrites) until every possible combination is determined and assessed. The optimizer will then yield only those statements which have the most chance of giving a performance improvement and the developer can decide, based on Plan Cost, etc, which ones to execute and ultimately make an informed decision as to which to use in the application. The SQL or PL/SQL can then replace the original in the application. Talk about ease-of-use, how it’s possible to take multiple SQL statements and PL/SQL code and perform a Batch Optimization and mention they can also use this in conjunction with the SQL Scan referred to earlier in Code Xpert. In your demo, use a tried and tested SQL statement (from the QUEST_OPTI schema) and perform an optimization based on an Intelligence Level between 2 and 4 (4 is much preferred). After optimization is complete, show the Alert tab and discuss number of re-writes generated, etc. Don’t execute any of the re-writes – instead, have a saved session which you can restore to talk about the execution statistics and comparison graphs. Leave the SQL Optimizer window open for now – you will need it later.

Inform Instance Performance Schema Integrity SQL Performance ADDM/AWR StatsPack Health Check Report (schedulable) Schema Integrity Schema Compare HTML Schema Report (schedulable) Reports Manager (schedulable) ER Diagram (Toad Data Modeler) Master-Detail Browser SQL Performance Plan Change Analyzer (Xpert or Dev Suite) Space Management Tablespace History IO History

Administer Instance Schema Integrity Space Management Users ASM Manager Oracle Parameters Redo Log Manager Schema Browser (Rollback Segment, Jobs, Scheduler) Schema Integrity Object Audit NLS Parameters Export & Import Space Management Schema Browser (Tablespaces) Tablespace Menu Users Audit SQL / Sys Privs Schema Browser (Users, Roles, Object Privs, etc) DBMS Flashback Recycle Bin

TOAD DB Optimization Check-List