www.SoftGozr.com www.SoftGozr.com Oracle Database Administration for ® ® Microsoft SQL Server DBAs Michelle Malcher New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto www.SoftGozr.com Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher. ISBN: 978-0-07-174430-0 MHID: 0-07-174430-4 The material in this eBook also appears in the print version of this title: ISBN: 978-0-07-174431-7, MHID: 0-07-174431-2. All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefi t of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps. McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs. To contact a representative please e-mail us at [email protected]. Information has been obtained by Publisher from sources believed to be reliable. However, because of the possibility of human or mechanical error by our sources, Publisher, or others, Publisher does not guarantee the accuracy, adequacy, or completeness of any information included in this Work and is not responsible for any errors or omissions or the results obtained from the use of such information. TERMS OF USE This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGrawHill”) and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill’s prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms. THE WORK IS PROVIDED “AS IS.” McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise. www.SoftGozr.com www.SoftGozr.com www.SoftGozr.com This book is dedicated to all of the hard-working DBAs who learn of ways to work smarter and then share that information so that others can learn as well. About the Author Michelle Malcher is a Senior Database Administrator at DRW Holdings with more than 12 years of experience in database development, design, and administration. She has expertise in performance tuning, security, data modeling, and database architecture of very large database environments. She has administered environments supporting multiple database platforms, includingOracle,SQLServer,andSybase.AsaDBA,shehasstrivedtodesign, implement, and maintain stable, reliable, and secure database environments in order to support the business and important business processes. Michelle enjoys contributing to the database technology user community by speaking at conferences and being on the Independent Oracle User Group (IOUG) Board of Directors as the Director of Education. She feels that being able to learn from others and teach what you know are key ways to enjoy working with databases. There is always something to learn and challenge us to come up with better solutions. About the Technical Editor Kimberly Floss is a Manager of Database Services for a large Fortune 500 company. She has managed teams responsible for both database administration and database engineering for Oracle, DB2, Teradata, and SQL Server. She has been largely responsible for database/system administration, general architecture, system performance monitoring, tuning, backup and recovery, and capacity planning of hundreds of database environments. Kimberly is a former President of the Independent Oracle User Group (IOUG) and has been a board member for six years. She currently serves as a member of the Conference Committee for IOUG. She also serves on the board for the North Central Teradata User Group and has served as a content reviewer for the Professional Association of SQL Server (PASS). She is a frequent speaker at conferences such as Oracle OpenWorld and Collaborate. Kimberly has a BS in Computer Information Systems from Purdue and an MBA with emphasis in MIS from Loyola University. She teaches a Database Applications and SQL Programming class at a local community college. Contents ACKNOWLEDGMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii 1 The Database Administrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 General DBA Skills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Where Do DBAs Belong in an Organization? . . . . . . . . . . . . . . . 4 Database Installation Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Leveraging Skills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Database Migrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2 Oracle Internals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Memory Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Oracle Memory Parameters . . . . . . . . . . . . . . . . . . . . . . . . 17 Sizing the SGA and PGA . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Where Are the master, msdb, and tempdb Databases? . . . . . . . . . 22 System-level Information . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Data Dictionary Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Jobs and Schedules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Templates and Temporary Tables . . . . . . . . . . . . . . . . . . . 28 Services and Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 sp_configure Options and Parameters . . . . . . . . . . . . . . . . . . . . . 32 Viewing and Setting Parameters . . . . . . . . . . . . . . . . . . . . . 33 Getting Started with Some Parameters . . . . . . . . . . . . . . . . 34 Undo, Redo, and Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Transaction Logs Versus Redo Logs . . . . . . . . . . . . . . . . . . 38 Undo and Beyond . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 v
Description: