SOL Server 2008 Administration Instant Reference Michael lee Mike mansfield WILEY Wiley Publishing, Inc Acquisitions Editor: Agatha Kim Development editor: Candace english Production Editor: Rachel Mc Conlogue Copy Editor: Judy Flynn Editorial man Pete Gaugh Production Manager: Tim Tate Vice President and Executive Group Publisher: Richard Swadley Vice President and Publisher: Neil edde Book Designer: Maureen Forys Compositors: Maureen Forys and Craig Woods, Happenstance Type-O-Rama Proofreader: publication services Inc Indexer: Nancy Guenther Project Coordinator, Cover: Lynsey Stanford Cover Designer: Ryan Sneed Cover I Copyright@ 2009 by Wiley Publishing, Inc, Indianapolis, Indiana Published simultaneously in Canada ISBN:978-0-470-49660-2 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 permitted 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 permissions Department, John Wiley Sons, Inc, 111 River Street, Hoboken, NJ 07030,(201)748-6011, fax(201) 748-6008,oronlineathttp://www.wiley.com/go/permissions Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular 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 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 Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites 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 or to obtain technical support, please contact our Customer Care Department within the U.S. at(877)762-2974, outside the U.S. at (317) 572-3993 or fax(317)572-4002 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 Cataloging-in-Publication Data Lee. michael. 1966 SQL Server 2008 administration instant reference/Michael Lee.--1st ed PC Summary: "Perfect companion to any sQl server 2008 book, providing fast, accurate answers on the spot for millions of IT professionals System and database administrators, IT consultants, and database application developers often need quick answers and practical solutions for SQL Server issues. This convenient guide offers you quick referencing for the product and database topics you need most. If you're an IT administrator looking for the essentials in the day-to-day tasks of administering SQL and tables, lists, and step-by-step instructions for answers on the spot. SQL Server 2008 Instar Server 2008, you'll appreciate this book's design for providing quick and easy look up of solution Administration Reference is a guide that you want to keep within reach. SQL Server is Microsoft's bestselling database manager; the 2008 version offers enhanced security and high availability, encouraging users to upgrade Features thumb tabs, secondary and tertiary tables of contents, and special heading treatments to provide quick and easy lookup, as well as quick-reference tables and lists to provide answers on the spot Covers installing, configuring, managing, and maintaining SQL Server; optimizing server performance; and troubleshooting SQL Server 2008 Administration Instant Reference answers the questions you encounter most often in your daily work"Provided by publisher ISBN978-0470-49660-2 1. SQL server. 2. Database management. 3. Relational databases. I. Title QA76.9D3L42752009 005.75°85--dc22 2009024947 TRADEMARKS: Wiley, the Wiley logo, and the Sybex logo 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 registered trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners. Wiley publishing, Inc, is not associated with any product or vendor mentioned in this book 10987654321 ear reader Thank you for choosing SOL Server 2008 Administration Instant Reference. This book is part of a family of premium-quality Sybex books, all of which are written by outstanding authors who combine practical experience with a gift for teaching Sybex was founded in 1976. More than 30 years later, were still com- mitted to producing consistently exceptional books. With each of our titles, we're working hard to set a new standard for the industry. From the paper we print on, to the authors we work with, our goal is to bring you the best books available hear your comments and get your feedback on how we're doing. Fee o I hope you see all that reflected in these pages. I'd be very interested free to let me know what you think about this or any other Sybex book firstname.lastname@example.org.Ifyouthinkyou'vefound atechnicalerrorinthisbookpleasevisithttp://sybex.custhelp.com Customer feedback is critical to our efforts at Sybex Best regards Neil edde Vice President and publisher obex, an Imprint of Wiley To the children of bikers against Child abuse(BACa You are the real heroes Michael To my father, Bill Mansfield, who joined the angels this year I am thankful that he always kept my good data and never seemed to recall the bad Mike Acknowledgments very time i finish a project like this, I am always humbled by all of the effort that it takes the team to put something like this together It may be my name on the cover, but my effort is only a portion of the work that went into this book. The entire team at Sybex is amaz ing. Agatha Kim kept everything on track and gave me encouragement throughout the process. Candace English is a phenomenal editor who was able to repair my problems without removing my personality from the work To all the rest at Sybex, including Rachel McConlogue, and to Judy Flynn, I am truly grateful. A special thanks to Neil Edde, who has been willing to give me these opportunities over the last 11 years Also, thanks to Mike Mansfield, who did a fantastic job as a tech reviewer for this work. He was also willing to write a few chapters hen the schedule got tight. I appreciate his help To Jon Hansen, Bob Taylor, and Tim Davis, my mentors and friends who have helped me along life's road, I am thankful. Finally, to my family, who always sup- port me: my wife, Raelynn and son myles. Thanks for the love and laughter that you bring to my life Finally, on a very personal note, I want to mention that a portion of the royalties from this book are being donated to the Nevada Chapter of Bikers Against Child Abuse (BACa). Thanks to Sybex for helping this to happen and to baca for the fine work that they do. It is my honor to call you my brothers and sisters. You can get more information about this organizationatwww.bacausa.com Michael Lee T his is my first book with Sybex. i have always had a passion for data- base work, and Sybex helped me take that and turn it into something that can be shared. The entire team made the experience extraordinary Even when difficulties arose, Agatha Kim and Candace english kept help ing me through them. I am not exaggerating when I say without them, I could never have been successful in this project I particularly wish to thank Michael Lee, who i have had the pleasure of knowing for most of my years as a trainer. michael and his lovely fam ily are exceptionally giving and caring folks; I feel truly blessed to know them. i also especially thank my family: brothers, sisters, uncles, and aunts whose support i have always deeply appreciated. My wife cindy must also be acknowledged for her patience and love that keeps me going - Mike mansfield About the authors M ICHAEL LEE (MCT, MCPD, MCITP, SCJP)has spent the last 5 years in technology training and consulting. Most of his career has been spent working with companies and helping them ease the transi tion to new technologies and practices. With a degree in Business finance from the University of Utah, Michael discovered early that he enjoyed the it aspects of business and built a career bringing together businesses d IT professionals, helping them understand each other and improve communication His beginnings in IT were a bit dubious, having worked as an intern with IBM in 1988 on the FAA modernization project(AAS), which has been dubbed one of the greatest project failures in IT history. He learned a great deal from that experience; since then, his focus has been bringing together business and technology interests. as a former Microsoft regional director, he was heavily involved in the rollout of Visual Studio 6.0 in 1997 and made a career out of melding business and technology into a unified strategic front Currently, Michael is employed with the Clark County Court System in Las Vegas, Nevada, where he still gets his hands dirty in all kinds of technology, applying his passion to the public sec tor.When he is not coding, writing, or spending time with family you can usually find him on his harley, looking for that next great American road MIKE MANSFIELD is a Senior Technical Trainer for Signal learning in Indianapolis, Indiana, and holds many 2008 product certifications Mike began teaching at Missouri State University in 2003. Prior to 2003 he worked in production environments and as a consultant for nearly two decades. In 2007, he went to Signal learning to design a program for retraining workers who had lost their job and the initial training of recent high school graduates. These programs focus on enabling people to achieve a certified Web developer or certified SharePoint administrator status,and at this point enjoy an 83% success rate Mike has authored or designed many courses and special training including a Kimball-based data warehouse architecture class for many high-level data personnel in the state of Indiana. He has trained data staff at the assembly of god world headquarters, delivered courses on clustering to Navitair com and Target stores world headquarters in Minneapolis, as well as many others. Mike currently resides in Carmel Indiana, where he enjoys spending time with his beautiful wife cinap and his interesting cat named earl Contents Introduction Part sol server basics Chapter 1: Installing SOL Server 2008 Prepare for Installation SQL Server in the Enterprise 13449 QL Server Editions QL Server 2008 Licensing 16 Installation Requirements Install SQL Server 2008 20 Performing a Standard Installation 21 Verifying a Standard Installation 32 Performing an Unattended Installation Chapter 2: Configuring SQL Server 2008 41 Configure the Server platform 42 onfiguring System Memory 42 Planning System Redundancy 46 gure r2008 50 Configuring the Server with the SSms 50 Configuring the Server with TSQL Configuring the Services Chapter 3: Creating Databases, Files, and Tables Perform Capacity Planning 76 SQL Server I/O Processes Disk Capacity Planning Memory Capacity Planning 82 Create and Alter Databases 83 Create a d 84 alter a Drop a database 96 Manage Database Files Add Files to a database 98 Add Files to a file 101 t Contents Modify database File size 104 Deallocate database files 107 Create and Alter tables 109 Understand SQL Server Data Types 109 Create a table 112 Alter a table 115 Drop a table 117 Chapter 4: Executing Basic Queries 119 Use SQL Server schemas 120 Understand Schemas 120 Create Schemas 123 Associate Objects with Schemas 125 Select data from a database 128 Use Basic Select syntax 128 Group and aggregate data 133 Join Data tables 136 Use Subqueries, Table Variables, Temporary Tables and Derived tables 138 Modify data 144 Insert Data 144 Delete data 146 Update data 146 Use the SQL Server System catalog 148 Use system v 148 Use System Stored Procedures 151 Use database Console commands 153 Part l: Data Integrity and security 155 Chapter 5: Managing Data Integrity 157 Implement Entity Integrity 158 Implement Primary Keys 159 Implement Unique Constraints 163 Implement Domain Integrity Implement Default Constraints 167 Implement Check Constraints 170 Implement Referential Integrity 174 Implement Foreign Keys 176 Implement Cascading References 179 Understand Procedural integrity 182 Understand Stored Procedure validation 183 Understand Trigger Validation 185
《SQL Server 2008 管理即时参考》 [PDF]2010-12-28
《SQL Server 2008 管理即时参考》(SQL Server 2008 Administration Instant Reference)(Michael Lee & Mike Mansfeld)文字版[PDF]
Microsoft SQL Server数据库建模工具2008-10-30
DataShow是一款基于.net Framework2.0的Microsoft SQL Server数据库建模工具，工具全部采用C#代码完成。该工具旨在利用自定义表字典的功能来设计强大的数据库控件或者页面，减少开发周期和代码量。 本工具具有如下...
这个是IM的数据库文件 c#开源ＩＭ系统 把系统中集成的ＩＭ部分，提取出来，共大家参考，也可以作为大家学习networkcomms框架的一个demo
EJB中JNDI的使用源码例子 1个目标文件，JNDI的使用例子，有源代码，可以下载参考，JNDI的使用，初始化Context,它是连接JNDI树的起始点，查找你要的对象，打印找到的对象，关闭Context…… ftp文件传输 2个目标文件...
Oracle Database 11g数据库管理艺术--详细书签版2012-09-30
第4章 使用SQL*Plus和Oracle企业管理器 73 4.1 启动SQL*Plus会话 73 4.1.1 设置环境 73 4.1.2 从命令行启动SQL*Plus会话 74 4.1.3 用CONNECT命令进行连接 75 4.1.4 用/NOLOG的无连接SQL*Plus会话 76 ...
第一步：运行ServerData.java 启动服务器，然后服务器处于等待状态 第二步：运行LoginData.java 启动(客户端)登陆界面 输入用户名 ip为本机localhost 第三步：在登陆后的界面文本框输入文本，然后发送 可以同时启动...
JICQ——Java即时通讯工具 ————供广大网友赏析 （0.61更新与补充说明版本说明） 近来忽闻，我的JICQ在CSDN上得到发布，惊喜之余，深表惭愧。喜的是：真没想到，我的JICQ居然会在CSDN的首页上出现。愧的是：我...
本书是经典名著《oracle 10g数据库管理艺术》一书的姊妹篇，通过示例全面而又详细地讲述了oracle 11g的新特性，讲述了更改管理、数据库自动化、性能管理、故障诊断、存储管理、安全管理、性能管理、应用开发、数据...
该论坛使用是用ASP.NET+SQL2005制作，前台板块包括每日推荐、最新推出、动作游戏 ... 开发环境为Visual Studio 2008,数据库为SQL Server 2005，数据库文件在DB文件夹中附加就行。 后台管理员用户名密码均是:51aspx
GameBBS论坛系统源码 功能介绍： 该论坛使用是用ASP.NET+SQL2005制作，前台板块包括每日推荐、最新推出、动作游戏 ... 后台功能：查看帖子、查看回复、查看... 开发环境为Visual Studio 2008,数据库为SQL Server 2005
在Oracle应用程序的开发过程中，访问数据库对象和编写SQL程序是一件乏味且耗费时间的工作，对数据库进行日常管理也是需要很多SQL脚本才能完成的。Quest Software为此提供了高效的Oracle应用开发工具-Toad（Tools of ...
本系统采用JSP和JAVA语言作为开发平台，利用SQL Server 2000来管理后端数据库。本系统具有试题录入、修改和删除，组卷以及进行在线考试。减轻了教师出题、组卷和改卷等繁重的工作量。 ...
该新闻管理系统可以在Windows 2000 Server操作系统平台上运行，Web服务器为IIS，数据库服务器为Microsoft SQL Server2000，开发工具采用的Microsoft Visual Studio .NET和DreamWeaver。图2给出系统的功能结构图。其...
├── zheng-im -- 即时通讯系统 ├── zheng-oa -- 办公自动化系统 ├── zheng-eoms -- 运维系统 └── zheng-demo -- 示例模块(包含一些示例代码等) ├── zheng-demo-rpc-api -- rpc接口包 ├── zheng-...
本书主要介绍ASP组件技术及其应用。全书共分为4部分，共21章，内容包括ASP组件概述、封装组件、类库组件、ASP功能扩展和解决方案...A.1 为 SQL Server 创建一个 DSN A.2 为Access创建数据源 附录B 本书所附光盘的内容
（24）支持数据库（SqlServer 2000/2005/2008、MySQL），并可以通过配置在真实数据库和虚拟数据库之间自由切换。 （25）语音视频设备测试 （26）聊天消息加密 （27）系统通知 相关说明 1.如果要将GGTalk开源即时...
used the SQL Server 2000 as a database server to design this system. This chat system consists of Browser and Server end . The function of this system is to accomplish online chatting, allowing ...