Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Microsoft ® SQL Server ™ 2005 Express Edition FOR DUMmIES ‰ by Robert Schneider 01_599275 ffirs.qxp 6/1/06 8:38 PM Page i Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com 01_599275 ffirs.qxp 6/1/06 8:38 PM Page iv Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Microsoft ® SQL Server ™ 2005 Express Edition FOR DUMmIES ‰ by Robert Schneider 01_599275 ffirs.qxp 6/1/06 8:38 PM Page i Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Microsoft ® SQL Server ™ 2005 Express Edition For Dummies ® Published by Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774 www.wiley.com Copyright © 2006 by Wiley Publishing, Inc., Indianapolis, Indiana Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by 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 written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright 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 at http://www.wiley.com/go/permissions. Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates in the United States and other countries, and may not be used without written permission. Microsoft and SQL Server are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other coun- tries. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not asso- ciated with any product or vendor mentioned in this book. ‘Microsoft’ is a registered trademark of Microsoft Corporation in the United States and/or other countries and is used by Wiley Publishing, Inc. under license from owner. ‘Microsoft ® SQL Server ™ 2005 Express Edition For Dummies ® ’ is an independent publication not affiliated with Microsoft Corporation. LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REP- RESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CON- TENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CRE- ATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CON- TAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD 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 COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FUR- THER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFOR- MATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ. For general information on our other products and services, please contact our Customer Care Department 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 may not be available in electronic books. Library of Congress Control Number: 2005927727 ISBN-13: 978-0-7645-9927-9 ISBN-10: 0-7645-9927-5 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 1B/QW/QW/QW/IN 01_599275 ffirs.qxp 6/1/06 8:38 PM Page ii Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com About the Author Robert D. Schneider has more than 15 years of experience developing and delivering sophisticated software solutions worldwide. He has provided data- base optimization, distributed computing, and other technical expertise to a wide variety of enterprises in the financial, technology, and government sec- tors. Clients have included Chase Manhattan Bank, VISA, HP, SWIFT, and the governments of the United States, Brazil, and Malaysia. He is the author of Optimizing Informix Applications, Microsoft SQL Server: Planning and Building a High Performance Database, and MySQL Database Design and Tuning. He has also written numerous articles on technical and professional services topics. He can be reached at Robert.Schneider@Think88.com. 01_599275 ffirs.qxp 6/1/06 8:38 PM Page iii Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com 01_599275 ffirs.qxp 6/1/06 8:38 PM Page iv Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Dedication In memory of Saul Weiss. Author’s Acknowledgments The author wants to acknowledge the following people for their invaluable assistance in creating and publishing this work: Nicole Sholly, Tiffany Franklin, Damir Bersinic, Rebecca Senninger, Terri Varveris, Nancy L. Reinhardt, and the folks in Composition Services. And last but certainly not least: Lynn Z. Schneider, Danielle Jolie Schneider, and Nicole Sierra Schneider for their unswerving support and encouragement. 01_599275 ffirs.qxp 6/1/06 8:38 PM Page v Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Publisher’s Acknowledgments We’re proud of this book; please send us your comments through our online registration form located at www.dummies.com/register/. Some of the people who helped bring this book to market include the following: Acquisitions, Editorial, and Media Development Project Editor: Nicole Sholly Acquisitions Editor: Tiffany Franklin Copy Editor: Rebecca Senninger Technical Editor: Damir Bersinic Editorial Manager: Kevin Kirschner Media Development Specialist: Kate Jenkins Media Development Coordinator: Laura Atkinson Media Project Supervisor: Laura Moss Media Development Manager: Laura VanWinkle Editorial Assistant: Amanda Foxworth Cartoons: Rich Tennant (www.the5thwave.com) Composition Services Project Coordinators: Maridee Ennis, Erin Smith Layout and Graphics: Carl Byers, Andrea Dahl, Stephanie D. Jumper, Lynsey Osborn Proofreaders: Laura Albert, Techbooks Indexer: Techbooks Publishing and Editorial for Technology Dummies Richard Swadley, Vice President and Executive Group Publisher Andy Cummings, Vice President and Publisher Mary Bednarek, Executive Acquisitions Director Mary C. Corder, Editorial Director Publishing for Consumer Dummies Diane Graves Steele, Vice President and Publisher Joyce Pepple, Acquisitions Director Composition Services Gerry Fahey, Vice President of Production Services Debbie Stailey, Director of Composition Services 01_599275 ffirs.qxp 6/1/06 8:38 PM Page vi Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com Table of Contents Introduction 1 About This Book 1 Foolish Assumptions 1 Conventions Used in This Book 2 What You Don’t Have to Read 2 How This Book Is Organized 3 Part I: Welcome to SQL Server 2005 Express 3 Part II: Administering a SQL Server 2005 Express System 3 Part III: Adding and Accessing a SQL Server 2005 Express Database 3 Part IV: Keeping Your Data Safe from Harm 4 Part V: Putting the Tools to Work: Programming with SQL Server 2005 Express 4 Part VI: Creating SQL Server 2005 Express Applications 4 Part VII: The Part of Tens 4 Part VIII: Appendixes 5 Icons Used in This Book 5 Where to Go from Here 6 Part I: Welcome to SQL Server 2005 Express 7 Chapter 1: SQL Server 2005 Express Overview . . . . . . . . . . . . . . . . . . . .9 Jumping on Board the SQL Server Express 9 The SQL Server 2005 Express Environment 12 Where Does SQL Server Express 2005 Work Best? 15 Small office/Home office (SOHO) 15 Distributed enterprise 16 Independent Systems Vendor/Original Equipment Manufacturer (ISV/OEM) 17 Getting Down to Business with SQL Server 2005 Express 17 Planning your database 18 Building SQL Server 2005 Express applications 19 Configuring, managing, and monitoring SQL Server 2005 Express 20 Chapter 2: Downloading and Installing SQL Server 2005 Express on Your Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 Getting a Copy of SQL Server 2005 Express 23 Before You Install 25 Installing SQL Server 2005 Express 26 Testing Your Installation 31 02_599275 ftoc.qxp 6/1/06 8:38 PM Page vii Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com [...]... information Although it’s not present in SQL Server 2005 Express, you will find it in SQL Server 2005 Express with Advanced Services Regardless of which version you use, your application can still store and work with this kind of information; the method you use might vary, however Figure 1-1: SQL Server 2005 Express information available from inside Visual Studio 13 14 Part I: Welcome to SQL Server 2005. .. the more feature-rich siblings of SQL Server 2005 Express Part II: Administering a SQL Server 2005 Express System Don’t be fooled by the low (actually, free) price point of SQL Server 2005 Express Aside from a few capacity and feature restrictions, it works exactly the same as its more powerful siblings They’ve all been built on the mainline SQL Server 2005 database platform However, all this power comes... Express ߜ Visual Basic 2005 Express ߜ Visual C# 2005 Express ߜ Visual C++ 2005 Express ߜ Visual J# 2005 Express All these products work seamlessly with SQL Server 2005 Express If you’re interested in taking advantage of these products, have a look at Chapters 19 and 20 11 12 Part I: Welcome to SQL Server 2005 Express The SQL Server 2005 Express Environment Simpo PDF Merge and Split Unregistered Version -... into Your SQL Server 2005 Express Database 323 Operating on XML-based Information .326 Searching for XML data .327 Modifying XML data 328 Formatting relational data as XML 328 Part VII: The Part of Tens 331 Chapter 22: Ten Sources of Information on SQL Server 2005 Express 333 Microsoft SQL Server Web Site 333 Microsoft. .. way Part VI: Creating SQL Server 2005 Express Applications SQL Server 2005 Express is tightly coupled with an entire line of easy-to-use software development technologies from Microsoft This part shows you how to quickly get productive with programming tools such as Microsoft Visual Basic 2005 Express and Visual Web Developer 2005 Express in conjunction with your new database server You also find out... There? 39 Connecting to Your Server 43 Connecting with SQLCMD 43 Connecting with SQL Server Management Studio Express 44 Connecting with ODBC 46 Connecting with Visual Studio Express .49 Part II: Administering a SQL Server 2005 Express System 53 Chapter 4: Putting SQL Server 2005 Express to Work 55 Planning For Tomorrow as Well as Today ... effectiveness and stability ߜ Interoperability and upgradeability: Because SQL Server 2005 Express is built on the underlying SQL Server 2005 platform, you can easily develop solutions that work with any SQL Server 2005 edition In addition, you can straightforwardly migrate from this entry-level edition to a more full-featured edition without changing your database design or altering any application... 56 Administering Your SQL Server 2005 Express System 58 Using character-based utilities 59 Using SQL Server Management Studio Express .60 Using third-party database administration tools .60 Creating a Database and Table .60 Chapter 5: Maintaining a SQL Server 2005 Express System 69 Master of the Database Domain 69 Setting SQL Server 2005 Express Parameters ... quickly and effectively perform these managerial tasks is what this part is all about Part III: Adding and Accessing a SQL Server 2005 Express Database Unless you’re the type of person who installs software just for the pleasure of it, you’re probably hoping to get some value out of your new SQL Server 2005 Express installation This part shows you how to create a SQL Server 2005 Express database, and then... more powerful edition of SQL Server The beauty of basing your solutions on a single relational database management product family is that you can do your development on the more advanced editions of SQL Server, using robust tools like Visual Studio, and then easily deploy your application onto the lightweight SQL Server 2005 Express As an added benefit to OEMs and ISVs, SQL Server 2005 Express lets . Welcome to SQL Server 2005 Express 7 Chapter 1: SQL Server 2005 Express Overview . . . . . . . . . . . . . . . . . . . .9 Jumping on Board the SQL Server Express 9 The SQL Server 2005 Express Environment. Organized 3 Part I: Welcome to SQL Server 2005 Express 3 Part II: Administering a SQL Server 2005 Express System 3 Part III: Adding and Accessing a SQL Server 2005 Express Database 3 Part IV: Keeping. to Business with SQL Server 2005 Express 17 Planning your database 18 Building SQL Server 2005 Express applications 19 Configuring, managing, and monitoring SQL Server 2005 Express 20 Chapter