Tài liệu Wiley - Microsoft SQL Server 2008 All-in-One Desk Reference For Dummies (2008)01 doc

40 351 0

Daniel Gửi tin nhắn Báo tài liệu vi phạm

Tải lên: 111,449 tài liệu

  • Loading ...
1/40 trang

Thông tin tài liệu

Ngày đăng: 27/01/2014, 09:20

by Robert D. Schneider and Darril GibsonMicrosoft®SQL Server®2008ALL-IN-ONE DESK REFERENCEFORDUMmIES‰01_179543-ffirs.qxp 8/23/08 12:23 AM Page i01_179543-ffirs.qxp 8/23/08 12:23 AM Page ivby Robert D. Schneider and Darril GibsonMicrosoft®SQL Server®2008ALL-IN-ONE DESK REFERENCEFORDUMmIES‰01_179543-ffirs.qxp 8/23/08 12:23 AM Page iMicrosoft®SQL Server®2008 All-in-One Desk Reference For Dummies®Published byWiley Publishing, Inc.111 River StreetHoboken, NJ 07030-5774www.wiley.comCopyright © 2008 by Wiley Publishing, Inc., Indianapolis, IndianaPublished by Wiley Publishing, Inc., Indianapolis, IndianaPublished simultaneously in CanadaNo part of this publication may be reproduced, stored in a retrieval system or transmitted in any form orby any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permit-ted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior writtenpermission of the Publisher, or authorization through payment of the appropriate per-copy fee to theCopyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600.Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing,Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online athttp://www.wiley.com/go/permissions.Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for theRest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, and related tradedress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates in the UnitedStates and other countries, and may not be used without written permission. Microsoft and SQL Serverare registered trademarks of Microsoft Corporation in the United States and/or other countries. All othertrademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with anyproduct or vendor mentioned in this book.LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONSOR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK ANDSPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR APARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS.THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK ISSOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING,OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPE-TENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLEFOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THISWORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THEAUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE ORRECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED INTHIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN ITIS READ. For general information on our other products and services, please contact our Customer CareDepartment within the U.S. at 800-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002.For technical support, please visit www.wiley.com/techsupport.Wiley also publishes its books in a variety of electronic formats. Some content that appears in print maynot be available in electronic books.Library of Congress Control Number: 2008933788ISBN: 978-0-470-17954-3Manufactured in the United States of America10 9 8 7 6 5 4 3 2 101_179543-ffirs.qxp 8/23/08 12:23 AM Page iiAbout the AuthorsRobert D. Schneider has more than 15 years of experience developing anddelivering sophisticated software solutions worldwide. He has provided tech-nical and business expertise on topics such as Service Oriented Architecture(SOA), database optimization, and distributed computing to a wide variety ofenterprises in the financial, technology, and government sectors. Clients haveincluded Chase Manhattan Bank, VISA, HP, SWIFT, Booz Allen Hamilton, andthe governments of the United States, Mexico, Brazil, and Malaysia.Robert is the author of Optimizing Informix Applications, Microsoft SQL Server:Planning and Building a High Performance Database, MySQL Database Designand Tuning, and SQL Server 2005 Express For Dummies. He has also writtennumerous articles on technical and professional services topics and has beenquoted as a subject matter expert in publications worldwide. He can bereached at Robert.Schneider@Think88.com.Darril Gibson has been a Microsoft Certified Trainer (MCT) for more thannine years, providing training on SQL Server (since SQL Server version 7.0)and a wide variety of other Microsoft technologies. He is currently contractedwith the U.S. Air Force, providing extensive technical training to Air Forcepersonnel in support of a major network operations support center. He holdsnearly 20 current certifications and has been certified in each SQL Server ver-sion since SQL Server 7.0.Darril is the author of MCITP: SQL Server 2005 Database Administration All-In-One and MCITP: SQL Server 2005 Database Developer All-In-One. He developedseveral video training courses for Keystone Learning on several certificationtopics including A+, MCSE, and Microsoft Exchange. He has also developedseveral courses teaching technical topics at the college and university level,and for U.S. government clients.DedicationTo my family for their support, patience, and encouragement. —Robert D. SchneiderTo my loving wife of 16 years who I’m grateful to also call my best friend. —Darril GibsonAuthors’ AcknowledgmentsThe authors want to acknowledge the following people for their invaluableassistance in creating and publishing this work: Carole McLendon, NicoleSholly, Kyle Looper, Brian Walls, Toni Settle, Joan K. Griffitts.01_179543-ffirs.qxp 8/23/08 12:23 AM Page iiiPublisher’s AcknowledgmentsWe’re proud of this book; please send us your comments through our online registration formlocated at www.dummies.com/register/.Some of the people who helped bring this book to market include the following:Acquisitions and EditorialProject Editor: Nicole ShollyAcquisitions Editor: Kyle LooperCopy Editor: Brian WallsTechnical Editor: Damir BersinicEditorial Manager: Kevin KirschnerEditorial Assistant: Amanda FoxworthSr. Editorial Assistant: Cherie CaseCartoons: Rich Tennant(www.the5thwave.com)Composition ServicesProject Coordinator: Katie KeyLayout and Graphics: Carl Byers, Reuben W. Davis, Ronald TerryProofreaders: David Faust, Jessica Kramer, Toni SettleIndexer: Joan K. GriffittsPublishing and Editorial for Technology DummiesRichard Swadley, Vice President and Executive Group PublisherAndy Cummings, Vice President and PublisherMary Bednarek, Executive Acquisitions DirectorMary C. Corder, Editorial DirectorPublishing for Consumer DummiesDiane Graves Steele, Vice President and PublisherJoyce Pepple, Acquisitions DirectorComposition ServicesGerry Fahey, Vice President of Production ServicesDebbie Stailey, Director of Composition Services01_179543-ffirs.qxp 8/23/08 12:23 AM Page ivContents at a GlanceIntroduction 1Book I: Essential Concepts 7Chapter 1: Introducing SQL Server 2008 9Chapter 2: SQL Server Architecture and Key Concepts 15Chapter 3: Getting Started, Getting Around 23Chapter 4: Setting Up SQL Server 2008 35Chapter 5: Using SQL Server Management Studio 59Book II: Designing and Using Databases 73Chapter 1: Setting Up a Database 75Chapter 2: Care and Feeding of Your Database 89Chapter 3: Data Types and How to Use Them 99Chapter 4: Constructing New Tables 121Chapter 5: Looking After Your Tables 141Chapter 6: Understanding Relationships 155Book III: Interacting with Your Data 175Chapter 1: Using Proper Normalization Techniques 177Chapter 2: The SQL Server Optimizer 187Chapter 3: Using the Query Designer 201Chapter 4: Setting Query Options 213Chapter 5: Searching for Information 231Chapter 6: Organizing Query Results 257Chapter 7: Modifying Your Data 265Chapter 8: Taking Advantage of Views 273Chapter 9: Advanced Query Topics 291Book IV: Database Programming 313Chapter 1: Understanding Transact-SQL 315Chapter 2: Stored Procedures and Functions 331Chapter 3: Triggers 349Chapter 4: Working with Visual Studio 361Chapter 5: Web Services 375Chapter 6: Developing Remote Applications 385Chapter 7: Advanced Development Topics 40102_179543-ftoc.qxp 8/23/08 12:23 AM Page vBook V: Reporting Services 419Chapter 1: Introduction to SQL Server Reporting Services 421Chapter 2: Creating Reports with Report Builder 435Chapter 3: Creating Reports with Report Designer 449Chapter 4: Integrating Reports 469Book VI: Analysis Services 477Chapter 1: Introduction to SQL Server Analysis Services 479Chapter 2: Creating Business Intelligence Solutions with BIDS 493Chapter 3: Data Mining and Maintaining Analysis Services Objects 517Book VII: Performance Tips and Tricks 529Chapter 1: Working with the SQL Server Optimizer 531Chapter 2: Using Performance Monitoring Tools 541Chapter 3: Data Access Strategies 569Chapter 4: Tuning SQL Server 587Book VIII: Database Administration 601Chapter 1: Configuring SQL Server 603Chapter 2: Performing Major Administrative Tasks 619Chapter 3: Security: Keeping SQL Server Safe 647Chapter 4: Integration and Your Database 661Chapter 5: Replication 677Chapter 6: Spreading the Load with Partitioning 693Book IX: Appendixes 701Appendix A: Ten Sources of Information on SQL Server 2008 703Appendix B: Troubleshooting SQL Server 2008 707Appendix C: Glossary 715Index 72502_179543-ftoc.qxp 8/23/08 12:23 AM Page viTable of ContentsIntroduction 1About This Book 1Foolish Assumptions 1Conventions Used in This Book 2What You Don’t Have to Read 2How This Book Is Organized 3Book I: Essential Concepts 3Book II: Designing and Using Databases 3Book III: Interacting with Your Data 4Book IV: Database Programming 4Book V: Reporting Services 4Book VI: Analysis Services 4Book VII: Performance Tips and Tricks 4Book VIII: Database Administration 5Book IX: Appendixes 5Icons Used in This Book 5Where to Go from Here 6Book I: Essential Concepts 7Chapter 1: Introducing SQL Server 2008 . . . . . . . . . . . . . . . . . . . . . . . . . .9SQL Server 2008: An Evolution, Not a Revolution 9More development productivity 10Improved integration 11Enhanced security 12Streamlined administration 12Understanding SQL Server’s Editions 13Chapter 2: SQL Server Architecture and Key Concepts . . . . . . . . . . . .15Relational Databases: The Heart of Modern Computing Solutions 15Understanding Key SQL Server 2008 Concepts 16Reliability 16Security 17Flexibility 17Administration 17Application Development 18Business Intelligence 19Reporting 20Integration 2002_179543-ftoc.qxp 8/23/08 12:23 AM Page viiMicrosoft SQL Server 2008 All-in-One Desk Reference For DummiesviiiChapter 3: Getting Started, Getting Around . . . . . . . . . . . . . . . . . . . . . .23Hardware and Software Requirements 23Converting to SQL Server 2008 25Upgrading from earlier versions of SQL Server 25Converting from a different database 27Tools at Your Disposal 29Administration 29Performance 30Software development 33Chapter 4: Setting Up SQL Server 2008 . . . . . . . . . . . . . . . . . . . . . . . . . .35Installing SQL Server 35Creating and Maintaining Configurations 43SQL Server communication protocols 43Reporting services configuration 45SQL Server features 47Streamlining Administration 47SQL Server Maintenance Plan Wizard 47Policy-based management 51Chapter 5: Using SQL Server Management Studio . . . . . . . . . . . . . . . .59Menu Structure and Icons 60Object Explorer 60Template Explorer 62Solution Explorer 63Running Queries 64Query-specific user interface features 64Creating a query 66Using the Query Designer 68Book II: Designing and Using Databases 73Chapter 1: Setting Up a Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75System Databases 75Connecting to a Database Server 76Exploring an Existing Database 78Understanding the Major Database Objects 79Creating a New Database 80Using SQLCMD to Create a Database 86Scripting Your Database 87Chapter 2: Care and Feeding of Your Database . . . . . . . . . . . . . . . . . . .89Renaming a Database 89Changing Database Parameters 90General 91Files 9202_179543-ftoc.qxp 8/23/08 12:23 AM Page viii[...]... Understanding SQL Server Partitioning 693 Partitioning Key Terms and Concepts .695 Setting Up Partitioning in Your Environment 696 02_179543-ftoc.qxp xx 8/23/08 12:23 AM Page xx Microsoft SQL Server 2008 All-in-One Desk Reference For Dummies Book IX: Appendixes 701 Appendix A: Ten Sources of Information on SQL Server 2008 703 Microsoft SQL Server Web Site 703 Microsoft SQL Server. .. 02_179543-ftoc.qxp 8/23/08 xviii 12:23 AM Page xviii Microsoft SQL Server 2008 All-in-One Desk Reference For Dummies Book VIII: Database Administration 601 Chapter 1: Configuring SQL Server 603 SQL Server Configuration Tools 603 SQL Server Configuration Manager 604 SQL Server Surface Area Configuration Tool 604 sp_configure 604 SQL Server Management... 8/23/08 12:23 AM Page x Microsoft SQL Server 2008 All-in-One Desk Reference For Dummies Chapter 6: Understanding Relationships 155 Relationships: Making Data Meaningful 155 Relationship Types 156 One-to-one 157 One-to-many 157 Many-to-many .157 Constraints 158 Creating Relationships 160 The SQL Server Management Studio... Data from Your Database 270 02_179543-ftoc.qxp xii 8/23/08 12:23 AM Page xii Microsoft SQL Server 2008 All-in-One Desk Reference For Dummies Chapter 8: Taking Advantage of Views 273 Tying Information Together with Views 273 Creating a View 275 Creating a view with the View Designer 275 Creating a view with T -SQL .278 Using a View ... likely to find yourself skipping the information called out by the Technical Stuff icons Just as your car runs without you memorizing the workings of its transmission, you can derive a lot of value from SQL Server 2008 without knowing its internal architecture How This Book Is Organized SQL Server 2008 All-in-One Desk Reference For Dummies is split into nine mini-books You don’t have to read it sequentially,... to Distribute Data 375 Requesting data and getting a response 377 Seeing a Web service in action 378 02_179543-ftoc.qxp xiv 8/23/08 12:23 AM Page xiv Microsoft SQL Server 2008 All-in-One Desk Reference For Dummies Using Web Services in Conjunction with SQL Server 379 Creating HTTP endpoints to support Web services 380 Exploring the SOAP request and the SOAP response 383 Chapter... 04_179543-pp01.qxp 8/23/08 12:24 AM Page 8 Contents at a Glance Chapter 1: Introducing SQL Server 2008 9 SQL Server 2008: An Evolution, Not a Revolution 9 Understanding SQL Server s Editions 13 Chapter 2: SQL Server Architecture and Key Concepts 15 Relational Databases: The Heart of Modern Computing Solutions 15 Understanding Key SQL Server 2008 Concepts... Queries 64 05_179543-bk01ch01.qxp 8/23/08 12:24 AM Page 9 Chapter 1: Introducing SQL Server 2008 In This Chapter ߜ SQL Server 2008: An evolution, not a revolution ߜ More development productivity ߜ Improved integration ߜ Additional security and administrative options ߜ Understanding SQL Server s editions B efore you take the plunge into SQL Server 2008, it’s only natural for you to wonder what you’re... every edition of SQL Server 2008 More development productivity Microsoft s software architecture and database tools have always offered excellent integration and productivity SQL Server 2008 amplifies the firm’s “Developers, developers, developers, developers!” mantra Here’s how SQL Server 2008 has helped this important audience: 05_179543-bk01ch01.qxp 8/23/08 12:24 AM Page 11 SQL Server 2008: An Evolution,... with past versions of SQL, this mini-book gives you valuable insight into what you can achieve with SQL Server 2008 Book V: Reporting Services You know there’s data in there How can you get it out? This is a common challenge for database users With SQL Server Reporting Services in SQL Server 2008, Microsoft has significantly improved the ability to get the data to the users’ desktops by using familiar . Gibson Microsoft ® SQL Server ® 2008 ALL-IN-ONE DESK REFERENCE FOR DUMmIES ‰01_179543-ffirs.qxp 8/23/08 12:23 AM Page i Microsoft ® SQL Server ® 2008 All-in-One. 37802_179543-ftoc.qxp 8/23/08 12:23 AM Page xiii Microsoft SQL Server 2008 All-in-One Desk Reference For Dummies xivUsing Web Services in Conjunction with SQL Server
- Xem thêm -

Xem thêm: Tài liệu Wiley - Microsoft SQL Server 2008 All-in-One Desk Reference For Dummies (2008)01 doc, Tài liệu Wiley - Microsoft SQL Server 2008 All-in-One Desk Reference For Dummies (2008)01 doc, Tài liệu Wiley - Microsoft SQL Server 2008 All-in-One Desk Reference For Dummies (2008)01 doc

Gợi ý tài liệu liên quan cho bạn