#EDIR DATA#
DOCTYPE='BOOK' PUBLICID='-//SYBOOKS//Default DTD//EN' SYSTEMID=''DOCTYPE='book' PUBLICID='' SYSTEMID=''System Administration GuideSYBASE SQL Servername='trade' font='symbol' code='228'  charset='fontspecific' System Administration GuideREMAP="titleBO--Body"SYBASE SQL Server Release 10.0REMAP="titleBO--Body"Document ID: 32500-00-1000-03REMAP="titleBO--Body"Change Level: 3REMAP="titleBO--Body"Last Revised: June 17, 1994Principal authorship: Server Publications GroupDocument ID: 32500-00-1000REMAP="discBO--Body"This publication pertains to SYBASE SQL Server Release 10.0 of the SYBASE database management software and to any subsequent release until otherwise indicated in new editions or technical notes. Information in this document is subject to change without notice. The software described herein is furnished under a license agreement, and it may be used or copied only in accordance with the terms of the agreement.Document OrdersREMAP="discBO--Body"Customers may purchase additional copies of any document or the right to make photocopies of documentation for their in-house use.REMAP="discBO--Body"To order additional documents or photocopy rights, U.S. and Canadian customers should call Customer Fulfillment at (800) 685-8225, fax (617) 229-9845.REMAP="discBO--Body"Customers in other countries with a U.S. license agreement may contact Customer Fulfillment via the fax number. All other international customers should contact their Sybase subsidiary or local distributor.REMAP="discBO--Body"Upgrades are provided only at regularly scheduled software release dates.REMAP="discBO--Body"© Copyright Sybase, Inc., 1989, 1994. All rights reserved.REMAP="discBO--Body"No part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, optical or otherwise, without prior written permission of Sybase, Inc.Sybase TrademarksREMAP="discBO--Body"SYBASE, the SYBASE logo, SyBooks, APT-FORMS, Data Workbench, DBA Companion, Deft, GainMomentum, SA Companion, SQL Debug, SQL Solutions, SQR, Transact-SQL, and VQL are registered trademarks of Sybase, Inc. ADA Workbench, Adaptable Windowing Environment, Application Manager, Applications from Models, APT Workbench, APT-Build, APT-Edit, APT-Execute, APT-Translator, APT-Library, Build Momentum, Camelot, Client/Server Architecture for the Online Enterprise, Client/Server for the Real World, Configurator, DataServer, Data Workbench, Database Analyzer, DB-Library, Deft Analyst, Deft Designer, Deft Educational, Deft Professional, Deft Trial, Developers Workbench, Easy SQR, Embedded SQL, Enterprise Builder, Enterprise Client/Server, Enterprise Meta Server, Enterprise Modeler, Enterprise Momentum, Gain, GainExposure, Insight, Mainframe Access Products (MAP), Momentum, Movedb, Navigation Server, Net-Gateway, Net Library, Object Momentum, OmniSQL Gateway, Omni SQL Server, OmniSQL Access Module, Open Client, Open Gateway, Open Server, Open Solutions, PC APT-Execute, PC DB-Net, PC Net Library, Report Workbench, Report Execute, Open Server, Partnerships that Work, Replication Server, Resource Manager, RW-Display Lib, RW-Library, SA Monitor, Secure SQL Server, Secure SQL Toolset, SQL Code Checker, SQL Edit/TPU, SQL Edit, SQL Monitor, SQL Server, SQL Toolset, SQL Server/CFT, SQL Server/DBM, SQL Station, SQR Toolset, SQR Developers Kit, SQR Workbench, SYBASE Client/Server Interfaces, SYBASE Gateways, SYBASE SQL Lifecycle, Sybase Synergy Program, SYBASE Virtual Server Architecture, SYBASE User Workbench System 10, Tabular Data Stream, and The Enterprise Client/Server Company are trademarks of Sybase, Inc.REMAP="discBO--Body"All other company and product names used herein may be the trademarks or registered trademarks of their respective companies.Restricted Rights LegendREMAP="discBO--Body"Use, duplication or disclosure by the Government is subject to restrictions set forth in subparagraph (c)(1)(ii) of DFARS 52.227-7013 for the DOD and as set forth in FAR 52.227-19(a)-(d) for civilian agencies.REMAP="discBO--Body"Sybase, Inc., 6475 Christie Avenue, Emeryville, CA 94608PrefaceREMAP="BO--Body"This manual, the SYBASE SQL Server
name='trade' font='symbol' code='228'  charset='fontspecific' System Administration Guide
, describes how to administer and control SQL Server databases independent of any specific database
 application. RENDERAS="SECT1"Audience REMAP="BO--Body"This manual is intended for SYBASE SQL Server System Administrators and Database Owners. RENDERAS="SECT1"How to Use this Book   REMAP="BO--Body"This manual contains two sections. Section I, "Basic Concepts," covers basic system administration issues: MARK="BULL" REMAP="BU--Bullet"LINKEND="X52556"Chapter 1,  "Overview of System Administration,"
 describes the structure of the SYBASE® system. LINKEND="X92769"Chapter 2,  "Roles in SQL Server,"
 describes different system administration roles and capabilities. LINKEND="X45883"Chapter 3,  "Managing Physical Resources,"
 discusses the physical placement of databases, tables, and indexes, and the allocation of space to them. LINKEND="X11284"Chapter 4,  "Managing SQL Server Logins and Database Users,"
 covers the addition and management of database users. LINKEND="X24272"Chapter 5,  "Managing User Permissions,"
 describes SQL Server's protection system and the privileges that different users have and can be granted.LINKEND="X97415"Chapter 6,  "Checking Database Consistency,"
 describes how to use the database consistency checker, MOREINFO="NONE"dbcc, to detect and fix database problems.LINKEND="X31864"Chapter 7,  "Developing a Backup and Recovery Plan,"
 discusses the capabilities of the Backup Server, and how to develop your backup strategy.LINKEND="X32898"Chapter 8,  "Backing Up and Restoring User Databases,"
 discusses how to recover user databases.LINKEND="X40994"Chapter 9,  "Backing Up and Restoring the System Databases,"
 discusses how to recover system databases.LINKEND="X63254"Chapter 10,  "Managing Free Space with Thresholds,"
 discusses managing space with thresholds.REMAP="BO--Body"Section II, "Special Topics," contains information needed for special environments or infrequently encountered situations: MARK="BULL" REMAP="BU--Bullet"LINKEND="X57130"Chapter 11,  "Diagnosing System Problems,"
 discusses SQL Server and Backup Server error handling, and shows how to shut down servers and kill user processes. LINKEND="X26541"Chapter 12,  "Fine-Tuning Performance and Operations,"
 describes how to configure SQL Server for the best performance. LINKEND="X71792"Chapter 13,  "Locking,"
 describes how SQL Server locks database pages and objects, and presents strategies for reducing lock contention.LINKEND="X53199"Chapter 14,  "Managing Multiprocessor Servers,"
 discusses system administration issues unique to symmetric multiprocessor environments. LINKEND="X99826"Chapter 15,  "Managing Remote Servers,"
 covers management of remote servers and remote users.LINKEND="X31147"Chapter 16,  "Auditing,"
 describes auditing on SQL Server.LINKEND="X60641"Chapter 17,  "Language, Sort Order, and Character Set Issues,"
 discusses international issues, such as the files included in the Language Modules and how to change SQL Server's language, sort order
, or character set
. LINKEND="X10322"Chapter 18,  "Converting Character Sets Between SQL Server and Client,"
 discusses character set conversion
 between SQL Server and clients in a heterogeneous environment. LINKEND="X94212"Appendix A,  "Reserved Words,"
 lists Transact-SQL reserved words, and includes a list of words that may be used as keywords in SQL 92 implementations.LINKEND="X56552"Appendix B,  "The System Tables"
 lists each system table and the definition of all columns in each table. A pull-out entity relationship diagram is included at the back of the book.ID="IN791"Sample database. See pubs2 databaseLINKEND="X40724"Appendix C,  "The pubs2 Database"
 describes the MOREINFO="NONE"pubs2 database in detail. Also included is an entity relationship diagram of all the tables in MOREINFO="NONE"pubs2.There is also a glossary of terms used in this book that relate to system administration and database management issues.RENDERAS="SECT1"Related Documents REMAP="BO--Body"Other manuals you may find useful are:MARK="BULL" REMAP="BU--Bullet" SQL Server Reference Manual
, which contains detailed information on all of the commands and system procedures discussed in this manual.SQL Server Utility Programs, which documents the SYBASE utility programs such as MOREINFO="NONE"isql and MOREINFO="NONE"bcp which are executed from the operating system
 level.System Administration Guide Supplement, which documents operating-system-specific system administration tasks.Transact-SQL User's Guide, which documents Transact-SQL®, Sybase's enhanced version of the relational database language. It serves as a textbook for beginning users of the  SYBASE database management system. SQL Server Installation Guide, which describes the installation procedures for SQL Server.Master Index for Server Publications, which combines the indexes of the SQL Server Reference Manual, Transact-SQL User's Guide, and System Administration Guide. Use it to locate various topics in different contexts throughout the  SYBASE documentation.What's New in Sybase SQL Server Release 10.0? , which describes the new features in Release 10.0.ID="IN412"Conventionsused in manualsRENDERAS="SECT1"Conventions Used in this ManualRENDERAS="SECT2"Formatting SQL StatementsREMAP="BO--Body"SQL is a free-form language: there are no rules about the number of words you can put on a line, or where you must break a line. However, for readability, all examples and syntax statements in this manual are formatted so that each clause of a statement begins on a new line. Clauses that have more than one part extend to additional lines, which are indented. ID="IN923"Syntax conventions, Transact-SQLID="X97350" RENDERAS="SECT2"SQL Syntax ConventionsID="IN664"Removing. See Dropping
ID="IN1095"SymbolsSymbolsSee also Symbols section of this index!see also
ID="IN996"DeletingDeletingSee also Dropping!see also Dropping
ID="IN797"Superuser. See System Administrator
ID="INA778"Editing. See Changing; Updating
ID="IN359"SymbolsSQL statementREMAP="BO--Body"The conventions for syntax statements in this manual are as follows:TOCENTRY="1"LBL="Table 1: "Syntax Statement Conventions COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="8*"COLNAME="C2" COLWIDTH="27*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"KeyCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DefinitionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"commandCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command names, command option names, utility 
names, utility flags, and other keywords are in 
MOREINFO="NONE"bold Courier in syntax statements, and in MOREINFO="NONE"bold 
Helvetica in paragraph text.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"variable COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Variables, or words that stand for values that you fill 
in, are in italics.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"{ }COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Curly braces indicate that you choose at least one of 
the enclosed options. Do not include braces in your 
option. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"[ ]COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Brackets mean choosing one or more of the enclosed 
options is optional. Do not include brackets in your 
option. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"( )COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Parentheses are to be typed as part of the command. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"|COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The vertical bar means you may select only one of 
the options shown. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE",COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The comma means you may choose as many of the 
options shown as you like, separating your choices 
with commas to be typed as part of the command.MARK="BULL" REMAP="BU--Bullet"Syntax statements (displaying the syntax and all options for a command
) are printed like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_dropdevice [MOREINFO="NONE"device_name]REMAP="UN--Under"or, for a command with more options:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"selecMOREINFO="NONE"t column_name     from MOREINFO="NONE"table_name     where MOREINFO="NONE"search_conditions REMAP="UN--Under"In syntax statements, keywords (commands) are in normal font and identifiers are in lowercase: normal font for keywords, italics for user-supplied words.ID="IN7510"* (asterisk). See Asterisks (*)Examples showing the use of Transact-SQL commands are printed like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * from publishersExamples of output from the computer are printed like this:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"pub_id  pub_name                 city        state ------- -------------------      ----------- -----0737    New Age Books            Boston      MA 0877    Binnet & Hardley         Washington  DC 1389    Algodata Infosystems     Berkeley    CA  (3 rows affected)ID="IN2311"Case sensitivityin SQLRENDERAS="SECT3"CaseREMAP="BO--Body"You can disregard case when you type keywords: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"SELECT is the same as MOREINFO="NONE"Select is the same as MOREINFO="NONE"select RENDERAS="SECT3"Obligatory Options {You Must Choose At Least One}ID="IN7112"{} (curly braces) in SQL statementsMARK="BULL" REMAP="BU--Bullet"Curly Braces and Vertical Bars: Choose one and only one option. REMAP="UI--UserInput" FORMAT="LINESPECIFIC"{die_on_your_feet | live_on_your_knees |live_on_your_feet}Curly Braces and Commas: Choose one or more options. If you choose more than one, separate your choices with commas. REMAP="UI--UserInput" FORMAT="LINESPECIFIC"{cash, check, credit}ID="IN8513"[ ] (square brackets)in SQL statementsRENDERAS="SECT3"Optional Options [You Don't Have to Choose Any]   MARK="BULL" REMAP="BU--Bullet"One Item in Square Brackets: You don't have to choose it. REMAP="UI--UserInput" FORMAT="LINESPECIFIC"[anchovies]Square Brackets and Vertical Bars:   Choose none or only one. REMAP="UI--UserInput" FORMAT="LINESPECIFIC"[beans | rice | sweet_potatoes]Square Brackets and Commas:   Choose none, one, or more than one option. If you choose more than one, separate your choices with commas. REMAP="UI--UserInput" FORMAT="LINESPECIFIC"[extra_cheese, avocados, sour_cream]ID="IN6514"... (ellipsis) in SQL statementsRENDERAS="SECT3"Ellipsis: Do it Again (and Again)...   REMAP="BO--Body"An ellipsis (three dots) means that you can repeat the last unit as many times as you like. In this syntax statement, MOREINFO="NONE"buy is a required keyword: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"buy thing = price [cash | check | credit]     [, thing = price [cash | check | credit]]... REMAP="BO--Body"You must buy at least one thing and give its price. You may choose a method of payment: one of the items enclosed in square brackets. You may also choose to buy additional things: as many of them as you like. For each thing you buy, give its name, its price, and (optionally) a method of payment. ID="IN3415"Expressionstypes ofRENDERAS="SECT3"ExpressionsREMAP="BO--Body"Several different types of expressions
 are used in SQL Server syntax statements. TOCENTRY="1"LBL="Table 2: "Types of Expressions Used in Syntax StatementsCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="5*"COLNAME="C2" COLWIDTH="12*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"UsageCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DefinitionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"expressionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Can include constants, literals, functions, 
column identifiers, variables, or parametersCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"logical expressionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"An expression that returns TRUE, FALSE, or 
UNKNOWNCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"constant expressionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"An expression that always returns the same 
value, such as "5+3" or "ABCDE"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"float_exprCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Any floating-point expression or expression 
that implicitly converts to a floating valueCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"integer_exprCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Any integer expression, or an expression that 
implicitly converts to an integer valueCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"numeric_exprCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Any numeric expression that returns a single 
valueCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char_exprCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"An expression that returns a single character-
type valueCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"binary_expressionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"An expression that returns a
single binary or varbinary valueRENDERAS="SECT1"If You Need HelpID="IN4016"HelpTechnical SupportREMAP="BO--Body"Help with your  SYBASE software is available in the form of documentation and the Technical Support Center.ID="IN7517"Database recovery. See RecoveryREMAP="BO--Body"Each  SYBASE installation has a designated person who may contact Technical Support. If you cannot resolve your problem using the manuals, ask the designated person at your site to contact Sybase Technical Support.REMAP="BO--Body"NUMBER="1" ID="X52556"Overview of System AdministrationID="IN341"System Administrator
ID="IN482"Database administration
ID="IN993"ChangingChangingSee also Updating!see also Updating
ID="IN994"UpdatingUpdatingSee also Changing!see also ChangingRENDERAS="SECT1"Introduction   REMAP="BO--Body"Administering SQL Server databases includes tasks such as: MARK="BULL" REMAP="BU--Bullet"Installing SQL Server and Backup ServerGranting roles and permissions to SQL Server usersManaging and monitoring the use of disk space, memory, and connectionsBacking up and restoring databasesDiagnosing system problemsFine-tuning SQL Server to achieve the best performanceREMAP="BO--Body"In addition, System Administrators may have a hand in certain database design tasks, such as enforcing integrity standards. This function may overlap with the work of application designers. REMAP="BO--Body"Although a System Administrator
 concentrates on tasks that are independent of the applications running on SQL Server, she or he is likely to be the person with the best overview of all the applications. For this reason, a System Administrator can advise application designers about the data that already exists on the SQL Server, make recommendations about standardizing data definitions across applications, and so on. REMAP="BO--Body"The System Administration Guide
 is concerned with physical storage issues, backup
 and recovery, fine-tuning SQL Server, and so on. Functions specific to an application-data definition
 and maintaining referential integrity-are covered in other manuals. Installation of SQL Server is covered in the SYBASE SQL Server Installation Guide
. REMAP="BO--Body"However, the distinction between what is and what is not specific to an application is sometimes a bit fuzzy. Owners of user databases will consult certain sections of this book. Similarly, System Administrators and Database Owners will use the Transact-SQL 
User's 
Guide (especially the chapters on data definition, stored procedures, and triggers). REMAP="BO--Body"The roles of the System Administrator, the Database Owner
, and other users of SQL Server are further discussed in LINKEND="X92769"Chapter 2,  "Roles in SQL Server"
. RENDERAS="SECT2"Roles Required for System Administration TasksREMAP="BO--Body"Many of the commands and procedures discussed in this document require you to be a System Administrator or System Security Officer. These special SQL Server roles are discussed in LINKEND="X92769"Chapter 2,  "Roles in SQL Server"
.ID="IN265"Database Ownerslogin name
ID="IN386"Ò dboÓ  user namedbo user name
ID="IN527"LoginsLoginsÒ dboÓ  user namedbo user nameREMAP="BO--Body"Other sections of this document are relevant to Database Owners. A Database Owner's username within the database is "dbo
." You cannot log in as "dbo": a Database Owner logs in under his or her SQL Server login
 name, and is recognized as "dbo" by SQL Server only while using his or her database.ID="IN818"isql utility commandsystem administration andRENDERAS="SECT2"Using isql to Perform System Administration Tasks   REMAP="BO--Body"Nearly all of the system administration tasks described in this guide require you as a System Administrator to connect to SQL Server with the utility MOREINFO="NONE"isql. For more information about MOREINFO="NONE"isql, see the SQL Server 
Utility Programs manualID="IN469"Database administration
ID="IN3210"System Administrator
 for your platform. ID="IN3811"System tables
ID="IN7812"Data dictionary. See System tables
ID="IN7813"System catalogs. See System tables
ID="IN15814"System tablesSystem tablesSee also Tables; individual table names!see also
ID="IN14515"TablesTablesSee also Database objects; System tables!see also Database objects; System tablesRENDERAS="SECT1"The System Tables   ID="IN4916"master databaseREMAP="BO--Body"The master database
 contains system tables that keep track of information about SQL Server as a whole. In addition, each database (including the MOREINFO="NONE"master database) contains system tables that keep track of information specific to that database. REMAP="BO--Body"All of the SQL Server-supplied tables in the MOREINFO="NONE"master database (SQL Server's controlling database) are considered system tables. In addition, each user database is created with a subset of these system tables. The system tables may also be referred to as the data dictionary
 or the system catalogs. ID="IN2517"System tablescreation of
ID="IN2218"Creatingsystem tablesREMAP="BO--Body"A MOREINFO="NONE"masterID="IN6819"System tablescreate database and
ID="IN7620"create database commandsystem tables and
 database and its tables are created when you install SQL Server. The system tables in a user database are automatically created when the MOREINFO="NONE"create database command is issued. The names of all system tables start with "sys". An explanation of the system tables and their columns is included in LINKEND="X56552"Appendix B,  "The System Tables"
. Some of the system tables are discussed in detail in later chapters. ID="IN2221"System tablesqueryingRENDERAS="SECT2"Querying the System Tables   REMAP="BO--Body"You can query
 the system tables just like any other tables. For example, here's a statement that returns the names of all the triggers in the database: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select name from sysobjects where type = "TR" ID="IN3522"System tablesstored procedures andREMAP="BO--Body"In addition, SQL Server supplies stored procedures (called system procedures
), many of which provide shortcuts for querying the system tables. REMAP="BO--Body"These system procedures provide information from the system tables:COLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="144*"COLNAME="C2" COLWIDTH="288*"COLNAME="C3" COLWIDTH="432*"VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_commonkeyCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpindexCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpsortCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_configureCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpjoinsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helptextCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_dboptionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpkeyCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpthresholdCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_estspaceCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helplanguageCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpuserCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helplogCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_lockCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpconstraintCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpremoteloginCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_monitorCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpdbCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helprotectCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_spaceusedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpdeviceCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpsegmentCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_whoCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpgroupCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpserverCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"REMAP="BO--Body"For complete information on the system procedures, see the SQL Server Reference Manual, Volume 2. RENDERAS="SECT2"Changing Data in System TablesREMAP="BO--Body"SQL Server's system tables contain information critical to the operation of your databases. Data in these tables is inserted, updated, or deleted by Transact-SQL commands (such as MOREINFO="NONE"create or MOREINFO="NONE"drop commands) or by system procedures. Under ordinary circumstances, you do not need to perform direct data modifications to system tables. REMAP="BO--Body"Generally, you should update these tables only when:MARK="BULL" REMAP="BU--Bullet"You are instructed to do so by Technical Support, orInstructions in the SYBASE Troubleshooting Guide or this guide instruct you to update a system table
.REMAP="BO--Body"If you must update system tables, you must issue an MOREINFO="NONE"sp_configure command that enables system table updates. While this command is in effect, any user with appropriate permission could modify a system table. Other guidelines for direct changes to system tables are:MARK="BULL" REMAP="BU--Bullet"Modify system tables only inside a transaction
. Issue a MOREINFO="NONE"begin transaction command before you issue the data modification
 command.Check to see that only the rows you wished to change were affected by the command, and that the data was changed correctly.If the command was incorrect, issue a MOREINFO="NONE"rollback transaction command. If the command was correct, use MOREINFO="NONE"commit transaction.ID="IN6323"syslogs tablemodification of
ID="IN6824"Changingsyslogs table, dangers ofSome system tables should not be altered by any user under any circumstances. Some system tables are built dynamically by system processes, contain encoded information, or display only a portion of their data when queried. Imprudent ad hoc updates to certain system tables can make SQL Server unable to run, can make database objects inaccessible, can scramble permissions on objects
, or terminate your user session.ID="IN2225"System tableskeys forID="IN1826"Keys, tablesystemRENDERAS="SECT2"Keys in System Tables   ID="IN7527"master databasekeys for system tables inREMAP="BO--Body"Primary, foreign, and common keys for the system tables have been defined in the MOREINFO="NONE"masterID="IN7428"model databasekeys for system tables in
 and MOREINFO="NONE"modelID="IN6229"sp_helpkey system procedure
 databases (the database used as a template for creating user databases). A report on defined keys is available by executing the system procedure MOREINFO="NONE"sp_helpkeyID="IN6430"sp_helpjoins system procedure
. For a report on columns in two system tables that are likely join candidates, execute MOREINFO="NONE"sp_helpjoinsID="IN3631"System tables
. The system tables diagram included at the end of this book shows the relationships between columns in the system tables.ID="IN4232"System procedures
ID="IN14133"Information (Server)Information (Server)See also System procedures!see also System proceduresRENDERAS="SECT1"System Procedures   ID="IN9834"Procedures. See Stored procedures; System procedures
ID="IN20535"System proceduresSystem proceduresSee also Information (Server); Stored procedures; individual procedure names!see also
ID="IN9136"System stored procedures. See System procedures
ID="IN2337"Namessystem proceduresREMAP="BO--Body"The names of all the system procedures begin with MOREINFO="NONE"sp_ID="IN5738"sybsystemprocs database
. They are located in the MOREINFO="NONE"sybsystemprocs database, but many of them can be run from any database. ID="IN7139"master databasesystem procedures andREMAP="BO--Body"Except for system procedures that update only tables in master, if a system procedure is executed in a database other than MOREINFO="NONE"sybsystemprocs, it operates on the system tables in the database from which it was executed. For example, if the Database Owner of MOREINFO="NONE"pubs2 runs MOREINFO="NONE"sp_adduser from MOREINFO="NONE"pubs2, the new user is added to pubs2..sysusers. REMAP="BO--Body"Permissions on the system procedures are discussed in LINKEND="X24272"Chapter 5,  "Managing User Permissions"
, and in the SQL Server Reference Manual, Volume 2.RENDERAS="SECT2"ID="IN2340"System proceduresusing
Using System ProceduresREMAP="BO--Body"If a parameter
ID="INA4141"" " (quotation marks)enclosing values in
 value for a system procedure contains reserved words, punctuation, or embedded blanks, it must be enclosed in single or double quotes. If the parameter is an object name and the object name is qualified by a database name or owner name, the entire name must be enclosed in single or double quotes.REMAP="BO--Body"System procedures can be invoked by sessions using either chained or unchained transaction modes. However, the system procedures that modify data in master's system tables cannot be executed from within a transaction, since this could comprise recovery. The system procedures that create temporary work tables cannot be run from transactions.REMAP="BO--Body"If no transaction is active when you execute system procedures, SQL Server turns off chained mode and sets MOREINFO="NONE"transaction isolation level 1 for the duration of the procedure. Before returning, the session's chained mode and isolation level
 are reset to their original settings. For more information about transaction modes and isolation levels, see Volume 1 of the SQL Server Reference Manual.ID="IN3142"Return statussystem proceduresREMAP="BO--Body"All system procedures report a return status. For example:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"MOREINFO="NONE"return status = 0 REMAP="BO--Body"means that the procedure executed successfully. RENDERAS="SECT2"System Procedure Tables   ID="IN3243"System procedurestables used byREMAP="BO--Body"The system procedures use several MOREINFO="NONE"system procedure tables in the masterID="IN5044"spt_values table
 database to convert internal system values (for example, status bits) into human-readable format. One of them, spt_values, is used by a wide variety of system procedures including MOREINFO="NONE"sp_configure, MOREINFO="NONE"sp_dboption, MOREINFO="NONE"sp_depends, MOREINFO="NONE"sp_help, MOREINFO="NONE"sp_helpdb, MOREINFO="NONE"sp_helpdevice, MOREINFO="NONE"sp_helpindex, MOREINFO="NONE"sp_helpkey, MOREINFO="NONE"sp_helprotect, and MOREINFO="NONE"sp_lock. REMAP="BO--Body"The table spt_values is only updated by upgrade; you should never modify it. To see how it is used, execute ID="IN6345"sp_helptext system procedure
MOREINFO="NONE"sp_helptext to look at the text for one of the system procedures that references it. ID="IN5146"spt_monitor table
ID="IN6247"Monitoringspt_monitor tableREMAP="BO--Body"The other system procedure tables include spt_monitorID="IN5348"spt_committab table
 and spt_committabID="IN12149"ReportsReportsSee also Information (Server)!see also Information (Server)
ID="IN6150"sp_helpdb system procedure
 and tables needed by the Catalog Procedures. In addition, several of the system procedures create and then drop temporary tables. For example, MOREINFO="NONE"sp_helpdb creates #spdbdescID="IN6551"sp_helpdevice system procedure
; MOREINFO="NONE"sp_helpdevice creates ID="IN8552"#spdevtab temporary tablespdevtab temporary table
#spdevtabID="IN6453"sp_helpindex system procedure
; and MOREINFO="NONE"sp_helpindexID="IN8554"#spindtab temporary tablespindtab temporary table
 creates #spindtab.ID="IN5355"Creatingstored proceduresRENDERAS="SECT2"Creating System Procedures   REMAP="BO--Body"Many of the system procedures are explained in this manual, in sections to which they are relevant. The SQL Server Reference
 Manual, Volume 2 lists and describes all of them. ID="IN2656"Stored procedurescreatingREMAP="BO--Body"System Administrators can write system procedures that can be executed from any database. Simply create a stored procedure
 in MOREINFO="NONE"sybsystemprocs and give it a name that begins with MOREINFO="NONE"sp_ID="IN957"IDs, user
ID="IN3358"User IDsnumber 1, Database Owner
. The MOREINFO="NONE"uid of the stored procedure must be 1, the MOREINFO="NONE"uid of the Database Owner. ID="IN5859"System tablesstored procedures and
ID="IN2660"System procedurescreating
ID="IN2261"System tablesqueryingREMAP="BO--Body"Most of the system procedures that you create yourself will query the system tables. You can also create stored procedures that modify the system tables, although this is not recommended. ID="IN4362"Stored proceduressystem tables changes and
ID="IN8063"Dynamic configuration variablesallow updates
ID="IN2264"Changingsystem tables
ID="IN7165"allow updates configuration variableREMAP="BO--Body"To create a stored procedure that modifies system tables, a System Security Officer must first turn on the MOREINFO="NONE"allow updates configuration variable. Any stored procedure created while this variable is set on will always be able to update system tables, even when MOREINFO="NONE"allow updatesID="IN16166"Updatingallow updates database option and reconfigure with override configuration variable
 is turned off. Here's how you'd create a stored procedure that updates the system tables: ID="IN10267"with override optionreconfigure
ID="IN12068"reconfigure with override optionallow updates and
ID="IN12769"allow updates configuration variablewith override clause
ID="IN6470"sp_configure system procedureMARK="BULL" REMAP="BU--Bullet"Issue MOREINFO="NONE"sp_configure and MOREINFO="NONE"reconfigure MOREINFO="NONE"with MOREINFO="NONE"override so that direct updates to system tables are allowed (see LINKEND="X26541"Chapter 12,  "Fine-Tuning Performance and Operations"
ID="IN11371"Override. See with override option
). ID="IN5972"create procedure commandCreate the stored procedure with the MOREINFO="NONE"create procedure command. ID="IN3173"System tablesdirect updates toIssue MOREINFO="NONE"sp_configure and MOREINFO="NONE"reconfigureID="IN5574"Updatingdirect to system tables
 again, to disallow direct updates to system tables. ID="IN3475"System tableschanges dangerous to
ID="IN4076"System proceduresUse extreme caution if you must modify system tables. Test procedures that modify system tables in development or test databases, not in your production database.ID="IN3077"System databasesID="IN3078"DatabasessystemID="IN25979"System databasesSystem databasesSee also master database; model database; sybsystemprocs database; tempdb database!see alsoRENDERAS="SECT1"System DatabasesREMAP="BO--Body"When you install SQL Server, it has these system databases
: MARK="BULL" REMAP="BU--Bullet"The MOREINFO="NONE"master databaseThe MOREINFO="NONE"model databaseThe system procedure database, sybsystemprocsThe temporary database
, teMOREINFO="NONE"mpdbREMAP="BO--Body"You can optionally install:MARK="BULL" REMAP="BU--Bullet"The auditing database, sybsecurity. Use MOREINFO="NONE"sybinit to install this database.The sample database, MOREINFO="NONE"pubs2, by using MOREINFO="NONE"isqlID="IN5480"installpubs2 script
 and the MOREINFO="NONE"installpubs2 script.The sybsyntax database. See the System Administration Guide Supplement for your platform for more information on sybsyntax.REMAP="BO--Body"The MOREINFO="NONE"master, MOREINFO="NONE"modelID="IN4281"d_master
, and temporary databases all reside on the device named during installation, which is known as MOREINFO="NONE"d_master. The MOREINFO="NONE"masterID="IN1382"Master device
 database is contained entirely on the master device and cannot be expanded onto any other device. All other databases and user objects should be created on other devices. REMAP="BO--Body"The sybsecurity database should be installed on its own device and segment
. (This is discussed in the Secure SQL Server Installation Guide.)REMAP="BO--Body"The sybsystemprocs database can be installed on a device of your choice. You may wish to modify the MOREINFO="NONE"installpubs2 script and the scripts that install the sybsyntax database to share the device you created for sybsystemprocs.ID="IN2983"Databasesdefault storage forThe installpubs2 script does not specify a device in its MOREINFO="NONE"create database statement, so it will be created on the default
ID="IN4984"Defaultsdatabase device
 device. At installation time, the master device is the default device. To change this you can edit the script or follow directions later in this document for adding more database devices and designating default devices.RENDERAS="SECT2"ID="IN7485"master database
master Database   ID="IN7586"User databasesmaster database control ofREMAP="BO--Body"The MOREINFO="NONE"master database (MOREINFO="NONE"master) controls the user databases and the operation of SQL Server as a whole. It keeps track of:MARK="BULL" REMAP="BU--Bullet"User accounts (in MOREINFO="NONE"syslogins) Remote user accounts (in MOREINFO="NONE"sysremotelogins)Remote servers that this server can interact with (in MOREINFO="NONE"sysservers)Ongoing processes (in MOREINFO="NONE"sysprocesses) The configurable environment variables (in MOREINFO="NONE"sysconfigures) System error messages (in MOREINFO="NONE"sysmessages) The databases on SQL Server (in MOREINFO="NONE"sysdatabases) The storage space allocated to each database (in MOREINFO="NONE"sysusages) The tapes and disks mounted on the system (in sysdevices)The active locks (in MOREINFO="NONE"syslocks)Character sets (in syscharsets) and languages (in MOREINFO="NONE"syslanguages)Users who hold server-wide roles (in MOREINFO="NONE"sysloginroles)Server roles (in syssrvroles)SQL Server engines online (in MOREINFO="NONE"sysengines)REMAP="BO--Body"You must be in the MOREINFO="NONE"master database in order to issue the MOREINFO="NONE"create or MOREINFO="NONE"alter database, MOREINFO="NONE"disk init, MOREINFO="NONE"disk refit, MOREINFO="NONE"disk reinit and the disk mirroring commands.RENDERAS="SECT3"Controlling Object Creation in masterREMAP="BO--Body"When you first install SQL Server, only System Administrators can create objects in the masterID="IN2587"Database objectscreating
ID="IN4588"Database objectscontrolling user creation of
 database, because they implicitly become "dbo" of any database they use. It is not a good idea to routinely add user objects to the MOREINFO="NONE"master database device. Any objects created on the MOREINFO="NONE"master  database device
ID="IN6189"Permissionsmaster database
 should be used for the administration of the system as a whole. Permissions in MOREINFO="NONE"master should remain set so that most users cannot create objects there. REMAP="BO--Body"Another way to discourage users from creating objects in MOREINFO="NONE"masterID="INA3690"Databasesdefault
 is to change users' default databases (the database to which the user is connected when he or she logs in) with the system procedure MOREINFO="NONE"sp_modifylogin. This procedure is discussed in LINKEND="X11284"Chapter 4,  "Managing SQL Server Logins and Database Users"
. REMAP="BO--Body"If you create system procedures, create them in the sybsystemprocs database, rather than in master.RENDERAS="SECT3"Protecting Your Server by Backing up masterREMAP="BO--Body"To be prepared for hardware or software failure on your server, the two most important housekeeping tasks are:MARK="BULL" REMAP="BU--Bullet"Performing frequent backups of the master database (as well as all of your user databases).ID="IN9191"Databasesdumping
ID="IN6092"master databasebacking up
ID="IN2093"Databasesbacking upBack up the master database with ID="IN6894"dump database commandwhen to use
MOREINFO="NONE"dump database each time you create, alter or drop any device, database, or database object
, and each time you execute a stored procedure that changes it. See LINKEND="X40994"Chapter 9,  "Backing Up and Restoring the System Databases"
ID="INB7295"master database
.) Keeping a copy (preferably off-line) of these system tables: sysusages, sysdatabases, sysdevices, sysloginroles and syslogins. You may want to create a script to perform these commands:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * from sysusages order by vstartREMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * from sysdatabasesREMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * from sysdevicesREMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * from sysloginrolesREMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * from sysloginsREMAP="UN--Under"If you have copies of these scripts, and a hard disk crash or other disaster makes your database unusable, you will be able to use the recovery procedures described in LINKEND="X40994"Chapter 9,  "Backing Up and Restoring the System Databases"
. If you do not have current copies of this information, full recovery of your SQL Server becomes much more difficult after damage to the master database.RENDERAS="SECT2"ID="IN5996"model database
modelID="IN15597"model databasemodel databaseSee also System tables!see also System tables
 DatabaseREMAP="BO--Body"The model database
ID="IN1398"Databasesnew
ID="IN11199"create database commandmodel database and
 is also supplied with SQL Server. It provides a template or prototype for new user databases. Each time the MOREINFO="NONE"create database command is issued, SQL Server makes a copy of the MOREINFO="NONE"modelID="IN32100"Databasessize
 database, and then extends the new database to the size requested in the MOREINFO="NONE"create database command. A new database can never be smaller than the model database. REMAP="BO--Body"The MOREINFO="NONE"modelID="IN95101"User databasessystem tables for
 database contains the system tables required for each user database. It can be modified to customize the structure of newly created databases-everything you do to MOREINFO="NONE"model will be reflected in each new database. Here are some of the changes that are commonly made to MOREINFO="NONE"model: MARK="BULL" REMAP="BU--Bullet"Adding user-defined datatypes, rules, or defaults. ID="IN62102"sp_adduser system procedureAdding users who are to be given access to all databases on SQL Server. ID="IN40103"Defaultspermissions
ID="INA60104"Permissionsmodel databaseGranting default privileges, particularly for guest
 accounts ID="IN124105"select into/bulkcopy database optionmodel database andSetting database options such as MOREINFO="NONE"select into/bulkcopy. The setting of options will be reflected in all new databases. Their original value in MOREINFO="NONE"model is "off". Database options are described in LINKEND="X26541"Chapter 12,  "Fine-Tuning Performance and Operations"
. ID="IN60106"Permissionsmodel databaseREMAP="BO--Body"Typically, most users are not granted permission to modify the MOREINFO="NONE"model database. There isn't much point in granting read permission either, since its entire contents are copied into each new user database. REMAP="BO--Body"The size of MOREINFO="NONE"model cannot be larger than the size of MOREINFO="NONE"tempdb. SQL Server displays an error message
 if you try to increase the size of model without making tempdb at least as large.ID="IN50107"Databasesbacking upKeep a backup copy of the model database and back up modelID="IN68108"dump database commandwhen to use
 with MOREINFO="NONE"dump database each time you change it. In case of media failure, restore model as you would a user database.RENDERAS="SECT2"ID="IN82109"sybsystemprocs database
ID="IN61110"Tablestemporary
sybsystemprocsID="IN165111"sybsystemprocs databasesybsystemprocs databaseSee also Databases!see also Databases
 Database   REMAP="BO--Body"SYBASE system procedures are stored in the database sybsystemprocs. When a user in any database executes any stored procedure that starts with the characters "sp_", SQL Server first looks for that procedure in user's current database. If there is no procedure there with that name, SQL Server looks for it in sybsystemprocs. If there's no procedure in sybsystemprocs by that name, SQL Server looks for the procedure in master.REMAP="BO--Body"If the procedure modifies system tables (for example, MOREINFO="NONE"sp_adduser modifies the sysusers table), the changes are made in the database from which the procedure was executed.REMAP="BO--Body"To change the default permissions on system procedures, you must modify these permissions in sybsystemprocs.If you make changes to sybsystemprocs or add your own stored procedures to the database, you should backup the database regularly.ID="IN80112"sybsystemprocs databaseRENDERAS="SECT2"ID="IN74113"tempdb database
tempdbID="IN149114"tempdb databasetempdb databaseSee also Databases!see also Databases
 Database   REMAP="BO--Body"SQL Server has a temporary database, MOREINFO="NONE"tempdbID="IN104115"group by clausetempdb database and
. It provides a storage area for temporary tables and other temporary working storage needs (for example, intermediate results of MOREINFO="NONE"group byID="IN104116"order by clausetempdb database and
 and MOREINFO="NONE"order by). The space in tempdb is shared among all users of all databases on the server.REMAP="BO--Body"Create temporary tables either by preceding the table name in a MOREINFO="NONE"create table statement with a pound sign (#), or by specifying the name prefix "tempdb..". ID="IN28117"Suffix namestemporary tableREMAP="BO--Body"Temporary tables created with a pound sign are accessible only by the current SQL Server session: users on other sessions cannot access them. These non-sharable temporary tables are destroyed at the end of the current session. The first 13 bytes of the table's name, including the pound sign (#), must be unique. SQL Server assigns the names of such tables a 17-byte number suffix. (You can see the suffix when you query tempdb..sysobjects.)ID="IN37118"Restarts, Servertemporary tables andREMAP="BO--Body"Temporary tables created with the "tempdb.." prefix are stored in tempdbID="IN83119"Rebooting, Server. See Restarts, Server
 and can be shared among SQL Server sessions. SQL Server does not change the names of temporary tables created this way. The table exists either until you reboot SQL Server, or until its owner drops it using MOREINFO="NONE"drop table. ID="IN73120"System proceduresSystem procedureson temporary tablestemporary tablesREMAP="BO--Body"System procedures (for example, MOREINFO="NONE"sp_help) work on temporary tables, but only if you use them from MOREINFO="NONE"tempdb. REMAP="BO--Body"If a stored procedure creates temporary tables, the tables are dropped when the procedure exits. Temporary tables can also be dropped explicitly before a session ends.REMAP="BO--Body"Each time you reboot SQL Server, it copies model to tempdb, clearing the database. Temporary tables are not recoverable.ID="IN112121"tempdb databasesize ofREMAP="BO--Body"The default size of MOREINFO="NONE"tempdb is 2 megabytes. Certain activities may make it necessary to increase the size of MOREINFO="NONE"tempdb. The most common of these are: MARK="BULL" REMAP="BU--Bullet"Large temporary tables.A lot of activity on temporary tables (which fills up MOREINFO="NONE"tempdb's logs).Large sorts, or many simultaneous sorts. Subqueries and aggregates with MOREINFO="NONE"group by also cause some activity in MOREINFO="NONE"tempdb.REMAP="BO--Body"You can increase the size of MOREINFO="NONE"tempdb with the MOREINFO="NONE"alter database command. MOREINFO="NONE"tempdb is initially created on the master device. Additional space can be added on the master device or on any other database device. ID="IN61122"Permissionstempdb databaseREMAP="BO--Body"No special permissions are required to use MOREINFO="NONE"tempdbID="IN57123"Tablestemporary
ID="INA72124"tempdb database
-that is, to create temporary tables or to execute commands that may require storage space in the temporary database. RENDERAS="SECT2"ID="IN65125"sybsecurity database
sybsecurity DatabaseID="IN63126"Auditingsybsecurity databaseREMAP="BO--Body"The sybsecurity database contains the audit system for SQL Server. It consists of:ID="IN11127"Audit trailMARK="BULL" REMAP="BU--Bullet"The sysaudits table, which contains the audit trail. All audit records are written into sysaudits.The sysauditoptions table, which contains rows describing the global audit options.All of the other default system tables, derived from model.REMAP="BO--Body"The audit system is discussed in LINKEND="X31147"Chapter 16,  "Auditing"
.RENDERAS="SECT2"ID="IN62128"pubs2 database
pubs2 Database   REMAP="BO--Body"Installing the sample database (MOREINFO="NONE"pubs2) is optional. Provided as a learning tool, MOREINFO="NONE"pubs2 is the basis of most of the examples in the SQL Server document set. The sample database is illustrated in LINKEND="X40724"Appendix C,  "The pubs2 Database"
. RENDERAS="SECT3"Using the Sample Database   REMAP="BO--Body"Many of the examples in the SQL Server documentation set are based on pubs2. See the System Administration Guide Supplement for your platform for information about installing pubs2.ID="IN64129"Guest userspubs2 database andREMAP="BO--Body"The sample database contains a guest user mechanism that allows any authorized SQL Server user to access it. The guest user has been given a fairly wide range of privileges in MOREINFO="NONE"pubs2, including permission to MOREINFO="NONE"select, MOREINFO="NONE"insert, MOREINFO="NONE"update, and MOREINFO="NONE"delete all the user tables. For more on the guest user mechanism, and a list of the guest permissions in MOREINFO="NONE"pubs2, see LINKEND="X11284"Chapter 4,  "Managing SQL Server Logins and Database Users"
. REMAP="BO--Body"If possible, each new user should be given a clean copy of MOREINFO="NONE"pubs2 so that she or he won't become confused by changes made by other users. pubs2 requires 2 megabytes. If you want it to be created on a specific database device, edit the MOREINFO="NONE"pubs2 database installation script. REMAP="BO--Body"If space is a problem, you could instruct users to issue the MOREINFO="NONE"begin transaction command before updating the sample database. After the user is finished updating, he or she can issue the MOREINFO="NONE"rollback transaction command in order to undo the changes.RENDERAS="SECT2"sybsyntax DatabaseID="IN52130"sybsyntax databaseREMAP="BO--Body"The syntax database, sybsyntax, contains the syntax of commands and language libraries for SYBASE products. Users can retrieve this information using the system procedure MOREINFO="NONE"sp_syntax. There are separate installation scripts for different SYBASE products.REMAP="BO--Body"See the System Administration Guide SupplementID="IN28131"System databases
ID="IN28132"Databasessystem
ID="IN60133"pubs2 database
 for your platform for information about installing this database.REMAP="BO--Body"NUMBER="2" ID="X92769"Roles in SQL ServerRENDERAS="SECT1"IntroductionID="IN711"Privileges. See Permissions
ID="IN302"RolesREMAP="BO--Body"In SQL Server uses can be granted special operational and administrative roles. Roles provide individual accountability for users performing system administration and security-related tasks. Roles are granted to individual server login accounts, and actions performed by these users can be audited and attributed to them.REMAP="BO--Body"These users gain their special status by being granted their roles with the MOREINFO="NONE"sp_role command. These roles are:MARK="BULL" REMAP="BU--Bullet"The System Administrator The System Security OfficerThe OperatorREMAP="BO--Body"In addition, there are two kinds of object owners, who gain special status because of the objects they own. These ownership types are:MARK="BULL" REMAP="BU--Bullet"The owner of a user database The owner of database objectsREMAP="BO--Body"All of these are discussed in the following sections. RENDERAS="SECT1"System and Security Administration RolesREMAP="BO--Body"The System Administrator, System Security Officer, and Operator roles are essential for managing SQL Server. REMAP="BO--Body"These roles are granted to individual users with the MOREINFO="NONE"sp_role command. See LINKEND="X71523""Granting and Revoking Roles" 
 for more information.REMAP="BO--Body"More than one login account on a SQL Server can be granted any role, and one account can possess more than one role.ID="IN403"RolesSystem AdministratorRENDERAS="SECT2"The System AdministratorID="IN454"System AdministratorREMAP="BO--Body"A System Administrator performs administrative tasks unrelated to specific applications. The System Administrator is not necessarily one individual; the role can be granted to any number of individual login accounts. In a large organization, the System Administrator's role may be carried out by several people or groups. It is important, however, that the System Administrator's functions be centralized or very well coordinated. ID="IN295"System Administratortasks ofRENDERAS="SECT3"System Administrator Tasks REMAP="BO--Body"System Administrator tasks include:MARK="BULL" REMAP="BU--Bullet"Installing SQL ServerManaging disk storageGranting permissions to SQL Server usersTransferring bulk data between SQL Server and other software programsModifying, dropping, and locking
 server login accountsMonitoring SQL Server's automatic recovery
 procedureDiagnosing system problems and reporting them as appropriateFine-tuning SQL Server by changing the configurable system parametersCreating user databases and granting ownership of themGranting and revoking the System Administrator roleSetting up groups (which are convenient in granting and revoking permissions) ID="IN656"System AdministratorpermissionsRENDERAS="SECT3"System Administrator Permissions REMAP="BO--Body"A System Administrator operates outside the object and command protection system-SQL Server does no permission checking when this user accesses objects. A System Administrator takes on the identity of Database Owner in any database he or she enters, including master, by assuming the user ID 1.REMAP="BO--Body"There are several commands and system procedures that only a System Administrator can issue, and on which permissions cannot be transferred to other users. For detailed information on System Administrator permissions, see LINKEND="X24272"Chapter 5,  "Managing User Permissions"
ID="IN437"System Administrator
ID="IN388"RolesSystem Administrator
. RENDERAS="SECT2"ID="IN299"RolesSystem Security Officer
ID="IN4810"System Security Officer
System Security OfficerID="IN3211"System Security Officertasks ofREMAP="BO--Body"The System Security Officer is responsible for security-sensitive tasks in SQL Server, such as:MARK="BULL" REMAP="BU--Bullet"Creating server login accountsGranting and revoking the System Security Officer and Operator rolesChanging the password of any accountSetting the password expiration intervalManaging the audit systemID="INA7112"System Security OfficerpermissionsREMAP="BO--Body"The System Security Officer has no special permissions on database objects, except in the sysaudits database where only a System Security Officer can access the sysauditsID="IN4613"System Security Officer
 table. There are also several system procedures that only a System Security Officer can execute and on which permissions cannot be transferred to other users. RENDERAS="SECT2"ID="IN1414"RolesOperator
ID="IN1915"Operator
The OperatorID="IN1716"Operatortasks ofREMAP="BO--Body"An operator is a user who can back up and load databases on a server-wide basis. The Operator role allows a single user to use the MOREINFO="NONE"dump database, dump transaction, MOREINFO="NONE"load database, and MOREINFO="NONE"load transaction commands to back up and restore all databases on a server without having to be the owner of each one. These operations can be performed in a single database by the Database Owner and the System Administrator.RENDERAS="SECT1"Data Ownership RolesREMAP="BO--Body"There are two types of owners recognized by SQL Server:MARK="BULL" REMAP="BU--Bullet"Database OwnersDatabase Object OwnersRENDERAS="SECT2"ID="IN4817"Database Owners
ID="IN9718"Owners. See Database object owners; Database Owners
Database Owner REMAP="BO--Body"The Database Owner is the creator of a database or someone to whom database ownership has been transferred. The System Administrator grants users the authority to create databases with the MOREINFO="NONE"grant command. ID="IN2619"Database Ownerslogin name
ID="IN9120"Ò dboÓ  user namedbo user nameREMAP="BO--Body"A Database Owner logs into SQL Server using his or her assigned login name and password. In other databases, that owner is known by his or her regular user name; in his or her own database SQL Server recognizes the user as "dbo." When SQL Server is installed, the "sa
ID="IN6221"master databaseownership of
" login is the Database Owner of the MOREINFO="NONE"master database. ID="IN2422"Database Ownerstasks ofRENDERAS="SECT3"Database Owner Tasks REMAP="BO--Body"The owner of a database may: MARK="BULL" REMAP="BU--Bullet"Run the system procedure MOREINFO="NONE"sp_adduser to allow other SQL Server users access to the databaseMOREINFO="NONE"grant other users permission to create objects and execute commands within the databaseREMAP="BO--Body"These tasks are discussed in LINKEND="X11284"Chapter 4,  "Managing SQL Server Logins and Database Users"
. RENDERAS="SECT3"Database Owner Permissions ID="IN5823"Database Ownerspermissions of
ID="IN9924"Transferring ownership. See Database objects, ownershipREMAP="BO--Body"The Database Owner has full permissions on objects inside the database that he or she owns. RENDERAS="SECT2"ID="IN9025"Database object owners
ID="IN14126"Database object ownersDatabase object ownersSee also Database Owners!see also Database Owners
ID="IN10927"ViewsViewsSee also Database objects!see also Database objects
ID="IN8528"Users, object. See Database object owners
ID="IN7829"User objects. See Database objects
ID="IN8430"Table Owners. See Database object owners
ID="IN15731"TriggersTriggersSee also Database objects; Stored procedures!see also Database objects; Stored procedures
ID="IN12132"Database objectsDatabase objectsSee also individual object names!see also
ID="IN17133"DatabasesDatabasesSee also Database objects; tempdb database; User databases!see also
ID="IN11534"DefaultsDefaultsSee also Database objects!see also Database objects
ID="IN14235"IndexesIndexesSee also Clustered indexes; Database objects; Non-clustered indexes!see also
ID="IN7336"Objects. See Database objects
ID="IN8537"Object owners. See Database object owners
ID="IN13738"Stored proceduresStored proceduresSee also Database objects; System procedures!see also
ID="IN8339"Stored procedure triggers. See Triggers
ID="IN10940"RulesRulesSee also Database objects!see also Database objects
Database Object Owner ID="IN1641"Database objects
ID="IN2642"Database objectsownership
ID="IN2843"Loginsdatabase object ownerREMAP="BO--Body"Database objects are tables, indexes, views, defaults, triggers, rules constraints and procedures. A user who creates a database object is its owner. The Database Owner must first grant the user permission to create the particular type of object. There are no special login names or passwords for database object owners.ID="IN3144"Database object ownerstasks ofRENDERAS="SECT3"Database Object Owner Tasks REMAP="BO--Body"The database object owner creates an object using the appropriate MOREINFO="NONE"create statement, and then grants permission to other users. ID="IN3345"Permissionsdatabase object owner
ID="IN5346"PermissionsobjectRENDERAS="SECT3"Database Object Owner Permissions ID="IN5947"Database objectsnames ofREMAP="BO--Body"The creator of a database object is automatically granted all permissions on it. System Administrators also have all permissions on the object, as long as they qualify the object name with the owner's name (for example, fred.table2ID="IN2648"Database objectsaccess to
). The owner of an object must explicitly grant permissions to other users before they can access it. Even the Database Owner cannot use an object directly unless the object owner grants him or her the appropriate permission. However, the Database Owner can always use the MOREINFO="NONE"setuserID="IN12049"Impersonating a user. See setuser command
 command to impersonate any other user in the database. When a database object is owned by someone other than the Database Owner, the user (including a System Administrator) must qualify the name of that object with the object owner's name-ownername.objectnameID="IN8650"Database object owners
-to access the object. If an object or a procedure needs to be accessed by a large number of users, particularly in ad hoc queries, having these objects owned by "dbo" greatly simplifies access. ID="IN5951"Ò saÓ  loginsa loginID="IN3052"RolesmanagementRENDERAS="SECT1"Managing Roles in SQL ServerREMAP="BO--Body"When it is installed, SQL Server includes an account called "sa" that is automatically granted the System Administrator, System Security Officer, and Operator roles during installation. The "sa" user is the Database Owner of the system databases. There are two ways to go from here:MARK="BULL" REMAP="BU--Bullet"You can use the "sa" account to perform all system administration and security-related functions. Any user who knows the "sa" password can use the account, and any actions performed can only be traced to "sa"; it is not possible to determine the individual user who was logged in as "sa".To increase accountability:ID="IN1553"LoginscreatingMARK="DASH" REMAP="BS--BulletSub"After installing SQL Server, use the "sa" account to create new server logins for users who are to be granted the System Administrator and System Security Officer roles. ID="IN3154"LockingaccountsStill logged in as "sa", grant the correct roles to these users using MOREINFO="NONE"sp_role.ID="IN1455"LoginslockingA user who has been granted the System Security Officer role can then log into his or her own account, lock the "sa" account (using MOREINFO="NONE"sp_locklogin), and create logins for other server users (using MOREINFO="NONE"sp_addlogin).ID="IN2256"Scriptspermissions on
If you decide to lock the "sa" account, be sure to check all scripts that may contain the "sa" login name and password. These can include scripts that perform backups, run MOREINFO="NONE"bcp, or perform MOREINFO="NONE"dbcc checking. The scripts cannot run if they are meant to run as "sa" and that account is locked. Change the logins in those scripts to the name of a user with the correct role.ID="IN6257"Granting roles with sp_roleID="IN2958"RolesgrantingID="X71523" RENDERAS="SECT2"Granting and Revoking RolesREMAP="BO--Body"The System Security Officer can grant the System Security Officer and Operator roles to other users, and the System Administrator can grant the System Administrator role. This is done with the ID="IN5959"sp_role system procedure
MOREINFO="NONE"sp_role system procedure. The syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_role {"grant" | "revoke"}, {sa_role | sso_role | oper_role}, login_nameREMAP="BO--Body"ID="IN9060"grant optionsp_role
MOREINFO="NONE"grantID="IN6261"Revoking roles with sp_role
 and MOREINFO="NONE"revoke specify whether you are granting or revoking the role. REMAP="BO--Body"The roles are MOREINFO="NONE"sa_role, MOREINFO="NONE"sso_role, or MOREINFO="NONE"oper_role. Only one role can be specified in each execution of MOREINFO="NONE"sp_role.REMAP="BO--Body"login_name is the name of the user to whom the role is being granted or revoked.REMAP="BO--Body"For example, this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_role "grant", sa_role, arthurREMAP="BO--Body"grants the role of System Administrator to "arthur". REMAP="BO--Body"When you grant a role to a user, it takes effect the next time the user logs into SQL Server. However, the user can immediately enable the role by using the MOREINFO="NONE"set role command. For example, this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"set role "sa_role" onREMAP="BO--Body"immediately enables the System Administrator role for the user.REMAP="BO--Body"You cannot revoke a role from a user while the user is logged in.ID="IN4662"System Security Officerlast remaining accountREMAP="BO--Body"You cannot lock or drop the last remaining System Security Officer's or System Administrator's account. The system procedures MOREINFO="NONE"sp_droplogin, MOREINFO="NONE"sp_locklogin, and MOREINFO="NONE"sp_role ensure that there is always at least one unlocked login that possesses the System Security Officer role, and one that possess the System Administrator role. ID="IN7363"Rolesset andRENDERAS="SECT2"Turning Your Roles On and OffREMAP="BO--Body"When you log into SQL Server, all roles granted to you are automatically enabled. Use the MOREINFO="NONE"role option of the MOREINFO="NONE"set command to turn any of your roles off or back on again for your current session. The syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set role "{sa_role | sso_role | oper_role}" {on | off}REMAP="BO--Body"This can be useful if, for example, you have been granted the System Administrator role, which means that you assume the identity of Database Owner within any database that you use. If you wish to assume your "real" user identity, execute this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"set role "sa_role" offREMAP="BO--Body"If you are granted a role during a session and wish to activate it immediately, use MOREINFO="NONE"set role to turn it on.RENDERAS="SECT2"Checking for RolesREMAP="BO--Body"The following sections describe commands and procedures that allow you to check roles granted to yourself or others.RENDERAS="SECT3"Displaying Login Account InformationID="IN3764"Loginsdisplaying account information
ID="IN6765"sp_displaylogin system procedureREMAP="BO--Body"You can use the MOREINFO="NONE"sp_displaylogin system procedure to display information about a login account. The syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_displaylogin [login_name]REMAP="BO--Body"If you are not a System Security Officer or System Administrator, you can get information only about your own account and you do not need to use the login_name parameter. MOREINFO="NONE"sp_displaylogin displays your server user ID
, login name, full name, roles, date of last password change, and whether your account is locked. REMAP="BO--Body"If you are a System Security Officer or System Administrator, you can use the login_name parameter to access information about any login.RENDERAS="SECT3"The show_role FunctionID="IN7766"show_role system functionREMAP="BO--Body"The MOREINFO="NONE"show_role function displays any roles that are currently enabled for your login session. The syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"select show_role()REMAP="BO--Body"It returns NULL if you have no roles enabled.ID="IN2767"Rolesstored procedures andRENDERAS="SECT3"Checking for Roles in Stored Procedures: the proc_role FunctionREMAP="BO--Body"UseID="IN12768"proc_role system function
ID="IN3969"Stored procedureschecking for roles in
ID="IN4970"Stored proceduresgranting permission to roles on
MOREINFO="NONE" proc_role within a stored procedure to guarantee that only users with a specific role can execute it. While MOREINFO="NONE"grant execute can also restrict execute permission on a stored procedure, users without the required role might inadvertently be granted permission to execute it. Only MOREINFO="NONE"proc_role provides a fail-safe way to prevent inappropriate access to a particular stored procedure.REMAP="BO--Body"MOREINFO="NONE"proc_role takes a string for the required role (MOREINFO="NONE"sso_role, sa_role, or MOREINFO="NONE"oper_role) and returns 1 if the invoker possesses it. Otherwise, it returns 0.REMAP="BO--Body"For example, here is a procedure that uses MOREINFO="NONE"proc_role to see if the user has the MOREINFO="NONE"sa_role role:ID="IN2871"Roles
ID="IN2872"RolesmanagementREMAP="UI--UserInput" FORMAT="LINESPECIFIC"create proc test_procasif (proc_role("sa_role") = 0)begin    print "You don't have the right role"    return -1endelse    print "You have SA role"    return 0REMAP="BO--Body"NUMBER="3" ID="X45883"Managing Physical ResourcesRENDERAS="SECT1"IntroductionID="IN961"Physical resources, managing. See Storage managementREMAP="BO--Body"SQL Server is designed to make reasonable default decisions about many aspects of storage management-where databases, tables, and indexes are placed, and how much space is allocated for each of them. However, the System Administrator has control over the physical placement of databases, tables, indexes, and the allocation of space to them. REMAP="BO--Body"In addition, after an application has stabilized and its data-handling requirements have been determined, SQL Server provides ways to refine storage management. These refinements are not an essential aspect of data definition, but a means of improving performance. ID="IN242"Storage managementabout
ID="IN1153"CachesCachesSee also Storage management!see also Storage management
ID="IN1174"Linkage, pageLinkage, pageSee also Pages (data)!see also Pages (data)REMAP="BO--Body"This chapter covers these aspects of storage management: ID="IN1475"Allocation unitsAllocation unitsSee also Size; Space allocation!see also Size; Space allocation
ID="INA996"Database device space. See Segments; Space allocation
ID="IN2067"database size configuration variabledatabase size configuration variableSee also Space allocation!see also Space allocation
ID="IN1958"Disk devicesDisk devicesSee also Database devices; Dump devices; Space allocation!see also Database devices; Dump devices; Space allocation
ID="IN1059"Management, space. See Space allocation; Storage management
ID="INA11110"MemoryMemorySee also Space allocation!see also Space allocation
ID="IN7511"Running out of space. See Space
ID="IN15512"SegmentsSegmentsSee also Database devices; Space allocation!see also Database devices; Space allocation
ID="INA8513"SizeSizeSee also Space!see also Space
ID="IN12514"SpaceSpaceSee also Size; Space allocation!see also Size; Space allocation
ID="IN19915"Space allocationSpace allocationSee also Database devices; Segments; Storage management!see also Database devices; Segments; Storage management
ID="IN17316"Storage managementStorage managementSee also Caches; Space; Space allocation!see also Caches; Space; Space allocationMARK="BULL" REMAP="BU--Bullet"Issues in storage management decisions The system tables that manage storage ID="IN12917"DevicesDevicesSee also Database devices; Dump devices; Master device!see also
ID="IN9818"Disks. See Database devices; Devices; Dump devices
ID="IN12519"Master deviceMaster deviceSee also Database devices!see also Database devices
ID="IN20920"disk reinit commanddisk reinit commandSee also disk init command!see also disk init commandInitializing database devices Designating default database
 devices ID="IN12521"Disabling mirroring. See disk unmirror command
ID="IN8322"Unmirroring devices. See Disk mirroring
ID="IN19323"Database devicesDatabase devicesSee also Disk mirroring; Dump devices; Master device!see also Disk mirroring; Dump devices; Master device
ID="IN17224"disk remirror commanddisk remirror commandSee also Disk mirroring!see also Disk mirroring
ID="IN17225"disk unmirror commanddisk unmirror commandSee also Disk mirroring!see also Disk mirroring
ID="IN7526"Duplication. See Disk mirroring
ID="IN19327"master databasemaster databaseSee also Disk mirroring; System tables!see also Disk mirroring; System tables
ID="IN7328"Mirroring. See Disk mirroring
ID="IN11129"RecoveryRecoverySee also Disk mirroring!see also Disk mirroring
ID="INA8030"Redundancy, full. See Disk mirroring
ID="IN9131"Transaction log duplication. See Disk mirroringDisk mirroring for nonstop recovery in case of physical disk crashesCreating user databases with the MOREINFO="NONE"create database command Putting the transaction log
 on a separate device with the MOREINFO="NONE"log MOREINFO="NONE" on clause to ID="IN20832"Transaction logsTransaction logsSee also dump transaction command; syslogs table!see also
MOREINFO="NONE"create databaseID="IN7033"Logs. See Transaction logs
ID="IN14134"TransactionsTransactionsSee also Locks; Transaction logs!see also Locks; Transaction logs
ID="IN7735"Current log. See Transaction logs
 ID="IN22736"alter database commandalter database commandSee also create database command!see also create database commandEnlarging user databases with the MOREINFO="NONE"alter database command Removing databases with the MOREINFO="NONE"drop database command ID="IN7537"Database segments. See Segments
ID="IN7238"Labels, device. See Segments
ID="IN7439"Pointers, device. See Segments
ID="IN12940"User segments, creatingUser segments, creatingSee also Segments!see also SegmentsCreating and using segments Finding information on storageREMAP="BO--Body"Responsibility for storage allocation and management is often centralized. In most installations, the System Administrator retains complete control over these matters.RENDERAS="SECT1"Commands for Managing ResourcesREMAP="BO--Body"LINKEND="X69136"Table 3-1
ID="INA3541"Storage managementcommands summary
 illustrates the major commands a System Administrator uses to manage the allocation of physical resources.TOCENTRY="1"LBL="Table 3-1: " ID="X69136"Commands for Allocating Physical Resources COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="17*"COLNAME="C2" COLWIDTH="23*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CommandCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"TaskVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"disk init
    name = "dev_name"
MOREINFO="NONE"    physname = "phys_name"
    MOREINFO="NONE"etc.COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Makes a physical device available to a 
particular SQL Server. Assigns a database device name (dev_name) used to identify the 
device in other SQL Server commands.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"disk mirror    MOREINFO="NONE"name = "dev_name"
   MOREINFO="NONE" mirror = "phys_name"   MOREINFO="NONE" etc.COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mirrors a database device on a specific 
physical device.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_diskdefault "dev_name"   
    MOREINFO="NONE"etc.COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Adds dev_name to the general pool of 
default database space.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create database ... on dev_name 
or 
MOREINFO="NONE"alter database ... on dev_nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Makes database devices available to a 
particular SQL Server database. The MOREINFO="NONE"log on clause to MOREINFO="NONE"create database places the 
database's logs on a particular database 
device.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create database ...  
or
MOREINFO="NONE"alter database ...COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"When used without theMOREINFO="NONE" on dev_name 
clause, these commands allocate space on 
the default database devices.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_addsegment seg_name, 
    dbname, devname  
and
MOREINFO="NONE"sp_extendsegment seg_name,
    dbname, devnameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Creates a segment, named collection of 
space, from the devices available to a 
particular database.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create table ... on seg_name  
or
MOREINFO="NONE"create index ... on seg_nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Creates database objects, placing them on a 
specific segment of the database's assigned 
disk space.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create table ...  
or 
MOREINFO="NONE"create index ...COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"When used without MOREINFO="NONE"on seg_name, tables 
and indexes occupy the general pool of 
space allocated to the database (the default 
devices).
ID="IN3942"Storage managementissuesRENDERAS="SECT1"Considerations in Storage Management Decisions REMAP="BO--Body"ID="IN5543"Space allocationrecovery/performance and
The System Administrator of a SQL Server installation must make many decisions regarding the physical allocation of space to SQL Server databases. The major considerations in these choices are: MARK="BULL" REMAP="BU--Bullet"Recovery: Disk mirroring and/or maintaining logs on a separate physical device provide two mechanisms for full recovery in the event of physical disk crashes. PerformanceID="IN3044"Performancedisk mirroring and
: For certain tables or databases where speed of disk reads and writes is crucial, properly assigning database objects to physical devices yields performance improvements. Disk mirroring will slow the speed of disk writes. RENDERAS="SECT2"Recovery ID="INA3745"Database objectsassigning to devices
ID="IN2946"Recoveryspace allocation andREMAP="BO--Body"Recovery is the key motivation for using several disk devices. Non-stop recovery can be accomplished by mirroring database devices. Full recovery can also be ensured by storing a database's log on a separate physical device. RENDERAS="SECT3"ID="INA2247"Devicesusing separate
ID="IN3348"Transaction logsdevice placement
Keeping Logs on a Separate Device ID="IN10749"create database commandlog on option
ID="IN9950"log on optioncreate databaseREMAP="BO--Body"Unless a database device is mirrored, full recovery in case of media failure requires that a database's transaction log be stored on a different device from the actual data (including indexes) of a database. You can use the MOREINFO="NONE"log  MOREINFO="NONE"on clause of MOREINFO="NONE"create database to guarantee that log records will be stored on a separate device. In the event of a hard disk crash, an up-to-date database can be recreated by loading a dump of the database, and then applying the log records which were safely stored on another device. ID="INA2751"Disk mirroringrecovery andRENDERAS="SECT3"Mirroring ID="IN3552"Non-stop recoveryREMAP="BO--Body"Non-stop recovery in the event of a hard disk crash is guaranteed through the mechanism of mirroring SQL Server devices to a separate physical disk. Mirroring the database devices containing the actual data and indexes (not just the device containing the transaction log) is required for recovery without downtime. ID="IN2153"Performancespeed and
ID="IN3754"Speed (Server)system performance andRENDERAS="SECT2"Performance ID="IN3555"Database devicesplacing objects on
ID="IN3256"Performancespace allocation andREMAP="BO--Body"System performance can be improved by placing logs and database objects on separate devices: ID="INA2657"Reads and writes, physicalMARK="BULL" REMAP="BU--Bullet"Placing a table on one hard disk and non-clustered indexes on another ensures that physical reads and writes are faster, since the work is split between two disk drives. ID="IN6758"Tablessplitting across two disksSplitting large tables across two disks can improve performance, particularly for multi-user applications. ID="IN5359"Space allocationrecovery/performance and
ID="IN3760"Storage managementissues
ID="IN4361"Storage managementdefaults at installation
ID="IN14362"d_masterd_masterSee also Master device!see also Master deviceRENDERAS="SECT1"Status and Defaults at Installation Time ID="IN3563"ServersinstallingREMAP="BO--Body"Installing SQL Server is covered in a separate document, the SQL Server Installation Guide
. The installation program and scripts initialize the master device and set up the MOREINFO="NONE"master, MOREINFO="NONE"model, sybsystemprocs, sybsecurity, and temporary databases for you. REMAP="BO--Body"When you first install SQL Server: ID="IN5864"master databasecreating
ID="IN5865"Creatingmaster databaseMARK="BULL" REMAP="BU--Bullet"The MOREINFO="NONE"masterID="IN5766"Creatingmodel database
ID="IN5767"model databasecreating
, modelID="IN5868"tempdb databasecreating
ID="IN5869"Creatingtempdb database
, and MOREINFO="NONE"tempdb databases are installed on the master device d_master.The sybsystemprocs database is installed on a device that you choose at installation time.ID="IN3570"Creatingsegments
ID="IN4971"Segmentssystem
ID="IN4872"system segmentThree segments are created in each database: MOREINFO="NONE"systemID="IN4973"default segment
ID="IN5074"Segmentsdefault
, MOREINFO="NONE"default, and ID="IN5675"logsegment log storage
ID="IN5376"Segmentslogsegment
MOREINFO="NONE"logsegment.ID="IN4177"Defaultssystem databases at installation
ID="IN2578"Database devicesnames ofThe default storage device for all user-created databases is ID="IN4279"d_master
MOREINFO="NONE"d_master. If you have chosen to install the audit database, sybsecurity, it is located on its own device.RENDERAS="SECT1"ID="IN11180"Storage managementsystem tables and
The System Tables that Manage Storage REMAP="BO--Body"Two system tables in the MOREINFO="NONE"master database and two more in each user database track the placement of databases, tables (including the transaction log table, MOREINFO="NONE"syslogs), and indexes. The relationship between the tables is illustrated in LINKEND="X82754"Figure 3-1
.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig3_1.xwd"LBL="Figure 3-1: " ID="X82754" The System Tables that Manage StorageID="IN6481"sysdevices table
ID="IN6782"Dump devicessysdevices table andRENDERAS="SECT2"The sysdevices TableREMAP="BO--Body"The MOREINFO="NONE"sysdevices table in the MOREINFO="NONE"master database contains one row for each database device and may contain a row for each dump device (tape, disk, or operating system file) available to SQL Server. ID="IN5283"disk init commandREMAP="BO--Body"The MOREINFO="NONE"disk init command adds entries for database devices to MOREINFO="NONE"master..sysdevices. Dump devices, added with the system procedure MOREINFO="NONE"sp_addumpdevice, are discussed in LINKEND="X31864"Chapter 7,  "Developing a Backup and Recovery Plan"
. ID="IN6184"Namesdevice, in sysdevicesREMAP="BO--Body"sysdevices stores two names for each device:MARK="BULL" REMAP="BU--Bullet"A "logical name" or "device name" to be used in all subsequent storage-management commands, stored in the name column of sysdevices. This is usually a user-friendly name, perhaps indicating the planned use for the device, for example "logdev" or "userdbdev".ID="IN5285"disk init commandThe "physical name", the actual operating system name of the device. You only use this name in the ID="IN9986"sysdevices tabledisk init and
MOREINFO="NONE"disk init command; after that, all SQL Server data storage commands use the logical name.ID="IN3387"Transaction logsdevice placement
ID="IN7188"Transaction logscreate database and
ID="IN7589"alter database commandsystem tables and
ID="IN6890"System tablescreate database andREMAP="BO--Body"You place a database or transaction log on one or more devices by specifying the logical name of the device in MOREINFO="NONE"create databaseID="IN7091"Transaction logsalter database and
ID="IN7592"alter database commandsystem tables and
 or MOREINFO="NONE"alter databaseID="IN9993"log on optioncreate database
 statements. The MOREINFO="NONE"log MOREINFO="NONE" on clause to MOREINFO="NONE"create database places a database's transaction log on a separate device (a must to ensure full recoverability). The log device must also have an entry in MOREINFO="NONE"sysdevices before you can use MOREINFO="NONE"log  MOREINFO="NONE"onID="IN6294"sysdevices table
. REMAP="BO--Body"A database can reside on one or more devices, and a device can store one or more databases.ID="IN4995"sysusages tableRENDERAS="SECT2"The sysusages TableID="IN6696"Space allocationsysusages tableREMAP="BO--Body"The MOREINFO="NONE"sysusages table in the MOREINFO="NONE"masterID="IN15097"master..sysusages. See sysusages table
 database keeps track of all of the space that you assign to all SQL Server databases. REMAP="BO--Body"MOREINFO="NONE"create database and MOREINFO="NONE"alter database allocate new space to the database by adding a row to MOREINFO="NONE"sysusages for each database device or device fragment. When you allocate only a portion of the space on a device with MOREINFO="NONE"create or MOREINFO="NONE"alter databaseID="IN8998"Database devicesfragments
, that portion is called a fragment.ID="IN6599"sp_addsegment system procedureREMAP="BO--Body"The system procedures MOREINFO="NONE"sp_addsegmentID="IN66100"sp_dropsegment system procedure
, MOREINFO="NONE"sp_dropsegmentID="IN68101"sp_extendsegment system procedure
, and MOREINFO="NONE"sp_extendsegmentID="IN47102"segmap column
 change the MOREINFO="NONE"segmap column in MOREINFO="NONE"sysusages for the device that is mapped or unmapped to a segment. ID="IN51103"syssegments tableRENDERAS="SECT2"The syssegments TableID="IN60104"Segmentssyssegments tableREMAP="BO--Body"The MOREINFO="NONE"syssegmentsID="IN19105"Segments
 table, one in each database, lists the segments in a database. A segment is a collection of the database devices and/or fragments available to a particular database. Tables and indexes can be assigned to a particular segment, and thereby to a particular physical device, or can span a set of physical devices. REMAP="BO--Body"MOREINFO="NONE"create database makes default entries in MOREINFO="NONE"syssegments. The system procedures MOREINFO="NONE"sp_addsegment and MOREINFO="NONE"sp_dropsegment add and remove entries from MOREINFO="NONE"syssegments. ID="IN50106"sysindexes tableRENDERAS="SECT2"The sysindexes TableREMAP="BO--Body"The MOREINFO="NONE"sysindexes table lists each table and index, and the segment where each table, clustered index
, nonclustered index, and each chain of text pages is stored. ID="IN56107"Rows, tablesysindexesREMAP="BO--Body"New rows are created in MOREINFO="NONE"sysindexes by MOREINFO="NONE"create tableID="IN55108"create index command
 and MOREINFO="NONE"create indexID="IN107109"Storage managementsystem tables and
 commands. ID="IN27110"Database devicesID="X59117" RENDERAS="SECT1"Initializing Database Devices ID="IN63111"Storage managementdatabase device initialization
ID="IN18112"DevicesREMAP="BO--Body"A database device stores the objects that make up databases. The term device does not necessarily refer to a distinct physical device: it can refer to any piece of disk (such as a partition) or a file in the file system used to store databases and their objects. ID="IN122113"Initializingdatabase devicesREMAP="BO--Body"Each database device or file must be prepared and made known to SQL Server before it can be used for database storage. This process is called initialization. REMAP="BO--Body"Once a database device is initialized, it can be: MARK="BULL" REMAP="BU--Bullet"Allocated to the pool of space available to a user database Allocated to a user database, and assigned to store a specific database object or objectsUsed to store a database's transaction logsDesignated as a default device for MOREINFO="NONE"create and MOREINFO="NONE"alter database commands ID="IN104114"Addingdatabase devices
ID="IN77115"disk init commandREMAP="BO--Body"A System Administrator initializes new database devices with the MOREINFO="NONE"disk init command. MOREINFO="NONE"disk init does the following: ID="IN36116"Mappingdevice name to physical nameMARK="BULL" REMAP="BU--Bullet"Maps the specified physical disk device or operating system file to a "database device" nameLists the new device in MOREINFO="NONE"master..sysdevicesPrepares the device for database storage Before you run MOREINFO="NONE"disk init, see the System Administration Guide Supplement for your platform for information about choosing a database device and preparing it for use with SQL Server. You may wish to re-partition the disks on your computer to provide maximum performance for your SYBASE databases. REMAP="BO--Body"ID="IN34117"Allocation unitspage
MOREINFO="NONE"disk initID="IN44118"Sizeallocation units
 divides the database devices into allocation units of 256 2K pages, a total of a half megabyte (on Stratus, 256 4K pages, one megabyte). In each 256-page allocation unit, the MOREINFO="NONE"disk init command initializes the first page as the allocation page, which will contain information about the database (if any) that resides on the allocation unit.ID="IN58119"Recoverymaster database
ID="IN105120"dump database commanddisk init andAfter you run the MOREINFO="NONE"disk init command, be sure to use MOREINFO="NONE"dump database to dump the master database. This makes recovery easier and safer in case master is damaged. If you add a device and fail to back up master, you may be able to recover the changes with MOREINFO="NONE"disk reinit. See LINKEND="X40994"Chapter 9,  "Backing Up and Restoring the System Databases"
.  RENDERAS="SECT2"disk init Syntax REMAP="BO--Body"Here's the syntax of the MOREINFO="NONE"disk init command: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"disk init name = "MOREINFO="NONE"device_name" , physname = "MOREINFO="NONE"physicalname" , vdevno = MOREINFO="NONE"virtual_device_number , size = MOREINFO="NONE"number_of_blocks [, vstart = MOREINFO="NONE"virtual_address ,     cntrltype = MOREINFO="NONE"controller_number][, contiguous] MOREINFO="NONE"(OpenVMS only)RENDERAS="SECT3"disk init ExamplesREMAP="BO--Body"On UNIX:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"disk init   name = "user_disk",   physname = "/dev/rxy1a",   vdevno = 2, size = 5120 REMAP="BO--Body"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"disk init name = "user_disk", physname = "disk$rose_1:[dbs]user.dbs", vdevno = 2, size = 5120, contiguousRENDERAS="SECT3"Specifying a Logical Device Name with disk init ID="IN34121"NamesdeviceREMAP="BO--Body"The device_name must be a valid identifier
. This name is used in the MOREINFO="NONE"create database and MOREINFO="NONE"alter database commands, and in the system procedures that manage segments. The logical device name is known only to SQL Server, not to the computer system on which the server runs. RENDERAS="SECT3"Specifying a Physical Device Name with disk initID="IN52122"Database devicesnames ofREMAP="BO--Body"The physicalnameID="IN34123"UNIX platforms, raw disk partition
ID="IN16124"Partitions, disk
 of the database device gives the name of a raw disk partition (UNIXID="IN30125"OpenVMS systemsforeign device
) or foreign device (OpenVMS), or the name of an operating system file. On PC platforms you can use only operating system filenames for the physicalname.RENDERAS="SECT3"Choosing a Device Number for disk initREMAP="BO--Body"ID="IN41126"Numbersdevice
ID="IN93127"vdevno optiondisk init
MOREINFO="NONE"vdevno ID="IN13128"Master device
is an identifying number for the database device. It must be unique among devices used by SQL Server. Device number 0 represents the device named MOREINFO="NONE"d_master, that stores the system catalogs. Legal numbers are between 1 and 255, but the highest number must be one less than the number of database devices for which your system is configured. For example, for a system with the default configuration of 10 devices, the legal device numbers are 1 through 9. To see the configuration value for your system, execute MOREINFO="NONE"sp_configure devices, without giving a second parameter, and check the run_value, the last column in the output:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure devicesREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"name            minimum  maximum  config_value run_value--------------- -------- -------- ------------ ---------devices                4      256            0        10REMAP="BO--Body"To see the numbers already in use for MOREINFO="NONE"vdevno, look in the MOREINFO="NONE"device_number column of the report from MOREINFO="NONE"sp_helpdevice, or, the following query lists all the device numbers currently in use: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select distinct low/16777216     from sysdevices     order by low ID="IN66129"Devicesoperating system constraintsREMAP="BO--Body"SQL Server is originally configured for 10 devices. You may be limited to a smaller number of devices by operating system constraints. See the discussion of MOREINFO="NONE"sp_configure, which is used to change configuration options, in LINKEND="X26541"Chapter 12,  "Fine-Tuning Performance and Operations"
.REMAP="BO--Body"If you issue a MOREINFO="NONE"disk init that does not succeed for any reason, and you need to re-issue the MOREINFO="NONE"disk init command, you must either use a different value for MOREINFO="NONE"vdevno, or you must restart SQL Server.RENDERAS="SECT3"Specifying the Device Size with disk initID="IN20130"Sizedatabase device
ID="IN91131"size optiondisk initREMAP="BO--Body"The MOREINFO="NONE"size of the database device must be given in 2K blocks (4K on Stratus). There are 512 2K blocks (256 4K blocks) in a megabyte. ID="IN53132"model databasesize
ID="IN53133"Sizemodel databaseREMAP="BO--Body"If you are planning to use the new device for the creation of a new database, the minimum MOREINFO="NONE"size is the larger of:MARK="BULL" REMAP="BU--Bullet"The size of MOREINFO="NONE"model. When you install SQL Server, model uses 2 megabytes, 1024 2K blocks. Use MOREINFO="NONE"sp_helpdb model to see the current size of model.The configuration value MOREINFO="NONE"database size. Use MOREINFO="NONE"sp_configure and look at the run_value for MOREINFO="NONE"database size.REMAP="BO--Body"If you are initializing a database device for a transaction log or for storing small tables or indexes on a segment, the MOREINFO="NONE"size can be as small as 512 2K blocks (1 megabyte).REMAP="BO--Body"If you are initializing a raw device (UNIX) or foreign device (OpenVMS), determine the size of the device from your operating system as described in the System Administration Guide Supplement for your platform. Use the maximum size available; once you have initialized the disk for use by SQL Server, you cannot use any space on the disk for other purposes.REMAP="BO--Body"MOREINFO="NONE"disk init uses MOREINFO="NONE"sizeID="IN20134"Virtual page numbers
 to compute the value for the high virtual page number in MOREINFO="NONE"sysdevices.high. RENDERAS="SECT3"Optional Parameters for disk initREMAP="BO--Body"ID="IN93135"vstart optiondisk init
MOREINFO="NONE"vstartID="IN15136"Virtual address
 is the starting virtual address, or the offset in 2K blocks, for SQL Server to begin using the database device. The default value (and usually the preferred value) of MOREINFO="NONE"vstart is zero.ID="IN96137"cntrltype optiondisk initREMAP="BO--Body"The optional MOREINFO="NONE"cntrltypeID="IN16138"Disk controllers
 keyword specifies the disk controller. Its default value is zero. Reset it only if instructed to do so. REMAP="BO--Body"ID="IN71139"OpenVMS systemscontiguous option on
ID="IN107140"contiguous option (OpenVMS)disk init
MOREINFO="NONE"contiguousID="IN27141"Space allocationcontiguous
, an option for OpenVMS systems only, forces the database file to be created contiguously.ID="IN56142"Permissionsdisk initTo perform disk initialization
ID="IN75143"disk init command
ID="IN116144"Initializingdatabase devices
, the user who started SQL Server must have the appropriate operating system permissions on the device that is being initialized. (This does not apply to SQL Servers running on PCs.) RENDERAS="SECT2"ID="IN98145"Devicesadding
Getting Information about Devices ID="IN103146"sysdevices tablesp_helpdevice and
ID="IN65147"sp_helpdevice system procedureREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_helpdeviceID="IN61148"sysdevices table
 provides information about the devices in the sysdevices table.REMAP="BO--Body"When used without a device name, MOREINFO="NONE"sp_helpdevice lists all the devices available on SQL Server. When used with a device name, it lists information about that device. Here MOREINFO="NONE"sp_helpdevice is used to report information on the master device: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpdevice master REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"device_name  physical_name  description -----------  -------------- ------------------------------------------master       d_master       special, default disk, physical disk, 20 MBREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"status      cntrltype    device_number     low      high ------      ----------   --------------    ------   ------- 3           0            0                 0        9999ID="IN100149"Information (Server)database devices
ID="IN31150"Devicesinformation listings on
ID="IN100151"master databasesysdevices tableREMAP="BO--Body"Each row in master..sysdevices describes:ID="INA30152"Dump devicesinformation aboutMARK="BULL" REMAP="BU--Bullet"A dump device (tape, disk, or file) to be used for backing up databases, orID="IN34153"Database devicesinformation aboutA database device to be used for database storage. REMAP="BO--Body"The initial contents of MOREINFO="NONE"sysdevices are operating-system dependent. Entries in MOREINFO="NONE"sysdevices usually include: ID="IN56154"Master deviceMARK="BULL" REMAP="BU--Bullet"One for MOREINFO="NONE"d_master.One for the sybsystemprocs database, which you can use to store additional databases such as pubs2 and sybsyntax, or for user databases and logs.Two for tape dump devices.REMAP="BO--Body"If you installed auditing, there will also be a separate device for sybsecurity.REMAP="BO--Body"The MOREINFO="NONE"low and MOREINFO="NONE"highID="IN93155"status bits in sysdevices
 fields represent the page numbers that have been assigned to the device. For dump devices, they represent the media capacity of the device. ID="IN99156"Numbersstatus bit (sysdevices)REMAP="BO--Body"The MOREINFO="NONE"statusID="IN62157"sysdevices tablestatus bits
 field in MOREINFO="NONE"sysdevicesID="INA87158"create database commandomitting database device and
 is a bitmap which indicates the type of device, whether a disk device will be used as a default storage device when users issue a MOREINFO="NONE"createID="IN86159"alter database commandomitting database device and
 or MOREINFO="NONE"alter database command without specifying a database device, and disk mirroring information. Here are the bits and their meanings: TOCENTRY="1"LBL="Table 3-2: "Status Bits in sysdevicesCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="7*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BitCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MeaningVALIGN="TOP"COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"default disk, may be used by any MOREINFO="NONE"create or MOREINFO="NONE"alter 
database command that doesn't specify a locationCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"physical diskCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"4COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"logical disk (not used)COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"8COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"skip headerCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"16COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump deviceCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"32COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"serial writesCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"64COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"device mirroredCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"128COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"reads mirroredCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"256COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"secondary mirror side onlyCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"512COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"mirror enabledCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"2048COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"used internally; set after MOREINFO="NONE"disk unmirror, MOREINFO="NONE"side = retainID="IN61160"Storage managementdatabase device initialization
ID="IN33161"DevicesdroppingRENDERAS="SECT2"Dropping Devices REMAP="BO--Body"To drop ID="IN51162"Database devicesdropping
ID="IN43163"Droppingdump devices
database and dump devices, use the system procedure ID="IN76164"sp_dropdevice system procedure
MOREINFO="NONE"sp_dropdevice. The syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_dropdevice MOREINFO="NONE"device_name REMAP="BO--Body"You cannot drop a device that is in use by a database. You must drop the database first. REMAP="BO--Body"ID="IN103165"sysdevices tablesp_dropdevice and
MOREINFO="NONE"sp_dropdevice removes the device name from sysdevices. MOREINFO="NONE"sp_dropdeviceID="IN42166"Deletingfiles
 does not remove an operating system file that is being dropped as a database device: it only makes the file inaccessible to SQL Server. You must use operating system commands to delete a file after using MOREINFO="NONE"sp_dropdevice. ID="IN81167"Server restarts. See Restarts, Server
ID="IN16168"Restarts, Server
ID="IN21169"Virtual device number
ID="IN46170"Master deviceremoving from default space poolREMAP="BO--Body"You must restart SQL Server after you drop a device because the server has a process that is accessing the dropped device; there is no other way to kill the process. Restarting frees up the virtual device number. Stop the server with MOREINFO="NONE"shutdownID="IN62171"startserver utility command
; restart it with MOREINFO="NONE"startserver. See the SQL Server Utility Programs manual for information on the MOREINFO="NONE"startserver utility. REMAP="BO--Body"If a MOREINFO="NONE"disk init fails for any reason, you may also need to restart SQL Server to free up the virtual device number. ID="IN82172"Databasesdefault storage for
ID="IN57173"Storage managementdefault database devices
ID="IN38174"Database devicesdefaultRENDERAS="SECT1"Designating Default Devices ID="IN91175"sp_diskdefault system procedureREMAP="BO--Body"To create a pool of default database devices to be used by all SQL Server users for creating databases, use the MOREINFO="NONE"sp_diskdefault command after the devices are initialized with MOREINFO="NONE"disk init. MOREINFO="NONE"sp_diskdefault marks these devices in MOREINFO="NONE"sysdevicesID="IN86176"alter database commandomitting database device and
ID="IN87177"create database commandomitting database device and
 as default devices. Whenever users create databases (or alter databases) without specifying a database device, new disk space is allocated from the pool of default disk space. REMAP="BO--Body"The syntax for MOREINFO="NONE"sp_diskdefault is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_diskdefault MOREINFO="NONE"device_name, {defaulton | defaultoff} ID="IN67178"Master devicesp_diskdefault and
ID="IN93179"Droppingmaster device from default space pool
ID="IN115180"defaulton | defaultoff option, sp_diskdefaultREMAP="BO--Body"You are most likely to use the MOREINFO="NONE"defaultoff option in order to remove the master device from the pool of default space: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_diskdefault master, defaultoffREMAP="BO--Body"The following command makes sprocdev, the device that holds the sybsystemprocs database, a default device:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_diskdefault sprocdev, defaultonREMAP="BO--Body"A SQL Server can have multiple default devices. They are used in the order in which they appear in the MOREINFO="NONE"sysdevices table (i.e., alphabetical order). When the first default device is filled, the second default device is used, and so on. RENDERAS="SECT2"Choosing Default and Non-Default DevicesREMAP="BO--Body"MOREINFO="NONE"sp_diskdefault lets you plan space usage carefully for performance and recovery, while allowing users to create or alter databases occasionally. REMAP="BO--Body"Make sure these devices are not default devices:MARK="BULL" REMAP="BU--Bullet"The master device (use MOREINFO="NONE"sp_diskdefault to set MOREINFO="NONE"defaultoff after adding user devices)The device for sybsecurityAny device intended solely for logsDevices where high-performance databases reside, perhaps using segmentsREMAP="BO--Body"You can use the device that holds sybsystemprocs for other user databases.If you're using disk mirroring or segments, you should exercise caution in deciding which devices you add to the default list with MOREINFO="NONE"sp_diskdefault.  ID="IN89181"sp_diskdefault system procedure
ID="IN36182"Database devicesdefault
ID="IN78183"Databasesdefault storage for
ID="IN55184"Storage managementdefault database devices
In most cases, devices that are to be mirrored or databases that will contain objects placed on segments should allocate devices specifically, rather than being made part of default storage.ID="IN42185"Disk mirroringapproaches toID="IN47186"Storage managementdisk mirroringID="IN36187"Disk devicesmirroringID="X81410" RENDERAS="SECT1"Disk MirroringID="IN26188"Reads and writes, physical
ID="IN23189"Disk mirroringbenefits
ID="IN69190"Disk mirroringdisk mirror command
ID="IN54191"disk mirror commandREMAP="BO--Body"Disk mirroring can provide non-stop recovery in the event of media failure. The disk mirror
 command causes a SQL Server database device to be "duplicated": all writes to the device are copied to a separate physical device. If one of the devices fails, the other contains an up-to-date copy of all transactions.You cannot mirror
 a dump device. REMAP="BO--Body"When a read or write to a mirrored device fails, SQL Server causes the bad device to become unmirrored, and displays error messages. SQL Server continues to run, unmirrored. The System Administrator must remirror the disk to restart mirroring. ID="IN49192"Space allocationdisk mirroring and
ID="IN14193"Mirror devicesRENDERAS="SECT2"Deciding What to MirrorREMAP="BO--Body"When deciding to mirror a device, you must weigh such factors as the costs of system downtime, possible reduction in performance, and the cost of storage media. Reviewing these issues will help you decide what to mirror: just the transaction logs, all devices on a server, or selected devices. REMAP="BO--Body"LINKEND="X44290"Figure 3-2: Disk Mirroring Using Minimal Physical Disk Space
ID="IN45194"Master devicedisk mirroring of
ID="IN16195"Partitions, disk
 illustrates the "minimum guaranteed configuration" for database recovery in case of hardware failure. The master device and a mirror of the user database transaction log are stored in separate partitions on one physical disk. The other disk stores the user database and its transaction log in two separate partitions. REMAP="BO--Body"If the disk with the user database fails, you can restore the user database on a new disk from your backups and the mirrored transaction log. REMAP="BO--Body"If the disk with the master device fails, you can restore the master device from a database dump of the MOREINFO="NONE"master database and remirror the user database's transaction log. FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig3_2.xwd"LBL="Figure 3-2: " ID="X44290"Disk Mirroring Using Minimal Physical Disk SpaceREMAP="BO--Body"This configuration minimizes the amount of disk storage required. It provides for full recovery, even if the disk storing the user database and transaction log is damaged, because the mirror of the transaction log ensures full recovery. However, this configuration does not provide non-stop recovery because the MOREINFO="NONE"master and user databases are not being mirrored, and must be recovered from backups. ID="IN29196"Rapid recoveryREMAP="BO--Body"LINKEND="X78861"Figure 3-3: Disk Mirroring for Rapid Recovery
 represents another mirror configuration. In this case, the master device, user databases, and the transaction log are all stored on different partitions of the same physical device, and are all mirrored to a second physical device. ID="IN35197"Non-stop recoveryREMAP="BO--Body"The configuration in LINKEND="X78861"Figure 3-3
 provides non-stop recovery from hardware failure. Working copies of the MOREINFO="NONE"master and user databases and log on the primary disk are all being mirrored, and failure of either disk will not interrupt SQL Server users. FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig3_3.xwd"LBL="Figure 3-3: " ID="X78861"Disk Mirroring for Rapid RecoveryID="IN68198"Speed (Server)system performance andREMAP="BO--Body"With this configuration, all data is written twice, once to the primary disk, and once to the mirror. Applications which involve many writes may be slower with disk mirroring than without mirroring. REMAP="BO--Body"LINKEND="X22489"Figure 3-4: Disk Mirroring: Keeping Transaction Logs on a Separate Disk
 illustrates another configuration with a high level of redundancy. In this configuration, all three database devices are mirrored, but the configuration uses four disks instead of two. This configuration speeds performance during write transactions because the database transaction log is stored on a different device from the user databases, and the system can access both with less disk head travel.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig3_4.xwd"LBL="Figure 3-4: " ID="X22489"Disk Mirroring: Keeping Transaction Logs on a Separate DiskREMAP="BO--Body"In summary, these three examples involved different cost and performance trade-offs: NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Speed of Recovery. You can achieve non-stop recovery when the MOREINFO="NONE"master and user databases (including logs) are mirrored, and can recover without the need to reload transaction logs. Storage space. Immediate recovery requires full redundancy (all databases and logs mirrored), which consumes disk space. Impact on performance. Mirroring the user databases (as in LINKEND="X78861"Figure 3-3
 and LINKEND="X22489"Figure 3-4
ID="IN40199"Disk mirroringapproaches to
ID="IN47200"Space allocationdisk mirroring and
ID="IN43201"Master devicedisk mirroring of
) increases the time needed to write transactions to both disks. RENDERAS="SECT2"ID="IN83202"Disk mirroringdisk mirror command
ID="IN37203"Disk mirroringcommands
ID="IN79204"disk mirror command
Disk Mirroring Commands REMAP="BO--Body"Three commands, MOREINFO="NONE"disk mirror, MOREINFO="NONE"disk unmirror and MOREINFO="NONE"disk remirror, control disk mirroring. All of the commands can be issued while the devices are in use, so you can start or stop database device mirroring while databases are being used. All of these commands alter the sysdevices table in the master database. After issuing any of these commands you should dump the master database to ensure recovery in case master is damaged. ID="IN81205"Disk mirroringinitializingRENDERAS="SECT3"Initializing Mirrors REMAP="BO--Body"The MOREINFO="NONE"disk mirror command starts disk mirroring. Do not ID="IN14206"Mirror devices
ID="IN71207"disk init commandmirror devices and
initialize the mirror device with MOREINFO="NONE"disk init. A database device and its mirror constitute one logical device. The mirror name is added to the MOREINFO="NONE"mirrornameID="IN78208"sysdevices tabledisk mirroring commands and
 column in the MOREINFO="NONE"sysdevices table. ID="IN28209"Disk mirroringeffect on I/O
ID="IN35210"Disk mirroringasynchronous I/O and
ID="IN35211"Asynchronous I/O and disk mirroring
ID="IN22212"Raw devices, mirroring
ID="IN32213"Operating systemsfile mirroringTo retain use of asynchronous I/O, mirror raw devices to raw devices, and operating system files to operating system files. Mirroring a raw device with a regular file produces an error message. Mirroring a regular file with a raw device will work, but will not use asynchronous I/O. REMAP="BO--Body"Here is the MOREINFO="NONE"disk mirror syntax: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"disk mirror name = MOREINFO="NONE""device_name" , mirror = MOREINFO="NONE""physicalname"[ , writes = { serial | noserial }] [ , contiguous ]      (OpenVMS only)REMAP="BO--Body"The device_name is the name of the device that you want to mirror, as it is recorded in MOREINFO="NONE"sysdevices.name (by MOREINFO="NONE"disk init). The physicalname is a full path name for the mirror disk, which is not yet initialized. It cannot be an already-existing operating system file. ID="IN65214"Serial writes, disk mirror and
ID="IN96215"writes option, disk mirrorREMAP="BO--Body"On systems that support asynchronous I/O, the MOREINFO="NONE"writesID="IN96216"serial option, disk mirror
 option allows you to specify whether writes to the first device must finish before writes to the second device begin (MOREINFO="NONE"serialID="IN98217"noserial option, disk mirror
), or whether both I/O requests are to be queued immediately, one to each side of the mirror (MOREINFO="NONE"noserial). ID="IN77218"Disk mirroringinitializingREMAP="BO--Body"In either case, if a write cannot be completed, the I/O error causes the bad device to become unmirrored. REMAP="BO--Body"MOREINFO="NONE"serial writes are the default. The writes to the devices take place consecutively; the first one finishes before the second one starts. MOREINFO="NONE"serial writes provide protection in the case of power failures: one write may be garbled, but both of them will not be. MOREINFO="NONE"serial writes are generally slower than MOREINFO="NONE"noserial writes. REMAP="BO--Body"OpenVMS users should see the SQL Server Utility Programs manual for an explanation of the MOREINFO="NONE"contiguous option. REMAP="BO--Body"In the following example, MOREINFO="NONE"tranlog is the logical device name for a raw device. The MOREINFO="NONE"tranlog device was initialized with MOREINFO="NONE"disk init and is being used as a transaction log device (as inMOREINFO="NONE" create database... MOREINFO="NONE" log MOREINFO="NONE" on MOREINFO="NONE" tranlog). The following command mirrors the transaction log device: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"disk mirror   nameMOREINFO="NONE" = tranlog,   mirror = "/dev/rxy1e"RENDERAS="SECT3"Effects on System TablesREMAP="BO--Body"The database device that you want to mirror will already have been initialized with MOREINFO="NONE"disk init. The MOREINFO="NONE"physicalname that you give to MOREINFO="NONE"disk mirror is added to the existing row in MOREINFO="NONE"sysdevices in the MOREINFO="NONE"mirrorname column and the status bits are updated to reflect the configuration you've chosen. ID="IN57219"Database devicesunmirroring and
ID="IN67220"disk unmirror commandRENDERAS="SECT3"Unmirroring a Device REMAP="BO--Body"Disk mirroring is automatically de-activated when one of the two physical devices fails. ID="IN23221"Disk mirroringstopping
ID="IN38222"HardwareunmirroringREMAP="BO--Body"Use the MOREINFO="NONE"disk unmirror command to stop the mirroring process when hardware maintenance is needed or when a hardware device needs to be changed. REMAP="UI--UserInput" FORMAT="LINESPECIFIC"disk unmirror   name = "MOREINFO="NONE"device_name"   [, side = { "primary" | secondary }]   [, mode = { retain | remove }] ID="IN96223"side option, disk unmirrorREMAP="BO--Body"The MOREINFO="NONE"side option to the MOREINFO="NONE"disk unmirrorID="IN99224"primary option, disk unmirror
 command allows you to specify which side of the mirror to disable. MOREINFO="NONE"primary (in quotes) is the device listed in the MOREINFO="NONE"name column of MOREINFO="NONE"sysdevicesID="IN101225"secondary option, disk unmirror
; MOREINFO="NONE"secondary (no quotes required) is the device listed in the MOREINFO="NONE"mirrorname column of MOREINFO="NONE"sysdevices. MOREINFO="NONE"secondary is the default. ID="IN96226"mode option, disk unmirrorREMAP="BO--Body"The MOREINFO="NONE"modeID="IN98227"retain option, disk unmirror
 option indicates whether the unmirroring process should be temporary (MOREINFO="NONE"retainID="IN98228"remove option, disk unmirror
) or permanent (MOREINFO="NONE"remove). MOREINFO="NONE"retain is the default. RENDERAS="SECT3"Effects on System TablesREMAP="BO--Body"The MOREINFO="NONE"mode option changes the MOREINFO="NONE"status column in MOREINFO="NONE"sysdevices to indicate that mirroring has been disabled. Its effects on the MOREINFO="NONE"phyname and MOREINFO="NONE"mirrorname columns in MOREINFO="NONE"sysdevices depend on the MOREINFO="NONE"side argument also, as shown in LINKEND="X77777"Table 3-3TOCENTRY="1"LBL="Table 3-3: " ID="X77777"Effects of mode and side Options to disk mirror CommandCOLS="4" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="5*"COLNAME="C2" COLWIDTH="8*"COLNAME="C3" COLWIDTH="14*"COLNAME="C4" COLWIDTH="10*"VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sideCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"primaryCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"secondaryCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"modeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"removeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name in mirrorname 
moved to phyname and 
mirrorname set to null; 
status changedCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name in 
mirrorname 
removed; status 
changedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"retainCOLNAME="C3" NAMEST="C3" NAMEEND="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Names unchanged; status changed to indicate 
which device is being de-activatedREMAP="BO--Body"This example suspends the operation of the primary device: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"disk unmirror   name = tranlog,   side = primaryID="IN25229"Disk mirroringrestarting
ID="IN67230"disk remirror commandRENDERAS="SECT3"Restarting Mirrors   REMAP="BO--Body"Use MOREINFO="NONE"disk remirrorID="IN14231"Mirror devices
 to restart a mirror process that has been suspended due to a device failure or with MOREINFO="NONE"disk unmirror. The syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"disk remirror    name = "MOREINFO="NONE"device_name"REMAP="BO--Body"This command copies the database device to its mirror.RENDERAS="SECT3"ID="IN61232"waitfor mirrorexit command
waitfor mirrorexitREMAP="BO--Body"Since disk failure can impair system security, the MOREINFO="NONE"waitfor MOREINFO="NONE"mirrorexit command can be included in an application to perform specific tasks when a disk becomes unmirrored. REMAP="UI--UserInput" FORMAT="LINESPECIFIC"begin    waitfor mirrorexit     commands to be executed end REMAP="BO--Body"The commands depend on your applications. You may wish to add certain warnings in applications which perform updates, or use ID="IN84233"sp_dboption system proceduredisk unmirroring and
MOREINFO="NONE"sp_dboption to make certain databases read only if the disk becomes unmirrored. ID="IN28234"Disk mirroringeffect on I/OSQL Server only knows that a device has become unmirrored when it attempts I/O to the mirror device. On mirrored databases, this occurs at a checkpoint
, or whenever the SQL Server buffer must be written to disk. On mirrored logs, I/O occurs whenever a process writes to the log, including any committed transaction that performs data modification, a checkpoint, or a database dump.REMAP="BO--Body"MOREINFO="NONE"waitfor mirrorexitID="IN45235"Storage managementdisk mirroring
ID="IN34236"Disk devicesmirroring
ID="IN77237"disk mirror command
ID="IN81238"Disk mirroringdisk mirror command
ID="IN35239"Disk mirroringcommands
 (and the error messages that are printed to the console and errorlog on mirror failure) are only activated by these events.RENDERAS="SECT3"Mirroring the Master DeviceREMAP="BO--Body"If you choose to mirror the device that contains the master database, you need to edit the runserver file for your SQL Server, so that the mirror device starts when the server boots.REMAP="BO--Body"On UNIX, add the MOREINFO="NONE"-r flag and the name of the mirror device:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dataserver -d /dev/rsd1f -r /dev/rs0e -e/sybase/install/errorlogREMAP="BO--Body"On OpenVMS, add the mirror name:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dataserver /device=(DUA0:[dbdevices]master.dat, -DUB1:[dbmirrors]mirror.dat) -/errorfile=sybase_system:[sybase.install]errorlogREMAP="BO--Body"For PC platform examples, refer to the System Administration Guide Supplement.RENDERAS="SECT1"Creating User Databases ID="IN56240"Storage managementcreating user databases
ID="IN51241"Creatingdatabases
ID="IN83242"create database commandREMAP="BO--Body"User databases are created with the MOREINFO="NONE"create database command. All databases must be created while using the MOREINFO="NONE"master database. To create a database, a user must be a valid user of master (added with MOREINFO="NONE"sp_adduser) and must have MOREINFO="NONE"create database permission. REMAP="BO--Body"The MOREINFO="NONE"create database command clears every page of the database device. It may take up to several seconds or several minutes to complete, depending on the size of the database and the speed of your system. If you are creating a database in order to load a database dump, you can use an option to MOREINFO="NONE"create database that skips page clearing (the page clearing step will be performed after the load completes).RENDERAS="SECT2"create database Syntax REMAP="BO--Body"The MOREINFO="NONE"create database syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"create database MOREINFO="NONE"database_name [on {default | MOREINFO="NONE"database_device} [= MOREINFO="NONE"size]     [, MOREINFO="NONE"database_device [= MOREINFO="NONE"size]...] [log on MOREINFO="NONE"database_device [ = MOREINFO="NONE"size ]     [, MOREINFO="NONE"database_device [= MOREINFO="NONE"size]]...][with override][for load]REMAP="BO--Body"ID="IN37243"Number (quantity of)Server databases
A database name must follow the rules for identifiers. You can create only one database at a time. REMAP="BO--Body"In its simplest form, MOREINFO="NONE"create database creates a database on the default devices available on your server:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"create database newpubsREMAP="BO--Body"The optional MOREINFO="NONE"on clause allows you to specify the names of one or more database devices, and the space allocation for each database device in megabytes. All of the database devices named in MOREINFO="NONE"create database must be listed in MOREINFO="NONE"sysdevices, that is, they must have been initialized with MOREINFO="NONE"disk init. If you use the keyword MOREINFO="NONE"default (or if you omit the MOREINFO="NONE"on clause altogether), the database is stored on one or more of the default database devices. ID="IN13244"Sizedatabase
ID="IN96245"on keywordcreate database
ID="IN104246"create database commandon keywordREMAP="BO--Body"To specify a size (in this example, 4 megabytes) for a database to be stored in a default location, use MOREINFO="NONE"on default = size like this: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"create database newpubs on default = 4 REMAP="BO--Body"To place the database on specific database devices, give the name(s) of the database device(s) on which you want it stored. As the syntax indicates, you can request that a database be stored on more than one database device, with different amounts of space on each. The following statement creates the MOREINFO="NONE"newdb database and allocates 3 megabytes on MOREINFO="NONE"mydata and 2 megabytes on MOREINFO="NONE"newdata2. It places the transaction log on a third database device, MOREINFO="NONE"tranlog: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"create database newdbon mydata = 3, newdata = 2log on tranlog = 2 ID="IN63247"Serversdatabase creation stepsRENDERAS="SECT2"How User Databases are Created   REMAP="BO--Body"When a MOREINFO="NONE"create database statement is issued, SQL Server takes the following steps: MARK="BULL" REMAP="BU--Bullet"Verifies that the database name specified in the statement is uniqueMakes sure that the database device names specified in the statement are availableID="IN26248"Database devicesnumberingFinds an unused identification number for the new databaseID="IN104249"sysusages tablecreate database andAssigns space to the database on the specified database devices, and updates MOREINFO="NONE"master..sysusages to reflect these assignmentsID="IN107250"sysdatabases tablecreate database andInserts a row into MOREINFO="NONE"sysdatabasesMakes a copy of the MOREINFO="NONE"model database in the new database space, thereby creating the new database's system tablesClears the remaining pages in the database (MOREINFO="NONE"create database...for load skips this step)REMAP="BO--Body"The new database initially contains a set of system tables, with entries that describe the system tables themselves. The new database inherits all of the changes you have made to the model database. These can include:MARK="BULL" REMAP="BU--Bullet"The addition of user namesThe addition of objectsThe database option settings. Originally, the options are set off in model. If you want all of your new user databases to inherit particular options, you can change the options in model ID="IN94251"sp_dboption system procedurechanging default settings with
with the system procedure MOREINFO="NONE"sp_dboption. ID="IN69252"create database commandpermission
ID="IN76253"Permissionscreate databaseRENDERAS="SECT2"Permissions for Creating Databases   REMAP="BO--Body"Only System Administrators can grant permission to use the MOREINFO="NONE"create database command. In many installations, System Administrators maintain a monopoly on MOREINFO="NONE"create database permission in order to centralize control of database placement and database device allocation. REMAP="BO--Body"In these situations, System Administrators create new databases on behalf of other users, and then transfer ownership to the appropriate user. REMAP="BO--Body"To create a database that is to be owned by another user, the System Administrator:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Issues the MOREINFO="NONE"create database command, Switches to the new database with the MOREINFO="NONE"use command, and then ID="IN68254"sp_changedbowner system procedureExecutes the system procedure MOREINFO="NONE"sp_changedbowner. ID="IN48255"grant commandREMAP="BO--Body"The System Administrator can also directly MOREINFO="NONE"grant permission to create databases. REMAP="BO--Body"The fact that System Administrators seem to operate outside the protection system serves as a safety precaution. For example, if a Database Owner forgets his or her password or accidentally deletes all entries in MOREINFO="NONE"sysusersID="IN74256"Permissionscreate database
, a System Administrator can repair the damage (from the backups or dumps that are, of course, regularly made). ID="IN79257"Database devicesassigning databases toRENDERAS="SECT2"Assigning Databases to Database DevicesID="IN26258"Space allocationassigning
ID="IN88259"create database commandallocating storage space withREMAP="BO--Body"Databases are allocated storage space when the MOREINFO="NONE"create databaseID="IN78260"alter database commandsize of database and
 or MOREINFO="NONE"alter database command is issued. The MOREINFO="NONE"create database command can specify one or more database devices, and the amount of space on each that is to be allocated to the new database. In addition, the ID="IN107261"create database commandlog on option
MOREINFO="NONE"logID="IN96262"on keywordcreate database
 MOREINFO="NONE" on clause to MOREINFO="NONE"create database should be used to place the database's transaction log on a separate device. REMAP="BO--Body"If no database device is specified (or if the keyword MOREINFO="NONE"default is used), SQL Server puts the database on one or more of the default database devices specified in MOREINFO="NONE"master..sysdevices. ID="IN60263"Databasesdefault size
ID="IN17264"Sizenew database
ID="IN34265"Information (Server)database sizeRENDERAS="SECT3"Database SizeID="IN107266"create database commandsize parameterREMAP="BO--Body"If the size parameter in the MOREINFO="NONE"on clause is omitted, the database is created with the default amount of space. This amount will be the greater of: ID="IN134267"create database commanddatabase size configuration variable and
ID="IN71268"database size configuration variableMARK="BULL" REMAP="BU--Bullet"The MOREINFO="NONE"database sizeID="IN103269"Sizedatabase size (sysconfigures)
 parameter in MOREINFO="NONE"master..sysconfigures, or ID="IN53270"Sizemodel database
ID="IN53271"model databasesizeThe size of the model database.ID="IN45272"Databasesdefault size
ID="IN79273"Changingspace allocation once assignedREMAP="BO--Body"The size of MOREINFO="NONE"model and the value ofMOREINFO="NONE" database size are initially set to 2 megabytes. The size of MOREINFO="NONE"model can be changed by allocating more space with MOREINFO="NONE"alter database. The MOREINFO="NONE"database sizeID="IN117274"sp_configure system proceduredatabase size and
 configuration variable can be reset with MOREINFO="NONE"sp_configure. The default size for new databases can be changed to any size greater than 2 megabytes (up to 10,000 megabytes), by updating MOREINFO="NONE"master..sysconfigures with the stored procedure MOREINFO="NONE"sp_configureID="IN116275"reconfigure commanddatabase size variable and
 and issuing the MOREINFO="NONE"reconfigure command. See LINKEND="X26541"Chapter 12,  "Fine-Tuning Performance and Operations"
, for complete instructions.REMAP="BO--Body"If the amount of space you request on a specific database device is unavailable, SQL Server creates the database with as much space as possible on a per-device basis. It then displays a message informing you how much space was actually allocated on each database device. (This is not considered an error.) If there is less than the minimum space necessary for a database on the specified database device (or on the default, if you don't give any names), the MOREINFO="NONE"create database command fails.REMAP="BO--Body"The allocation decisions that you make when you issue MOREINFO="NONE"create database or MOREINFO="NONE"alter database are important, because it is difficult to reclaim storage space once it's assigned. You can always add additional space; however you cannot deallocate space that has been assigned to a database unless you drop the database first. RENDERAS="SECT3"Estimating the Size of Tables and IndexesID="IN51276"Sizetables
ID="IN33277"Spaceestimating table/index size
ID="IN63278"sp_estspace system procedureREMAP="BO--Body"You can estimate the size of the tables and indexes for your database using the MOREINFO="NONE"sp_estspace system procedure. Before you create your user database, follow these steps for each table:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Create the table, with all of the columns and datatypes you will use. Both the length specification and the nulltype of the columns is important in determining the amount of storage space a table will occupy.Create all of the indexes on the table.Execute MOREINFO="NONE"sp_estspace, giving the table name and the number of rows that you estimate the table will hold.REMAP="BO--Body"You can perform this work in a test or development database, or in tempdb.REMAP="BO--Body"MOREINFO="NONE"sp_estspace prints the estimated size of the table and each of its indexes, and the sum of these sizes.REMAP="BO--Body"Add the results from MOREINFO="NONE"sp_estspace to get an estimate of the size of the user tables and indexes. Each database also requires additional space for:MARK="BULL" REMAP="BU--Bullet"syslogs. If you store your database's log on a separate segment using the MOREINFO="NONE"log on clause, you don't have to include that in your size estimate for the data portion of your database.Views, procedures, defaults, rules, and triggers you create. System tables store a copy of the text of these objects, and a copy of the compiled procedure plan.Other system tables. Execute MOREINFO="NONE"sp_helpsegment system in the model database or a newly created database to see how much free space is available on the segment that stores user and system tables. Adding users, granting permissions, and performing other actions in the database that affect the system tables increase the amount of space these tables use.REMAP="BO--Body"See MOREINFO="NONE"sp_estspace in Volume 2 of the SQL Server Reference Manual for more information on using this procedure.ID="IN96279"on keywordcreate database
ID="IN113280"create database commandomitting on keywordRENDERAS="SECT2"Omitting the on ClauseREMAP="BO--Body"If you omit the MOREINFO="NONE"onID="IN105281"sysdevices tablecreate database and
 clause completely, the size of the database is the default size, as described. The space is allocated from the default database devices indicated in MOREINFO="NONE"master..sysdevices, in alphabetical order by database device name. ID="IN24282"Default database devices
ID="IN24283"Database devicesdefaultREMAP="BO--Body"Use the following query to see the logical names of default database devices:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select name    from sysdevices     where status & 1 = 1    order by nameREMAP="BO--Body"MOREINFO="NONE"sp_helpdevice also displays "default disk" as part of the description of database devices.ID="IN99284"log on optioncreate database
ID="IN107285"create database commandlog on option
ID="IN105286"Transaction logscreate database and
ID="IN22287"Devicesusing separateRENDERAS="SECT2"Placing the Transaction Log on a Separate Device: log onID="IN159288"syslogs tablesyslogs tableSee also Transaction logs!see also Transaction logs
 REMAP="BO--Body"The MOREINFO="NONE"log MOREINFO="NONE" on clause to MOREINFO="NONE"create database places the transaction log (the ID="IN102289"syslogs tablecreate database and
MOREINFO="NONE"syslogs table) on a separate database device. If the size parameter in the MOREINFO="NONE"log MOREINFO="NONE" on clause is omitted, the log device is allocated 2 megabytes of storage. REMAP="BO--Body"There are several reasons to place the logs on a separate database device: ID="IN59290"dump transaction commandMARK="BULL" REMAP="BU--Bullet"It allows you to use the MOREINFO="NONE"dump transaction command (rather than MOREINFO="NONE"dump database), thus saving time and tapes.It allows you to establish a fixed size for the log, keeping it from competing with other database activity for space. It creates default free-space threshold
 monitoring on the log segment, and allows you to create additional free-space monitoring on the log and data portions of the database.It improves performance.It ensures full recovery in the event of hard disk crashes. A special argument to MOREINFO="NONE"dump transaction lets you dump your transaction log, even if your data device is on a damaged disk.REMAP="BO--Body"Unless you are creating very small, non-critical databases, you should always use the MOREINFO="NONE"log MOREINFO="NONE" on clause to MOREINFO="NONE"create database. ID="IN39291"Transaction logschecking space used by
ID="IN43292"Sizetransaction logsRENDERAS="SECT3"Determining the Size of the Transaction LogID="IN35293"Spaceproportion of log to databaseREMAP="BO--Body"The size of the device required for the transaction log varies according to the amount of update activity and the frequency of transaction log dumps, whether you perform the dumps manually or use threshold procedures to dump your transaction logs automatically. As a rule of thumb, allocate to the log 10% to 25% of the space you allocate to the database itself.ID="IN59294"dump transaction commandREMAP="BO--Body"Inserts, deletes and updates increase the size of the logs, and MOREINFO="NONE"dump transactionID="IN69295"update commandtransaction log and
 decreases the size of the log by writing committed transactions to disk and removing them from the log. Since MOREINFO="NONE"update statements require logging of both the "before" and "after" images of a row, applications which require mass updates of large numbers of rows should plan for transaction log space at least twice as large as the number of rows to be updated at once-or twice as large as your largest table. (Of course, you can also "batch
" the updates in smaller groups with transaction dumps between the batches.)ID="IN79296"Speed (Server)Speed (Server)of transaction log growthtransaction log growthREMAP="BO--Body"In databases with a lot of insert and update activity, logs can grow quickly. Periodic checking can help you determine the correct size for your log, can help you choose thresholds for the log, and can help you schedule transaction log dumps. To check on the space used by your transaction log, you must be using the database. Then, issue the command: ID="IN61297"Tablesdbcc checktable and
ID="IN93298"checktable option, dbccREMAP="UI--UserInput" FORMAT="LINESPECIFIC"dbcc checktable(syslogs)REMAP="BO--Body"MOREINFO="NONE"dbcc reports the number of data pages in use by the log. If your log is on a separate device, MOREINFO="NONE"dbcc checktable also tells you how much space is used and free. Here is sample output for a 2 megabyte log:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Checking syslogsThe total number of data pages in this table is 199.*** NOTICE: Space used on the log segment is 0.39 Mbytes, 19.43%.*** NOTICE: Space free on the log segment is 1.61 Mbytes, 80.57%.Table has 1661 data rows.REMAP="BO--Body"Another command you can use to check on the growth of the log is:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select count(*) from syslogs REMAP="BO--Body"You can repeat either command periodically to see how fast the log grows. ID="IN116299"create database commandomitting log on option
ID="IN99300"log on optioncreate databaseRENDERAS="SECT3"Omitting the log on ClauseREMAP="BO--Body"If you omit the MOREINFO="NONE"log MOREINFO="NONE" on clause, the database's transaction log is placed on the same database device as the data tables. Subsequent use of the system procedure MOREINFO="NONE"sp_logdevice (as described in LINKEND="X29150""Moving the Transaction Log to Another Device"
) affects only future writes to the log, and does not immediately move the first few log pages that were written when the database was created. This leaves exposure problems in certain recovery situations, and is not recommended. Each time you issue the MOREINFO="NONE"create database command, you should dump the master database. This makes recovery easier and safer in case master is later damaged. See LINKEND="X40994"Chapter 9,  "Backing Up and Restoring the System Databases"
ID="IN81301"create database command
ID="IN49302"Creatingdatabases
ID="IN54303"Storage managementcreating user databases
.RENDERAS="SECT2"ID="IN115304"for load optioncreate database
ID="IN127305"create database commandfor load option and
for load Option for Database RecoveryID="IN77306"Recoveryfor load option and
ID="IN53307"Machine types, moving databases between
ID="IN52308"Databasesmoving to different machinesREMAP="BO--Body"Use the MOREINFO="NONE"for load option if you are going to use the database for loading from a database dump, either for recovery from media failure or for moving a database from one machine to another. Using MOREINFO="NONE"for load runs a streamlined version of MOREINFO="NONE"create database to create a target database that can only be used for loading a dump.REMAP="BO--Body"If you create a database using the MOREINFO="NONE"for load option, you can run only the following commands in the new database before loading a database dump: MARK="BULL" REMAP="BU--Bullet"MOREINFO="NONE"alter database... for loadMOREINFO="NONE"drop database MOREINFO="NONE"load database REMAP="BO--Body"When you load a database dump, the new database device allocations for the database need to match the usage allocations of the dumped database. See LINKEND="X32898"Chapter 8,  "Backing Up and Restoring User Databases"
, for a discussion of duplicating space allocation.ID="IN50309"Databasesmoving to different machines
ID="IN125310"create database commandfor load option and
ID="IN113311"for load optioncreate database
ID="IN51312"Machine types, moving databases between
ID="IN75313"Recoveryfor load option andREMAP="BO--Body"After you load the database dump into the new database, there are no restrictions on the commands you can use.RENDERAS="SECT2"ID="IN114314"create database commandwith override option
ID="IN106315"with override optioncreate database
with override Option to create databaseID="IN33316"Transaction logsdevice placementREMAP="BO--Body"This option allows SQL Servers on machines with limited space to still maintain their logs on separate device fragments from their data. Use this option only when you're putting log and data on the same logical device. This is not recommended practice, but may be the only option available on machines with limited storage, especially if you need to get databases back on-line following a hard disk crash.REMAP="BO--Body"You'll still be able to dump your transaction log, but if you experience a media failure, you won't be able to access the current log (since it's on the same device as the data). You will be able to recover only to the last transaction log dump, and all transactions between that point and the failure time will be lost.REMAP="BO--Body"Here is an example where log and data are on separate fragments of the same logical device:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"create database littledb    on diskdev1 = 4    log on diskdev1 = 1    with overrideREMAP="BO--Body"Use this option only if you are not concerned with up-to-the-minute recoverability.ID="IN62317"MovingMovinga transaction logtransaction logID="X29150" RENDERAS="SECT1"Moving the Transaction Log to Another Device ID="IN89318"sp_logdevice system procedureREMAP="BO--Body"If you did not use the MOREINFO="NONE"log on clause to MOREINFO="NONE"create database, the following procedure allows you to move your transaction log to another database device. REMAP="BO--Body"The system procedure MOREINFO="NONE"sp_logdeviceID="IN39319"Pages (data)filling up transaction log
 moves future allocation for a database's transaction log. However, the transaction log remains on the original device until the allocated page has been filled, and the transaction log has been dumped. REMAP="BO--Body"Here is the syntax for MOREINFO="NONE"sp_logdevice: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_logdevice MOREINFO="NONE"database_name, MOREINFO="NONE"device_name REMAP="BO--Body"The database device that you name must be initialized with MOREINFO="NONE"disk init, and must be allocated to the database with MOREINFO="NONE"create or MOREINFO="NONE"alter database. REMAP="BO--Body"To move the entire transaction log, complete these steps: NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Execute MOREINFO="NONE"sp_logdevice, naming the new database device. ID="IN37320"Updatingcurrent transaction log page
ID="IN61321"Tablesdbcc checktable and
ID="IN93322"checktable option, dbccExecute enough transactions to fill the page that is currently in use. Since the page contains 2048 bytes, you may need to update at least 2048 bytes. You can execute MOREINFO="NONE"dbcc  MOREINFO="NONE"checktable(syslogs) before and after you start updating to determine when a new page is used. Wait for all currently active transactions to finish to ensure that there are no active transactions on the database device. You may want to perform this entire activity after putting the database into single-user mode with MOREINFO="NONE"sp_dboption.ID="IN59323"dump transaction commandRun MOREINFO="NONE"dump transaction. See LINKEND="X31864"Chapter 7,  "Developing a Backup and Recovery Plan"
, for more information. MOREINFO="NONE"dump transaction removes all the log pages that it writes to disk; as long as there are no active transactions in the part of the log on the old device, all of those pages will be removed. ID="IN73324"sp_helplog system procedureRun the system procedure MOREINFO="NONE"sp_helplog to ensure that the complete log is on the new log device. ID="IN40325"Transaction logsmoving to release space
ID="IN33326"Transaction logsdevice placementWhen you move a transaction log, the space no longer used by the transaction log becomes available for data. You cannot reduce the amount of space allocated to a device by moving the transaction log.REMAP="BO--Body"Transaction logs are discussed in detail in LINKEND="X31864"Chapter 7,  "Developing a Backup and Recovery Plan"
ID="IN87327"sp_logdevice system procedure
ID="IN60328"MovingMovinga transaction logtransaction log
. ID="IN49329"ChangingDatabase OwnersRENDERAS="SECT1"Changing Database Ownership   ID="IN46330"Storage managementchanging database ownership
ID="IN68331"sp_changedbowner system procedureREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_changedbowner can be used to change the ownership of a database. A System Administrator might want to create the user databases, giving ownership of them to another user after some of the initial work has been completed. The procedure must be executed by the System Administrator in the database whose ownership will be changed. The syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_changedbowner MOREINFO="NONE"loginame [, true ] REMAP="BO--Body"This example makes the user "albert," the owner of the current database and drops aliases of users who could act as the old "dbo": REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_changedbowner albert ID="IN63332"sp_dropuser system procedureREMAP="BO--Body"The new owner must already have a login name on SQL Server, but cannot be a user of the database, or have an alias in the database. You may have to use MOREINFO="NONE"sp_dropuserID="IN64333"sp_dropalias system procedure
 or MOREINFO="NONE"sp_dropalias before you can change a database's ownership. ID="IN38334"Aliasestransfer to new Database Owner
ID="IN25335"Permissionstransfers andREMAP="BO--Body"To transfer aliases and their permissions to the new Database Owner, add the second parameter with the value "true" or "TRUE". ID="IN62336"master databaseownership ofYou cannot change the ownership of the master database. It is always owned by the "sa" login.RENDERAS="SECT1"Increasing the Size of a DatabaseREMAP="BO--Body"ID="IN75337"Sizealtering database
ID="IN82338"alter database command
ID="IN79339"Spaceadding to database
ID="IN28340"Databasesincreasing size of
ID="IN79341"Changingspace allocation once assigned
When your database grows to fill all of the space you allocated with MOREINFO="NONE"create database, you use the MOREINFO="NONE"alter database command to add additional storage. You can add space for database objects or transaction log space, or both at once. MOREINFO="NONE"alter database is also used to prepare to load a database from backup.REMAP="BO--Body"Permission to use the MOREINFO="NONE"alter database command defaults to the Database Owner, and permission is automatically transferred with database ownership (see MOREINFO="NONE"sp_changedbowner in the SQL Server Reference Manual). MOREINFO="NONE"alter database permission cannot be changed with MOREINFO="NONE"grant or MOREINFO="NONE"revoke. REMAP="BO--Body"If you execute MOREINFO="NONE"alter database with only a database name, it adds one megabyte on the default database devices. If your database separates log and data, the space you add will be entirely used for data. You can find names of database devices that are in your default list with MOREINFO="NONE"sp_helpdevice. REMAP="BO--Body"To add one megabyte on a default database device for the MOREINFO="NONE"newpubs database, type: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"alter database newpubsRENDERAS="SECT2"alter database SyntaxREMAP="BO--Body"The full syntax allows you to extend a database by other amounts and to specify where storage space is to be added: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"alter database MOREINFO="NONE"database_name   [on {default | MOREINFO="NONE"database_device} [= MOREINFO="NONE"size]       [, MOREINFO="NONE"database_device [= MOREINFO="NONE"size]]...]  [log on  {default | MOREINFO="NONE"database_device} [= MOREINFO="NONE"size]       [, MOREINFO="NONE"database_device [= MOREINFO="NONE"size]]...]  [with override]  [for load]REMAP="BO--Body"ID="IN95342"on keywordalter database
The MOREINFO="NONE"on andID="IN98343"log on optionalter database
MOREINFO="NONE" log on clauses in the MOREINFO="NONE"alter database command are just like the corresponding clauses in the MOREINFO="NONE"create databaseID="IN114344"master databaseextending with alter database
 command. You can specify space on a default database device or on some other database device, and you can name more than one database device. If you are using MOREINFO="NONE"alter database to extend the MOREINFO="NONE"master database, however, you can only extend it on the master device. The minimum increase you can specify is one megabyte (512 2K pages). REMAP="BO--Body"To add three megabytes to the space allocated for the MOREINFO="NONE"newpubs database on the database device named MOREINFO="NONE"pubsdata1, the command is: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"alter database newpubs on pubsdata1 = 3 REMAP="BO--Body"If SQL Server can't allocate the requested size, it allocates as much as it can on each database device with a minimum allocation of one-half megabyte (256 2K pages) per device. When MOREINFO="NONE"alter database completes, it prints messages telling you how much space it allocated, like this:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Extending database by 1536 pages on disk pubsdata1REMAP="BO--Body"You should check these messages to be sure you added enough space.REMAP="BO--Body"Here is how to add two megabytes to the space allocated for MOREINFO="NONE"newpubs on MOREINFO="NONE"pubsdata1, and add three megabytes on a new device, MOREINFO="NONE"pubsdata2, plus another megabyte for the log, on tranlog: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"alter database newpubs on pubsdata1 = 2, pubsdata2 = 3 log on tranlogEach time you issue the MOREINFO="NONE"alter database command, dump the master database. RENDERAS="SECT3"The with override ClauseID="IN114345"create database commandwith override option
ID="IN113346"alter database commandwith override optionREMAP="BO--Body"The MOREINFO="NONE"with override clause allows you to create a device fragment containing log space on a device which already contains data, or a data fragment on a device already in use for the log. Use this option only in cases where you have no other storage options, and where up-to-the-minute recoverability is not critical.RENDERAS="SECT3"The for load ClauseID="IN108347"alter database commandfor load option
ID="IN100348"for load optionalter databaseREMAP="BO--Body"TheMOREINFO="NONE" for loadID="IN113349"create database commandfor load option and
 option is used only after MOREINFO="NONE"create database for load to recreate the space allocation of the database being loaded into the new database from a dump. See LINKEND="X32898"Chapter 8,  "Backing Up and Restoring User Databases"
ID="IN71350"Sizealtering database
ID="IN80351"alter database command
ID="IN39352"Database devicesassigning databases to
ID="IN75353"Spaceadding to database
, for a discussion of duplicating space allocation when loading a dump into a new database.RENDERAS="SECT1"ID="IN67354"drop database command
drop database CommandID="IN37355"DatabasesdroppingREMAP="BO--Body"The MOREINFO="NONE"drop database command removes a database from the server, deleting the database and all of the objects in it from SQL Server. This command:ID="IN37356"Storage managementdropping databases
ID="IN75357"Space allocationdrop database effect onMARK="BULL" REMAP="BU--Bullet"Frees the storage space allocated for the databaseDeletes references to it from the system tables in the master databaseREMAP="BO--Body"The syntax of this command is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"drop database MOREINFO="NONE"database_name [, MOREINFO="NONE"database_name]... REMAP="BO--Body"Only the Database Owner can drop a database. You must be in the master database to drop any database. You cannot drop a database that is in use (open for reading or writing by any user).REMAP="BO--Body"You can drop more than one database in a single statement. For example: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"drop database newpubs, newdbID="IN51358"Database objectsdroppingREMAP="BO--Body"You must MOREINFO="NONE"dropID="IN16359"Droppingdevices
ID="IN65360"sp_dropdevice system procedure
 all the databases on a database device before you can drop the database device. The command to drop a device is MOREINFO="NONE"sp_dropdevice. REMAP="BO--Body"After you drop a database, dump the MOREINFO="NONE"master database to ensure recovery in case MOREINFO="NONE"master is damaged. ID="IN36361"Space allocationfunctions of Server
ID="IN37362"Information (Server)database storage
ID="IN30363"Serversspace allocation stepsRENDERAS="SECT1"How SQL Server Allocates Space for a DatabaseREMAP="BO--Body"For the user, creating a database on a database device and allocating a certain amount of space to it is just a matter of issuing a command. For SQL Server, it's a more involved task. REMAP="BO--Body"SQL Server first makes an entry for the new database in MOREINFO="NONE"sysdatabases. Then it checks MOREINFO="NONE"master..sysdevices to make sure that the device names specified in the MOREINFO="NONE"create database command actually exist and are database devices. If you did not specify database devices, or used the MOREINFO="NONE"default option, SQL Server checks MOREINFO="NONE"master..sysdevices and MOREINFO="NONE"master..sysusages for free space on all devices that can be used for default storage. It performs this check in alphabetical order by device name. ID="IN29364"Databasesstorage information
ID="IN27365"Space allocationcontiguousREMAP="BO--Body"The storage space from which SQL Server gathers the specified amount of storage need not be contiguous, and can be extracted from whatever free space is available. The database storage space can even be drawn from more than one database device. Of course, a database is treated as a logical whole even if it is stored on more than one database device. ID="IN44366"Sizeallocation units
ID="IN48367"Pages (data)allocation ofREMAP="BO--Body"Each piece of storage for a database must be at least 1 allocation unit-half a megabyte, or 256 contiguous 2K pages (on Stratus, 256 4K pages).The first page of each allocation unit is the allocation page. It does not contain database rows like all the other pages. Rather, it contains an array that shows how the other 255 pages are used. ID="IN80368"sysusages tabledatabase space allocations andRENDERAS="SECT2"The sysusages Table   REMAP="BO--Body"The database storage information is listed in the table MOREINFO="NONE"master..sysusages. Each row in MOREINFO="NONE"master..sysusages represents a space allocation assigned to a database. Thus, each database has one row in MOREINFO="NONE"sysusages for each time MOREINFO="NONE"create database or MOREINFO="NONE"alter databaseID="IN23369"Fragments, device space
 assigns a fragment of disk space to a database. ID="IN97370"dbids column, sysusages tableREMAP="BO--Body"When SQL Server is first installed, MOREINFO="NONE"sysusages contains rows for theseMOREINFO="NONE" dbids:MARK="BULL" REMAP="BU--Bullet"1, the MOREINFO="NONE"master database2, the temporary database, MOREINFO="NONE"tempdb3, the MOREINFO="NONE"model database4, the sybsystemprocs databaseREMAP="BO--Body"If you installed auditing, the sybsecurity database will be dbid 5.If your installation is an upgrade from a pre-Release 10.0 SQL Server, sybsystemprocs and sybsecurity may have different database IDs.REMAP="BO--Body"As new databases are created or current databases enlarged, new rows are added to MOREINFO="NONE"sysusages to represent new database allocations. REMAP="BO--Body"Here is what MOREINFO="NONE"sysusages might look like on a SQL Server with the five system databases and two user databases (with MOREINFO="NONE"dbids 6 and 7). Both of these databases were created with the MOREINFO="NONE"log  MOREINFO="NONE"on option. The database with MOREINFO="NONE"dbid 7 has been given additional storage space with two MOREINFO="NONE"alter database commands:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select dbid, segmap, lstart, size, vstartfrom sysusages REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"dbid   segmap      lstart      size             vstart ------ ----------- ----------- -----------     -------     1           7           0        1536           4      2           7           0        1024        2564      3           7           0        1024        1540        4           7           0        5120    16777216      5           7           0       10240    33554432      6           3           0         512     1777216      6           4         512         512     3554432      7           3           0        2048    67108864      7           4        2048        1024    50331648      7           3        3072         512    67110912      7           3        3584        1024    67111424  (10 rows affected)RENDERAS="SECT3"The segmap ColumnID="IN34371"Segmentssystem tables entries for
ID="IN47372"segmap columnREMAP="BO--Body"The MOREINFO="NONE"segmapID="IN48373"segment column
 column is a bitmap linked to the MOREINFO="NONE"segmentID="IN51374"syssegments table
 column in the user database's MOREINFO="NONE"syssegments table. Since the MOREINFO="NONE"logsegment in each user database is segment 2, and these user databases have their logs on separate devices, MOREINFO="NONE"segmap contains 4 (22) for those devices named in the MOREINFO="NONE"log MOREINFO="NONE" on statement, and 3 for the data segment that holds the system segment (20 = 1) + default segment (21 = 2). ID="IN43375"Segmentsvalues tableREMAP="BO--Body"Here are some of the possible values for segments containing data or logs: TOCENTRY="1"LBL="Table 3-4: "Segment ValuesCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="6*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ValueCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SegmentVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"data only (system and default segments)COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"log only COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"data and log REMAP="BO--Body"Values higher than 7 indicate user-defined segments. The MOREINFO="NONE"segmap column is explained more fully in the segments tutorial section, later in this chapter. RENDERAS="SECT3"The lstart, vstart and size ColumnsREMAP="BO--Body"The MOREINFO="NONE"lstartID="IN15376"Logical address
 column contains the starting page number within the database of this allocation unit. Each database starts at logical address "0." If additional allocations have been made for a database, as in the case of MOREINFO="NONE"dbid 7, the MOREINFO="NONE"lstart field reflects this. REMAP="BO--Body"The MOREINFO="NONE"sizeID="IN27377"Space allocationcontiguous
ID="IN99378"Pages (data)numbering in database
 column contains the number of contiguous 2K pages that are assigned to the same database (on Stratus, 4K pages). The ending logical address of this portion of the database can be determined by adding the values in ID="IN47379"lstart column
MOREINFO="NONE"lstart and MOREINFO="NONE"size. ID="IN47380"vstart columnREMAP="BO--Body"The MOREINFO="NONE"vstartID="INA22381"Disk allocation pieces
ID="IN44382"Virtual device number
 column contains the address where the piece assigned to this database begins. The upper four bits store the virtual device number (ID="IN14383"Numbersdevice
vdevno), and the lower four bits store the virtual block number. (To obtain the virtual device number, divide MOREINFO="NONE"sysusages.vstart or MOREINFO="NONE"sysdevices.low by 16,777,216, which is 224.) The value in MOREINFO="NONE"vstart identifies which database device contains this portion of the database, because it falls between the values in the MOREINFO="NONE"low and MOREINFO="NONE"highID="IN62384"sysdevices tablestatus bits
 columns of MOREINFO="NONE"sysdevices for the database device in question. RENDERAS="SECT1"Creating ID="IN33385"Segments
and Using Segments   ID="IN13386"NamessegmentREMAP="BO--Body"Segments are named subsets of the database devices available to a particular SQL Server database. A segment can best be described as a label that points to one or more database devices. Segment names are used in MOREINFO="NONE"create table and MOREINFO="NONE"create indexID="IN29387"Speed (Server)using segments
 commands to place tables or indexes on specific database devices. The use of segments can increase SQL Server performance, and can give the System Administrator or Database Owner increased control over placement, size and space usage of specific database objects. For example: ID="IN16388"Disk controllersMARK="BULL" REMAP="BU--Bullet"If a table is placed on one device, and its non-clustered indexes on a device on another disk controller, the time required to read or write to the disk can be reduced, since disk head travel is usually reduced. ID="IN65389"Performancesegments use andIf a large, heavily-used table is split across devices on two separate disk controllers, read/write time may be improved. ID="IN70390"text datatypeperformance effects ofSQL Server stores the data for textID="IN71391"image datatypeperformance effects of
 and image columns on a separate chain of data pages. By default, this text chain is placed on the same segment as the table. Since reading a text column requires a read operation for the text pointer in the base table and an additional read operation on the text page in the separate text chain, placing the text chain on a separate physical device can improve performance. If you place tables and indexes only on specific segments, those database objects cannot grow beyond the space available to the devices represented by those segments, and other objects cannot contend for space with them. Segments can be extended to include additional devices as needed.You can use thresholds to warn you when space becomes low on a particular database segment. See LINKEND="X63254"Chapter 10,  "Managing Free Space with Thresholds"
 for more information.REMAP="BO--Body"Segments are created within a particular database from the database devices already allocated to that database. Each SQL Server database can contain up to 32 segments. The database devices must first be initialized with MOREINFO="NONE"disk init, and then be made available to the database with a MOREINFO="NONE"create database or MOREINFO="NONE"alter database statement before you can assign segment names. ID="IN29392"Number (quantity of)segmentsREMAP="BO--Body"When you first create a database, SQL Server creates three segments in the database: TOCENTRY="1"LBL="Table 3-5: "Default SegmentsCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="30*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SegmentCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"FunctionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"systemCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Stores this database's system tables.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"logsegmentCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Stores this database's transaction log.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"defaultCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Stores all other database objects-unless you create 
additional segments, and store the table or index on the 
new segments by using MOREINFO="NONE"create table... on segment_name or 
MOREINFO="NONE"create index... on segment_name.RENDERAS="SECT2"Commands and Procedures for Using SegmentsID="IN70393"System proceduresSystem proceduresfor using segmentsusing segmentsREMAP="BO--Body"SQL Server procedures and commands for using segments are: TOCENTRY="1"LBL="Table 3-6: "Commands and Procedures for Managing SegmentsCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="10*"COLNAME="C2" COLWIDTH="29*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CommandCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ActionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_addsegmentCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Define a segment in a database COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create table andMOREINFO="NONE" 
create indexCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Create database objects on segmentsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_dropsegmentCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Remove a segment from a database COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_extendsegmentCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Add additional devices to an existing segment COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_placeobjectCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Assign future space allocations for a table or index to a 
specific segmentCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpsegmentCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Display segment allocation for a database or data on a 
particular segmentCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpdbCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Display the segments on each database deviceREMAP="BO--Body"The following sections introduce the system procedures and commands for using segments, and review how segments affect system tables. The final section on segments is a tutorial showing how to use the system procedures and commands. See LINKEND="X26541"Chapter 12,  "Fine-Tuning Performance and Operations"
, for another example of using segments to improve system performance.ID="IN35394"CreatingsegmentsRENDERAS="SECT2"Creating Segments   REMAP="BO--Body"There are two preliminary steps to creating a segment within a database: MARK="BULL" REMAP="BU--Bullet"Initialize the physical device with MOREINFO="NONE"disk init. Make the database device available to the database by using the MOREINFO="NONE"on clause to MOREINFO="NONE"create database or MOREINFO="NONE"alter database. ID="IN76395"sp_addsegment system procedureREMAP="BO--Body"Once the database device exists and is available to the database, define the segment in the database with the stored procedure MOREINFO="NONE"sp_addsegment. Here is the syntax: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addsegment MOREINFO="NONE"segname, MOREINFO="NONE"dbname, devnameREMAP="BO--Body"ID="IN13396"Namessegment
MOREINFO="NONE"segname can be any valid identifier. It will be used in MOREINFO="NONE"create table and MOREINFO="NONE"create index statements to place those objects on the segment (and thereby, on the device named in MOREINFO="NONE"devname). REMAP="BO--Body"MOREINFO="NONE"dbname is the name of the database where the next segment will be created.REMAP="BO--Body"MOREINFO="NONE"devname is the name of the database device: the name used in MOREINFO="NONE"disk init and MOREINFO="NONE"create and MOREINFO="NONE"alter database statements. REMAP="BO--Body"This statement creates the segment MOREINFO="NONE"seg_mydisk1 on the database device MOREINFO="NONE"mydisk1: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addsegment seg_mydisk1, mydata, mydisk1ID="IN37397"Segmentscreating database objects on
ID="IN49398"Database objectsassigning to devices 
ID="IN73399"Creatingdatabase objects on segmentsRENDERAS="SECT2"Creating Database Objects on Segments   ID="IN55400"create table commandREMAP="BO--Body"After the segment has been defined in the current database, the MOREINFO="NONE"create tableID="IN55401"create index command
 or MOREINFO="NONE"create indexID="IN93402"on keywordcreate table
ID="IN93403"on keywordcreate index
 commands use the optional clause MOREINFO="NONE"on segment_name to place the object on a segment. Here is the syntax: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"create table MOREINFO="NONE"table_name (MOREINFO="NONE"col_name MOREINFO="NONE"datatype ... )[on MOREINFO="NONE"segment_name] REMAP="SY--Syntax" FORMAT="LINESPECIFIC"create [ clustered | nonclustered ] index MOREINFO="NONE"index_name on MOREINFO="NONE"table_name(MOREINFO="NONE"col_name) [on MOREINFO="NONE"segment_name] ID="IN29404"Segmentsclustered indexes on
ID="IN57405"Clustered indexesClustered indexeson segmentssegmentsClustered indexes, where the bottom or leaf level
 of the index contains the actual data, are by definition on the same segment as the table. See LINKEND="X41643""Segments and Clustered Indexes" 
.REMAP="BO--Body"LINKEND="X59021"Figure 3-5: Placing Objects on Specific Devices Using Segments
 shows the sequence of Transact-SQL commands used to place specific database objects on specific physical disks: NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Initialize the physical disks.ID="IN33406"Storage managementusing segmentsAllocate them to a database.Label the devices with segment names.Create the objects, giving the segment name.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig3_5.xwd"LBL="Figure 3-5: " ID="X59021"Placing Objects on Specific Devices Using SegmentsID="IN65407"SegmentsextendingRENDERAS="SECT2"Extending Segments   ID="IN93408"sp_extendsegment system procedureREMAP="BO--Body"The stored procedure MOREINFO="NONE"sp_extendsegmentID="IN22409"Sizesegment extension
 increases the size of a segment, including additional database devices as part of an existing segment. The syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_extendsegment MOREINFO="NONE"segname, dbname, MOREINFO="NONE"devname REMAP="BO--Body"Before you can extend a segment: MARK="BULL" REMAP="BU--Bullet"The database device must be listed in MOREINFO="NONE"sysdevices (through the use of MOREINFO="NONE"disk init), The database device must be available in the desired database (through an MOREINFO="NONE"alter database or MOREINFO="NONE"create database statement), and The segment name must exist in the current database (through earlier use of MOREINFO="NONE"sp_addsegment). REMAP="BO--Body"The following example adds the database device MOREINFO="NONE"pubs_dev2 to an existing segment named MOREINFO="NONE"bigseg: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_extendsegment bigseg, pubs2, pubs_dev2 ID="IN43410"Storage managementdefault database devicesREMAP="BO--Body"Since the word "default" is a keyword, if you want to extend the default segment in your database, you must place the word default in quotes: ID="IN61411"Segmentsextending
ID="IN91412"sp_extendsegment system procedureREMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_extendsegment "default", mydata, newdevice ID="IN27413"Segmentsplacing objects on
ID="IN37414"Segmentsdatabase object placement on
ID="IN38415"Database objectsplacement on segments
ID="IN36416"Serversobject placement on segmentsRENDERAS="SECT2"Placing Objects on a Segment   ID="IN39417"Space allocationchanging once assigned
ID="IN77418"sp_placeobject system procedureREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_placeobject does not remove an object from its allocated segment; however, it causes all further disk allocation for that object to occur on the segment it specifies. Here is the syntax: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_placeobject MOREINFO="NONE"segment_name, object_nameREMAP="BO--Body"The following command causes all further disk allocation for the MOREINFO="NONE"mytab table to take place on MOREINFO="NONE"bigseg: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_placeobject bigseg, mytab MOREINFO="NONE"sp_placeobject does notID="IN22419"Space allocationpages
 move an object from one database device to another. Whatever pages have been allocated on the first device remain allocated; whatever data was written to the first device remains on the device. MOREINFO="NONE"sp_placeobjectID="IN29420"Tablesmoving between devices
ID="IN28421"MovingMovinga tabletable
ID="IN29422"Segmentsclustered indexes on
ID="IN57423"Clustered indexesClustered indexeson segmentssegments
ID="IN44424"Non-clustered indexesmoving between devices
ID="IN33425"Segmentsnon-clustered indexes on
 affects only future space allocations.  To completely move a table, you can drop its clustered index (if one exists), and create or re-create a clustered index on the desired segment. To completely move a non-clustered index
, drop the index and re-create it on the new segment. REMAP="BO--Body"After you have used MOREINFO="NONE"sp_placeobject, executing MOREINFO="NONE"dbcc checkalloc causes the following message to appear for each object that is split across segments: REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Extent not within segment: Object MOREINFO="NONE"object_name, indid MOREINFO="NONE"index_id includes extents on allocation page MOREINFO="NONE"page_number which is not in segment MOREINFO="NONE"segment_name. REMAP="BO--Body"You can ignore these messages.ID="IN48426"Segmentsdropping
ID="IN77427"Database objectsdropping segments andRENDERAS="SECT2"Dropping Segments   ID="IN77428"sp_dropsegment system procedureREMAP="BO--Body"The stored procedure MOREINFO="NONE"sp_dropsegment, when used with only a segment name and the database name, drops the named segment from a database. You cannot drop a segment as long as it contains database objects. You must assign the objects to another segment (as described in the previous note) or you must drop the objects, then drop the segment. The syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_dropsegment MOREINFO="NONE"segment_name, dbnameREMAP="BO--Body"You can also use MOREINFO="NONE"sp_dropsegmentID="IN89429"sp_extendsegment system procedurereversing effects of
 to remove a database device from a segment, reversing the effects of MOREINFO="NONE"sp_extendsegment. This syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_dropsegment MOREINFO="NONE"segment_name, dbname, MOREINFO="NONE"devnameREMAP="BO--Body"With three arguments, MOREINFO="NONE"sp_dropsegment does not drop the segment, it just drops the given MOREINFO="NONE"devname from the range of devices that the segment spans. The following example removes the database device MOREINFO="NONE"pubs_dev2 from MOREINFO="NONE"bigseg: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_dropsegment bigseg, pubs2, pubs_dev2 ID="IN65430"Spacesp_dropsegment effect on
ID="IN95431"checkcatalog option, dbccDropping a segment removes its name from the list of segments in the database, but it does not remove the database device from the allocation for that database, nor does it remove objects from the device.  If you drop all of the segments from a database device, the space is still allocated to the database, but cannot be used for database objects. MOREINFO="NONE"dbcc checkcatalog reports "Missing segment in Sysusages segmap." UseID="IN65432"sp_addsegment system procedure
MOREINFO="NONE" sp_addsegment "default", dbname, devname to map the device to the default segment if you don't plan to assign it to another segment.RENDERAS="SECT2"ID="IN43433"Information (Server)segments
ID="IN37434"Segmentsinformation on
Getting Information about Segments REMAP="BO--Body"Two system procedures provide information about segments. MOREINFO="NONE"sp_helpsegment lists the segments in the database in which it is executed, or displays information about a particular segment in the database. MOREINFO="NONE"sp_helpdb displays information about the relationship between devices and segments in a database. RENDERAS="SECT3"ID="IN77435"sp_helpsegment system procedure
sp_helpsegment REMAP="BO--Body"The system procedure MOREINFO="NONE"sp_helpsegment, when used without an argument, displays information about all of the segments in the database where you execute it:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpsegment REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"segment name                          status ------- ----------------------------- ------        0 system                            0        1 default                           1        2 logsegment                        0        3 seg1                              0        4 seg2                              0 REMAP="BO--Body"For information about a particular segment, specify the segment name as an argument. Use quotes when requesting information about the default segment:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpsegment "default"REMAP="BO--Body"The following example displays information about seg1:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC" segment name                    status  ------- ---------------------- ------        3 seg1                        0 REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC" device                 size          free_space   ---------------------- -------------- -----------  seg_mydisk1            2.0MB                1008 REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC" table_name             index_name          indid ---------------------- -------------------- ------  authors                au_ind                 1REMAP="BO--Body"In addition to the segment's number and name, MOREINFO="NONE"sp_helpsegment displays its MOREINFO="NONE"status (1 for the MOREINFO="NONE"default segment, 0 for others). The names of the database devices and their size are displayed on the next line. The final line displays information about the tables and indexes on a segment. In this case, the segment stores the index au_ind for the authors table. The indid indicates that it is a clustered index.RENDERAS="SECT3"ID="IN95436"sp_helpdb system proceduresegment information
sp_helpdb REMAP="BO--Body"When you execute MOREINFO="NONE"sp_helpdb within a database, and give that database's name, the system procedure displays information about the segments in the database: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpdb mydata REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"name      db_size    owner  dbid created        status  --------- ---------- ----------- -------------- ------------mydata        8.0 MB sa        4 May 27, 1993   no options setREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"device_fragments    size       usage             free kbytes  ------------------- ---------- ----------------- -----------  datadev2            4.0 MB     data only                3408 logdev              2.0 MB     log only                 2032 seg_mydisk1         2.0 MB     data only                2016 REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"ID="IN93437"sp_helpdb system proceduresegment information
device                         segment           ------------------------------ ------------------------- datadev2                       default         datadev2                       system         logdev                         logsegment        seg_mydisk1                    seg1 ID="IN41438"Information (Server)segments
ID="IN35439"Segmentsinformation on
ID="IN51440"System tablessegment information and
ID="IN48441"Segmentssystem tables entries forRENDERAS="SECT1"Segments and System TablesREMAP="BO--Body"Three system tables store information about segments: the ID="IN49442"sysusages table
MOREINFO="NONE"master..sysusages table, and two system tables in the user database, MOREINFO="NONE"sysindexesID="IN62443"syssegments table
 and MOREINFO="NONE"syssegmentsID="IN66444"sp_helpsegment system procedure
. The system procedure MOREINFO="NONE"sp_helpsegment uses these three tables to provide its information. (In addition, it finds the database device name in MOREINFO="NONE"sysdevices.) ID="IN76445"create database commandsystem tables and
ID="IN68446"System tablescreate database andREMAP="BO--Body"When you allocate a device to a database with MOREINFO="NONE"create databaseID="IN75447"alter database commandsystem tables and
 or MOREINFO="NONE"alter database, SQL Server adds a row to MOREINFO="NONE"master..sysusages. The MOREINFO="NONE"segmap column in MOREINFO="NONE"sysusages provides bitmaps to the segments in the database for each device. REMAP="BO--Body"MOREINFO="NONE"create database also creates the MOREINFO="NONE"syssegments table in the user database with these default entries: REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"segment name             status  ------- --------------- ------        0 system                0        1 default               1        2 logsegment            0ID="IN65448"sp_addsegment system procedureREMAP="BO--Body"When you add a segment to a database with MOREINFO="NONE"sp_addsegment, the procedure: MARK="BULL" REMAP="BU--Bullet"Adds a new row to the MOREINFO="NONE"syssegments table in the user database, andUpdates the MOREINFO="NONE"segmap in MOREINFO="NONE"master..sysusages. REMAP="BO--Body"When you create a table or index, SQL Server adds a new row to MOREINFO="NONE"sysindexes. The MOREINFO="NONE"segment column in that table stores the segment number, showing where the server will allocate new space for the object. If you do not specify a segment name when you create the object, it is placed on the MOREINFO="NONE"defaultID="IN102449"text datatypesysindexes table and
 segment; otherwise it is placed on the specified segment. If you create a table containing textID="IN103450"image datatypesysindexes table and
 or image columns, a second row is also added to MOREINFO="NONE"sysindexes for the linked list of text pages; by default, the chain of text pages is stored on the same segment as the table. An example using MOREINFO="NONE"sp_placeobject to put the text chain on its own segment is included later in this chapter.REMAP="BO--Body"The MOREINFO="NONE"name from MOREINFO="NONE"syssegments is used in MOREINFO="NONE"create table and MOREINFO="NONE"create index statements. The MOREINFO="NONE"statusID="IN49451"System tablessegment information and
ID="IN46452"Segmentssystem tables entries for
 column indicates which segment is the default segment. ID="IN37453"User segments, creating
ID="IN44454"Segmentstutorial for creating
ID="IN44455"Tutorial for creating segmentsRENDERAS="SECT1"A Segment Tutorial   REMAP="BO--Body"Segments provide a flexible tool for allowing System Administrators to assign objects to particular database devices. For example, you can add a database device to a database, and improve your system performance by assigning a particular high-use table to the device. To achieve these improvements, you must be certain that no other database objects use the new segment. The following tutorial shows how to create a user segment, and how to remove all other segment mappings from the device. REMAP="BO--Body"These are important facts to keep in mind when considering how SQL Server handles segments and devices: ID="IN23456"Fragments, device spaceMARK="BULL" REMAP="BU--Bullet"If you assign the space in fragments, for example, some of it with MOREINFO="NONE"create database, and some later pieces with MOREINFO="NONE"alter database, each fragment will have an entry in MOREINFO="NONE"sysusages. When an additional fragment of a device is assigned to a database which has already been assigned a fragment of that device, all the segments mapped to the existing fragment are mapped to the new fragment. If you use MOREINFO="NONE"alter database to add space on a device that is new to the database, the MOREINFO="NONE"system and MOREINFO="NONE"default segments are mapped to the new space. REMAP="BO--Body"The tutorial begins with a new database, created with one device for the database objects, and another for the transaction log: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"create database mydata on bigdevice = 4      log on logdev = 2REMAP="BO--Body"Now, if you MOREINFO="NONE"use MOREINFO="NONE"mydata, and run MOREINFO="NONE"sp_helpdb, you'll see: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpdb mydata REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"name       db_size  owner     dbid   created      status---------- -------- --------- ------ ------------ ---------------mydata       6.0 MB sa             4 May 27, 1993  no options setREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"device_fragments       size          usage           free kbytes---------------------- ------------- --------------- -----------bigdevice              4.0 MB        data only              3408logdev                 2.0 MB        log only               2032REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"device                 segment---------------------- ----------------------bigdevice              defaultbigdevice              systemlogdev                 logsegmentREMAP="BO--Body"Like all newly created databases, MOREINFO="NONE"mydata has the segments named MOREINFO="NONE"default, MOREINFO="NONE"system and MOREINFO="NONE"logsegment. Since the MOREINFO="NONE"create database statement used MOREINFO="NONE"log MOREINFO="NONE" on, the MOREINFO="NONE"logsegment is mapped to its own device-MOREINFO="NONE"logdev, and the MOREINFO="NONE"default and MOREINFO="NONE"system segment are both mapped to MOREINFO="NONE"bigdevice. REMAP="BO--Body"If you add additional space on the same devices to MOREINFO="NONE"mydata, and then run MOREINFO="NONE"sp_helpdb again, you'll see entries for the added fragments: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"use master REMAP="UI--UserInput" FORMAT="LINESPECIFIC"alter database mydata on bigdevice = 2    log on logdev = 1 REMAP="UI--UserInput" FORMAT="LINESPECIFIC"use mydata REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpdb mydata REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"name       db_size  owner     dbid   created      status---------- -------- --------- ------ ------------ ---------------mydata       9.0 MB sa             4 May 27, 1993  no options setREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"device_fragments       size          usage           free kbytes---------------------- ------------- --------------- -----------bigdevice              2.0 MB        data only              2048bigdevice              4.0 MB        data only              3408logdev                 1.0 MB        log only               1024logdev                 2.0 MB        log only               2032REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"device                 segment---------------------- ----------------------bigdevice              defaultbigdevice              systemlogdev                 logsegmentREMAP="BO--Body"Always add log space to log space, and data space to data space. SQL Server will warn you, and instruct you to use MOREINFO="NONE"with override if you try to allocate a segment that is already in use for data to the log, or vice versa. Remember that segments are mapped to entire devices, and not just to the space fragments. If you change any of the segment assignments on a device, you make the change for all of the fragments. REMAP="BO--Body"When you allocate a new device to the database with MOREINFO="NONE"alter database-one that's not in use by the database-the new fragments are automatically assigned:MARK="BULL" REMAP="BU--Bullet"To the MOREINFO="NONE"system and MOREINFO="NONE"default segments, if they are in the MOREINFO="NONE"on clause, or if they are default devices, orTo the log segment, if they are in the MOREINFO="NONE"log on clauseREMAP="BO--Body"The following example allocates a new database device that has not been used by MOREINFO="NONE"mydata: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"use master REMAP="UI--UserInput" FORMAT="LINESPECIFIC"alter database mydata on newdevice = 3 REMAP="UI--UserInput" FORMAT="LINESPECIFIC"use mydata REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpdb mydata REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"name       db_size  owner     dbid   created      status---------- -------- --------- ------ ------------ ---------------mydata      12.0 MB sa             4 May 27, 1993  no options setREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"device_fragments       size          usage           free kbytes---------------------- ------------- --------------- -----------bigdevice              2.0 MB        data only              2048bigdevice              4.0 MB        data only              3408logdev                 1.0 MB        log only               1024logdev                 2.0 MB        log only               2032newdevice              3.0 MB        data only              3072REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"device                 segment---------------------- ----------------------bigdevice              defaultbigdevice              systemlogdev                 logsegmentnewdevice              defaultnewdevice              systemREMAP="BO--Body"The MOREINFO="NONE"default and MOREINFO="NONE"system segments are mapped to the new space. In some cases, you want the new space for use as default storage space for MOREINFO="NONE"create table or MOREINFO="NONE"create indexID="IN47457"Segmentsassigning a table or index to specific
ID="IN37458"Tablesassigning to specific segments
ID="IN38459"Indexesassigning to specific segments
 statements. In that case, this allocation is fine. However, if you're adding space in order to assign a table or index to a specific segment (and therefore to specific devices), drop the MOREINFO="NONE"system and MOREINFO="NONE"default segments from the new fragment, and add your own segment name. REMAP="BO--Body"The following example creates a segment called MOREINFO="NONE"new_space on MOREINFO="NONE"newdevice: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addsegment new_space, mydata, newdevice REMAP="BO--Body"Here is just the portion of the MOREINFO="NONE"sp_helpdb report that's changed, the portion that lists the segment mapping: REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"device                         segment ---------------------------- ------------------bigdevice                      default bigdevice                      system logdev                         logsegment newdevice                      default newdevice                      new_space newdevice                      system REMAP="BO--Body"Notice that the MOREINFO="NONE"default and MOREINFO="NONE"system segments are still mapped to MOREINFO="NONE"newdevice. If you're planning to use new_space to store a user table or index for improved performance, and want to insure that other user objects aren't stored on the device by default, drop the MOREINFO="NONE"default and MOREINFO="NONE"system segments with MOREINFO="NONE"sp_dropsegment: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_dropsegment system, mydata, newdevice REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_dropsegment "default", mydata, newdevice ID="IN41460"" " (quotation marks)enclosing values inREMAP="BO--Body"The quotes around "default" are needed because it's a Transact-SQL reserved word. REMAP="BO--Body"Here is just the portion of the MOREINFO="NONE"sp_helpdb report that shows the segment mapping: REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"device                         segment ---------------------------- --------------------bigdevice                      default bigdevice                      system logdev                         logsegment newdevice                      new_space REMAP="BO--Body"Only MOREINFO="NONE"new_space is now mapped to MOREINFO="NONE"newdevice. Users who create objects can use MOREINFO="NONE"on MOREINFO="NONE"new_space to place a table or index on the device that corresponds to that segment. Since the MOREINFO="NONE"default segment is not using that database device, users who create tables and indexes without using the MOREINFO="NONE"on clause won't be placing them on your specially-prepared device. REMAP="BO--Body"If you MOREINFO="NONE"alter database on MOREINFO="NONE"newdevice again, the new space fragment acquires the same segment mapping as the existing fragment of that device (that is, the MOREINFO="NONE"new_space segment only). REMAP="BO--Body"At this point, if you use MOREINFO="NONE"create table and name MOREINFO="NONE"new_space as the segment, you'll get results like these from MOREINFO="NONE"sp_help and MOREINFO="NONE"sp_helpsegment: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"create table mytabl (c1 int, c2 datetime)     on new_spaceREMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_help mytablREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Name              Owner             Type----------------- ----------------- ----------------mytabl            dbo               user tableREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Data_located_on_segment        When_created------------------------------ --------------------new_space                     May 27 1993  3:21PMREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Column_name   Type      Length Nulls Default_name Rule_name------------- --------- ------ ----- ------------ ----------c1            int            4     0 NULL           NULLc2            datetime       8     0 NULL           NULLObject does not have any indexes.No defined keys for this object.REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpsegment new_space REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"segment name                           status  ------- ------------------------------ ------        3 new_space                           0  REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"device                 size           free_space   ---------------------- -------------- -----------  newdevice              3.0MB                 1528  ID="IN42461"Segmentstutorial for creating
ID="IN42462"Tutorial for creating segments
ID="IN35463"User segments, creatingREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"table_name            index_name             indid   --------------------- ---------------------- ------  mytabl                mytabl                      0RENDERAS="SECT1"Other Factors in Using Segments   ID="IN29464"Segmentsclustered indexes on
ID="IN57465"Clustered indexesClustered indexeson segmentssegmentsID="X41643" RENDERAS="SECT2"Segments and Clustered Indexes   ID="IN117466"Tablesmigration to a clustered index
ID="IN29467"Tablesmoving between devicesREMAP="BO--Body"The bottom or leaf level of a clustered index contains the actual data. By definition, therefore, a table and its clustered index are on the same segment. If you create a table on one segment, and then create its clustered index on a different segment, the table travels with its index. The entire table will "leave" the segment on which the table was created and migrate to the segment where the clustered index is created. This provides a quick and easy mechanism for moving a table to another segment in your database.REMAP="BO--Body"This example creates a clustered index, without specifying the segment name, using the same table just created on the new_space segment in the example above. Checking new_space after the MOREINFO="NONE"create index command shows that there are no longer any objects on the segment:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"/* Don't try this at home */create clustered index mytabl_cix    on mytabl(c1)REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpsegment new_spaceREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"segment name                           status ------- ------------------------------ ------       3 myseg                               0 REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"device              size             free_space  ------------------- ---------------- ----------- datadev2            2.0MB                   1016ID="IN77468"create table commandclustered indexes and
ID="IN74469"create index commandmoving tables withREMAP="BO--Body"If you have placed a table on a segment, and need to create a clustered index, be sure to use the MOREINFO="NONE"on segment_name clause, or the table will migrate to the default segment.ID="IN51470"Spacesharing on segmentsRENDERAS="SECT2"Sharing Space on Segments   ID="IN38471"Database objectsplacement on segments
ID="IN37472"Segmentsdatabase object placement onREMAP="BO--Body"When all databases and database objects on a SQL Server share a default pool of space, any table or index might grow to fill the entire pool of space. Similarly, if you place several database objects on a single segment, any of those objects may grow to fill the entire segment. They cannot grow beyond the devices named by that segment to contend for space with objects on other devices, but they will be in contention with each other for space. ID="IN65473"Segmentstext/image columns andRENDERAS="SECT2"Placing Text Pages on a Separate Device   ID="IN75474"text datatypestorage on separate devicesREMAP="BO--Body"When you create a table with textID="IN76475"image datatypestorage on separate devices
 or imageID="IN11476"Chainstext
ID="IN67477"text datatypechain of text pages
ID="IN102478"text datatypesysindexes table and
 columns, the data is stored on a separate chain of text pages. A table that contains textID="IN103479"image datatypesysindexes table and
 or image columns has an additional entry in MOREINFO="NONE"sysindexes for the text chain, with the name column set to the name of the table preceded by the letter "t" and an MOREINFO="NONE"indid of 255. You can use MOREINFO="NONE"sp_placeobjectID="IN50480"sysindexes table
 to store the text chain on a separate device, giving both the table name, and the name of the text chain from MOREINFO="NONE"sysindexes: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_placeobject textseg, "mytab.tmytab" By default, a chain of text pages is placed on the same segment as its table. After you execute MOREINFO="NONE"sp_placeobject, whatever pages were previously written on the old device remain allocated, but all new allocations take place on the new segment. ID="IN90481"Information (Server)segmentsID="IN37482"Segmentsinformation onRENDERAS="SECT1"Information on Storage ID="IN37483"Information (Server)database devices
ID="IN34484"Database devicesinformation about
ID="IN81485"sp_helpdb system procedurestorage informationREMAP="BO--Body"To find the names of the database devices on which a particular database resides, use the system procedure MOREINFO="NONE"sp_helpdb with the database name: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpdb pubs2 REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"name      db_size    owner     dbid created        status--------- ---------- --------- ---- -------------- --------------pubs2         2.0 MB sa           5 May 25, 1993   no options set device_fragments    size          usage            free kbytes------------------- ------------- ---------------- -----------pubdev              2.0 MB        data and log             288REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"device                 segment  ---------------------- ----------------------pubdev                 defaultpubdev                 logsegmentpubdev                 systemREMAP="BO--Body"MOREINFO="NONE"sp_helpdb reports on the size and usage of the devices in use by the named database. If you are using the named database, MOREINFO="NONE"sp_helpdb also reports on the segments in the database, and the devices that are named by the segments. REMAP="BO--Body"When MOREINFO="NONE"sp_helpdb is used without arguments, it reports on all the databases on SQL Server: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpdb REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"name          db_size  owner dbid created      status------------- -------- ----- ---- ------------ -------------------master          3.0 MB sa       1 Jan 01, 1900 no options setmodel           2.0 MB sa       3 Jan 01, 1900 no options setmydata          4.0 MB sa       7 Aug 25, 1993 no options setpubs2           2.0 MB sa       6 Aug 23, 1993 no options setsybsecurity    20.0 MB sa       5 Aug 18, 1993 no options setsybsystemprocs 10.0 MB sa       4 Aug 18, 1993 trunc log on chkpttempdb          2.0 MB sa       2 Aug 18, 1993 select into/bulkcopyID="IN26486"Spaceinformation on usage
ID="IN43487"Databasesinformation on storage space used
ID="IN64488"sp_spaceused system procedureREMAP="BO--Body"To get a summary on the amount of storage space used by a database, execute the system procedure MOREINFO="NONE"sp_spaceused in the database: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_spaceused REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"database_name                  database_size------------------------------ -------------pubs2                          2.0 MBREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"reserved      data          index_size      unused------------- ------------- --------------- --------1720 KB       536 KB        344 KB          840 KBID="IN29489"Spacereserved and unreservedREMAP="BO--Body"The columns in the report are:REMAP="RI--RefIndent"MOREINFO="NONE"database_size - gives the total amount of space allocated to the database by MOREINFO="NONE"create database or MOREINFO="NONE"alter database commands. MOREINFO="NONE"reserved - ID="IN32490"Extents
ID="IN22491"Space allocationpages
reports the amount of space that has been allocated to all the tables and indexes that have been created in the database. (Space is allocated to database objects inside a database in increments of one extent, or 8 pages, at a time.) ID="IN69492"Databasesmonitoring space used byMOREINFO="NONE"data and MOREINFO="NONE"index_size - shows how much space has actually been used by data and indexes. MOREINFO="NONE"unused - shows the amount of space that has been reserved but not yet used by existing tables and indexes. REMAP="BO--Body"Adding the values in the MOREINFO="NONE"unused, MOREINFO="NONE"index_size, and MOREINFO="NONE"data columns should give you the figure in the reserved column. Subtracting MOREINFO="NONE"reserved from MOREINFO="NONE"database_size gives you the amount of unreserved space. This space is available to new objects or to existing objects which grow beyond the space that has already been reserved for them. ID="IN36493"Storage managementinformation aboutREMAP="BO--Body"Running MOREINFO="NONE"sp_spaceused regularly enables you to monitor the amount of database space available. For example, if the value of reserved is close to the total MOREINFO="NONE"database_size, you are close to running out of space for new objects. If MOREINFO="NONE"unused is also quite small, you are close to running out of space for additional data as well. ID="IN30494"Database objectsspace used byREMAP="BO--Body"You can also use MOREINFO="NONE"sp_spaceused with a table name as its parameter, and get a report on the space used by that table, like this: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_spaceused titles REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"name   rowtotal reserved  data    index_size unused ------ -------- --------- ------- ---------- -----titles 18       48 KB     6 KB    4 KB       38 KB REMAP="BO--Body"The rowtotal column in this report may be very different than the results of running MOREINFO="NONE"select count(*) on the table, because MOREINFO="NONE"sp_spaceused computes the value with the built-in function MOREINFO="NONE"rowcnt. This function uses values stored in the allocation pages that record the average number of rows per page. These values aren't updated regularly, however, so they can be very different for tables with a lot of activity. The MOREINFO="NONE"update statistics command, MOREINFO="NONE"dbcc checktable and MOREINFO="NONE"dbcc checkdb update the rows-per-page estimate, so rowtotal will be most accurate after one of these commands has been run. REMAP="BO--Body"It is a good idea to run MOREINFO="NONE"sp_spaceusedID="IN72495"syslogs tablemonitoring space used by
 regularly on MOREINFO="NONE"syslogs, since the transaction log can grow rapidly if there are frequent database modifications. This is a particular problem if the transaction log is not on a separate device-in which case it will be competing with the rest of the database for space. REMAP="BO--Body"You may want to write some of your own queries for additional information about physical storage. For example, to determine the total number of 2K blocks of storage space that exist on SQL Server, you can query MOREINFO="NONE"sysdevices: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select sum(high - low) from sysdevices where status in (2, 3) REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"-------------------                7168 REMAP="BO--Body"A "2" in theMOREINFO="NONE" statusID="IN35496"Segmentsinformation on
ID="IN86497"Information (Server)segments
ID="IN31498"Segments
 column represents a physical device; a "3" represents a physical device that is also a default device. REMAP="BO--Body"NUMBER="4" ID="X11284"Managing SQL Server Logins and Database UsersRENDERAS="SECT1"IntroductionID="IN921"Identity of user. See Aliases; Logins; Users
ID="IN672"Login names. See Logins
ID="IN1233"LoginsLoginsSee also Remote logins; Users!see also Remote logins; Users
ID="IN1374"NamesNamesSee also Information (Server); Logins!see also Information (Server); Logins
ID="IN1205"UsersUsersSee also Aliases; Groups; Logins; Remote logins!see also
ID="IN696"Managing users. See Users
ID="IN827"Remote server users. See Remote logins
ID="IN758"Remote users. See Remote loginsREMAP="BO--Body"This chapter describes methods for managing SQL Server login accounts and database users. Topics covered include:MARK="BULL" REMAP="BU--Bullet"Adding new logins to SQL Server Creating groups Adding users to databases Dropping logins, users, and groupsLocking SQL Server loginsChanging user information Changing user information such as passwords and group membershipObtaining information about users, groups, and SQL Server usageRENDERAS="SECT1"ID="IN809"System proceduresSystem proceduresfor adding usersadding users
ID="IN2610"Usersadding
ID="IN4011"Addingusers to a database
ID="IN4312"Addingnew users to databases
Adding New Users: an OverviewREMAP="BO--Body"The process of adding new logins to SQL Server, adding users to databases, and granting them permission to use commands and database objects is divided between the System Security Officer, System Administrator, and Database Owner.REMAP="BO--Body"The process of adding new users consists of the following steps: NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"A System Security Officer creates a server login account for a new user is created with MOREINFO="NONE"sp_addlogin. A System Administrator or Database Owner adds a user to a database with MOREINFO="NONE"sp_adduser. This command can also give the user an alias or assign the user to a group. Groups are added using MOREINFO="NONE"sp_addgroup. See LINKEND="X73525""Creating Groups: sp_addgroup" 
 for more information.A System Administrator, Database Owner, or object owner grants the user or group specific permissions on specific commands and database objects. Users or groups can also be granted permission to grant specific permissions on objects to other users or groups. See LINKEND="X24272"Chapter 5,  "Managing User Permissions"
 for detailed information on permissions.ID="INA7813"System proceduresSystem proceduresfor adding usersadding usersREMAP="BO--Body"The following table summarizes the commands and system procedures used for these tasks.PGWIDE=1 TOCENTRY="1"LBL="Table 4-1: " ID="X28945"System Procedures for Adding Users to SQL Server and DatabasesCOLS="4" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="8*"COLNAME="C2" COLWIDTH="25*"COLNAME="C3" COLWIDTH="10*"COLNAME="C4" COLWIDTH="8*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"Command or 
ProcedureCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"TaskCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Executed ByCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"WhereVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_addloginCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Create new logins, assign passwords, default 
databases, default language, and full name, COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SSOCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"any databaseCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_addgroupCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Create groupsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DBO or SACOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"user 
databaseCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_adduserCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Add users to database, assign aliases, assign 
groupsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DBO or SACOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"user 
databaseCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"grantCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Grant groups or users permission on commands 
and database objectsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DBO, SA, or object 
ownerCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"user 
databaseID="X57429" RENDERAS="SECT2"Choosing a Password REMAP="BO--Body"ID="IN1914"Passwordsrules for
Your ID="IN1815"Passwordschoosing
password is the first line of defense against SQL Server access by unauthorized people. SQL Server passwords must be at least six bytes long and can contain any printable letters, numerals, or symbols. When you create your own password or one for another user, choose one that cannot be guessed. Do not use personal information, names or nicknames of pets or loved ones, or words that appear in the dictionary. The most secure passwords are ones that combine upper- and lowercase characters with numbers, punctuation, and accented characters. Once you select a password, protecting it is your responsibility. Never give anyone your password and never write it down where anyone can see it.ID="IN8816"sp_addlogin system procedure
ID="IN3717"Serversadding users to
ID="IN4218"Serversadding new logins to
ID="IN3819"Loginsadding to servers
ID="IN2720"AddingloginsID="X68053" RENDERAS="SECT1"Adding Logins to SQL ServerREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_addlogin adds new login names to SQL Server. It does not give the user permission to access any user databases; the procedure MOREINFO="NONE"sp_adduser gives users access to specific databases. Only the System Security Officer can execute MOREINFO="NONE"sp_addlogin. Here is its syntax:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_addlogin login_name, password [, defdb] [, deflanguage [, fullname]]]MARK="BULL" REMAP="BU--Bullet"The login_name parameter (the new user's login name) is required. The login name must follow the rules for identifiers and must be unique on SQL Server. It is highly recommended that the SQL Server login name be the same as the user's operating system login name. This makes logging into SQL Server easier, since many client programs use the operating system login name as a default. It also simplifies management of server and operating system login accounts, and makes it easier to correlate usage and audit data generated by SQL Server and by the operating system.The passwordID="IN4121"" " (quotation marks)enclosing values in
 parameter, also required, is a password for the new user. The password must be at least six bytes long, and can be any printable letters, numerals, or symbols. A password must be enclosed in quotation marks in MOREINFO="NONE"sp_addlogin if:MARK="DASH" REMAP="BS--BulletSub"It includes characters besides A-Z, a-z, 0-9,_, #, valid single- or multi-byte alphabetic characters, or accented alphabetic charactersIt begins with 0-9REMAP="UN--Under"See LINKEND="X57429""Choosing a Password"
 for guidelines on choosing secure passwords. A user can change his or her own password, and a System Security Officer can change any user's password, with MOREINFO="NONE"sp_passwordID="IN5622"Passwordssp_password
ID="INA6323"sp_password system procedure
. ID="IN3624"Databasesdefault
defdb specifies the name of the new user's default database. This causes the user to start each session on SQL Server in that database, without having to issue the MOREINFO="NONE"useID="IN6625"sp_modifylogin system procedure
 command. A System Administrator can change anyone's default database with MOREINFO="NONE"sp_modifylogin; other users can only change their own.ID="IN10326"master databasemaster databaseas default databasedefault databaseIf you do not specify a user's default database parameter with MOREINFO="NONE"sp_addlogin, the user's default database is masterID="IN11327"master databasemaster databaseas user default databaseuser default database
. Assign default databases other than master to most users, to discourage users from creating database objects in the master database. REMAP="UN--Under"After you specify the default database, add the user to the default database with MOREINFO="NONE"sp_adduser, so that he or she can log in directly to the default database. MOREINFO="NONE"deflanguageID="IN3528"Defaultslanguage
 specifies the default language
ID="IN6629"sp_modifylogin system procedure
 in which this user's prompts and messages are displayed. If you omit this parameter, SQL Server's default language is used. The System Administrator can change any user's default language with MOREINFO="NONE"sp_modifylogin; other users can only change their own. fullnameID="IN6630"sp_modifylogin system procedure
 specifies a full name for the user. This can be useful for documentation and identification purposes. If omitted, no full name is added. The System Administrator can change any user's full name with MOREINFO="NONE"sp_modifylogin; other users can only change their own.REMAP="BO--Body"The following statement sets up an account for the user "maryd" with the password "100cents," the default database (MOREINFO="NONE"master), the default language, and no full name: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addlogin "maryd", "100cents"ID="INA4331"" " (quotation marks)enclosing punctuation
ID="IN1732"Spaces, character
ID="IN4033"Punctuationenclosing in quotation marks
ID="IN2734"Reserved wordsTransact-SQLREMAP="BO--Body"Quotation marks are not required around character-type parameters to stored procedures as long as they do not contain spaces, punctuation marks or Transact-SQL reserved words. However, it is never wrong to use quotes in MOREINFO="NONE"sp_addlogin. REMAP="BO--Body"Once this statement is executed, "maryd" can log in to the SQL Server. She is automatically treated as a guest user in MOREINFO="NONE"master, with limited permissions, unless she has been specifically given access to MOREINFO="NONE"master. REMAP="BO--Body"Here's a statement that sets up a login account and a password ("rubaiyat") for user "omar_khayyam," and makes MOREINFO="NONE"pubs2 his default database:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addlogin omar_khayyam, rubaiyat, pubs2ID="IN9735"null keywordin sp_addloginREMAP="BO--Body"If you wish to specify a full name for a user but use the default database and language, you must specify MOREINFO="NONE"null in place of those two parameters. For example:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addlogin omar, rubaiyat, null, null,     "Omar Khayyam"ID="IN2136"Parameters, procedureREMAP="BO--Body"As an alternative, you can specify a parameter name, in which case you do not have to specify all the parameters. For example:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addlogin omar, rubaiyat,     @fullname = "Omar Khayyam"RENDERAS="SECT2"Effects on System TablesID="IN10637"syslogins tablesp_addlogin effect onREMAP="BO--Body"When you execute MOREINFO="NONE"sp_addlogin, SQL Server adds a row to MOREINFO="NONE"master.dbo.syslogins, assigns a unique server user ID (suid) for the new user, and fills in other information. When a user logs in, SQL Server looks in MOREINFO="NONE"syslogins for the name and password the user gives. The MOREINFO="NONE"password column is encrypted with a one-way algorithm and so is not human-readable.ID="IN4538"suid columnREMAP="BO--Body"The suid column in MOREINFO="NONE"syslogins uniquely identifies the user on SQL Server. A user's MOREINFO="NONE"suid remains the same no matter what database he or she is using. The MOREINFO="NONE"suid 1 is always assigned to the default "sa" account that is created when SQL Server is installed. Other users' server user IDs are small integers assigned consecutively by SQL Server each time MOREINFO="NONE"sp_addlogin is executedID="IN3639"Loginsadding to servers
.ID="IN8640"sp_addlogin system procedure
ID="IN3541"Serversadding users to
ID="IN4042"Serversadding new logins to
ID="IN2543"AddingloginsRENDERAS="SECT2"Permissions RequiredREMAP="BO--Body"Only a System Security Officer can execute MOREINFO="NONE"sp_addlogin.ID="IN5944"Creatinggroups
ID="IN10545"GroupsGroupsSee also "public" group!see also public group
ID="IN10546""public" grouppublic groupSee also Groups!see also GroupsID="X73525" RENDERAS="SECT1"Creating Groups: sp_addgroupID="IN2247"Permissionsgroups and
ID="IN3248"Permissionsrevoking from groupsREMAP="BO--Body"Groups provide a convenient way to grant and revoke permissions to more than one user in a single statement. Groups enable you to provide a collective name to a group of users. They are especially useful if you administer a SQL Server installation that has large numbers of users.ID="IN2849""public" grouppublic groupREMAP="BO--Body"Every user is a member of the group "public," and can be a member of one other group. (Users remain in "public" whether or not they belong to another group.)ID="IN5350"Serversadding new logins toREMAP="BO--Body"It is probably most convenient to create groups before adding users to a database since the MOREINFO="NONE"sp_adduserID="IN7451"sp_addgroup system procedure
 procedure can assign users to groups as well as adding them to the database. A System Administrator or the Database Owner can create a group at any time with MOREINFO="NONE"sp_addgroup. The syntax for MOREINFO="NONE"sp_addgroup is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_addgroup MOREINFO="NONE"groupnameID="IN2752"GroupsnamingREMAP="BO--Body"The group name, a required parameter, must follow the rules for identifiers. For example, to set up the Senior Engineering group, use the following command while using the database to which you wish to add the group: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addgroup senioreng ID="IN6653"sp_changegroup system procedureREMAP="BO--Body"The System Administrator can assign or re-assign users to groups with MOREINFO="NONE"sp_changegroup. RENDERAS="SECT2"Permissions Required   REMAP="BO--Body"MOREINFO="NONE"sp_addgroup can be executed by the Database Owner or by a System Administrator.ID="IN7054"System tablessp_addgroup effect on
ID="IN10555"sysusers tablesp_addgroup effect onRENDERAS="SECT2"Effects on System Tables   REMAP="BO--Body"The MOREINFO="NONE"sp_addgroup system procedure adds a row to MOREINFO="NONE"sysusers in the current database. In other words, each group in a database-as well as each user-has an entry in MOREINFO="NONE"sysusersID="IN2456"Usersadding
ID="IN5557"Creatinggroups
. ID="IN2658"Usersadding
ID="IN8759"sp_adduser system procedure
ID="IN3660"Databasesadding usersID="X96087" RENDERAS="SECT1"Adding Users to Databases: sp_adduserREMAP="BO--Body"The procedure MOREINFO="NONE"sp_adduser adds a user to a specific database. The user must already have a SQL Server login. Here is the syntax for MOREINFO="NONE"sp_adduser: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_adduser MOREINFO="NONE"login_name [, MOREINFO="NONE"name_in_db [, MOREINFO="NONE"groupname]]MARK="BULL" REMAP="BU--Bullet"login_name is the login name of an existing user. It is required. MOREINFO="NONE"name_in_db allows you to specify a name different from the login name by which the user is to be known inside the database. It is optional.ID="IN2861"Namesserver user
ID="IN2262"User namespreferences
ID="IN4563"Preferences, user nameREMAP="UN--Under"This feature is supplied to accommodate users' preferences. For example, if there are five SQL Server users named Mary, all of them must have different login names. Mary Doe might log in as "maryd," Mary Jones as "maryj," and so on. However, if the Marys don't use the same databases, each might prefer to be known simply as "mary" inside a particular database. REMAP="UN--Under"If no MOREINFO="NONE"name_in_db parameter is given, the name inside the database is the same as MOREINFO="NONE"login_name. REMAP="UN--Under"Be careful not to confuse this capability with the alias mechanism described in LINKEND="X28647""Using Aliases in Databases" 
, which maps the identity and privileges of one user to another.groupnameID="IN9364""public" grouppublic groupsp_adduser andsp_adduser and
, also optional, is the name of an existing group in the database. If you do not specify a group name, the user is made a member of the default group "public". Users remain in "public" even if they are a member of another group. See LINKEND="X64567""Changing a User's Group Membership: sp_changegroup" 
 for information on modifying a user's group membership.REMAP="BO--Body"Here's a command that the owner of the MOREINFO="NONE"pubs2 database could give to allow "maryh" of the (already existing) engineering group to access MOREINFO="NONE"pubs2: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_adduser maryh, mary, eng REMAP="BO--Body"Here's how to give "maryd" access to MOREINFO="NONE"pubs2, with her name in the database the same as her login name, and making her a member of the "public" group: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_adduser maryd REMAP="BO--Body"Here's how to add a user and put the user in a group, but without different names, using MOREINFO="NONE"null in place of a new user name: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_adduser maryj, null, eng REMAP="BO--Body"Users who have access to a database still need permission to do things inside it: to read data, modify data, and use certain commands. These permissions are set up by the owners of the database objects or user databases with the MOREINFO="NONE"grant and MOREINFO="NONE"revoke commands. They are discussed in LINKEND="X24272"Chapter 5,  "Managing User Permissions"
.ID="IN6965"System tablessp_adduser effect onRENDERAS="SECT2"Effects on System TablesID="IN10466"sysusers tablesp_adduser effect onREMAP="BO--Body"The MOREINFO="NONE"sp_adduser system procedure adds a row to the MOREINFO="NONE"sysusers system table in the current database. Once a user has an entry in the MOREINFO="NONE"sysusers table of a database, he or she: MARK="BULL" REMAP="BU--Bullet"Can issue the MOREINFO="NONE"use command and access that database, Will use that database by default, if the default database parameter was issued as part of MOREINFO="NONE"sp_addlogin, or Can use MOREINFO="NONE"sp_modifylogin to make that database the default. RENDERAS="SECT2"Permissions RequiredREMAP="BO--Body"MOREINFO="NONE"sp_adduser can be executed by the Database Owner and System Administrator.ID="IN9167"Creatingguest usersID="X69386" RENDERAS="SECT2"Adding a "guest" User REMAP="BO--Body"Creating a user named "guest" in a database
enables any user with a SQL Server account to access the database as a guest user. If a user issues the "MOREINFO="NONE"use database_name" command, and his or her name is not found in the database's MOREINFO="NONE"sysusersID="IN2368"Permissionsguest users
 table, SQL Server looks for a guest user. If there is one, the user is allowed to access the database, with the permissions of the guest user. REMAP="BO--Body"The Database Owner can add a guest entry to the MOREINFO="NONE"sysusers table of any user database with the system procedure MOREINFO="NONE"sp_adduser, like this: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_adduser guestREMAP="BO--Body"The guest user can be removed with MOREINFO="NONE"sp_dropuser, as discussed in LINKEND="X70066""Dropping Database Users: sp_dropuser" 
.ID="IN7369"master databasedropping guest users of
ID="IN6370"master databaseguest user in
ID="IN6471"Droppingguest users of masterREMAP="BO--Body"If you drop the guest user from the MOREINFO="NONE"master database, server users who have not yet been added to any databases will be unable to log into SQL Server.ID="IN4772"Permissionsguest usersRENDERAS="SECT3""guest" User PermissionsID="INA8273""public" grouppublic groupguest user permissions andguest user permissions andREMAP="BO--Body"When you first add the username "guest" to a database, "guest" inherits the privileges of "public". The Database Owner and the owners of database objects can change these permissions as they wish, using MOREINFO="NONE"grant and MOREINFO="NONE"revoke, to make the privileges of "guest" either more restrictive or less restrictive than those of "public." See LINKEND="X24272"Chapter 5,  "Managing User Permissions"
, for a description of the privileges "public" has.REMAP="BO--Body"When you install SQL Server, MOREINFO="NONE"master..sysusers contains a guest entry. The installation script for the MOREINFO="NONE"pubs2 database also contains a guest entry for its MOREINFO="NONE"sysusers table.ID="IN5774"Guest usersGuest usersin user databasesuser databasesRENDERAS="SECT3"The "guest" User in User DatabasesREMAP="BO--Body"In user databases, the Database Owner is responsible for setting up any guest mechanisms that are needed. Adding a guest user to a user database allows an owner to permit all SQL Server users to use that database without having to use MOREINFO="NONE"sp_adduser to explicitly name each one as a database user. ID="IN3075"Accessrestricting guest usersREMAP="BO--Body"You can use the guest mechanism to restrict access to database objects while allowing access to the database.REMAP="BO--Body"For example, the owner of the MOREINFO="NONE"titles table could grant MOREINFO="NONE"select permission on MOREINFO="NONE"bugs to all database users except "guest" by executing the following three commands: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"MOREINFO="NONE"grant select on titles to public REMAP="UI--UserInput" FORMAT="LINESPECIFIC"MOREINFO="NONE"sp_adduser guest REMAP="UI--UserInput" FORMAT="LINESPECIFIC"MOREINFO="NONE"revoke all on titles from guest REMAP="BO--Body"If you wish to grant permissions to "public", but do not wish to grant these permissions to "guest", be sure to issue a MOREINFO="NONE"revoke command after granting permission to "public". The group "public" includes all users.ID="INA6476"Guest userspubs2 database andRENDERAS="SECT3"The "guest" User in pubs2REMAP="BO--Body"The "guest" user entry in pubs2, the sample database, allows new SQL Server users to follow the examples in the Transact-SQL User's Guide and to engage in a certain amount of experimentation. The guest in pubs2 is given a wide range of privileges:MARK="BULL" REMAP="BU--Bullet"MOREINFO="NONE"select permission and data modification permission on all of the user tablesMOREINFO="NONE"execute permission on all of the proceduresMOREINFO="NONE"create table, create view, create rule, create default and MOREINFO="NONE"create procedure permissionID="IN3177"UsersvisitingRENDERAS="SECT2"Visitor Accounts on SQL ServerREMAP="BO--Body"As another method of accommodating visiting users on SQL Server, the System Security Officer can use MOREINFO="NONE"sp_addlogin to enter a row in ID="IN6878"syslogins tablevisiting users and
master..syslogins with a login name and password that visiting users are instructed to use (for example, "visitor"). Typically, such users are granted very restricted permissions. A default database may be assigned. Allowing more than one person to use the visitor account does not provide good individual accountability, however, since the actions of individual users of the visitor account cannot be audited.REMAP="BO--Body"Be careful not to confuse such visitor accounts with the guest user mechanism described earlier. ID="IN2079"Addingremote loginsRENDERAS="SECT2"Adding Remote Users REMAP="BO--Body"You can allow users on another SQL Server to execute stored procedures on your server by enabling remote access. Working with a System Administrator of the remote server, you can also allow users of your server to execute remote procedure calls to the remote server. To enable remote procedure calls, both the local and the remote server must be configured, following several steps. See LINKEND="X99826"Chapter 15,  "Managing Remote Servers"
, for information on setting up remote servers and adding remote users.RENDERAS="SECT2"Granting Permissions to Database UsersREMAP="BO--Body"The final step in adding database users is granting them permission to use commands and database objects. See LINKEND="X24272"Chapter 5,  "Managing User Permissions"
ID="IN4180"Addingnew users to databases
ID="IN3881"Addingusers to a database
ID="IN3482"Databasesadding users
ID="IN8583"sp_adduser system procedure
ID="IN2484"Usersadding
.ID="IN8785"Databasesdropping users fromRENDERAS="SECT1"Dropping Logins, Users, and GroupsREMAP="BO--Body"The following system procedures allow a System Administrator or Database Owner to drop logins, users and groups.TOCENTRY="1"LBL="Table 4-2: "Dropping Logins, Users, and GroupsCOLS="4" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="10*"COLNAME="C2" COLWIDTH="15*"COLNAME="C3" COLWIDTH="8*"COLNAME="C4" COLWIDTH="7*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"System 
ProcedureCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"TaskCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Executed ByCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"WhereVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_droploginCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Drop user from COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SACOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"masterCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_dropuserCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Drop user from databaseCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DBO or SACOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"user 
databaseCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_dropgroupCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Drop group from databaseCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DBO or SACOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"user 
database ID="X85742" RENDERAS="SECT2"Dropping Logins: sp_droploginID="IN2786"Droppingusers from servers
ID="IN2787"Usersdropping from servers
ID="IN2888"Loginsdropping from servers
ID="INA7589"sp_droplogin system procedure
ID="IN8690"Loginsdropping from serversREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_droploginID="IN2491"Denying access to a user
 denies a user access to SQL Server. It may be easier to lock logins rather than delete them, for these reasons:MARK="BULL" REMAP="BU--Bullet"You cannot drop a login who is a user in any database, and you cannot drop a user from a database if the user owns any objects in that database or has granted any permissions on objects to other users.SQL Server may reuse the dropped login account's server user ID (suid) when the next login account is created. This only occurs when the dropped login holds the highest suid in syslogins, but could compromise accountability if execution of MOREINFO="NONE"sp_droplogin is not being audited.You cannot drop the last remaining System Security Officer's or System Administrator's login account.REMAP="BO--Body"See LINKEND="X71995""Locking SQL Server Logins: sp_locklogin" 
 for information on locking logins.REMAP="BO--Body"Here is the syntax for MOREINFO="NONE"sp_droplogin: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_droplogin login_nameID="IN4392"Usersdropping from databasesID="X70066" RENDERAS="SECT2"Dropping Database Users: sp_dropuserID="IN7493"sp_dropuser system procedureREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_dropuser denies a SQL Server user access to the database in which it is executed. (If there is a "guest" user defined in that database, the user can still access it as "guest".)REMAP="BO--Body"Here is the syntax for dropping a user from a database: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_dropuser name_in_db REMAP="BO--Body"ID="IN3694"Database Ownersname inside database
name_in_db is usually the login name, unless another name has been assigned. REMAP="BO--Body"MOREINFO="NONE"sp_dropuser can be executed only by the Database Owner or a System Administrator. ID="INA2695"Database objectsownership
ID="IN3996"Droppingusers who own database objects
ID="IN3997"Database objectsdropping users who own
ID="IN4698"Database object ownersstatus not transferable
ID="IN4799"Database Ownersobjects not transferred betweenYou cannot drop a user who owns objects. Since there is no command to transfer ownership of objects, you must drop objects owned by a user before you drop the user with MOREINFO="NONE"sp_dropuser. If you wish to deny access to a user who owns objects, useMOREINFO="NONE" sp_locklogin to lock his or her account.  You also cannot drop a user who has granted permissions to other users.MOREINFO="NONE" sp_dropuser displays an informational message when this happens. Use MOREINFO="NONE"revoke with cascadeID="IN41100"Usersdropping from databases
 to revoke permissions from all users who were granted permissions by the user to be dropped, then drop the user. You must then re-grant permissions to the users, if appropriate.ID="IN31101"DroppinggroupsRENDERAS="SECT2"Dropping Groups: sp_dropgroupID="IN75102"sp_dropgroup system procedureREMAP="BO--Body"To drop a group, use MOREINFO="NONE"sp_dropgroup and give the group name: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_dropgroup groupnameREMAP="BO--Body"You cannot drop a group that has members. If you try to do so, the error report displays a list of the members of the group you are attempting to drop. To remove users from a group, execute MOREINFO="NONE"sp_changegroup, discussed in LINKEND="X64567""Changing a User's Group Membership: sp_changegroup" 
ID="IN83103"Databasesdropping users from
. ID="IN29104"LockingloginsID="X71995" RENDERAS="SECT1"Locking SQL Server Logins: sp_lockloginID="IN24105"Denying access to a userREMAP="BO--Body"Locking a SQL Server login account prevents that user from logging in. You may prefer to lock accounts instead of dropping them for reasons discussed in LINKEND="X85742""Dropping Logins: sp_droplogin" 
ID="IN64106"sp_locklogin system procedure
. The MOREINFO="NONE"sp_locklogin system procedure locks and unlocks accounts, or displays a list of locked accounts.REMAP="BO--Body"The syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_locklogin [login_name, "{lock | unlock}"]MARK="BULL" REMAP="BU--Bullet"login_name is the name of the account to be locked or unlocked. It must be an existing, valid account.MOREINFO="NONE"lock | MOREINFO="NONE"unlock specifies whether the account is to be locked or unlocked. ID="IN34107"Information (Server)locked loginsREMAP="BO--Body"Using MOREINFO="NONE"sp_locklogin with no parameters displays a list of all locked logins.REMAP="BO--Body"You can lock an account that is currently logged in. You will receive a warning that the account has been locked, but the user is not locked out of the account until he or she logs out. You can lock the account of a Database Owner, and a locked account can own objects in databases. In addition, you can use MOREINFO="NONE"sp_changedbowner to specify a locked account as the owner of a database.REMAP="BO--Body"SQL Server ensures that there is always at least one unlocked System Security Officer's account and one unlocked System Administrator's account.RENDERAS="SECT2"Permissions RequiredREMAP="BO--Body"Only System Administrators and System Security Officers can execute MOREINFO="NONE"sp_locklogin.RENDERAS="SECT1"ID="IN106108"System proceduresSystem proceduresfor changing user informationchanging user information
ID="IN88109"Changinguser information
Changing User InformationREMAP="BO--Body"Additional system procedures allow you to change any of the user information added with the commands discussed earlier in this chapter. For example, MOREINFO="NONE"sp_modifylogin and MOREINFO="NONE"sp_password change default databases and passwords for SQL Server users. REMAP="BO--Body"The system procedures described in LINKEND="X46727"Table 4-3
 change aspects of users' logins and database usage.PGWIDE=1 TOCENTRY="1"LBL="Table 4-3: " ID="X46727"System Procedures for Changing User InformationCOLS="4" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="11*"COLNAME="C2" COLWIDTH="26*"COLNAME="C3" COLWIDTH="8*"COLNAME="C4" COLWIDTH="7*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"System ProcedureCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"TaskCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Executed ByCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Where VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_passwordCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Change another user's password

Change own passwordCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SSO

userCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"any 
databaseCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_changegroupCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Change group assignment of a userCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SA, DBOCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"user 
database COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_modifyloginCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Change a login account's default database, default 
language, or full name

Change own default database, default language, 
or full nameCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SA


userCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"any databaseCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_trustloginCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Change a login account`s sensitivity labels, add 
labels to an account, remove labels from an 
accountCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SSOCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"any 
databaseID="X83352" RENDERAS="SECT2"Changing Passwords: sp_passwordID="IN37110"ChangingpasswordsREMAP="BO--Body"Your site may choose to use the MOREINFO="NONE"password expiration interval configuration variable to establish a password expiration interval to force all SQL Server users to change their passwords on a regular basis. (See LINKEND="X29469""password expiration interval"
 for information.) Even if you do not use MOREINFO="NONE"password expiration interval, for security reasons it is important that users change their passwords from time to time. REMAP="BO--Body"The column pwdate in syslogins records the date of the last password change. This query selects all login names whose passwords have not been changed since January 30th, 1994:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select name, pwdate from syslogins where pwdate < "Jan 30 1994"ID="IN56111"Passwordssp_password
ID="IN74112"sp_password system procedureREMAP="BO--Body"A user can change passwords at any time with the system procedure MOREINFO="NONE"sp_password. The System Security Officer can use this system procedure to change any other user's password. The syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_password caller_passwd, new_passwd [, login_name]MARK="BULL" REMAP="BU--Bullet"caller_passwd is the password of the login account that is currently executing MOREINFO="NONE"sp_password. When you are changing your own password, this is your old password. When a System Security Officer uses MOREINFO="NONE"sp_password to change another user's password, caller_passwd is the password of the System Security Officer.new_passwd is the new password for the user executing MOREINFO="NONE"sp_password, or for the user indicated by login_name. The password must be at least six bytes long, and can be any printable letters, numerals, or symbols. A password must be enclosed in quotation marks ID="IN44113"" " (quotation marks)enclosing passwords in
if:MARK="DASH" REMAP="BS--BulletSub"It includes characters other than A-Z, a-z, 0-9, _, #, valid single- or multi-byte alphabetic characters, or accented alphabetic charactersIt begins with 0-9See LINKEND="X57429""Choosing a Password" 
 for guidelines on selecting a password.login_name may only be used by a System Security Officer to change another user's password. REMAP="BO--Body"For example, a user can change her password from "3blindmice" to "2mediumhot" with this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_password "3blindmice", "2mediumhot"REMAP="BO--Body"These passwords are enclosed in quotes because they begin with numerals.REMAP="BO--Body"In the following example, the System Security Officer whose password is "2tomato" changes Victoria's password to "sesame1":REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_password "2tomato", sesame1, victoriaID="IN29114"Null passwordsRENDERAS="SECT3"Null PasswordsREMAP="BO--Body"You may not assign a null password. However, when SQL Server is installed, the default "sa" account has a null password. The following example changes a null password to a valid one:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_password null, "16tons"REMAP="BO--Body"Note that "null" is not enclosed in quotes.RENDERAS="SECT3"Permissions RequiredREMAP="BO--Body"All users can use MOREINFO="NONE"sp_password to change their own passwords. Only a System Security Officer can use it to change another user's password.ID="IN25115"Changingdefault database
ID="IN58116"Databasesdefault
ID="IN66117"Modifying server loginsRENDERAS="SECT2"Changing User Defaults with sp_modifyloginID="IN77118"sp_modifylogin system procedureREMAP="BO--Body"The MOREINFO="NONE"sp_modifylogin system procedure allows a user to change his or her default database, default language, or full name at any time. The System Administrator can use MOREINFO="NONE"sp_modifylogin to change these for any user. The syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_modifylogin login_name, option, valueMARK="BULL" REMAP="BU--Bullet"login_name is the name of the user whose account you are modifying.option specifies the option that you are changing. The options are listed in LINKEND="X60262"Table 4-4
, and are described in more detail in the sections following.TOCENTRY="1"LBL="Table 4-4: " ID="X60262"Options for sp_modifyloginCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="4*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"OptionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DefinitionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"defdbCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The "home" database to which the user is connected when he 
or she logs in.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"deflanguageCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The official name of the user's default language, as stored in 
master..syslanguages.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"fullnameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The user's full name. valueID="IN84119"Changinguser information
ID="IN104120"System proceduresSystem proceduresfor changing user informationchanging user information
 is the new value for the specified option. REMAP="BO--Body"After you execute MOREINFO="NONE"sp_modifylogin to change the default database, the user is connected to the new default database the next time he or she logs in. However, MOREINFO="NONE"sp_modifylogin does not automatically give the user access to the database. Unless the Database Owner has set up access with MOREINFO="NONE"sp_adduser, MOREINFO="NONE"sp_addalias, or with a guest user mechanism, the user is connected to master even after his or her default database has been changed. RENDERAS="SECT3"ExamplesREMAP="BO--Body"This example changes the default database for "anna" to pubs2:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_modifylogin anna, defdb, pubs2REMAP="BO--Body"This example changes the default language for "claire" to French:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_modifylogin claire, deflanguage, frenchREMAP="BO--Body"This example changes the full name for "clemens" to "Samuel Clemens."REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_modifylogin clemens, fullname, "Samuel Clemens"ID="IN77121"sp_changegroup system procedureID="X64567" RENDERAS="SECT2"Changing a User's Group Membership: sp_changegroupID="INA31122"ChanginggroupsREMAP="BO--Body"The System Administrator can use the system procedure MOREINFO="NONE"sp_changegroupID="IN101123""public" grouppublic groupsp_changegroup andsp_changegroup and
 to change an existing user's group affiliation. At any one time, each user can be a member of only one group other than "public," of which all users are always members. When new users are added to the database, they are assigned to the group "public" as well as any group specified with the MOREINFO="NONE"sp_adduser procedure. REMAP="BO--Body"Before you execute MOREINFO="NONE"sp_changegroup: MARK="BULL" REMAP="BU--Bullet"The group must exist. (Use MOREINFO="NONE"sp_addgroup to create a group.) The user must have access to the current database (must be listed in sysusers). REMAP="BO--Body"The syntax for MOREINFO="NONE"sp_changegroup is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_changegroup grpname, name_in_dbREMAP="BO--Body"For example, here's how you'd change Jim from his current group to the group "manage": REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_changegroup manage, jimID="IN26124"Usersdropping from groupsREMAP="BO--Body"To remove a user from a group without assigning the user to another group, you must change the group affiliation to "public": REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_changegroup "public", jimREMAP="BO--Body"The name "public" must be in quotes because it is a reserved word. All users are always members of "public." This command reduces Jim's group affiliation to "public" only.REMAP="BO--Body"When a user changes from one group to another, the user loses all permissions that he or she had as a result of belonging to the old group. That user gains the permissions that have been granted to the new group.REMAP="BO--Body"The assignment of users into groups can be changed at any time. ID="IN13125"Usersaliases
ID="IN111126"AliasesAliasesSee also Logins; Users!see also Logins; Users
ID="IN70127"Linking users. See Aliases
ID="IN75128"Alternate identity. See AliasesID="X28647" RENDERAS="SECT1"Using Aliases in DatabasesID="IN33129"Aliasescreating
ID="IN37130"Database Ownersseveral users as same
ID="IN24131"Audit trailaliasing andREMAP="BO--Body"The alias mechanism allows you to treat more than one person as the same user inside a database, so that they all have the same privileges. It is often used so that several users can assume the role of Database Owner. The alias mechanism can also be used to set up a collective user identity, within which the identities of individual users can be traced by auditing their activities.ID="IN23132"Permissionsaliases andREMAP="BO--Body"For example, say several vice presidents want to use a database with identical privileges and ownerships. One way to accomplish this is to add a login named "vp" to SQL Server and the database; each vice president logs in as "vp". The problem with this method is that there is no way to tell the individual users apart. The other approach is to alias all the vice presidents, each of whom has his or her own SQL Server account, to the database user name "vp".REMAP="BO--Body"The following system procedures are used to manage aliases:TOCENTRY="1"LBL="Table 4-5: "System Procedures for Managing AliasesCOLS="4" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="10*"COLNAME="C2" COLWIDTH="13*"COLNAME="C3" COLWIDTH="8*"COLNAME="C4" COLWIDTH="8*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"System 
ProcedureCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"TaskCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Executed ByCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"WhereVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_addaliasCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Add an alias for a userCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DBO or SACOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"user databaseCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_dropaliasCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Drop an aliasCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DBO or SACOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"user databaseID="IN201133"sysalternates tablesysalternates tableSee also sysusers table!see also sysusers tableRENDERAS="SECT2"Adding Aliases: sp_addaliasID="IN74134"sp_addalias system procedureREMAP="BO--Body"Here's the syntax for MOREINFO="NONE"sp_addalias: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_addalias login_name, name_in_db MARK="BULL" REMAP="BU--Bullet"ID="INA30135"Loginsalias user to specified
login_name is the name of the user who wants an alternate identity in the current database. This user must have an account on SQL Server but cannot be a user in the current database. ID="IN36136"Database Ownersname inside database
ID="IN11137"Namesalias
name_in_db is the name of the database user to whom the first user wishes to be linked. This name must exist in both master..syslogins and in sysusers in the current database. Both parameters are required. REMAP="BO--Body"Executing MOREINFO="NONE"sp_addalias maps the user with the specified login name to the user with the specified name_in_dbID="IN53138"sysalternates table
. It does this by adding a row to the system table sysalternates. ID="IN106139"sysusers tablesysalternates table andREMAP="BO--Body"When a user tries to MOREINFO="NONE"useID="IN45140"suid column
 a database, SQL Server checks for the user's server user ID number (suidID="IN106141"sysusers tablesysalternates table and
) in sysusersID="IN53142"sysalternates table
. If it is not found, SQL Server then checks sysalternates. If the user's suid is found there, mapped to a database user's suid, the first user is treated as the second user while using the database. REMAP="BO--Body"As an example, suppose that Mary owns the database. She wishes to allow both Jane and Sarah to use the database as if they were its owner. Jane and Sarah have logins on SQL Server but are not authorized to use Mary's database. Mary executes these commands: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addalias jane, dbo exec sp_addalias sarah, dboREMAP="BO--Body"Now both Jane and Sarah can access Mary's database, and be recognized as its owner. ID="IN33143"AliasesdroppingRENDERAS="SECT2"Dropping Aliases: sp_dropaliasID="IN75144"sp_dropalias system procedureREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_dropalias drops the mapping of an alternate suid to a user ID, deleting the relevant row from sysalternates. Its syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_dropalias login_nameREMAP="BO--Body"login_name is the name of the user who was mapped to another user. Once a user's alias is dropped, the user no longer has access to the database, unless his or her name is then added to sysusers (with MOREINFO="NONE"sp_adduser) or the database has a "guest" user in sysusers. ID="IN28145"Information (Server)aliasesRENDERAS="SECT2"Getting Information on Aliases   ID="IN63146"sp_helpuser system procedureREMAP="BO--Body"To display information about aliases, use the MOREINFO="NONE"sp_helpuser procedure. Here's an example: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpuser dboREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Users_name     ID_in_db    Group_name   Login_name   Default_db----------     --------    ----------   ----------   --------- dbo            1           public       sa           master REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"(1 row affected)REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Users aliased to user. Login_name ---------------------- andychristahowardlinda (4 rows affected)ID="IN38147"Serversuser information
ID="IN85148"Information (Server)users, databaseRENDERAS="SECT1"Getting Information on Users REMAP="BO--Body"The following procedures allow users to obtain information about users, groups and current SQL Server usage. TOCENTRY="1"LBL="Table 4-6: "System Procedures that Report on  Users and GroupsCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="10*"COLNAME="C2" COLWIDTH="27*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ProcedureCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"FunctionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_whoCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reports on current  users and processes COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_displayloginCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Displays information about login accountsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpuserCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reports on users and aliases in a database COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_helpgroupCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reports on groups within a database RENDERAS="SECT2"Getting Reports on SQL Server Users and Processes: sp_whoID="IN69149"sp_who system procedureREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_whoID="IN53150"Userscurrently on database
ID="IN82151"Processes (Server tasks)current on server
 reports information on current users and processes on SQL Server. Its syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_who [login_name | "spid"]ID="IN30152"Loginscurrent userREMAP="BO--Body"login_name is the user's SQL Server login name. If you give a login name, MOREINFO="NONE"sp_who reports information on processes being run by the specified user. REMAP="BO--Body"spid is the number of a specific process. Enclose it in quotes because a character type argument is expected. REMAP="BO--Body"For each process being run, MOREINFO="NONE"sp_who reports the server process ID, its status, the login name of the process user, the name of the host computer, the server process ID of a process that's blocking this one (if any), the name of the database, and the command being run. REMAP="BO--Body"If you do not give a login name, MOREINFO="NONE"sp_who reports on processes being run by all users.REMAP="BO--Body"Here's an example of the results of executing MOREINFO="NONE"sp_who without a parameter: REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"spid   status   loginame hostname blk dbname cmd         ------ -------- -------- -------- --- ------ ----------------     1 running  sa       sunbird  0   pubs2  SELECT              2 sleeping NULL              0   master NETWORK HANDLER        3 sleeping NULL              0   master MIRROR HANDLER         4 sleeping NULL              0   master AUDIT PROCESS          5 sleeping NULL              0   master CHECKPOINT SLEEP   (5 rows affected, return status = 0)REMAP="BO--Body"For all system processes, MOREINFO="NONE"sp_who reports NULL for the login_name.RENDERAS="SECT2"Getting Information about Login Accounts: sp_displayloginREMAP="BO--Body"ID="IN81153"sp_displaylogin system procedure
MOREINFO="NONE"sp_displaylogin displays information about a specified login account. The syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_displaylogin [login_name]REMAP="BO--Body"login_name is the user login account about which you want information. If you wish to display information about your own login, you do not need to specify login_name.REMAP="BO--Body"Only a System Administrator or System Security Officer can use MOREINFO="NONE"sp_displaylogin (with the login_name parameter) to get information about other logins.REMAP="BO--Body"MOREINFO="NONE"sp_displaylogin displays the following information about any login account:ID="IN31154"Passwordschecking date changedREMAP="UN--Under"Server user IDLogin nameFull nameAny roles grantedWhether the account is lockedDate that the password was last changedREMAP="BO--Body"MOREINFO="NONE"sp_displaylogin displays all roles that have been granted to you, so that even if you have made a role inactive with the MOREINFO="NONE"set command, it is displayedID="IN79155"sp_displaylogin system procedure
.ID="IN64156"Information (Server)loginsRENDERAS="SECT2"Getting Information about Database Users: sp_helpuserID="IN26157"Serversusers currently on
ID="IN27158"Databasesusers information
ID="IN74159"sp_helpuser system procedureREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_helpuser reports information on authorized users of the current database. Its syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_helpuser [name_in_db]REMAP="BO--Body"The parameter, the database name of a user, is optional. If you give a user's name, MOREINFO="NONE"sp_helpuser reports information on that user. If you don't give a name, it reports on all users. REMAP="BO--Body"The procedure reports the user's name in the database, the user ID, the user's login name, and the group name. Here's an example of the results of executing MOREINFO="NONE"sp_helpuser without a parameter in the database pubs2: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpuserREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Users_name  ID_in_db  Group_name Login_name  Default_db ----------   -------- ---------- ----------  ---------- dbo            1    public       sa          master marcy          4    public       marcy       pubs2 sandy          3    public       sandy       pubs2 judy           5    public       judy        pubs2 linda          6    public       linda       master anne           2    public       anne        pubs2 jim            7    senioreng    jim         master REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"(7 rows affected) RENDERAS="SECT2"ID="IN28160"Namesserver user
ID="IN35161"User IDsfinding
ID="INA32162"Namesfinding user
ID="IN49163"IDs, user
Finding User Names and IDs ID="IN23164"Server user name and ID
ID="IN84165"suser_id system functionREMAP="BO--Body"To find a user's server user ID or login name, use the system functions MOREINFO="NONE"suser_idID="IN86166"suser_name system function
 and MOREINFO="NONE"suser_name.PGWIDE=1 TOCENTRY="1"LBL="Table 4-7: "System Functions suser_id and suser_nameCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="18*"COLNAME="C2" COLWIDTH="17*"COLNAME="C3" COLWIDTH="17*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"FunctionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ArgumentCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Result VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"suser_idCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"(["server_user_name"])COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"server user ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"suser_nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"([server_user_ID])COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"server user name 
(login name)REMAP="BO--Body"The arguments for these system functions are optional. If you don't give one, SQL Server displays information about the current user. For example, here we give names and numbers from the MOREINFO="NONE"sp_helpuser example above: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select suser_name(3), suser_id("sandy")  REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"---------------- ------sandy                 3REMAP="BO--Body"Here the System Administrator issues the commands without arguments:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select suser_name(), suser_id() ID="IN82167"suser_id system function
ID="IN84168"suser_name system functionREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"---------------- ------sa                    1 REMAP="BO--Body"To find a user's ID number or name inside a database, use the system functions MOREINFO="NONE"user_id and MOREINFO="NONE"user_name. TOCENTRY="1"LBL="Table 4-8: "System Functions user_id and user_name COLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="4*"COLNAME="C2" COLWIDTH="6*"COLNAME="C3" COLWIDTH="5*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"FunctionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ArgumentCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Result VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"user_idCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"(["db_user_name"])COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"user ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"user_nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"([db_user_ID])COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"user name REMAP="BO--Body"The arguments for these system functions are optional. If you don't give one, SQL Server displays information about the current user. For example: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select user_name(10) select user_name( ) select user_id("joe") ID="IN20169"ReportsServer usageRENDERAS="SECT1"Getting Information about Usage: Chargeback AccountingID="IN71170"Accountingchargeback
ID="IN39171"CPU usageper userREMAP="BO--Body"When a user logs into SQL Server, the server begins accumulating CPU and I/O usage for that user. Using this information, SQL Server can report total usage for an individual or for all users. Information for each user is kept in the syslogins system table in the master database. REMAP="BO--Body"A System Administrator can configure the frequency with which usage statistics are updated by setting the configuration variables MOREINFO="NONE"cpu flush and MOREINFO="NONE"i/o flush. Whenever the user logs out of a SQL Server session or accumulates more CPU or I/O usage than the configured MOREINFO="NONE"cpu flush or MOREINFO="NONE"i/o flush value, the new totals are written to syslogins. RENDERAS="SECT2"System Procedures for Reporting Current Usage StatisticsREMAP="BO--Body"The System Administrator can use either of the system procedures MOREINFO="NONE"sp_reportstats or MOREINFO="NONE"sp_clearstats to get current total usage for individuals or for all users on a SQL Server. To get one user's totals, use the SQL Server login as a parameter; to get the total for all users, use MOREINFO="NONE"sp_clearstats or MOREINFO="NONE"sp_reportstats with no parameters. RENDERAS="SECT3"ID="IN66172"sp_reportstats system procedure
Using sp_reportstatsREMAP="BO--Body"ID="IN86173"Reporting usage statistics
MOREINFO="NONE"sp_reportstats displays a report of current accounting totals for SQL Server users. It reports total CPU and total I/O, as well as the percentage of those resources used. It does not record statistics for processes with an suid of 1 (the "sa" login), checkpoint, network, and mirror handlers. RENDERAS="SECT3"ID="IN39174"Clearingusage statistics
ID="IN79175"sp_clearstats system procedure
Using sp_clearstatsID="IN41176"I/O usage statisticsREMAP="BO--Body"SQL Server continues to accumulate CPU and I/O statistics until you clear the totals from syslogins by running MOREINFO="NONE"sp_clearstats. MOREINFO="NONE"sp_clearstats initiates a new accounting interval for SQL Server users. It executes MOREINFO="NONE"sp_reportstatsID="IN49177"syslogins table
 to print out statistics for the previous period and clears syslogins of the accumulated CPU and I/O statistics.REMAP="BO--Body"Choose the length of your accounting interval by deciding how you wish to use the statistics at your site. To do monthly cross-department charging for percentage of SQL Server CPU and I/O usage, for example, the System Administrator would run MOREINFO="NONE"sp_clearstats once a month. REMAP="BO--Body"For detailed information on these stored procedures, see Volume 2 of the SQL Server Reference ManualID="IN77178"sp_clearstats system procedure
ID="IN37179"Clearingusage statistics
. ID="IN45180"Configuration variableschargeback accountingID="X94153" RENDERAS="SECT2"Configuration Variables for Chargeback AccountingREMAP="BO--Body"Two configuration variables allow a System Administrator to decide how often accounting statistics are added to syslogins:ID="IN67181"cpu flush configuration variableMARK="BULL" REMAP="BU--Bullet" MOREINFO="NONE"cpu flush specifies how many machine clock ticks to accumulate before adding to syslogins. To find out how many microseconds a tick is on your system, run this query while logged into SQL Server:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"MOREINFO="NONE" select @@timeticksID="IN67182"i/o flush configuration variable
MOREINFO="NONE"i/o flush specifies how many read or write I/Os to accumulate before flushing to syslogins. I/O and CPU statistics for an individual user are written out whenever the user exits a SQL Server session or accumulates more CPU or I/O usage than these values. REMAP="BO--Body"The minimum value allowed for either variable is 1; the maximum value allowed is 2147483647. The default value for MOREINFO="NONE"cpu flush is 300 and the default value forMOREINFO="NONE" i/o flush, 1000. REMAP="BO--Body"To set these values, use the MOREINFO="NONE"sp_configure command: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "cpu flush", 600 REMAP="BO--Body"or: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "i/o flush", 2000 REMAP="BO--Body"Next, run the MOREINFO="NONE"reconfigureID="IN81183"Information (Server)users, database
ID="IN36184"Serversuser information
ID="IN85185"Information (Server)users, database
ID="IN81186"Information (Server)users, database
ID="IN67187"Accountingchargeback
 command to change the configuration values. REMAP="BO--Body"NUMBER="5" ID="X24272"Managing User PermissionsID="INA781"Access protection. See Permissions
ID="IN1272"Command permissionsCommand permissionsSee also Permissions!see also Permissions
ID="IN1353"Conflicting permissionsConflicting permissionsSee also Permissions!see also Permissions
ID="IN974"DataDataSee also Permissions!see also Permissions
ID="IN1335"Database OwnersDatabase OwnersSee also Database object owners; Permissions!see also
ID="IN856"Hierarchy of permissions. See Permissions
ID="IN1237"Protection systemProtection systemSee also Permissions!see also Permissions
ID="IN1438"User databasesUser databasesSee also Databases; Permissions!see also Databases; PermissionsRENDERAS="SECT1"IntroductionREMAP="BO--Body"The SQL commands MOREINFO="NONE"grant and MOREINFO="NONE"revoke control SQL Server's command and object protection system. You can give various kinds of permissions to users, groups, and roles with the MOREINFO="NONE"grant command, and rescind them with the MOREINFO="NONE"revoke command. MOREINFO="NONE"grant and MOREINFO="NONE"revoke are used to specify which users can issue which commands and perform which operations on which tables, views, or columns. The terms granting, assigning privileges, and permissions
 are used to describe the use of the MOREINFO="NONE"grant and MOREINFO="NONE"revoke commands. REMAP="BO--Body"Some commands can be used at any time by any user, with no permission required. Others can be used only by users of certain status (for example, only by a System Administrator) and are not transferable. ID="IN489"Database object ownerspermissionsREMAP="BO--Body"The ability to assign permissions for the commands that can be granted and revoked is determined by each user's status (as System Administrator, Database Owner, or database object owner), and by whether or not a particular user has been granted a permission with the option to grant that permission to other users. REMAP="BO--Body"To supplement and complement the MOREINFO="NONE"grant and MOREINFO="NONE"revoke commands, you can use views and stored procedures as a security mechanism. This is discussed in LINKEND="X58875""Permissions on Views and Stored Procedures" 
. ID="IN5010"Protection systemsummary
ID="INA3611"Permissionssummary ofRENDERAS="SECT2"Permission SummaryID="IN9312"PermissionsSystem AdministratorREMAP="BO--Body"System Administrators operate outside of the command and object protection system, and have all permissions on commands and objects at all times. ID="IN8613"Database Ownerspermissions ofREMAP="BO--Body"Database Owners do not automatically receive permissions on objects owned by other users, but they can impersonate other users in their database at any time with the MOREINFO="NONE"setuser command, temporarily assuming their permissions. Or, a Database Owner can permanently acquire permission on a given object by assuming the identity of the object owner with the MOREINFO="NONE"setuser command and then issuing the appropriate MOREINFO="NONE"grant or MOREINFO="NONE"revoke statements. The MOREINFO="NONE"setuser command is discussed in more detail later in this chapter. REMAP="BO--Body"For permissions that default to "public," no permission is required-that is, no MOREINFO="NONE"grant or MOREINFO="NONE"revoke statements need ever be written. REMAP="BO--Body"LINKEND="X80642"Table 5-1
ID="IN6014"Serverscommand and object permissions summary
ID="IN6815"Defaultspermissions
 summarizes the SQL Server protection system. The type of user listed as the one to whom the command defaults is the "lowest" level of user to which the permission is automatically granted. This user can MOREINFO="NONE"grant the permission to other users or MOREINFO="NONE"revokeID="IN2516"Permissionstransfers and
 it from other users, if it is transferable. REMAP="BO--Body"This table does not include System Security Officers. The System Security Officer does not have any special permissions on commands and objects, only on certain system procedures.PGWIDE=1 TOCENTRY="1"LBL="Table 5-1: " ID="X80642"Command and Object Permissions COLS="9" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="11*"COLNAME="C2" COLWIDTH="6*"COLNAME="C3" COLWIDTH="5*"COLNAME="C4" COLWIDTH="7*"COLNAME="C5" COLWIDTH="6*"COLNAME="C6" COLWIDTH="5*"COLNAME="C7" COLWIDTH="4*"COLNAME="C8" COLWIDTH="4*"COLNAME="C9" COLWIDTH="4*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"Command and Object PermissionsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StatementCOLNAME="C2" NAMEST="C2" NAMEEND="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"Defaults ToCOLNAME="C7" NAMEST="C7" NAMEEND="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Can Be 
Granted/RevokedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"System 
Admin.COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"OperatorCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Database 
OwnerCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object 
OwnerCOLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"PublicCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"YesCOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NoCOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"N/AVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"alter databaseCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"(1)COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"alter tableCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"begin transactionCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"checkpointCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"commit transactionCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create databaseCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create defaultCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create indexCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create procedureCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create ruleCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create tableCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"(2)COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific' (2)COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create triggerCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create viewCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"dbccCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"deleteCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific' (3)COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"disk initCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"disk mirrorCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"disk refitCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"disk reinitCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"disk remirrorCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"disk unmirrorCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"drop (any object)COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"dump databaseCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"dump transactionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"execute COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'(4)COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"grant on objectCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"grant commandCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"insertCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific' (3)COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"killCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"load databaseCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"load transactionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"printCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"raiserrorCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"readtextCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"(5)COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"reconfigureCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"referencesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"revoke on objectCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"revoke commandCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"rollback transactionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"save transactionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"selectCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific' (3)COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"setCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"setuserCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"shutdownCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"truncate tableCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"updateCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific' (3)COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"update statisticsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"writetextCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific'COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"(6)COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" NAMEST="C1" NAMEEND="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"(1) Transferred with database ownership 
(2) Public can create temporary tables, no permission 
required 
(3) If a view, permission defaults to view owner 
(4) Defaults to stored procedure ownerCOLNAME="C5" NAMEST="C5" NAMEEND="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"(5) Transferred with MOREINFO="NONE"select permission 
(6) Transferred with MOREINFO="NONE"update permission 
MOREINFO="NONE"No means use of the command is always 
restricted
MOREINFO="NONE"N/A means use of the command is never 
restrictedCOLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID="IN12117"Processes (Server tasks)Processes (Server tasks)See also Servers!see also
ID="IN4818"Protection systemsummary
ID="IN4619"Database object ownerspermissions
ID="IN8220"Database Ownerspermissions of
ID="IN5821"Serverscommand and object permissions summary
ID="IN3422"Permissionssummary of
ID="IN6423"DefaultspermissionsRENDERAS="SECT1"Types of SQL Server Users and Their PrivilegesREMAP="BO--Body"SQL Server's command and object permission system recognizes these types of users: MARK="BULL" REMAP="BU--Bullet"System Administrators System Security Officers Operators Owners of databasesOwners of database objectsOther users (also known as "public")RENDERAS="SECT2"Privileges of System Administrators REMAP="BO--Body"System Administrators are special users who handle tasks not specific to applications. SQL Server recognizes a System Administrator as a super-user who works outside SQL Server's command and object protection system. ID="IN2824"IDs, userREMAP="BO--Body"The role of System Administrator is usually granted to individual SQL Server logins. This provides a high degree of individual accountability because all actions taken by that user can be traced to his or her individual server user ID. If the server administration tasks at your site are few enough that they are performed by a single individual, you may instead choose to use the "sa" account that is installed with SQL Server. At installation, "sa" has permission to assume the System Administrator, System Security Officer, and Operator roles. Any user who knows the "sa" password can log into that account and assume the System Administrator role.REMAP="BO--Body"The fact that a System Administrator operates outside the protection system serves as a safety precaution. For example, if the Database Owner accidentally deletes all the entries in the MOREINFO="NONE"sysusers table, the System Administrator can fix things up (provided, of course, you are making regular backups!). REMAP="BO--Body"There are several commands that only a System Administrator can issue-they cannot be granted to any other user. They include: MOREINFO="NONE"reconfigure, MOREINFO="NONE"disk init, MOREINFO="NONE"disk refit, MOREINFO="NONE"disk reinit, the disk mirroring commands, MOREINFO="NONE"shutdown and MOREINFO="NONE"kill. ID="INA3725"CreatingdatabasesRENDERAS="SECT3"Permissions for Creating Databases   ID="IN6026"Permissionscreate database
ID="IN6927"create database commandpermissionREMAP="BO--Body"Only a System Administrator can grant permission to use the MOREINFO="NONE"create database command. The MOREINFO="NONE"grant command for permission on MOREINFO="NONE"create database must be issued from master. In many installations, the System Administrator maintains a monopoly on MOREINFO="NONE"create database permission in order to centralize control of database placement and database device space allocation. REMAP="BO--Body"In such situations, a System Administrator creates new databases on behalf of other users, and then transfers ownership to the appropriate user. To create a database that is to be owned by another user, the System Administrator issues the MOREINFO="NONE"create database command, switches to the new database with the MOREINFO="NONE"use command, and then executes the system procedure MOREINFO="NONE"sp_changedbownerID="IN8928"PermissionsSystem Administrator
. System Administrators can, however, grant permission to create databases if that is desired. ID="IN11029"System Security OfficerpermissionsRENDERAS="SECT2"Privileges of System Security OfficersREMAP="BO--Body"System Security Officers perform security-sensitive tasks in SQL Server. These tasks include managing logins (including login aliases and group set-up), granting roles, and changing passwords. System Security Officers do not have special permissions on database objects.ID="INA3730"Database Ownerspassword forgotten by
ID="IN1931"Passwordsforgotten
ID="IN10632"System Security OfficerpermissionsREMAP="BO--Body"System Security Officers can repair any damage inadvertently done to the protection system by a user. For example, if the Database Owner forgets his or her password, a System Security Officer can change the password to allow the Database Owner to log in.ID="IN4133"OperatorpermissionsRENDERAS="SECT2"Privileges of OperatorsREMAP="BO--Body"Users who have been granted the Operator role can back up and restore databases on a server-wide basis without having to be the owner of each one. The Operator role allows a user to use these commands on any database:REMAP="UN--Under"MOREINFO="NONE"dump database dump transaction load database load transaction REMAP="BO--Body"Database Owners also have dump and load permissions on the databases they own. System Administrators can dump and load all databases.ID="IN5834"Database Ownerspermissions ofRENDERAS="SECT2"Privileges of Database Owners REMAP="BO--Body"Database owners and System Administrators are the only users who can grant command permissions to other users. REMAP="BO--Body"The owner of a database has full privileges to do anything inside that database, and must explicitly MOREINFO="NONE"grant permissions to other users. REMAP="BO--Body"Here are the permissions that are automatically granted to the owner of a database, and that cannot be transferred to others (except that the dump and load commands are granted to users with the Operator role): REMAP="UN--Under"MOREINFO="NONE"checkpoint dbcc setuser dump database dump transaction load databaseload transaction drop databasegrant and MOREINFO="NONE"revoke command permissionsREMAP="BO--Body"Database owners can MOREINFO="NONE"grant permissions on the following commands to other users: REMAP="UN--Under"MOREINFO="NONE"create tablecreate defaultcreate rulecreate procedurecreate MOREINFO="NONE"viewgrant and MOREINFO="NONE"revoke permissions on system tablesMOREINFO="NONE"grant and MOREINFO="NONE"revoke select, insert, delete, update, references, and MOREINFO="NONE"execute       permissions on database objectsID="IN5435"Permissionssystem tablesRENDERAS="SECT3"Permissions on System Tables   REMAP="BO--Body"The installation script supplied by SQL Server sets permissions on the system tables in a user database so that all database users can read them. ID="IN3236"System tableschanges allowed toREMAP="BO--Body"However, the default situation is that no users-including Database Owners-can modify the system tables directly. Instead, the system stored procedures supplied with SQL Server modify the system tables. This helps guarantee integrity. REMAP="BO--Body"A System Administrator can change this situation so that ad hoc modifications to the system tables are allowed with the system procedure MOREINFO="NONE"sp_configure and the MOREINFO="NONE"reconfigure command. See LINKEND="X60446""allow updates"
.ID="IN5937"Permissionssystem proceduresRENDERAS="SECT3"Permissions on System Procedures   REMAP="BO--Body"Since system procedures are stored in the MOREINFO="NONE"sybsystemprocs database, their permissions are also set there. REMAP="BO--Body"Security-related system procedures can only be run by System Security Officers. Certain other system procedures can only be run by System Administrators.REMAP="BO--Body"Some of the system procedures can be run only by Database Owners. These procedures make sure that the user executing the procedure is the owner of the database from which they are being executed. REMAP="BO--Body"Other system procedures (for example, all the MOREINFO="NONE"sp_help procedures) can be executed by any user who has been granted permission-but this permission must be granted in MOREINFO="NONE"sybsystemprocs. In other words, a user must have permission to execute a system procedure in all databases, or in none of them. ID="IN2338"Guest usersREMAP="BO--Body"Users not listed in MOREINFO="NONE"sybsystemprocs..sysusers are treated as "guest" in ID="IN7939"sybsystemprocs databasesystem procedures and
MOREINFO="NONE"sybsystemprocs, and are automatically granted permission on many of the system procedures. In order to deny a user permission on a system procedure, the System Administrator must add him or her to ID="IN6440"sysusers tablepermissions and
MOREINFO="NONE"sybsystemprocs..sysusers and issue a MOREINFO="NONE"revoke statement that applies to that procedure. The owner of a user database cannot directly control permissions on the system procedures within his or her own database. ID="IN7541"Usersimpersonating (setuser)
ID="IN6142"setuser command
ID="IN8443"Database Ownerssetuser command andRENDERAS="SECT3"The setuser Command   ID="IN5544"ChangingChangingto another identityanother identity
ID="IN2445"Namesimpersonating userREMAP="BO--Body"A Database Owner can use the MOREINFO="NONE"setuser command to "impersonate" another user's identity and permissions status in the current database. A Database Owner may find it convenient to use MOREINFO="NONE"setuser in order to access an object owned by another user, to grant permissions on an object owned by another user, to create an object that will be owned by another user, or to temporarily take on the privileges of another user for some other reason. REMAP="BO--Body"MOREINFO="NONE"setuser permission defaults to the Database Owner and cannot be transferred. The user being impersonated must be an authorized user of the database. REMAP="BO--Body"System Administrators can use MOREINFO="NONE"setuser in order to create objects that will be owned by another user. However, since System Administrators operate outside the permissions system, they cannot use MOREINFO="NONE"setuser to acquire another user's permissions. No matter what MOREINFO="NONE"setuser commands have been issued, System Administrators always retain permission to do everything. REMAP="BO--Body"The syntax of the MOREINFO="NONE"setuser command is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"setuser ["MOREINFO="NONE"user_name"]REMAP="BO--Body"The user being impersonated must be authorized to use the current database. To re-establish your original identity, give the MOREINFO="NONE"setuser command with no name after it. REMAP="BO--Body"Here's how the Database Owner would grant Joe permission to read the MOREINFO="NONE"authors table, which is owned by Mary: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"setuser "mary"  grant select on authors to joe  setuser               /*re-establishes original identity*/REMAP="BO--Body"When the Database Owner uses the MOREINFO="NONE"setuser command, SQL Server checks the permissions of the user being impersonated. ID="IN5746"Namesoriginal identityREMAP="BO--Body"The MOREINFO="NONE"setuser command remains in effect until another MOREINFO="NONE"setuser command is given, or until the current database is changed with the MOREINFO="NONE"useID="IN8247"Database Ownerssetuser command and
 command. ID="IN4948"ChangingDatabase OwnersRENDERAS="SECT3"Changing Database Ownership   ID="IN7949"sp_changedbowner system procedureREMAP="BO--Body"Use the system procedure MOREINFO="NONE"sp_changedbowner to change the ownership of a database. Often, System Administrators create the user databases, then give ownership to another user after some of the initial work is complete. Only the System Administrator can execute MOREINFO="NONE"sp_changedbowner.REMAP="BO--Body"It is a good idea to transfer ownership before the user has been added to the database, and before the user has begun creating objects in the database. The new owner must already have a login name on SQL Server, but cannot be a user of the database, or have an alias in the database. You may have to use MOREINFO="NONE"sp_dropuser or MOREINFO="NONE"sp_dropalias before you can change a database's ownership, and you may have to drop objects before you can drop the user.REMAP="BO--Body"Issue MOREINFO="NONE"sp_changedbowner in the database whose ownership will be changed. The syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_changedbowner MOREINFO="NONE"login_name [, true ] REMAP="BO--Body"This example makes the user "albert" the owner of the current database and drops aliases of users who could act as the old "dbo": REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_changedbowner albertID="IN3850"Aliasestransfer to new Database Owner
ID="IN2551"Permissionstransfers andREMAP="BO--Body"To transfer aliases and their permissions to the new "dbo," add the second parameter with the value "true" or "TRUE". ID="IN6252"master databaseownership ofYou cannot change the ownership of the master database and should not change the ownership of any other system databases.ID="IN3353"Permissionsdatabase object ownerID="IN4554"Database object ownerspermissionsRENDERAS="SECT2"Privileges of Database Object Owners   ID="IN1855"Permissionsobject
ID="IN3156"Database objectspermissions on
ID="IN2657"Database objectsownership
ID="IN2558"Database objectsdropping
ID="IN2559"Database objectscreating
ID="IN4160"Permissionstables
ID="IN3861"Viewspermissions onREMAP="BO--Body"A user who creates a database object (a table, view
ID="IN6262"Permissionsstored procedures
, or stored procedure) owns the objects, and is automatically granted all object permissions
 on it. Users other than the object owner, including the owner of the database, are automatically denied all permissions on that object, unless they are explicitly granted by either the owner or a user who has MOREINFO="NONE"grant permission on that object. REMAP="BO--Body"As an example, say that Mary is the owner of the MOREINFO="NONE"pubs2 database, and has granted Joe permission to create tables in it. Now Joe creates the table MOREINFO="NONE"new_authors; he is the owner of this database object. REMAP="BO--Body"Initially, object permissions on new_MOREINFO="NONE"authors belong to Joe and Joe alone. Joe can grant or revoke object permissions for this table to other users, including Mary and the Database Owner. (However, the Database Owner can use the MOREINFO="NONE"setuser command as described earlier to impersonate Joe.) REMAP="BO--Body"These are the command permissions that default to the owner of a table, and that cannot be transferred to other users: REMAP="UN--Under"MOREINFO="NONE"alter table drop table create index create trigger truncate table update statistics REMAP="BO--Body"Permission to use the MOREINFO="NONE"grant and MOREINFO="NONE"revoke commands to grant specific users permission to use the MOREINFO="NONE"select, insert, update, delete, references, and MOREINFO="NONE"execute commands on specific database objects can be transferred, using MOREINFO="NONE"grant with grant option. ID="IN2563"Database objectsdroppingREMAP="BO--Body"Permission to MOREINFO="NONE"drop an object-a table, view, index, stored procedure, rule, or default-defaults to its owner and cannot be transferred. ID="IN10564"PermissionsPermissions"public" grouppublic groupRENDERAS="SECT2"Privileges of Other Database UsersREMAP="BO--Body"At the bottom of the hierarchy is the "public"-other database users. Permissions are granted to or revoked from them by object owners, Database Owners, users who were granted permissions MOREINFO="NONE"with grant optionID="IN2165"Namesuser
, and/or a System Administrator. These users are specified by user name, by group name, or by the keyword MOREINFO="NONE"public. RENDERAS="SECT1"Command and Object Permissions   REMAP="BO--Body"There are two categories of permissions. Permissions for the commands MOREINFO="NONE"select, MOREINFO="NONE"update, MOREINFO="NONE"insert, MOREINFO="NONE"delete, MOREINFO="NONE"references, and MOREINFO="NONE"execute are called object permissions because these commands always apply to database objects (in the current database). REMAP="BO--Body"The objects to which the object permissions can apply are: TOCENTRY="1"LBL="Table 5-2: "Object PermissionsCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="12*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CommandCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ObjectsVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"selectCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"table, view, columnsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"updateCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"table, view, columnsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"insertCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"table, viewCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"deleteCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"table, viewCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"referencesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tableCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"executeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"stored procedureREMAP="BO--Body"Object permissions default to System Administrators and the object owner, and can be granted to other users.ID="IN3966"Command permissionsREMAP="BO--Body"Permissions for other commands are called command permissions
 because they are not object specific. They can be granted only by a System Administrator or a Database Owner. These commands are: TOCENTRY="1"LBL="Table 5-3: "Commands on Which Permissions May Be GrantedCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="10*"COLNAME="C2" COLWIDTH="31*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CommandsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"RestrictionsVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create database COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Can be granted only by a System Administrator, and only to 
users in the master databaseCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create default COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create procedure COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create rule COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create table COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create view COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"REMAP="BO--Body"Each database has its own independent protection system: having permission to use a certain command in one database has no effect in other databases. REMAP="BO--Body"If you try to use a command or database object for which you have not been assigned permission, SQL Server displays an error message. ID="IN7367"grant command
ID="IN6968"Permissionsgranting
ID="IN7469"revoke commandRENDERAS="SECT1"Granting and Revoking Permissions REMAP="BO--Body"Command permissions and object permissions are given or removed with the MOREINFO="NONE"grant and MOREINFO="NONE"revoke commands. RENDERAS="SECT2"grant and revoke Syntax   REMAP="BO--Body"The syntax for command permissions differs slightly from the syntax for object permissions. Here are the syntax statements for command permissions: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"grant {all [privileges] | MOREINFO="NONE"command_list} to {public | MOREINFO="NONE"name_list | role_name}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"revoke {all [privileges] | MOREINFO="NONE"command_list} from {public | MOREINFO="NONE"name_list | role_name} REMAP="BO--Body"The command list can include the following commands in any combination: MOREINFO="NONE"create database (can be granted only by a System Administrator and in master), MOREINFO="NONE"create default, MOREINFO="NONE"create procedure, MOREINFO="NONE"create rule, MOREINFO="NONE"create table, andMOREINFO="NONE" create MOREINFO="NONE"view. If you include more than one command, separate them with commas. ID="IN2170"Permissionsassigning
ID="IN7771"Database Ownerspermissions granted by
ID="IN8572"Object owners. See Database object owners
ID="IN9773"Owners. See Database object owners; Database Owners
ID="INA6774"all keywordgrant
ID="IN6875"all keywordrevoke
ID="IN9576"grant commandall keywordREMAP="BO--Body"Only a System Administrator or the Database Owner can use the keyword MOREINFO="NONE"all. When used by a System Administrator, MOREINFO="NONE"grant MOREINFO="NONE"all assigns all MOREINFO="NONE"create permissions. When the Database Owner uses MOREINFO="NONE"grant MOREINFO="NONE"all, SQL Server grants all MOREINFO="NONE"create permissions except MOREINFO="NONE"create database, and prints an informational message. ID="INA3177"Database objectspermissions onREMAP="BO--Body"Here are the syntax statements for granting and revoking object permissions (permission to use tables, views, columns, and stored procedures): REMAP="SY--Syntax" FORMAT="LINESPECIFIC"grant {all [privileges] | MOREINFO="NONE"permission_list}on {MOREINFO="NONE"table_name [(MOREINFO="NONE"column_list)] |    MOREINFO="NONE"view_name [(MOREINFO="NONE"column_list)] |    MOREINFO="NONE"stored_procedure_name}to {public | MOREINFO="NONE"name_list | role_name}    [with grant option]ID="IN9678"revoke commandall keywordREMAP="SY--Syntax" FORMAT="LINESPECIFIC"revoke {all [privileges] | MOREINFO="NONE"permission_list}on {MOREINFO="NONE"table_name [(MOREINFO="NONE"column_list)] |    MOREINFO="NONE"view_name [(MOREINFO="NONE"column_list)] |    MOREINFO="NONE"stored_procedure_name}from {public | MOREINFO="NONE"name_list | role_name}     [cascade]MARK="BULL" REMAP="BU--Bullet"If you are granting or revoking permissions on a table or view, without specifying any columns, the privilege list can consist of any combination of MOREINFO="NONE"select, MOREINFO="NONE"insert, MOREINFO="NONE"delete, MOREINFO="NONE"references, and MOREINFO="NONE"update. MOREINFO="NONE"insert and MOREINFO="NONE"delete permissions do not apply to columns, so you can't include them in a privilege list (or use the keyword MOREINFO="NONE"all) if you specify a column list. ID="INA4279"Columnspermissions onWhen you grant or revoke permissions on columns, the privilege list can include only MOREINFO="NONE"select, MOREINFO="NONE"references, and MOREINFO="NONE"updateID="IN6580"select commandpermissions and
. If you want a user to be able to use a "MOREINFO="NONE"select *" statement, you must grant her or him MOREINFO="NONE"select permission on the table, or on all the columns in a table. REMAP="UN--Under"You can specify columns either in the permission_list, or in the column_list, but not both. ID="IN3281"Stored procedurespermissions onWhen you grant permissions on stored procedures, the privilege list must consist of MOREINFO="NONE"executeID="IN6882"all keywordrevoke
 or MOREINFO="NONE"all, which is a synonym for MOREINFO="NONE"execute.When you have MOREINFO="NONE"set ansi_permissions on additional permissions are required for MOREINFO="NONE"update and MOREINFO="NONE"delete statements. The following table summarizes these requirements:TOCENTRY="1"LBL="Table 5-4: "ANSI Permissions for update and deleteCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="5*"COLNAME="C2" COLWIDTH="17*"COLNAME="C3" COLWIDTH="17*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Permissions Required with
set ansi_permissions offCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Permissions Required with
set ansi_permissions onVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"updateCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific' MOREINFO="NONE"update permission on columns 
where values are being setCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific' MOREINFO="NONE"update permission on columns 
where values are being set
And... 
name='bull' font='symbol' code='168'  charset='fontspecific' MOREINFO="NONE"select permission on all 
columns appearing in MOREINFO="NONE"where 
clause
name='bull' font='symbol' code='168'  charset='fontspecific' MOREINFO="NONE"select permission on all 
columns right side of set clauseCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"deleteCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name='bull' font='symbol' code='168'  charset='fontspecific' MOREINFO="NONE"delete permission on columns 
where values are being setCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"name='bull' font='symbol' code='168'  charset='fontspecific' delete permission on the table 
from which rows are being 
deleted
And...  
MOREINFO="NONE"name='bull' font='symbol' code='168'  charset='fontspecific' select permission on all 
columns appearing in MOREINFO="NONE"where 
clauseREMAP="UN--Under"If you attempt to MOREINFO="NONE"update or MOREINFO="NONE"delete without having all the required permissions an exception is generated and the transaction is rolled back. In such a case you see the following message:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"permission_type permission denied on object object_name database database_name, owner owner_nameREMAP="UN--Under"If this occurs, you need to be granted MOREINFO="NONE"select permission on all relevant columns by the column owner.The MOREINFO="NONE"onID="IN8683"on keywordgrant
 clause in a MOREINFO="NONE"grantID="IN8784"on keywordrevoke
 or MOREINFO="NONE"revokeID="IN4085"Tablespermissions on
ID="IN3886"Viewspermissions on
ID="IN6287"Permissionsstored procedures
 statement specifies the object on which the permission is being granted or revoked. You can grant or revoke privileges for only one table, view, or stored procedure object at a time. You can grant or revoke permissions for more than one column at a time, but all the columns must be in the same table or view.ID="IN5288"PermissionsPermissions"public" grouppublic groupThe keyword MOREINFO="NONE"public refers to the group "public," which includes all the users of SQL Server. MOREINFO="NONE"public means slightly different things for MOREINFO="NONE"grant and MOREINFO="NONE"revoke:ID="IN9589"grant commandgrant commandand "public" grouppublic group
ID="IN8390""public" grouppublic groupgrant andgrant andMARK="DASH" REMAP="BS--BulletSub"For MOREINFO="NONE"grant, MOREINFO="NONE"public includes you, the object owner. Therefore, if you have revoked permissions from yourself on your object, and later you MOREINFO="NONE"grant permissions to MOREINFO="NONE"public, you regain the permissions along with the rest of "public."ID="IN9791"revoke commandrevoke commandand "public" grouppublic group
ID="IN8592""public" grouppublic grouprevoke andrevoke andFor MOREINFO="NONE"revoke on object permissions, MOREINFO="NONE"public excludes the owner. For MOREINFO="NONE"revoke on command permissions, MOREINFO="NONE"public excludes the Database Owner (who "owns" command permissions). The MOREINFO="NONE"name_list is a list of the names of: ID="IN1193"NamesgroupMARK="DASH" REMAP="BS--BulletSub"GroupsID="IN1094"NamesuserUsersA combination of users and groups, each name separated from the next by a commaID="IN14195"RolesRolesin grant and revoke statementsgrant and revoke statementsThe role_name is the name of a SQL Server role. This allows you to grant permissions to all users who have been granted a specific role. The roles are MOREINFO="NONE"sa_role (System Administrator), MOREINFO="NONE"sso_role (System Security Officer), and MOREINFO="NONE"oper_role (Operator).ID="IN10196"with grant option option, grantThe MOREINFO="NONE"with grant option clause in a MOREINFO="NONE"grant statement specifies that the user(s) specified in name_list can grant the specified object permission(s) to other users. This option can only be used for individual users, not for groups or roles. If a user has MOREINFO="NONE"with grant option permission on an object, that permission is not revoked when permissions on the object are revoked from MOREINFO="NONE"public or a group of which the user is a member.ID="IN7297"cascade option, revokeThe MOREINFO="NONE"cascade option in a MOREINFO="NONE"revoke statement removes the specified object permissions from the user(s) specified in name_list, and also from any users they granted those permissions to.REMAP="BO--Body"You may only grant and revoke permissions on objects in the current database.ID="IN2498"Permissionshierarchy of
ID="IN2199"Rolespermissions and
ID="INA32100"Groupspermissions heirarchy andREMAP="BO--Body"Permissions granted to roles override permissions granted to users or groups. For example, say John has been granted the System Security Officer role, and MOREINFO="NONE"sso_role has been granted permission on the sales table. If John's individual permission on sales is revoked, he is still able to access sales because his role permissions override his individual permissions.RENDERAS="SECT3"Examples: Granting and Revoking Object PermissionsID="IN85101"User groups. See Groups; "public" group
ID="IN51102"Groupsgrant andREMAP="BO--Body"This statement gives Mary and the MOREINFO="NONE"sales group permission to MOREINFO="NONE"insert into and MOREINFO="NONE"delete from the MOREINFO="NONE"titles table: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"grant insert, delete on titles to mary, salesREMAP="BO--Body"This statement gives Harold permission to use the stored procedure MOREINFO="NONE"makelist: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"grant executeon makelistto haroldREMAP="BO--Body"This statement grants permission to execute the stored procedure sa_only to users who have been granted the System Administrator role:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"grant executeon sa_only_procto sa_roleREMAP="BO--Body"This statement gives Aubrey permission to MOREINFO="NONE"select, MOREINFO="NONE"update, and MOREINFO="NONE"delete from the authors table, and to grant the same permissions to other users:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"grant select, update, delete on authorsto aubreywith grant optionID="IN52103"Groupsrevoke andREMAP="BO--Body"Both the following statements revoke permission for all users except the table owner to MOREINFO="NONE"update the MOREINFO="NONE"price and MOREINFO="NONE"ytd_sales columns of the MOREINFO="NONE"titles table: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"revoke update on titles (price, ytd_sales) from publicREMAP="UI--UserInput" FORMAT="LINESPECIFIC"revoke update(price, ytd_sales)on titlesfrom publicREMAP="BO--Body"This statement revokes permission for Clare to update the authors table, and simultaneously revokes that permission from all users she granted that permission to:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"revoke updateon authorsfrom clarecascadeREMAP="BO--Body"This statement revokes permission for users who have been granted the Operator role to execute the stored procedure new_sproc:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"revoke executeon new_sprocfrom oper_roleRENDERAS="SECT3"Examples: Granting and Revoking Command PermissionsREMAP="BO--Body"Here are a few examples that show how to grant and revoke command permissions: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"grant create table, create view to mary, jane, bob REMAP="UI--UserInput" FORMAT="LINESPECIFIC"grant create table, create ruleto public REMAP="UI--UserInput" FORMAT="LINESPECIFIC"revoke create table, create rule from mary RENDERAS="SECT2"Combining grant and revoke Statements   ID="IN36104"Userspermissions to all or specificREMAP="BO--Body"There are two basic styles of setting up permissions in a database or on a database object. The most straightforward is to assign specific permissions to specific users. ID="IN36105"Userspermissions to all or specific
ID="IN35106"Permissionsselective assignment ofREMAP="BO--Body"However, if most users are going to be granted most privileges, it's easier to assign all permissions to all users and then revoke specific permissions from specific users. REMAP="BO--Body"For example, a Database Owner can grant all permissions on the MOREINFO="NONE"titles table to all users by issuing the following statement: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"grant all on titles to public REMAP="BO--Body"Then the Database Owner can issue a series of MOREINFO="NONE"revoke statements, for example: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"revoke update on titles (royalty, advance) from public REMAP="UI--UserInput" FORMAT="LINESPECIFIC"revoke delete on titles from mary, sales, john ID="IN129107"Order of commandsgrant and revoke statements
ID="IN37108"Conflicting permissionsRENDERAS="SECT2"Conflicting grant and revokeID="IN87109"Sequence of commands. See Order of commands
 Statements   REMAP="BO--Body"As implied in the previous section, MOREINFO="NONE"grant and MOREINFO="NONE"revoke statements are sensitive to the order in which they are issued. So, for example, if Joe's group has been granted MOREINFO="NONE"select permission on the MOREINFO="NONE"titles table and then Joe's permission to select the MOREINFO="NONE"advance column has been revoked, Joe can select all the columns except MOREINFO="NONE"advance, while the other users in his group can still select all the columns. ID="IN48110"Groupsconflicting permissions andREMAP="BO--Body"A MOREINFO="NONE"grant or MOREINFO="NONE"revoke command that applies to a group changes any conflicting permissions that have been assigned to any member of that group. For example, suppose that the owner of the MOREINFO="NONE"titles table has granted different permissions to various members of the MOREINFO="NONE"sales group, and then decides to standardize. He or she might issue the following statements: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"revoke all on titles from sales grant select on titles(title, title_id, type,    pub_id) to sales REMAP="BO--Body"Similarly, a MOREINFO="NONE"grant or MOREINFO="NONE"revoke statement issued to MOREINFO="NONE"public changes, for all users, any previously issued permissions that conflict with the new regime. REMAP="BO--Body"The same MOREINFO="NONE"grant and MOREINFO="NONE"revoke statements issued in different orders can create entirely different situations. For example, the following set of statements leaves Joe without any MOREINFO="NONE"select permission on MOREINFO="NONE"titles: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"grant select on titles(title_id, title) to joe revoke select on titles from public REMAP="BO--Body"In contrast, the same statements issued in the opposite order result in only Joe having MOREINFO="NONE"select permission, and only on the MOREINFO="NONE"title_id and MOREINFO="NONE"title columns. ID="IN95111"grant commandgrant commandand "public" grouppublic group
ID="IN136112"PermissionsPermissions"public" grouppublic groupREMAP="BO--Body"Remember that when you use the keyword MOREINFO="NONE"public with MOREINFO="NONE"grantID="IN85113""public" grouppublic grouprevoke andrevoke and
ID="IN97114"revoke commandrevoke commandand "public" grouppublic group
, you are including yourself. With MOREINFO="NONE"revoke on command permissions, you are included in MOREINFO="NONE"public unless you are the Database Owner. With MOREINFO="NONE"revoke on object permissions, you are included in MOREINFO="NONE"public unless you are the object owner. You may wish to deny yourself permission to use your own table, while giving yourself permission to access a view built on it. To do this you must issue MOREINFO="NONE"grant andMOREINFO="NONE" revoke statements explicitly setting your permissions. (You can always change your mind and reinstitute the permission with a MOREINFO="NONE"grant statement.) ID="IN35115"Conflicting permissions
ID="IN127116"Order of commandsgrant and revoke statements
ID="IN46117"Groupsconflicting permissions and
ID="IN72118"revoke command
ID="IN71119"grant command
ID="IN65120"Permissionsgranting
ID="IN51121"Protection systemreports 
ID="IN40122"Permissionsinformation on
ID="IN46123"Information (Server)permissionsRENDERAS="SECT1"Reporting on PermissionsREMAP="BO--Body"These system procedures provide information about command and object permissions:MARK="BULL" REMAP="BU--Bullet"MOREINFO="NONE"sp_helprotect reports on permissions on database objects or users.MOREINFO="NONE"sp_column_privileges reports on permissions on specific columns in a table.MOREINFO="NONE"sp_table_privileges reports on permissions on a specific table.RENDERAS="SECT2"sp_helprotectID="IN90124"sp_helprotect system procedureREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_helprotect reports on permissions by database object or by user, and (optionally) by user for a specified object. Any user can execute this procedure. Its syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_helprotect MOREINFO="NONE"name [, MOREINFO="NONE"name_in_db [, "grant"]]REMAP="BO--Body"The first parameter, MOREINFO="NONE"name, is either the name of the table, view, or stored procedure; or the name of a user, group, or role in the current database. If you specify the second parameterMOREINFO="NONE", name_in_db, only that user's permissions on the specified object are reported. If MOREINFO="NONE"name is not an object, MOREINFO="NONE"sp_helprotect checks whether name is a user, group, or role. If so, the permissions for the user, group, or role are listed. If you specify the third parameter, the keyword MOREINFO="NONE"grant, and name is not an object, MOREINFO="NONE"sp_helprotect displays all permissions granted by MOREINFO="NONE"with grant option.REMAP="BO--Body"For example, suppose you issue the following series of MOREINFO="NONE"grant and MOREINFO="NONE"revoke statements: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"grant select on titles to judy grant update on titles to judy revoke update on titles(contract) from judy grant select on publishers to judy    with grant optionREMAP="BO--Body"To determine the permissions Judy now has on each column in the titles table, type:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helprotect titles, judyREMAP="BO--Body"The following display results: REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"grantor grantee type   action   object     column      grantable ------- ------ -----   ------   ------     ------      ------- dbo     judy   Grant   Select   titles     All         FALSE dbo     judy   Grant   Update   titles     advance     FALSE dbo     judy   Grant   Update   titles     notes       FALSE dbo     judy   Grant   Update   titles     pub_id      FALSE dbo     judy   Grant   Update   titles     pubdate     FALSE dbo     judy   Grant   Update   titles     title       FALSE dbo     judy   Grant   Update   titles     title_id    FALSE dbo     judy   Grant   Update   titles     total_sales FALSE dbo     judy   Grant   Update   titles     type        FALSEREMAP="BO--Body"The first row of the display shows that the Database Owner ("dbo") gave Judy permission to select all columns of the titles table. The rest of the lines indicate that she can update only the columns listed in the display. Judy's permissions are not grantable: she cannot give MOREINFO="NONE"select or MOREINFO="NONE"update permissions to any other user.REMAP="BO--Body"To see the Judy's permissions on the publishers table, type:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helprotect publishers, judyREMAP="BO--Body"In the display below, the grantable column indicates TRUE, meaning that Judy can grant the permission to other users.REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"grantor grantee type   action   object     column      grantable ------- ------ -----   ------   ------     ------      ------- dbo     judy   Grant   Select   publishers all         TRUEID="IN88125"sp_helprotect system procedureRENDERAS="SECT2"sp_column_privilegesREMAP="BO--Body"ID="IN22126"Columnspermissions on
ID="IN80127"sp_column_privileges catalog stored procedure
MOREINFO="NONE"sp_column_privileges is a catalog stored procedure that returns information about permissions on columns in a table. The syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_column_privileges table_name [, table_owner [, table_qualifier [, column_name]]]REMAP="BO--Body"table_name is the name of the table. This is required.REMAP="BO--Body"table_owner can be used to specify the name of the table owner, if it is not "dbo" or the user executing MOREINFO="NONE"sp_column_privileges.REMAP="BO--Body"table_qualifier is the name of the current database.REMAP="BO--Body"column_name is the name of the column on which you want to see permissions information.REMAP="BO--Body"Use MOREINFO="NONE"null for parameters that you do not wish to specify. REMAP="BO--Body"For example, this statement:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_column_privileges publishers, null, null, pub_idREMAP="BO--Body"returns information about the pub_id column of the publishers table. See Volume 2, Chapter 2 of the SQL Server Reference Manual for more specific information about the output of MOREINFO="NONE"sp_column_privileges.RENDERAS="SECT2"sp_table_privilegesREMAP="BO--Body"ID="IN33128"Tablespermissions information on
ID="IN79129"sp_table_privileges catalog stored procedure
MOREINFO="NONE"sp_table_privileges is a catalog stored procedure that returns permissions information about a specified table. The syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_table_privileges table_name [, table_owner [, table_qualifier]]REMAP="BO--Body"table_name is the name of the table. It is required.REMAP="BO--Body"table_owner can be used to specify the name of the table owner, if it is not "dbo" or the user executing MOREINFO="NONE"sp_column_privileges.REMAP="BO--Body"table_qualifier is the name of the current database.REMAP="BO--Body"You can use MOREINFO="NONE"null for parameters that you do not wish to specify. REMAP="BO--Body"For example, this statement:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_table_privileges titlesREMAP="BO--Body"returns information about all permissions granted on the titles table. See Volume 2, Chapter 2 of the SQL Server Reference Manual for more specific information about the output of MOREINFO="NONE"sp_table_privilegesID="IN44130"Information (Server)permissions
ID="IN38131"Permissionsinformation on
ID="IN49132"Protection systemreports 
.ID="X58875" RENDERAS="SECT1"Permissions on Views and Stored Procedures ID="IN18133"Viewssecurity andREMAP="BO--Body"Views and stored procedures can serve as security mechanisms. A user can be granted permission on a view or on a stored procedure even if he or she has no permissions on objects the view or procedure references. ID="IN66134"PermissionsviewsRENDERAS="SECT2"Views as Security Mechanisms REMAP="BO--Body"Through a view, users can query and modify only the data they can see. The rest of the database is neither visible nor accessible. ID="IN67135"Permissionstables versus viewsREMAP="BO--Body"Permission to access the subset of data in a view must be explicitly granted or revoked, regardless of the set of permissions in force on the view's underlying tables. Data in an underlying table that is not included in the view is hidden from users who are authorized to access the view but not the underlying table. REMAP="BO--Body"By defining different views and selectively granting permissions on them, a user (or any combination of users) can be restricted to different subsets of data. The following examples illustrate the use of views for security purposes: ID="IN17136"Tablesunderlying
ID="IN67137"Base tables. See Tables
ID="IN85138"Underlying tables. See Tables, underlyingMARK="BULL" REMAP="BU--Bullet"Access can be restricted to a subset of the rows of a base table (a value-dependent subset). For example, you might define a view that contains only the rows for business and psychology books, in order to keep information about other types of books hidden from some users. Access can be restricted to a subset of the columns of a base table (a value-independent subset). For example, you might define a view that contains all the rows of the MOREINFO="NONE"titles table, but omits the MOREINFO="NONE"royalty and MOREINFO="NONE"advanceID="IN31139"Sensitive information, views of
 columns, since this information is sensitive. Access can be restricted to a row-and-column subset of a base table. ID="IN15140"Joinsviews andAccess can be restricted to the rows that qualify for a join of more than one base table. For example, you might define a view that joins the MOREINFO="NONE"titles, MOREINFO="NONE"authors, and MOREINFO="NONE"titleauthor tables in order to display the names of the authors and the books they have written. This view would hide personal data about authors and financial information about the books. Access can be restricted to a statistical summary of data in a base table. For example, you might define a view that contains only the average price of each type of book. Access can be restricted to a subset of another view, or of some combination of views and base tables. ID="IN24141"Usersviews for specificREMAP="BO--Body"As an example, you want to prevent some users from accessing the columns in the MOREINFO="NONE"titles table that have to do with money and sales. You could create a view of the MOREINFO="NONE"titles table that omits those columns, and then give all users permission on the view but only the Sales Department permission on the table. Here's how: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"grant all on bookview to public REMAP="UI--UserInput" FORMAT="LINESPECIFIC"grant all on titles to sales REMAP="BO--Body"An equivalent way of setting up these privilege
 conditions, without using a view, is this series of statements: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"grant all on titles to public REMAP="UI--UserInput" FORMAT="LINESPECIFIC"revoke select, update on titles (price, advance,    royalty, ytd_sales)from publicREMAP="UI--UserInput" FORMAT="LINESPECIFIC"grant select, update on titles (price, advance,    royalty, ytd_sales) to sales REMAP="BO--Body"One possible problem with the second scheme is that users not in the MOREINFO="NONE"sales group who enter the command:ID="IN107142"select commandselect*, error messageREMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * from titlesREMAP="BO--Body"might be surprised to see the message that includes the phrase:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Permission deniedID="IN36143"Userspermissions to all or specific
ID="IN59144"Asterisks (*)select andREMAP="BO--Body"SQL Server expands the asterisk into a list of all the columns in the MOREINFO="NONE"titles table, and since permission on some of these columns has been revoked from non-sales users, refuses access to them. The error message lists the columns for which the user does not have access. ID="IN77145"PermissionsPermissionson views instead of columnsviews instead of columnsREMAP="BO--Body"In order to see all the columns for which they do have permission, the non-sales users would have to name them explicitly. For this reason, creating a view and granting the appropriate permissions on it is a better solution. ID="IN38146"Tablescontext-sensitive protection of
ID="IN28147"Context-sensitive protection
ID="IN35148"Protection systemcontext-sensitiveREMAP="BO--Body"In addition to protecting data based on a selection of rows and/or columns, views can be used for context-sensitive protection
. For example, you can create a view that gives a data entry clerk permission to access only those rows that he or she has added or updated. REMAP="BO--Body"In order to do so, you would add a column to a table in which the user ID of the user entering each row is automatically recorded with a default. You can define this default in the MOREINFO="NONE"create table statement, like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"create table testtable    (empid       int,     startdate    datetime,    username     varchar(30) default user)REMAP="BO--Body"Next, define a view that includes all the rows of the table where MOREINFO="NONE"uid is the current user: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"create view context_view as    select *     from testtable     where username = user_name()with check optionREMAP="BO--Body"The rows retrievable through this view depend on the identity of the person who issues the MOREINFO="NONE"select command against the view. By adding the MOREINFO="NONE"with check option to the view definition, you make it impossible for any data entry clerk to falsify the information in the usernameID="IN62149"Permissionsviews
 column.ID="IN79150"Stored proceduresStored proceduresas security mechanismssecurity mechanisms
ID="IN97151"Protection mechanisms. See Stored procedures; ViewsRENDERAS="SECT2"Stored Procedures as Security Mechanisms   ID="IN62152"Stored procedurespermissions on
ID="IN30153"Updatingstored procedures andREMAP="BO--Body"A user with permission to execute a stored procedure can do so even if he or she does not have permissions on tables or views referenced in it. For example, a user might be given permission to execute a stored procedure that updates a row-and-column subset of a specified table, even though that user does not have any other permissions on that table. ID="INA31154"Serverspermissions checking byREMAP="BO--Body"Permissions on views and stored procedures are checked when the object is used, not when it is created. ID="INA55155"Rolesstored procedures andRENDERAS="SECT3"Roles and Stored ProceduresREMAP="BO--Body"You can use the MOREINFO="NONE"grant execute command to grant execute permission on a stored procedure to all users who have been granted a specified role. Similarly, MOREINFO="NONE"revoke execute removes this permission.ID="IN119156"execute commanddenying permission with proc_role
ID="IN60157"proc_role system functionREMAP="BO--Body"For further security, you can restrict the use of a stored procedure with any SQL commands you can program into it. For example, you can use the MOREINFO="NONE"proc_role system function within a stored procedure to guarantee that a procedure can only be executed by users with a given role. MOREINFO="NONE"proc_role returns 1 if the user has a specific role (MOREINFO="NONE"sa_role, MOREINFO="NONE"sso_role, orMOREINFO="NONE" oper_role) and returns 0 if the user does not have that role. For example, here is a procedure that uses MOREINFO="NONE"proc_role to see if the user has the System Administrator role: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"create proc test_procasif (proc_role("sa_role") = 0)begin    print "You don't have the right role"    return -1endelse    print "You have SA role"    return 0REMAP="BO--Body"See "System Functions" in Volume 1 of the SQL Server Reference Manual for more information about MOREINFO="NONE"proc_role.ID="IN55158"ChainsownershipID="X53658" RENDERAS="SECT2"Ownership Chains   ID="IN22159"Viewsownership chains
ID="IN27160"Tablesownership chains for
ID="INA34161"Stored proceduresownership chainsREMAP="BO--Body"Views can depend on other views and/or tables. Procedures can depend on other procedures, views, and/or tables. These dependencies can be thought of as an ownership chain.RENDERAS="SECT3"Ownership Chains and ViewsID="IN32162"Permissionsownership chains andREMAP="BO--Body"Typically, the owner of a view also owns its underlying objects (other views and tables), and the owner of a stored procedure owns all the procedures, tables, and views the procedure references. REMAP="BO--Body"Also, a view and its underlying objects are usually all in the same database, as are a stored procedure and all the objects it references. However, it is not required that all of the underlying objects be in the same database. If these objects are in different databases, a user wishing to use the view or stored procedure must be a valid or guest user in all of the databases containing the objects. (This prevents users from accessing a database unless the Database Owner has authorized it.)ID="IN46163"Protection systemhierarchy (ownership chains)REMAP="BO--Body"When a user with permission to access a view does so, SQL Server does not check permissions on any of the view's underlying objects if:MARK="BULL" REMAP="BU--Bullet"These objects and the view are all owned by the same user, andThe user accessing the view is a valid user or guest in each of the databases containing the underlying objects.REMAP="BO--Body"Similarly, if the same user owns a stored procedure and all the views or tables it references, SQL Server checks only the permissions on the procedure.REMAP="BO--Body"However, if the ownership chain of a procedure or view is broken-that is, if not all the objects in the chain are owned by the same user-SQL Server checks permissions on each object in the chain whose next lower link is owned by a different user. In this way, SQL Server allows the owner of the original data to retain control over who is authorized to access it. REMAP="BO--Body"Ordinarily, a user who creates a view need worry only about granting permissions on that view. For example, say Mary has created a view called MOREINFO="NONE"auview1 on the MOREINFO="NONE"authors table, which she also owns. If Mary grants MOREINFO="NONE"select permission to Sue on MOREINFO="NONE"auview1, SQL Server will let Sue access it without checking permissions on MOREINFO="NONE"authors. ID="IN42164"ViewsdependentREMAP="BO--Body"However, a user who creates a view or stored procedure that depends on an object owned by another user must be aware that any permissions he or she grants depend on the permissions allowed by those other owners. REMAP="BO--Body"Say Joe creates a view called MOREINFO="NONE"auview2, which depends on Mary's view MOREINFO="NONE"auview1. Joe grants Sue MOREINFO="NONE"select permission on MOREINFO="NONE"auview2.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig5_1.xwd"LBL="Figure 5-1: "Ownership Chains and Permission Checking for Views, Case 1REMAP="BO--Body"SQL Server checks the permissions on MOREINFO="NONE"auview2 and MOREINFO="NONE"auview1, and finds that Sue can use them. SQL Server checks ownership on auview1 and authors and finds they have the same owner. Sue can therefore use auview2.REMAP="BO--Body"SQL Server performs no authorization checks at the time a view is created. In fact, if Joe has permission on the MOREINFO="NONE"create MOREINFO="NONE"view command, he can define a view based on the MOREINFO="NONE"authors table even if he does not have MOREINFO="NONE"select permission on MOREINFO="NONE"authors. However, the view would be useless to everyone, including Joe. Anyone who tried to use the view would receive an error message.REMAP="BO--Body"Let's take our example a step further. Suppose that Joe's view, MOREINFO="NONE"auview2, depends on MOREINFO="NONE"auview1, which depends on MOREINFO="NONE"authors. Mary decides she likes Joe's MOREINFO="NONE"auview2 and creates MOREINFO="NONE"auview3 on top of it. Both MOREINFO="NONE"auview1 and MOREINFO="NONE"authors are owned by Mary. REMAP="BO--Body"The ownership chain looks like this: FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig5_2.xwd"LBL="Figure 5-2: "Ownership Chains and Permission Checking for Views, Case 2REMAP="BO--Body"When Sue tries to access MOREINFO="NONE"auview3, SQL Server checks permissions on MOREINFO="NONE"auview3, MOREINFO="NONE"auview2, and MOREINFO="NONE"auview1. If Joe has granted permission to Sue on MOREINFO="NONE"auview2 and Mary has granted her permission on MOREINFO="NONE"auview3 and MOREINFO="NONE"auview1, SQL Server allows the access. SQL Server checks permissions only if the object immediately before it in the chain has a different owner (or if it is the first object in the chain). For example, it checks MOREINFO="NONE"auview2 because the object before it-MOREINFO="NONE"auview3-is owned by a different user. It does not check permission on MOREINFO="NONE"authors, because the object which immediately depends on it, MOREINFO="NONE"auview1, is owned by the same user. REMAP="BO--Body"Procedures follow the same rules. As an example, suppose the situation is this:         FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig5_3.xwd"LBL="Figure 5-3: "Ownership Chains and Permission Checking for Stored ProceduresREMAP="BO--Body"To execute proc4, Sue must have permission to execute proc4, proc2, and proc1. Permission to execute proc3 is not necessary, since proc3 and proc4 have the same owner. RENDERAS="SECT3"Ownership Chains and Stored ProceduresREMAP="BO--Body"SQL Server checks Sue's permissions on proc4 and all objects it references each time she executes proc4. SQL Server knows which referenced objects to check: it determined this the first time Sue executed proc4, and it saved the information with the procedure's execution plan. Unless one of the objects referenced by the procedure is dropped or otherwise redefined, SQL Server does not change its initial decision about which objects to check. ID="IN26165"Rulesprotection hierarchyREMAP="BO--Body"The purpose of this protection hierarchy is to allow every object's owner to fully control access to the object. Owners can control access to views and stored procedures, as well as to tables. RENDERAS="SECT2"Triggers   ID="IN28166"Database objectstriggers onREMAP="BO--Body"Triggers are a special kind of stored procedure used to enforce integrity, especially referential integrity. (Please see the Transact-SQL User's Guide
 or the SQL Server Reference Manual
ID="IN49167"Triggerspermissions and
 for details.) Triggers are never executed directly, but only as a side effect of modifying a table. There is no way to MOREINFO="NONE"grant or MOREINFO="NONE"revoke permissions for triggers. REMAP="BO--Body"Only the owner of an object can create a trigger
 on it. However, the ownership chain can be broken if a trigger on a table references objects owned by different users. The protection hierarchy rules that apply to procedures also hold for triggers. REMAP="BO--Body"While the objects which a trigger affects are usually owned by the same user who owns the trigger, you can write a trigger that modifies an object owned by another user. If this is the case, any users modifying your object in a way that activates the trigger must have permission on the other object as well. REMAP="BO--Body"If SQL Server denies permission on a data modification command because of a trigger that affects an object for which the user does not have permission, the entire data modification command is aborted. REMAP="BO--Body"NUMBER="6" ID="X97415"Checking Database ConsistencyID="IN951"dbcc (Database Consistency Checker)RENDERAS="SECT1"Introduction   REMAP="BO--Body"The Database Consistency Checker (MOREINFO="NONE"dbcc) is a set of utility commands for checking the logical and physical consistency of a database. Use the MOREINFO="NONE"dbcc commands: ID="IN1092"dbcc (Database Consistency Checker)database maintenance and
ID="IN383"Databasesmaintenance ofMARK="BULL" REMAP="BU--Bullet"As part of regular database maintenance (periodic checks run by the System Administrator). These checks can detect, and often correct, errors before they affect a user's ability to use SQL Server.ID="IN424"Databasesintegrity concernsTo determine the extent of possible damage after a system error has occurred.Before backing up a database.ID="INA905"dbcc (Database Consistency Checker)database damage andBecause you suspect that a database is damaged. For example, if using a particular table generates the message "Table corrupt", you can use MOREINFO="NONE"dbcc to determine if other tables in the database are also damaged. REMAP="BO--Body"The integrity of the internal structures of a database depends upon the System Administrator or Database Owner running database consistency checks on a regular basis. Two major functions of MOREINFO="NONE"dbcc are:MARK="BULL" REMAP="BU--Bullet"Checking allocation structures (the commands MOREINFO="NONE"checkalloc, MOREINFO="NONE"tablealloc, and MOREINFO="NONE"indexalloc).Checking page linkage and data pointers at both the page level and row level (MOREINFO="NONE"checktable and MOREINFO="NONE"checkdb). The next section explains page and object allocation and page linkage.REMAP="BO--Body"This chapter discusses:MARK="BULL" REMAP="BU--Bullet"Page and object allocation. Understanding how SQL Server handles page and object allocation makes it easier to understand what the MOREINFO="NONE"dbcc commands do.The MOREINFO="NONE"dbcc commands: their syntax and what they do.When and how to use the MOREINFO="NONE"dbcc commands.REMAP="BO--Body"AllMOREINFO="NONE" dbcc commands except the MOREINFO="NONE"dbrepair command and MOREINFO="NONE"checkdb with the MOREINFO="NONE"fix option can be run while the database is active.RENDERAS="SECT2"Errors Generated by Database Consistency ProblemsREMAP="BO--Body"Errors generated by database consistency problems usually have error numbers from 2500 through 2599 or 7900 through 7999. These messages and others that can result from database consistency problems (such as message 605) can be very scary, including phrases like "Table Corrupt" or "Extent not within segment". Many of these messages indicate severe database consistency problems, while other problems are not urgent. Some will require help from Technical Support, but many can be solved by:MARK="BULL" REMAP="BU--Bullet"Running MOREINFO="NONE"dbcc commands which have the MOREINFO="NONE"fix option.Following instructions in the SYBASE Troubleshooting Guide. This guide contains step-by-step instructions for many resolving MOREINFO="NONE"dbcc errors.REMAP="BO--Body"Whatever the techniques required to solve the problems, the solutions are much easier when you find the problem early, soon after the corruption or inconsistency originated. Consistency problems can exist on data pages that are not used frequently, such as a table that is only updated monthly. MOREINFO="NONE"dbcc can find-and often fix-these problems for you before a user needs the data. The only way to find these problems early is to run MOREINFO="NONE"dbcc commands often.REMAP="BO--Body"If you dump a database that contains consistency errors, and load that dump of the database at a later time, the result will be a database that has consistency problems, since a database dump is a logical image of the data pages.RENDERAS="SECT2"dbcc PermissionsID="IN606"Permissionsdbcc commandsREMAP="BO--Body"The Database Owner and System Administrator are automatically granted permission to use all of theMOREINFO="NONE" dbcc commands. Permission for MOREINFO="NONE"dbcc MOREINFO="NONE"checktable,MOREINFO="NONE" dbcc reindex, andMOREINFO="NONE" dbcc fix_text defaults to the table owner. Permission to run MOREINFO="NONE"dbcc is not transferable. RENDERAS="SECT1"ID="IN267"Pages (data)allocation of
Page and Object Allocation ConceptsID="IN608"Allocation unitspage
ID="IN679"disk init commandallocation andREMAP="BO--Body"When you initialize a database device, the MOREINFO="NONE"disk init command divides the new space into allocation units
 of 256 2K data pages (data pages on Stratus machines are 4K each). The first page of each allocation unit is an allocation page, which tracks the use of all pages in the allocation unit. Allocation pages have an object ID of 99; they aren't real database objects, and don't appear in system tables, but MOREINFO="NONE"dbcc errors on allocation pages report this value. ID="IN5610"Space allocationpages
ID="IN3611"Space allocationfunctions of ServerREMAP="BO--Body"Whenever a table or index requires space, SQL Server allocates a block of 8 2K pages (8 4K pages on Stratus) to the object. This 8-page block is called an ID="IN3212"Space allocationextents
extentID="IN3613"Pages (data)management with extents
ID="IN2814"Number (quantity of)extents
. Each 256-page allocation unit contains 32 extents. SQL Server use extents as a unit of space management to allocate and de-allocate space:MARK="BULL" REMAP="BU--Bullet"When you create a table or index SQL Server allocates an extent for the object. When you add rows to an existing table, SQL Server allocates another page if existing pages are full. If all of the pages in an extent are full, SQL Server allocates an additional extent.When you drop a table or index, SQL Server deallocates the extents it occupied. When you delete rows from a table, so that it shrinks off a page, SQL Server deallocates the page; if the table shrinks off the extent, SQL Server deallocates the extent. REMAP="BO--Body"Every time space is allocated or deallocated on an extent, SQL Server records the event on the allocation page that tracks the extents for that object. This provides a fast method for tracking space allocations in the database, since objects can shrink or grow without a lot of overhead.REMAP="BO--Body"LINKEND="X20952"Figure 6-1
 shows how data pages are set up within extents and allocation units in SQL Server databases.       FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig6_1.xwd"LBL="Figure 6-1: " ID="X20952"Page Management with ExtentsREMAP="BO--Body"ID="IN9315"checkalloc option, dbcc
MOREINFO="NONE"dbcc provides the MOREINFO="NONE"checkalloc command for checking all allocation pages in the database, and the MOREINFO="NONE"indexalloc and MOREINFO="NONE"tablealloc commands for checking allocation for specific database objects.REMAP="BO--Body"MOREINFO="NONE"dbcc checkalloc checks all allocation pages (page 0 and all pages divisible by 256) in a database, and reports on the allocation information it finds there. ID="IN10116"Object Allocation Map (OAM)pagesRENDERAS="SECT2"The Object Allocation Map (OAM)REMAP="BO--Body"Each table, and each index on a table, has an Object Allocation Map (OAMID="IN3217"TablesObject Allocation Maps of
ID="IN3318"IndexesObject Allocation Maps of
). The OAM is stored on pages allocated to the table or index and is checked when a new page is needed for the index or table. A single OAM page can hold allocation mapping for between 2016 and 64,260 data or index pages.REMAP="BO--Body"The OAM pages point to the allocation page for each allocation unit where the object uses space. The allocation pages, in turn, track the information about extent and page usage within the allocation unit. In other words, if the titles table is stored on extents 24 and 272, the OAM page for the titles table points to pages 0 and 256.REMAP="BO--Body"LINKEND="X28672"Figure 6-2: OAM Page and Allocation Page Pointers
 shows an object stored on 4 extents, numbered 0, 24, 272 and 504. The Object Allocation Map is stored on the first page of the first segment. In this case, since the allocation page occupies page 0, the OAM is located on page 1.REMAP="BO--Body"This OAM points to two allocation pages: page 0 and page 256.REMAP="BO--Body"These allocation pages track the pages used in each extent used by all objects with storage space in the allocation unit. For the object in this example, it tracks the allocation and deallocation of pages on extents 0, 24, 272, and 504. FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig6_2.xwd"LBL="Figure 6-2: " ID="X28672"OAM Page and Allocation Page PointersREMAP="BO--Body"The MOREINFO="NONE"dbcc checkalloc and MOREINFO="NONE"dbcc tablealloc commands examine this OAM page information, in addition to checking page linkage, described in the following section.RENDERAS="SECT2"Page LinkageREMAP="BO--Body"Once a page has been allocated to a table or index, that page is linked with other pages used for the same object. LINKEND="X37128"Figure 6-3: How a Newly-Allocated Page is Linked with Other Pages
 illustrates this linking. Each page contains a header that includes the number of the page that precedes it (prev) and of the page that follows it (next). When a new page is allocated, the header information on the surrounding pages changes to point to that page. MOREINFO="NONE"dbcc checktable and MOREINFO="NONE"dbcc checkdbID="IN4219"Pages (data)linkage in tables and indexes
ID="IN1320"Linkage, page
 check page linkage. MOREINFO="NONE"dbcc checkalloc, MOREINFO="NONE"tablealloc, and MOREINFO="NONE"indexalloc compare page linkage to information on the allocation page. FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig6_3.xwd"LBL="Figure 6-3: " ID="X37128"How a Newly-Allocated Page is Linked with Other PagesID="IN9321"dbcc (Database Consistency Checker)commandsRENDERAS="SECT1"Individual dbcc CommandsRENDERAS="SECT2"ID="IN7022"Tablesintegrity checking with dbcc
ID="IN10423"checktable option, dbcc
dbcc checktable REMAP="BO--Body"The syntax for MOREINFO="NONE"dbcc MOREINFO="NONE"checktable is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"dbcc checktable MOREINFO="NONE"({MOREINFO="NONE"table_name | table_id}[, skip_ncindex] )REMAP="BO--Body"The MOREINFO="NONE"dbcc MOREINFO="NONE"checktableID="IN7224"Tablesdbcc checktable and
 command checks the specified table to see that:ID="IN4225"Pages (data)linkage in tables and indexes
ID="IN1326"Linkage, pageMARK="BULL" REMAP="BU--Bullet"Index and data pages are correctly linked ID="IN3027"Indexessort order changes andIndexes are in properly sorted order All pointers are consistent ID="IN10428"Object Allocation Map (OAM)checking with dbcc commandsThe data rows on each page all have entries in the first OAM page matching their respective locations on the pageREMAP="BO--Body"The option MOREINFO="NONE"skip_ncindex allows you to skip checking the page linkage, pointers and sort order on nonclustered indexes. The linkage and pointers of clustered indexes and data pages is essential to the integrity of your tables. You can easily drop and recreate nonclustered indexes if SQL Server reports problems with page linkage or pointers.REMAP="BO--Body"MOREINFO="NONE"dbcc MOREINFO="NONE"checktable can be used with the table name or the table's object ID. The sysobjects table stores this information in the name and id columns.REMAP="BO--Body"Here's an example of a report on an undamaged table: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"1>  dbcc checktable(titles)2>  goREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Checking titlesThe total number of data pages in this table is 2.Table has 18 data rows.REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"DBCC execution completed. If DBCC printed error messages, see your System Administrator.  REMAP="BO--Body"To check a table not in the current database, supply the database name. To check a table owned by another object, supply the owner's name. You must enclose any qualified table name in quotes:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dbcc checktable("pubs2.newuser.testtable")REMAP="BO--Body"These are the problems thatMOREINFO="NONE" dbcc checktable addresses:MARK="BULL" REMAP="BU--Bullet"If the page linkage is incorrect, MOREINFO="NONE"dbcc checktable displays an error message.ID="IN6529"Sort orderdbcc checktable andIf the sort order (sysindexes.soid) or character set (sysindexes.csid) for a table with columns with char or varcharID="IN2030"Tablessort order of
 datatypes is incorrect, and the table's sort order is compatible with SQL Server's default sort order, MOREINFO="NONE"dbcc MOREINFO="NONE"checktableID="IN1731"Binary sort order
 corrects the values for the table. Only the binary sort order is compatible across character sets.ID="IN2032"Changingsort orders
ID="IN1933"Sort orderchanging
If you change sort orders, character-based user indexes are marked read-only and must be checked and rebuilt if necessary. See LINKEND="X60641"Chapter 17,  "Language, Sort Order, and Character Set Issues"
, for more information about changing sort orders.If there are data rows not accounted for in the first OAM page for the object, MOREINFO="NONE"dbcc checktableID="IN10234"Object Allocation Map (OAM)checking with dbcc commands
 updates the number of rows on that page. This is never a serious problem, it is just a little quick housekeeping. The built-in function MOREINFO="NONE"rowcnt uses this value to provide fast row estimates in procedures like MOREINFO="NONE"sp_spaceused.RENDERAS="SECT2"ID="IN11235"Databasescheckdb option (dbcc)
ID="IN9036"checkdb option, dbcc
dbcc checkdb REMAP="BO--Body"The syntax for MOREINFO="NONE"dbcc checkdb is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"dbcc checkdb [(MOREINFO="NONE"database_name [, skip_ncindex]) ] ID="IN6937"Tablesdbcc checkdb andREMAP="BO--Body"The MOREINFO="NONE"dbcc checkdb command runs the same checks as MOREINFO="NONE"dbcc checktable on each table in the specified database. If you do not give a database name, MOREINFO="NONE"dbcc checkdb checks the current database. MOREINFO="NONE"dbcc checkdb gives similar messages to those returned by MOREINFO="NONE"dbcc checktable and makes the same types of corrections.REMAP="BO--Body"If you specify the optional MOREINFO="NONE"skip_ncindex mode, MOREINFO="NONE"dbcc checkdb does not check any of the nonclustered indexes on user tables in the database.RENDERAS="SECT2"ID="IN10638"checkcatalog option, dbcc
dbcc checkcatalog    REMAP="BO--Body"The syntax for MOREINFO="NONE"dbcc checkcatalog is:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dbcc checkcatalog [(database_name)]REMAP="BO--Body"The MOREINFO="NONE"dbcc MOREINFO="NONE"checkcatalogID="IN7039"System tablesdbcc checkcatalog and
 command checks for consistency within and between the system tables found in a particular database. If no database name is given, MOREINFO="NONE"dbcc checkcatalog checks the current database. REMAP="BO--Body"For example, it verifies that:ID="IN5040"syscolumns tableMARK="BULL" REMAP="BU--Bullet"Every type in MOREINFO="NONE"syscolumns has a matching entry in MOREINFO="NONE"systypesEvery table and view in MOREINFO="NONE"sysobjects has at least one column in MOREINFO="NONE"syscolumnsThe last checkpoint in MOREINFO="NONE"syslogs is validID="IN5341"Information (Server)segmentsREMAP="BO--Body"It also lists the segments defined for use by the database. REMAP="BO--Body"Here's an example of output from MOREINFO="NONE"dbcc checkcatalog: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dbcc checkcatalog (testdb)REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Checking testdbThe following segments have been defined for database 5 (database name testdb).virtual start addr      size      segments--------------------    ------    --------------------------33554432                4096                                 0                                 116777216                1024                                 2DBCC execution completed. If DBCC printed error messages, see your System Administrator.RENDERAS="SECT2"ID="IN10442"checkalloc option, dbcc
dbcc checkalloc REMAP="BO--Body"The syntax for MOREINFO="NONE"dbcc checkalloc is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"dbcc checkalloc [(MOREINFO="NONE"database_name [, fix | nofix] )]REMAP="BO--Body"The MOREINFO="NONE"dbcc checkalloc command checks the specified database to see that:MARK="BULL" REMAP="BU--Bullet"All pages are correctly allocatedNo page is allocated that is not usedNo page is used that is not allocatedREMAP="BO--Body"If you do not give a database name, MOREINFO="NONE"dbcc checkalloc checks the current database. REMAP="BO--Body"The default mode for MOREINFO="NONE"dbcc checkalloc is MOREINFO="NONE"nofix. To useMOREINFO="NONE" dbcc checkalloc with the MOREINFO="NONE"fixID="IN7643"fix optiondbcc checkalloc
 option, you must first put the database into single-user mode with the command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_dboption dbname, "single user", trueREMAP="BO--Body"You can only issue this command when no one is using the database.REMAP="BO--Body"ID="IN4744"Reportsdbcc
MOREINFO="NONE"dbcc checkalloc reports the amount of space allocated and used. MOREINFO="NONE"dbcc checkalloc output consists of a block of data for each table, including the system tables and the indexes on each table. For each table or index, it reports the number of pages and extents used. Table information is reported as either INDID =0 or INDID=1. Tables without clustered indexes have indid = 0 (for example, salesdetail, below). Tables with clustered indexes have indid = 1, and the report for these includes information on the data level and the index level. See the report for titleauthor and titles, below. Nonclustered indexes are numbered consecutively, starting from INDID=2.REMAP="BO--Body"Here is a portion of a report on pubs2, showing the output for 3 tables:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"***************************************************************TABLE: salesdetail              OBJID = 144003544INDID=0  FIRST=297       ROOT=299        SORT=0        Data level: 0.  3 Data  Pages in 1 extents.INDID=2  FIRST=289       ROOT=290        SORT=1        Indid     : 2.  3 Index Pages in 1 extents.INDID=3  FIRST=465       ROOT=466        SORT=1        Indid     : 3.  3 Index Pages in 1 extents.TOTAL # of extents = 3***************************************************************TABLE: titleauthor              OBJID = 176003658INDID=1  FIRST=433       ROOT=425        SORT=1        Data level: 1.  1 Data  Pages in 1 extents.        Indid     : 1.  1 Index Pages in 1 extents.INDID=2  FIRST=305       ROOT=305        SORT=1        Indid     : 2.  1 Index Pages in 1 extents.INDID=3  FIRST=441       ROOT=441        SORT=1        Indid     : 3.  1 Index Pages in 1 extents.TOTAL # of extents = 4***************************************************************TABLE: titles           OBJID = 208003772INDID=1  FIRST=417       ROOT=409        SORT=1        Data level: 1.  3 Data  Pages in 1 extents.        Indid     : 1.  1 Index Pages in 1 extents.INDID=2  FIRST=313       ROOT=313        SORT=1        Indid     : 2.  1 Index Pages in 1 extents.TOTAL # of extents = 3***************************************************************REMAP="BO--Body"In its default (MOREINFO="NONE"nofix) mode, MOREINFO="NONE"dbcc checkallocID="IN7945"Space allocationerrors correction with dbcc
ID="IN6246"Errorscorrection with dbcc
 does not correct allocation errors. In MOREINFO="NONE"fix mode, it can fix all of the allocation errors fixed by MOREINFO="NONE"dbcc tablealloc, and can also fix pages which remain allocated to objects that have been dropped from the database. REMAP="BO--Body"Since the database must be in single-user mode to use the MOREINFO="NONE"fix option, you can run MOREINFO="NONE"dbcc checkalloc in nofix mode, and use MOREINFO="NONE"dbcc tablealloc or MOREINFO="NONE"dbcc indexalloc, described below, with the MOREINFO="NONE"fixID="IN8347"Space allocationverification with dbcc commands
 option to correct errors found in individual tables or indexes.RENDERAS="SECT2"dbcc tableallocID="IN10448"tablealloc option, dbccREMAP="BO--Body"The syntax for MOREINFO="NONE"dbcc tablealloc is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"dbcc tablealloc ({MOREINFO="NONE"table_name | MOREINFO="NONE"table_id}[, {full | optimized | fast | null}[, fix | nofix]])You can specify MOREINFO="NONE"fix or MOREINFO="NONE"nofix only if you include a value for the type of report (MOREINFO="NONE"full, MOREINFO="NONE"optimized, MOREINFO="NONE"fast, or MOREINFO="NONE"null).ID="IN9049"Object Allocation Map (OAM)checking with dbcc commandsREMAP="BO--Body"This command performs the same checks as MOREINFO="NONE"dbcc checkalloc on a single table. You can specify either the table name or the table's object ID (the id column from sysobjects).ID="INA6150"ReportsdbccREMAP="BO--Body"There are three types of reports that can be generated with MOREINFO="NONE"dbcc tablealloc: MOREINFO="NONE"full, MOREINFO="NONE"optimized, and MOREINFO="NONE"fast. ID="IN11151"full optiondbcc tableallocMARK="BULL" REMAP="BU--Bullet"The MOREINFO="NONE"full option is equivalent to MOREINFO="NONE"dbcc checkalloc at a table level; it reports all types of allocation errorsMOREINFO="NONE". ID="IN3652"Pages (data)management with extents
ID="IN11653"optimized reportdbcc tableallocThe MOREINFO="NONE"optimizedID="IN2154"Allocation unitspage
ID="IN2455"Space allocationextents
ID="IN756"Extents
 option produces a report based on the allocation pages listed in the object allocation map (OAM) pages for the table. It does not report and cannot fix unreferenced extents on allocation pages not listed in the OAM pages. If the type of report is not indicated in the command, or if you indicate MOREINFO="NONE"null, MOREINFO="NONE"optimized is the default.ID="IN11157"fast optiondbcc tableallocThe MOREINFO="NONE"fast option produces an exception report of pages that are referenced but not allocated in the extent (2521 errors). It does not produce an allocation report. REMAP="BO--Body"LINKEND="X11648"Table 6-1: dbcc Commands Compared for Speed, Thoroughness, and Locking
 in "Comparing the dbcc Commands" compares these options and other MOREINFO="NONE"dbcc commands for speed, completeness, locking, and performance issues.ID="IN6258"Errorscorrection with dbccRENDERAS="SECT3"Correcting Allocation Errors-the fix | nofix optionREMAP="BO--Body"TheID="IN9659"fix optiondbcc tablealloc
MOREINFO="NONE" fix |ID="IN7760"System tablesdbcc tablealloc nofix option
ID="IN9861"nofix optiondbcc tablealloc
MOREINFO="NONE" nofix option determines whether or not MOREINFO="NONE"tablealloc fixes the allocation errors found in the table. The default is MOREINFO="NONE"fixID="IN7762"System tablesdbcc tablealloc nofix option
 for all user tables; the default for all system tables isMOREINFO="NONE" nofix. To use the MOREINFO="NONE"fix option with system tables, you must first put the database into single user mode.ID="IN7963"Space allocationerrors correction with dbcc
ID="IN8264"Number (quantity of)errors corrected with dbccThe number of errors corrected when you run MOREINFO="NONE"dbcc tablealloc and MOREINFO="NONE"dbcc indexalloc with the MOREINFO="NONE"fixID="IN5965"Reportsdbcc
 option depends on the type of report (ID="IN10966"full optiondbcc tablealloc
MOREINFO="NONE"full, ID="IN11467"optimized reportdbcc tablealloc
MOREINFO="NONE"optimizedID="IN10968"fast optiondbcc tablealloc
, or MOREINFO="NONE"fast) you request. Running MOREINFO="NONE"dbcc tablealloc with the MOREINFO="NONE"full option fixes more errors than running the command with the MOREINFO="NONE"optimized or MOREINFO="NONE"fast option.REMAP="BO--Body"Output from a MOREINFO="NONE"dbcc tablealloc command with the MOREINFO="NONE"fix ID="IN7169"Error messagestablealloc allocation
option displays any allocation errors found, as well as any corrections made. Here is an example of an error message that appears whether or not the MOREINFO="NONE"fix option is used:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Msg 7939, Level 22, State 1:Line 2:Table Corrupt: The entry is missing from the OAM for object id 144003544 indid 0 for allocation page 2560.REMAP="BO--Body"The following message, which appears when the MOREINFO="NONE"fix option is used, indicates that the missing entry has been restored:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"The missing OAM entry has been inserted.RENDERAS="SECT2"ID="IN3870"Indexesintegrity checks
ID="IN11871"indexalloc option, dbcc
dbcc indexallocREMAP="BO--Body"This is the syntax for MOREINFO="NONE"dbcc indexalloc:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"dbcc indexalloc ( {MOREINFO="NONE"table_name | MOREINFO="NONE"table_id }, MOREINFO="NONE"index_id [, {full | optimized | fast | null}[, fix | nofix]])You can specify MOREINFO="NONE"fix or MOREINFO="NONE"nofix only if you include a value for the type of report (MOREINFO="NONE"full, MOREINFO="NONE"optimized, MOREINFO="NONE"fast, or MOREINFO="NONE"null).REMAP="BO--Body"The MOREINFO="NONE"dbcc indexalloc command checks the specified index to see that:MARK="BULL" REMAP="BU--Bullet"All pages are correctly allocatedNo page is allocated that is not usedNo page is used that is not allocatedREMAP="BO--Body"This is an index-level version of MOREINFO="NONE"dbcc checkalloc, providing the same integrity checks on an individual index. You can specify either the table name or the table's object ID (the id column from sysobjects) and the index's indid from sysindexes. MOREINFO="NONE"dbcc checkalloc and MOREINFO="NONE"dbcc indexalloc include the index ID's in their output.REMAP="BO--Body"MOREINFO="NONE"dbcc indexalloc produces the same three types of reports as MOREINFO="NONE"dbcc tableallocID="IN9772"full optiondbcc indexalloc
: MOREINFO="NONE"fullID="IN10273"optimized reportdbcc indexalloc
, MOREINFO="NONE"optimizedID="IN9774"fast optiondbcc indexalloc
, and MOREINFO="NONE"fast (see preceding paragraphs on MOREINFO="NONE"tablealloc). TheID="IN9675"fix optiondbcc indexalloc
ID="IN9876"nofix optiondbcc indexalloc
MOREINFO="NONE" fix|nofix option works the same in MOREINFO="NONE"dbcc indexalloc as in ID="IN11677"indexalloc option, dbcc
ID="IN3678"Indexesintegrity checks
MOREINFO="NONE"dbcc tablealloc.RENDERAS="SECT2"ID="IN9879"dropdb option, dbcc dbrepair
ID="IN10280"dbrepair option, dbcc
dbcc dbrepair   REMAP="BO--Body"This is the syntax for MOREINFO="NONE"dbcc dbrepair:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"dbcc dbrepair (MOREINFO="NONE"database_name, dropdb )ID="IN4481"Droppingdamaged database
ID="IN1882"DatabasesdroppingREMAP="BO--Body"The MOREINFO="NONE"dbcc dbrepair dropdbID="IN11683"drop database commanddbcc dbrepair dropdb and
ID="IN14484"dbrepair option, dbccdrop database and
 command drops a damaged database. The Transact-SQL command MOREINFO="NONE"drop database does not work on a database that cannot be recovered or used. Issue the MOREINFO="NONE"dbrepair statement from the MOREINFO="NONE"master database; no users, including the MOREINFO="NONE"dbrepair user, can be using the database when it is dropped. RENDERAS="SECT2"ID="IN2485"Indexesintegrity checks
ID="IN9086"reindex option, dbcc
ID="IN6687"Indexesreindex integrity check
dbcc reindex REMAP="BO--Body"The System Administrator or table owner should runMOREINFO="NONE" dbcc reindex after changing SQL Server's sort order. This is the syntax forMOREINFO="NONE" dbcc reindex:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"dbcc reindex ({MOREINFO="NONE"table_name | MOREINFO="NONE"table_id})ID="IN6188"Tablesdbcc checktable andREMAP="BO--Body"The MOREINFO="NONE"dbcc reindexID="IN6489"Fast version, dbcc checktable
ID="IN10690"checktable option, dbccfast version
 command checks the integrity of indexes on user tables by running a "fast" version of MOREINFO="NONE"dbcc MOREINFO="NONE"checktableID="IN1991"Sort orderchanging
ID="IN2092"Changingsort orders
. It drops and rebuilds indexes it suspects are corrupted (that is, the order in which the indexes sort data is not consistent with the new sort order). For more information, see LINKEND="X60641"Chapter 17,  "Language, Sort Order, and Character Set Issues"
.RENDERAS="SECT2"ID="IN10293"fix_text option, dbcc
dbcc fix_textID="IN9194"dbcc (Database Consistency Checker)commands
 ID="IN10695"text values, dbcc fix_text upgrade ofREMAP="BO--Body"The MOREINFO="NONE"dbcc fix_text command upgrades textID="IN4796"Changingcharacter sets
 values after a SQL Server's character set has been changed to a multibyte character set
. This is the syntax forMOREINFO="NONE" dbcc fix_text:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"dbcc fix_text ({MOREINFO="NONE"table_name | MOREINFO="NONE"table_id})ID="IN7597"text datatypechanging character sets and
ID="IN4098"Updatingtext after character set change
ID="IN2499"Character setsmultibyte
ID="IN76100"text datatypemultibyte character sets and
ID="IN24101"Multibyte character setsREMAP="BO--Body"Changing to a multibyte character set makes the management of text data more complicated. Since a text value can be large enough to cover several pages, SQL Server must be able to handle characters that may span page boundaries. To do so, SQL Server requires additional information on each of the text pages. The System Administrator or table owner must run MOREINFO="NONE"dbcc MOREINFO="NONE"fix_text on each table that has text data to calculate the new values needed. See LINKEND="X60641"Chapter 17,  "Language, Sort Order, and Character Set Issues"
, for more information.RENDERAS="SECT1"ID="IN96102"dbcc (Database Consistency Checker)when to use
How, When, and Why to Use the dbcc CommandsREMAP="BO--Body"The following sections compare the MOREINFO="NONE"dbcc commands, provide suggestions for scheduling and strategies to avoid serious performance impacts, and provide additional information about MOREINFO="NONE"dbcc output.RENDERAS="SECT2"Comparing the dbcc CommandsREMAP="BO--Body"Run the following MOREINFO="NONE"dbcc commands whenever you schedule database maintenance:MARK="BULL" REMAP="BU--Bullet"MOREINFO="NONE"dbcc checkdb or MOREINFO="NONE"dbcc checktableMOREINFO="NONE"dbcc checkalloc orMOREINFO="NONE" dbcc indexalloc and MOREINFO="NONE"dbcc tableallocMOREINFO="NONE"dbcc checkcatalog REMAP="BO--Body"In general, the more thoroughly the MOREINFO="NONE"dbcc command checks the integrity of an object or database, the slower it is. LINKEND="X11648"Table 6-1
 compares the speed, thoroughness, level of checking, and locking and other performance implications of these commands. Bear in mind that MOREINFO="NONE"dbcc checktable (and MOREINFO="NONE"dbcc checkdb) and MOREINFO="NONE"dbcc checkcatalog perform different types of integrity checks than MOREINFO="NONE"dbcc checkalloc, MOREINFO="NONE"dbcc tablealloc, and MOREINFO="NONE"dbcc indexallocID="IN47103"Reportsdbcc
ID="IN88104"dbcc (Database Consistency Checker)commands compared
.PGWIDE=1 TOCENTRY="1"LBL="Table 6-1: " ID="X11648"dbcc Commands Compared for Speed, Thoroughness, and LockingCOLS="5" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="11*"COLNAME="C2" COLWIDTH="12*"COLNAME="C3" COLWIDTH="14*"COLNAME="C4" COLWIDTH="7*"COLNAME="C5" COLWIDTH="8*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command and OptionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LevelCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Locking and PerformanceCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SpeedCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ThoroughnessVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0" MOREINFO="NONE"checktable MOREINFO="NONE"checkdbCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"page chains, sort 
order, data rows for 
all indexesCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"shared table lock; MOREINFO="NONE"dbcc 
MOREINFO="NONE"checkdb locks one table at 
a time and releases lock 
after it finishes checking 
that tableCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"slowCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"highCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0" MOREINFO="NONE"checktable MOREINFO="NONE"checkdbwith MOREINFO="NONE"skip_ncindexCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"page chains, sort 
order, data rows for 
tables and clustered 
indexesCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"same as aboveCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"up to 
40% 
faster 
than 
without
 the 
MOREINFO="NONE"skip_nc
index 
optionCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"mediumCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"checkallocCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"page chainsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"no locking; performs a lot 
of I/O and may saturate 
the I/O calls; only 
allocation pages are 
cachedCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"slowCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"highCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"tablealloc full 
indexalloc fullCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"page chainsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"shared table lock; 
performs a lot of I/O; 
only allocation pages are 
cachedCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"slowCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"highCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"tablealloc optimized
indexalloc optimizedCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"allocation pagesCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"shared table lock; 
perform a lot of I/O; only 
allocation pages are 
cachedCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"moderateCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"mediumCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"tablealloc fast
indexalloc fastCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"OAM pagesCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"shared table lock COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"fastestCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"lowCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"checkcatalogCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"rows in system 
tablesCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"shared page locks on 
system catalogs; releases 
lock after each page is 
checked; very few pages 
cachedCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID="IN81105"Scheduling, Serverdbcc commandsRENDERAS="SECT2"Scheduling Database Maintenance at Your SiteREMAP="BO--Body"Several factors determine how often you should run MOREINFO="NONE"dbcc commands in databases at your site and which ones you need to run:MARK="BULL" REMAP="BU--Bullet"When are your databases heavily used? Is your installation used heavily primarily between the hours of 8 a.m. and 5 p.m., or is it used heavily 24 hours a day?REMAP="UN--Under"If your SQL Server is used primarily between the hours of 8 a.m. and 5 p.m., Monday through Friday, you can run MOREINFO="NONE"dbcc checks at night and on weekends so the checks do not have a significant impact on your users. If your tables are not extremely large, you can run a complete set of MOREINFO="NONE"dbcc commands fairly frequently.REMAP="UN--Under"If your SQL Server is heavily used 24 hours a day, 7 days a week, you may want to schedule a cycle of checks on individual tables and indexes usingMOREINFO="NONE" dbcc checktable, MOREINFO="NONE"dbcc tablealloc, andMOREINFO="NONE" dbcc indexalloc. At the end of the cycle, when all tables have been checked, you can run MOREINFO="NONE"dbcc checkcatalog and back up the database.REMAP="UN--Under"Some sites with 24-hour, high-performance demands choose to run MOREINFO="NONE"dbcc checks by: MARK="DASH" REMAP="BS--BulletSub"Dumping the database to tapeLoading their database dumps into a separate SQL ServerRunning MOREINFO="NONE"dbcc commands on the copied databaseRunning MOREINFO="NONE"dbcc commands with the MOREINFO="NONE"fix on appropriate objects in the original database, if errors are detected that can be repaired with the MOREINFO="NONE"fix optionsREMAP="UN--Under"Since the dump is a logical copy of the database pages, any problems in the original database are duplicated in the dumped copy.REMAP="UN--Under"You should run MOREINFO="NONE"dbcc checkdb regularly on the entire database, or MOREINFO="NONE"dbcc checktable on each table in the database. You might choose to run the object-level commands rather than the database-level check for performance reasons. MOREINFO="NONE"dbcc checkdbID="IN79106"Order of commandsobject-level dbcc checking
 acquires locks on the objects while it checks them, and you cannot
control the order in which it checks the objects. For example, if you
have one application running that uses table4, table5, and table6, and the MOREINFO="NONE"dbcc checks take 20 minutes to complete, the application might be blocked for a long time while you are using MOREINFO="NONE"dbcc checkdb. REMAP="UN--Under"Using the table-level commands, you can intersperse checks on tables not used in the application, thereby allowing the application access in the intervals: ID="IN79107"Scheduling, Serverdbcc commandsREMAP="UI--UserInput" FORMAT="LINESPECIFIC"    dbcc checktable(table4)    dbcc checktable(table1) /*not in application*/    dbcc checktable(table5)    dbcc checktable(table2)/*not in application*/    dbcc checktable(table6)ID="IN14108"Dump, database
ID="IN38109"Databasesbacking upHow often do you back up your databases with MOREINFO="NONE"dump database?ID="IN29110"Recoveryplanning backups forREMAP="UN--Under"The more often you back up your databases and dump your transaction logs, the more data you can recover in case of failure. You and the users at your site need to decide how much data you are willing to lose in the event of a disaster and develop a dump schedule to support that decision. After you schedule your dumps, decide how to incorporate the MOREINFO="NONE"dbcc commands into that schedule.ID="IN68111"dump database commandwhen to use
ID="IN109112"dump database commanddbcc schedule andREMAP="UN--Under"An ideal time to dump a database is after you run a complete check of that database using MOREINFO="NONE"dbcc checkalloc, MOREINFO="NONE"dbcc checkcatalog, and MOREINFO="NONE"dbcc checkdbID="IN24113"Scriptsoperating system
. If these commands find no errors in the database, you know that your backup contains a clean database. You can use scripts to automate this process, sending output to a file and using an operating system script to search the file for errors. Use MOREINFO="NONE"dbcc tablealloc or MOREINFO="NONE"indexalloc on individual tables and indexes to correct allocation errors reported by MOREINFO="NONE"dbcc checkalloc.How many tables contain highly critical data and how often does that data change? How large are those tables?ID="IN23114"Tablescritical data inREMAP="UN--Under"If you have only a few tables containing critical data or data that changes often, you may want to run the table- and index-level MOREINFO="NONE"dbccID="IN36115"Databasesmaintenance of
ID="IN40116"Databasesintegrity concerns
ID="IN107117"dbcc (Database Consistency Checker)database maintenance and
ID="IN94118"dbcc (Database Consistency Checker)when to use
 commands more frequently on those tables.ID="IN67119"Information (Server)dbcc outputID="X20003" RENDERAS="SECT2"What to Look for in dbcc OutputID="IN94120"dbcc (Database Consistency Checker)output ofREMAP="BO--Body"The output of most MOREINFO="NONE"dbccID="IN96121"fix optiondbcc tablealloc
 commands includes information that identifies the object or objects being checked, and error messages that indicate what problems, if any, the command finds in the object. When MOREINFO="NONE"dbcc tablealloc and MOREINFO="NONE"dbcc indexalloc are run with the default MOREINFO="NONE"fixID="IN71122"Error messagestablealloc allocation
 option, the output also indicates the repairs that the command makes. Here's an annotated example of MOREINFO="NONE"dbcc tablealloc output for a table with an allocation error:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dbcc tablealloc(table5)REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"MOREINFO="NONE"Information from sysindexes about object being checked:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"TABLE: table5            OBJID = 144003544INDID=0  FIRST=337       ROOT=2587       SORT=0REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"MOREINFO="NONE"Error message:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Msg 7939, Level 22, State 1:Line 2:Table Corrupt: The entry is missing from the OAM for object id144003544 indid 0 for allocation page 2560.REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"MOREINFO="NONE"Message indicating that error has been corrected:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"The missing OAM entry has been inserted.        Data level: 0.  67 Data  Pages in 9 extents.REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"MOREINFO="NONE"dbcc report on page allocation:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"TOTAL # of extents = 9Alloc page 256 (# of extent=1 used pages=8 ref pages=8)EXTID:560 (Alloc page: 512) is initialized.  Extent follows:NEXT=0 PREV=0 OBJID=144003544 ALLOC=0xff DEALL=0x0 INDID=0 STATUS=0x0Alloc page 512 (# of extent=2 used pages=8 ref pages=8)Page 864 allocated (Alloc page: 768 Extent ID: 864 Alloc mask: 0x1)Page 865 allocated (Alloc page: 768 Extent ID: 864 Alloc mask: 0x3)Page 866 allocated (Alloc page: 768 Extent ID: 864 Alloc mask: 0x7)Page 867 allocated (Alloc page: 768 Extent ID: 864 Alloc mask: 0xf)Page 868 allocated (Alloc page: 768 Extent ID: 864 Alloc mask: 0x1f)Page 869 allocated (Alloc page: 768 Extent ID: 864 Alloc mask: 0x3f)Page 870 allocated (Alloc page: 768 Extent ID: 864 Alloc mask: 0x7f)Page 871 allocated (Alloc page: 768 Extent ID: 864 Alloc mask: 0xff)Alloc page 768 (# of extent=1 used pages=8 ref pages=8)Alloc page 1024 (# of extent=1 used pages=8 ref pages=8)Alloc page 1280 (# of extent=1 used pages=8 ref pages=8)Alloc page 1536 (# of extent=1 used pages=8 ref pages=8)Alloc page 1792 (# of extent=1 used pages=8 ref pages=8)Alloc page 2048 (# of extent=1 used pages=8 ref pages=8)REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"MOREINFO="NONE"(Output deleted....)REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"MOREINFO="NONE"Information on resources used:ID="IN71123"Statistical data summarydbcc outputREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Statistical information for this run follows:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Total # of pages read = 68Total # of pages found cache = 68Total # of physical reads = 0Total # of saved I/O = 0REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"MOREINFO="NONE"Message printed on completion of dbcc command:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"DBCC execution completed. If DBCC printed error messages, see your System Administrator.ID="IN93124"dbcc (Database Consistency Checker)
ID="IN92125"dbcc (Database Consistency Checker)output ofREMAP="BO--Body"NUMBER="7" ID="X31864"Developing a Backup and Recovery PlanRENDERAS="SECT1"IntroductionID="IN321"BackupsREMAP="BO--Body"SQL Server has automatic recovery procedures to protect you from power outages and computer failures. To protect yourself against media failure, you must make regular and frequent backups of your databases.REMAP="BO--Body"This chapter is part of a four-chapter unit on backup and recovery. It provides information to help you develop a backup and recovery plan. It includes an overview of SQL Server's backup and recovery processes:MARK="BULL" REMAP="BU--Bullet"How the transaction log keeps track of database changesHow checkpoints synchronize the database and transaction logThe function of the MOREINFO="NONE"dump database, MOREINFO="NONE"dump transaction, MOREINFO="NONE"load database, andMOREINFO="NONE" load transaction commandsThe role of the Backup Server in the backup and recovery processSQL Server's automatic recovery processREMAP="BO--Body"It also covers backup and recovery issues you should address before you begin using your system for production:MARK="BULL" REMAP="BU--Bullet"Choosing backup mediaConfiguring your system for backup and recoveryCreating logical names for local backup devicesScheduling backups of your system and user databasesGranting permission to use the commands for backup and recoveryTOCENTRY="1"LBL="Table 7-1: " ID="X61536"Further Information About Backup and RecoveryCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="11*"COLNAME="C2" COLWIDTH="9*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"For more information aboutCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SeeVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"dump, load, and MOREINFO="NONE"sp_volchanged syntaxCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LINKEND="X32898"Chapter 8,  "Backing Up and 
Restoring User Databases"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Backing up and restoring the system 
databasesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LINKEND="X40994"Chapter 9,  "Backing Up and 
Restoring the System Databases"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Using thresholds to automate backupsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LINKEND="X63254"Chapter 10,  "Managing Free 
Space with Thresholds"ID="IN232"TransactionsdefinitionRENDERAS="SECT1"Keeping Track of Database ChangesREMAP="BO--Body"SQL Server uses transactions to keep track of all database changes. Transactions are SQL Server's units of work. A transaction consists of one or more Transact-SQL statements that succeed-or fail-as a unit.REMAP="BO--Body"Each SQL statement that modifies data is considered a transaction. Users can also define transactions by enclosing a series of statements within a MOREINFO="NONE"begin transaction ... end transaction block. For more information about transactions, see "Transactions" in Volume 1 of the SQL Server Reference Manual.ID="IN283"Transaction logsfunction ofREMAP="BO--Body"Each database has its own transaction log, the system tableID="IN474"syslogs table
 syslogs. The transaction log automatically records every transaction issued by each user of the database. You cannot turn off transaction logging.ID="IN815"Write-ahead log. See Transaction logsREMAP="BO--Body"The transaction log is a write-ahead log. When a user issues a statement that would modify the database, SQL Server automatically writes the changes to the log. After all changes for a statement have been recorded in the log, they are written to an in-cache copy of the data page. The data page remains in cache until the memory is needed for another database page. At that time, it is written to disk.REMAP="BO--Body"If any statement in a transaction fails to complete, SQL Server reverses all changes made by the transaction. SQL Server writes an "end transaction" record to the log at the end of each transaction, recording the status (success or failure) of the transaction.RENDERAS="SECT2"Getting Information about the Transaction LogID="IN246"Transaction logscopyingREMAP="BO--Body"The transaction log contains enough information about each transaction to ensure that it can be recovered. Use the MOREINFO="NONE"dump transaction command to copy the information it contains to tape or disk. Use MOREINFO="NONE"sp_spaceused syslogsID="IN1177"Transaction logssize
ID="IN1198"sp_helpsegment system procedurechecking space with
 to check the size of the log, or MOREINFO="NONE"sp_helpsegment logsegment to check the space available for log growth.ID="IN699"insert commandtransaction log and
ID="IN6910"update commandtransaction log and
ID="IN6911"delete commandtransaction log andNever use insert, update, or delete commands to modify syslogs.ID="IN9112"Checkpoint processRENDERAS="SECT1"Synchronizing a Database and its Transaction Log: CheckpointsID="IN3013"Pages (data)dirtyREMAP="BO--Body"A checkpoint writes all "dirty" pages-pages that have been modified in memory, but not on disk, since the last checkpoint-to the database device. SQL Server's automatic checkpoint mechanism guarantees that data pages changed by completed transactions are regularly written from the cache in memory to the database device. Synchronizing the database and its transaction log shortens the time it takes to recover the database after a system crash. LINKEND="X47398"Figure 12-1
 illustrates the checkpoint process.RENDERAS="SECT2"Setting the Recovery IntervalREMAP="BO--Body"Typically, the automatic recovery process takes from a few seconds to a few minutes per database. Time varies depending on the size of the database, the size of the transaction log, and the number and size of transactions that must be committed or rolled back.ID="INA2714"Timingautomatic checkpoint
ID="IN8715"sp_configure system procedureautomatic recovery and
ID="IN7516"recovery interval configuration variableREMAP="BO--Body"Use the MOREINFO="NONE"recovery interval configuration variable to specify the maximum permissible recovery time, in minutes. SQL Server runs automatic checkpoints often enough to recover the database within that period of time. REMAP="BO--Body"Use MOREINFO="NONE"sp_configure for a report on the current recovery interval:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "recovery interval"REMAP="BO--Body"The default value, 5, allows recovery within 5 minutes per database. Use MOREINFO="NONE"sp_configure MOREINFO="NONE""recovery interval" followed by the MOREINFO="NONE"reconfigure command to change the recovery interval. For example, to set the recovery interval to 3 minutes, issue these commands: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "recovery interval", 3REMAP="UI--UserInput" FORMAT="LINESPECIFIC"reconfigure ID="IN5117"Transactionslong-running
ID="IN10518"recovery interval configuration variablelong-running transactions andThe recovery interval has no effect on long-running transactions that are active at the time SQL Server fails. It may take as much time to reverse these transactions as it took to run them.ID="IN3219"Automatic operationscheckpointsRENDERAS="SECT2"The Automatic Checkpoint ProcedureID="IN9520"Sleeping checkpoint process. See Checkpoint processREMAP="BO--Body"Approximately once each minute, the checkpoint process "wakes up" and checks each database on the server to see how many records have been added to the transaction log since the last checkpoint. If the server estimates that the time that would be required to recover these transactions is greater than the database's recovery interval, SQL Server issues a checkpoint. REMAP="BO--Body"The modified pages are written from cache onto the database devices, and the checkpoint event is recorded in the transaction log. Then, the checkpoint process sleeps for another minute.ID="IN7721"sp_who system procedurecheckpoint processREMAP="BO--Body"To see the checkpoint process, execute MOREINFO="NONE"sp_who. The checkpoint process usually displays as "CHECKPOINT SLEEP" in the cmd column:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"spid  status     loginame   hostname blk dbname  cmd              ----- ---------- ---------- -------- --- ------- ----------------     1 running    sa         mars     0   master  SELECT    2 sleeping   NULL                0   master  NETWORK HANDLER    3 sleeping   NULL                0   master  MIRROR HANDLER    4 sleeping   NULL                0   master  CHECKPOINT SLEEPRENDERAS="SECT2"Truncating the Log After Automatic CheckpointsID="IN4422"Checkpoint processclearing transaction logs
ID="IN5723"Transaction logsclearing after checkpoints
ID="IN8824"Checkpoint processtrunc log on chkpt database optionREMAP="BO--Body"System Administrators can use the MOREINFO="NONE"trunc log on chkpt database option to truncate the transaction log every time SQL Server performs an automatic checkpoint. Run this command from the master database:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_dboption database_name, "trunc log on chkpt", trueREMAP="BO--Body"This option is not suitable for production environments because it does not make a copy of the transaction log before truncating it. UseMOREINFO="NONE" trunc log on chkpt only for:MARK="BULL" REMAP="BU--Bullet"Databases whose transaction logs cannot be backed up because they are not on a separate segment Test databases for which current backups are not importantID="IN11725"dump transaction commandtrunc log on chkpt and
If you leave theMOREINFO="NONE" trunc log on chkpt option off (the default condition) the transaction log continues to grow until you truncate it with the MOREINFO="NONE"dump transaction command. REMAP="BO--Body"To protect your log from running out of space, you should design your last-chance threshold procedure to dump the transaction log. For more information about threshold procedures, see LINKEND="X63254"Chapter 10,  "Managing Free Space with Thresholds"
ID="IN5526"Transaction logsclearing after checkpoints
.RENDERAS="SECT2"Manually Requesting a CheckpointID="IN5327"checkpoint commandREMAP="BO--Body"Database Owners can issue the MOREINFO="NONE"checkpointID="IN3828"Checkpoint processtransaction log and
 command to force all modified pages in memory to be written to disk. Manual checkpoints do not truncate the log, even if the MOREINFO="NONE"trunc log on chkpt option of MOREINFO="NONE"sp_dboption is turned on. REMAP="BO--Body"Use the MOREINFO="NONE"checkpoint command: MARK="BULL" REMAP="BU--Bullet"As a precautionary measure in special circumstances-for example, just before a planned MOREINFO="NONE"shutdown with nowaitID="IN8429"shutdown commandautomatic checkpoint process and
 so that SQL Server's recovery mechanisms will occur within the recovery interval. (An ordinary MOREINFO="NONE"shutdown performs a checkpoint.)ID="IN7930"sp_dboption system procedurecheckpoints andTo cause a change in database options to take effect after executing the MOREINFO="NONE"sp_dboption system procedure. (After you run MOREINFO="NONE"sp_dboption, an informational message reminds you to run MOREINFO="NONE"checkpointID="IN8731"Checkpoint process
.)ID="IN4332"Automatic operationsrecoveryRENDERAS="SECT1"Automatic Recovery After a System Failure or ShutdownID="IN5533"Restarts, Serverautomatic recovery after
ID="IN2334"Recoveryafter failures
ID="IN4935"Operating systemsfailures and automatic recovery
ID="IN7636"shutdown commandautomatic recovery afterREMAP="BO--Body"Each time you restart SQL Server-for example, after a power failure, an operating system failure, or the use of the MOREINFO="NONE"shutdown command- it automatically performs a set of recovery procedures on each database. ID="IN3937"Recoverydatabase dump/log interactions
ID="INB3738"Databasesbackup/log interactions and
ID="IN4439"Roll back processesuncommitted transactionsREMAP="BO--Body"The recovery mechanism compares each database to its transaction log. If the log record for a particular change is more recent than the data page, the recovery mechanism reapplies the change from the transaction log. If a transaction was ongoing at the time of the failure, the recovery mechanism reverses all changes that were made by the transaction. This mechanism ensures that the entire transaction succeeds or fails as a unit.REMAP="BO--Body"When SQL Server is booted, it performs database recovery in this order:ID="IN7140"Recovery of master databaseautomaticNUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Recovers masterID="IN7741"sybsecurity databaseautomatic recovery andRecovers sybsecurityRecovers ID="IN7142"model databaseautomatic recovery and
modelID="IN7243"tempdb databaseautomatic recovery andCreates MOREINFO="NONE"tempdb (by copying model) ID="IN8044"sybsystemprocs databaseautomatic recovery andRecovers sybsystemprocsID="IN3745"User databasesautomatic recovery andRecovers user databases, in order by sysdatabases.dbidID="IN3646"Recoverydenying users access duringREMAP="BO--Body"Users can log into SQL Server as soon as the system databases have been recovered, but cannot access other databases until they have been recovered. ID="INB2247"Recoverytime requiredRENDERAS="SECT2"ID="IN8648"recovery flags configuration variable
Determining Whether Messages Are Displayed During RecoveryREMAP="BO--Body"The configuration variable MOREINFO="NONE"recovery flags determines whether SQL Server displays detailed messages about each transaction on the console screen during recovery. By default, these messages are not displayed. To display messages, issue these commands: ID="IN8449"recovery flags configuration variableREMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "recovery flags", 1  ID="INA5350"Restarts, Serverautomatic recovery afterREMAP="UI--UserInput" FORMAT="LINESPECIFIC"reconfigureID="IN4151"Automatic operationsrecoveryRENDERAS="SECT1"Using the Dump and Load CommandsID="IN15152"Databasesdumping
ID="IN5353"RecoveryRecoveryfrom backupsbackups
ID="IN3854"Recoveryafter failures
ID="IN2855"Failures, mediarecovery andREMAP="BO--Body"In case of media failure, such as a disk crash, you can restore your databases if-and only if-you have been making regular backups of the databases and their transaction logs. Full recovery depends on the regular use of the MOREINFO="NONE"dump MOREINFO="NONE"database and MOREINFO="NONE"dump transaction commands to back up databases and theMOREINFO="NONE" load database andMOREINFO="NONE" load transaction commands to restore them. These commands are described briefly below and more fully in LINKEND="X32898"Chapter 8,  "Backing Up and Restoring User Databases"
 and LINKEND="X40994"Chapter 9,  "Backing Up and Restoring the System Databases"
.ID="IN5256"Operating systemscopy commands corrupting databasesNever use operating system copy commands to copy a database device. Loading the copy into SQL Server causes massive database corruption.ID="IN8957"Consistencychecking databaseRENDERAS="SECT2"Checking Database Consistency: dbcc REMAP="BO--Body"The dump commands can complete successfully even if your database is corrupt. Before you back up a database, use the MOREINFO="NONE"dbcc commands to check its consistency. See LINKEND="X97415"Chapter 6,  "Checking Database Consistency"
, for more information.ID="INA2258"Dump, databaseroutineRENDERAS="SECT2"Making Routine Database Dumps: dump databaseREMAP="BO--Body"The MOREINFO="NONE"dump database command makes a copy of the entire database, including both the data and the transaction log. MOREINFO="NONE"dump database does not truncate the log.REMAP="BO--Body"MOREINFO="NONE"dump database allows dynamic dumps: users can continue to make changes to the database while the dump takes place. This feature makes it convenient to back up databases on a regular basis.REMAP="BO--Body"The MOREINFO="NONE"dump database command executes in three phases. A progress message informs you when each phase completes. When the dump is finished, it reflects all changes that were made during its execution, except for those initiated during Phase 3.ID="IN2159"Dump, transaction logRENDERAS="SECT2"Making Routine Transaction Log Dumps: dump transactionID="IN2760"Transaction logsbacking upREMAP="BO--Body"Use the MOREINFO="NONE"dump transaction command (or its abbreviation MOREINFO="NONE"dump tran) to make routine backups of your transaction log. MOREINFO="NONE"dump transaction is similar to the incremental backups provided by many operating systems. It copies the transaction log, providing a record of any database changes made since the last database or transaction log dump. Once MOREINFO="NONE"dump transaction has copied the log, it truncates the inactive portion. REMAP="BO--Body"MOREINFO="NONE"dump transactionID="IN7161"Transaction logsTransaction logson a separate deviceseparate device
 takes less time and storage space than a full database backup, and is usually run more often. Users can continue to make changes to the database while the dump is taking place. You can run MOREINFO="NONE"dump transaction only if the database stores its log on a separate segment.REMAP="BO--Body"After a media failure, use the MOREINFO="NONE"with no_truncate option of MOREINFO="NONE"dump transaction to backup your transaction log. This provides a record of the transaction log up to the time of the failure. ID="IN4062"Failures, mediacopying log device afterRENDERAS="SECT2"Copying the Log After Device Failure: dump tran with no_truncateREMAP="BO--Body"When your data device fails and the database is inaccessible, use the special MOREINFO="NONE"with no_truncate option of the MOREINFO="NONE"dump transaction command to get a current copy of the log. This option does not truncate the log. You can use it only if the transaction log is on a separate segment and the master database is accessible.RENDERAS="SECT2"Restoring the Entire Database: load databaseID="IN2763"Space allocationrecreatingREMAP="BO--Body"Use the MOREINFO="NONE"load database command to load the backup created with MOREINFO="NONE"dump database. You can load the dump into a pre-existing database, or create a new database with the MOREINFO="NONE"for load option. When you create a new database, allocate at least as much space as was allocated to the original database. You cannot load a dump that was made on a different platform or with an earlier version of SQL Server.If the database you are loading includes tables that contain the primary keys for tables in other databases, you must load the dump into the same database name.ID="IN8164"Databasessingle-user mode during recoveryID="IN3365"Databaseslocking during recoveryID="IN6766"Lockingdatabases during recoveryREMAP="BO--Body"Put the database into single-user mode so that users cannot make changes from the time you begin loading it until you have applied the last transaction log dump. Before loading a database, lock it by using MOREINFO="NONE"sp_dboption to set the MOREINFO="NONE"no chkpt on recovery, dbo use only, andMOREINFO="NONE" read only options to TRUE.RENDERAS="SECT2"Applying Changes to the Database: load transactionREMAP="BO--Body"Once you have loaded the database, use the MOREINFO="NONE"load transaction command (or its abbreviation, MOREINFO="NONE"load tran) to load each transaction log dump in the order in which it was made. This process reconstructs the database by re-executing the changes recorded in the transaction log. If users have made any changes between the MOREINFO="NONE"load database and MOREINFO="NONE"load transaction commands, theMOREINFO="NONE" load transaction fails. Lock the database, then reload it and re-apply the transaction log dumps.REMAP="BO--Body"When the entire sequence of transaction log dumps has been loaded, the database reflects all transactions that had committed at the time of the last transaction log dump. Use MOREINFO="NONE"sp_dboption to reset the MOREINFO="NONE"no chkpt on recovery, dbo use only, andMOREINFO="NONE" read only options to FALSE so that users can resume making changes to the database.RENDERAS="SECT2"Using the Special dump transaction OptionsREMAP="BO--Body"Under certain circumstances, the simple model described above does not apply. LINKEND="X71536"Table 7-2
 describes when to use the specialMOREINFO="NONE" with no_log andMOREINFO="NONE" with truncate_only options instead of the standard MOREINFO="NONE"dump transaction command.PGWIDE=1 TOCENTRY="1"LBL="Table 7-2: " ID="X71536"When to Use dump transaction with truncate_only or with no_log COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="11*"COLNAME="C2" COLWIDTH="13*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"WhenCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"UseVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The log is on the same segment as the dataCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"dump transaction with truncate_only to truncate 
the log 
MOREINFO="NONE"dump database to copy the entire database, 
including the logCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"You are not concerned with the recovery 
of recent transactions (for example, in an 
early development environment)COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"dump transaction with truncate_only to truncate 
the log and
MOREINFO="NONE"dump database to copy the entire databaseCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Your usual method of dumping the 
transaction log (either the standard MOREINFO="NONE"dump 
transaction command or MOREINFO="NONE"dump transaction 
with truncate_only) fails because of 
insufficient log spaceCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"dump transaction with no_log to truncate the log 
without recording the event and
MOREINFO="NONE"dump database immediately after to copy the 
entire database, including the logID="IN3167"Tapesinformation on dump filesRENDERAS="SECT2"Using the Special Load Options to Identify Dump FilesREMAP="BO--Body"Use the special MOREINFO="NONE"with ID="IN5268"headeronly option
MOREINFO="NONE"headeronlyID="IN2869"Listingdump files on a tape
 option to provide header information for a specified file or for the first file on a tape. Use the ID="IN5070"listonly option
MOREINFO="NONE"with listonly option to return information about all files on a tape. These options do not actually load databases or transaction logs on the tape.RENDERAS="SECT2"Backup and Recovery IllustratedREMAP="BO--Body"LINKEND="X25577"Figure 7-1
 illustrates the process of restoring a database that is created at 4:30pm on Monday and dumped immediately after. Full database dumps are made every night at 5pm. Transaction log dumps are made at 10am, noon, 2pm, and 4pm every day:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig7_1.xwd"LBL="Figure 7-1: " ID="X25577"Restoring a Database from BackupsREMAP="BO--Body"If the disk that stores the data fails on Tuesday at 6:00 pm, use the following steps to restore the database:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Use MOREINFO="NONE"dump transaction with no_truncate to get a current transaction log dumpMOREINFO="NONE".Use MOREINFO="NONE"load database to load the most recent database dump, Tape 6.Use MOREINFO="NONE"load transaction to apply the most recent transaction log dump, Tape 7.REMAP="BO--Body"LINKEND="X96540"Figure 7-2
 illustrates how to restore the database when the data device fails at 4:59 pm on Tuesday-just before the operator is scheduled to make the nightly database dump:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig7_2.xwd"LBL="Figure 7-2: " ID="X96540"Restoring a Database, A Second ScenarioREMAP="BO--Body"Use the following steps to restore the database:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Use MOREINFO="NONE"dump transaction with no_truncate to get a current transaction log dump on Tape 6 (the tape you would have used for the routine database dump)MOREINFO="NONE".Use MOREINFO="NONE"load database to load the most recent database dump, Tape 1.Use MOREINFO="NONE"load transactionID="IN5171"RecoveryRecoveryfrom backupsbackups
 to load Tapes 2, 3, 4, and 5 and the most recent transaction log dump, Tape 6.ID="X86868" RENDERAS="SECT1"Designating Responsibility for BackupsID="INA8572"load transaction commandpermissions for execution
ID="IN8273"load database commandpermissions for execution
ID="IN8574"dump transaction commandpermissions for execution
ID="IN8275"dump database commandpermissions for execution
ID="IN1776"Operatortasks ofREMAP="BO--Body"Many organizations have an operator whose job is to perform all backup and recovery operations. Only a System Administrator, Database Owner, or Operator can execute the dump and load commands. The Database Owner can dump only his or her own database. The Operator and System Administrator can dump and load any database.REMAP="BO--Body"Any user can execute MOREINFO="NONE"sp_volchangedID="IN3677"OpenVMS systemsOperator permissions
ID="IN5778"REPLY command (OpenVMS)
 to notify the Backup Server when a tape volume is changed. On OpenVMS systems, the operator responsible for changing tape volumes must have permission to execute the REPLY command.RENDERAS="SECT1"ID="IN3879"Backup Server
Using the Backup Server for Backup and RecoveryID="INA2980"Remote backupsREMAP="BO--Body"Dumps and loads are performed by an Open Server program, Backup Server, running on the same machine as SQL Server. (On VAX clusters, Backup Server can run on any machine in the cluster with access to every database device to be dumped or loaded.) You can perform backups over the network, using a Backup Server on a remote computer and another on the local computer.REMAP="BO--Body"Backup Server:ID="IN5481"Dump stripingbacking up databases to multiple devicesMARK="BULL" REMAP="BU--Bullet"Creates and loads from "striped dumps". Dump striping allows you to use up to 32 backup devices in parallel. This splits the database into approximately equal portions and backs up each portion to a separate device. Creates and loads single dumps that span several tapes.Dumps and loads across the network to a Backup Server running on another machine. Dumps several databases or transaction logs to a single tape.Loads a single file from a tape that contains many database or log dumps.Supports platform-specific tape handling options.Directs volume-handling requests to the session where the dump or load command was issued, or to its operator console.Detects the physical characteristics of the dump devices to determine protocols, block sizes, and other characteristics.RENDERAS="SECT2"Relationship Between SQL Server and Backup ServersREMAP="BO--Body"LINKEND="X16522"Figure 7-3
 shows two users performing backup activities simultaneously on two databases:MARK="BULL" REMAP="BU--Bullet"User1 is dumping database db1 to a remote Backup Server. User2 is loading database db2 from the local Backup Server. ID="IN3082"Remote procedure callsbackupsREMAP="BO--Body"Each issues the appropriate dump or load command from a SQL Server session. SQL Server interprets the command and sends remote procedure calls (RPCs) to the Backup Server. The calls indicate which database pages to dump or load, which dump devices to use, and other options.REMAP="BO--Body"While the dumps and loads execute, SQL Server and Backup Server use remote procedure calls to exchange instructions and status messages. Backup Server-not SQL Server-performs all data transfer for the dump and load commands.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig7_3.xwd"LBL="Figure 7-3: " ID="X16522"SQL Server/Backup Server Installation with a Remote Backup ServerREMAP="BO--Body"When the local Backup Server receives user1's dump instructions, it reads the specified pages from the database devices and sends them to the remote Backup Server. The remote Backup Server saves the data to off-line media.REMAP="BO--Body"Simultaneously, the local Backup Server performs user2's load command by reading data from local dump devices and writing it to the database device. ID="IN3683"Backup Serverrequirements for dumpsRENDERAS="SECT2"Communicating with the Backup ServerREMAP="BO--Body"To use the dump and load commands, your SQL Server must be able to communicate with its Backup Server. These are the requirements:ID="IN2584"Backup Serverlocation ofMARK="BULL" REMAP="BU--Bullet"You must have a Backup Server running on the same machine as the SQL Server (or on the same cluster for OpenVMS).ID="IN6485"Backup Serversysservers table
ID="IN6886"sysservers tableBackup Server and
The Backup Server must be listed in the master..sysservers table. The Backup Server entry, SYB_BACKUP, is created in sysservers when you install SQL Server. Use MOREINFO="NONE"sp_helpserver to see this informationMOREINFO="NONE". For information about changing the default Backup Server, see LINKEND="X99826"Chapter 15,  "Managing Remote Servers"
.ID="IN6387"Interfaces fileBackup ServerThe Backup Server must be listed in the interfaces file. The entry for the local Backup Server is created when you install SQL Server. If you have installed a remote Backup Server on another machine, create the interfaces file on a file system shared by both machines or copy the entry to your local interfaces file.ID="INA2888"Dump devicespermissions forThe user who starts the Backup Server process must have write permission for the dump devices. The "sybase" user, who usually starts SQL Server and Backup Server, can read from and write to the database devices. ID="IN2889"AccessremoteYour SQL Server must be configured for remote access. By default, SQL Server is installed with remote access enabled. See LINKEND="X11834""Configuring Your Server for Remote Access" 
 for more information.ID="IN3690"Backup ServerRENDERAS="SECT2"Mounting a New VolumeREMAP="BO--Body"During the backup and restore process, it may be necessary to change tape volumes. If the Backup Server detects a problem with the currently mounted volume, it requests a volume change by sending messages to either the client or its operator console. After mounting another volume, the operator notifies the Backup Server by executing the MOREINFO="NONE"sp_volchanged system procedure on SQL Server.REMAP="BO--Body"On UNIX systems, the Backup Server requests a volume change when the tape capacity has been reached. The operator mounts another tape, then executes MOREINFO="NONE"sp_volchanged. LINKEND="X57983"Figure 7-4
 illustrates this process.REMAP="BO--Body"On OpenVMS systems, the operating system requests a volume change when it detects the end of a volume or when the specified drive is offline. The operator uses the REPLY command to reply to these messages.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig7_4.xwd"LBL="Figure 7-4: " ID="X57983" Changing Tape Volumes on a UNIX SystemRENDERAS="SECT1"Starting and Stopping the Backup ServerID="IN10391"Backup ServerstartingREMAP="BO--Body"Use the MOREINFO="NONE"startserver utility to start a Backup Server on the same machine as the SQL Server. For more information about MOREINFO="NONE"startserver syntax, see the SQL Server Utility Programs for your operating system. ID="IN8892"StoppingBackup ServerREMAP="BO--Body"Use the MOREINFO="NONE"shutdown command to shut down a Backup Server. SeeLINKEND="X57130""Diagnosing System Problems"
 and the SQL Server Reference Manual, Volume 1for information about this command.ID="X11834" RENDERAS="SECT1"Configuring Your Server for Remote AccessID="IN2793"Backup Serverremote access
ID="IN8994"remote access configuration variableBackup Server andREMAP="BO--Body"The MOREINFO="NONE"remote access configuration variable is set to 1 when you install SQL Server. This allows your SQL Server to execute remote procedure calls to the Backup Server. REMAP="BO--Body"For security reasons, you may want to disable remote access except during times when dumps and loads are taking place. Use the following commands to disable remote access:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "remote access", 0REMAP="UI--UserInput" FORMAT="LINESPECIFIC"reconfigureREMAP="BO--Body"Use the following commands to re-enable remote access right before a dump or load:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "remote access", 1REMAP="UI--UserInput" FORMAT="LINESPECIFIC"reconfigureREMAP="BO--Body"TheMOREINFO="NONE" remote access configuration variable is dynamic, and does not require a reboot of SQL Server to take effect. Only a System Security Officer can set the MOREINFO="NONE"remote access variable. Only a System Administrator can execute the MOREINFO="NONE"reconfigure command.RENDERAS="SECT1"Choosing Backup MediaID="IN5695"Tape dump devicesTape dump devicesfor backupsbackups
ID="IN2196"Dump devicestapes asREMAP="BO--Body"Tapes are preferred as dump devices since they permit a library of database and transaction log dumps to be kept off-line. Large databases can span multiple tape volumes. On UNIX systems, the Backup Server requires non-rewinding tape devices for all dumps and loads. REMAP="BO--Body"For a list of supported dump devices, see the System Administration Guide Supplement for your platform. ID="INA7497"Backupspreventing tape overwritesRENDERAS="SECT2"Protecting Backup Tapes From Being OverwrittenID="IN7298"tape retention configuration variableREMAP="BO--Body"The MOREINFO="NONE"tape retention configuration variable determines how many days backup tapes are protected from being overwritten. When you install SQL Server, MOREINFO="NONE"tape retention has a value of 0. This means that backup tapes can be overwritten immediately. REMAP="BO--Body"Use MOREINFO="NONE"sp_configure to change the MOREINFO="NONE"tape retention value. The new value takes effect the next time you reboot SQL Server:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "tape retention", 14REMAP="UI--UserInput" FORMAT="LINESPECIFIC"reconfigureREMAP="BO--Body"Both the MOREINFO="NONE"dump database and MOREINFO="NONE"dump transaction commands provide a ID="IN10499"retaindays optiondump transaction
ID="IN101100"retaindays optiondump database
MOREINFO="NONE"retaindays option, which overrides the MOREINFO="NONE"tape retention value for a particular dump. RENDERAS="SECT2"ID="IN37101"Filesdump to
ID="IN43102"Dump devicesdisks as
Dumping to Files or Disks ID="IN13103"Filesdump to
ID="IN57104"master databasedumpingREMAP="BO--Body"In general, dumping to a file or to a disk is not recommended. If the disk or computer containing that file crashes, there may be no way to recover the dumps. On UNIX and PC systems, this is your only option if the master database is too large to fit on a single tape volume.ID="IN28105"Copyingdump files and disks
ID="IN34106"Backup Serverreading copied dumpsREMAP="BO--Body"Dumps to a file or disk can be copied to tape for off-line storage, but these tapes must be copied back to an on-line file before they can be read by SQL Server. A dump that is made to a disk file and then copied to tape cannot be read directly from tape by Backup Server.ID="IN62107"Namesdump device
ID="IN36108"Logical names
ID="IN40109"Devicesnames for physicalRENDERAS="SECT1"Creating Logical Device Names for Local Dump Devices REMAP="BO--Body"If you are dumping to or loading from local devices (that is, you aren't performing backups across a network to a remote Backup Server), you can specify dump devices either by providing their physical locations or by specifying their logical device names. In this case, you may want to create logical dump device names in the sysdevices system table of the master database.ID="IN30110"Backup Serverdevice names andIf you are dumping to or loading from a remote Backup Server, you must specify the absolute pathname of the dump device. You cannot use a logical device name.ID="IN67111"sysdevices tabledump devices andREMAP="BO--Body"The ID="IN67112"Dump devicessysdevices table and
sysdevices table stores information about each database and backup device, including its physical_name (the actual operating system device or file name) and its device_nameID="IN46113"Aliasesdevice names
 (or logical name, known only within SQL Server). On most platforms, SQL Server has one or two aliases for tape devices installed in sysdevices. The physical names for these devices are common disk drive names for the platform; the logical names are tapedump1 and tapedump2.ID="IN48114"Threshold procedurescreating, logical names and
ID="IN31115"Scriptslogical device names inREMAP="BO--Body"When creating backup scripts and threshold procedures, it is advantageous to use logical names, rather than physical device names, whenever possible. Scripts and procedures that refer to actual device names must be modified each time a backup device is replaced. If your scripts and procedures refer to logical device names, you can simply drop the sysdevices entry for the failed device and create a new entry that associates the logical name with a different physical device.ID="IN20116"Dump deviceslisting
ID="IN33117"Information (Server)dump devices
ID="IN69118"Information (Server)device namesRENDERAS="SECT2"Listing the Current Device NamesID="IN15119"DeviceslistingREMAP="BO--Body"To list the backup devices for your system, run the following query: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * from master..sysdevices   where status = 16 or status = 24 ID="INA65120"sp_helpdevice system procedureREMAP="BO--Body"To list both the physical and logical names for database and backup devices, use the MOREINFO="NONE"sp_helpdevice system procedure, as below:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpdevice tapedump1REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"device_name physical_name  description status cntrltype device_number low      high  ------ --------- ------------- -------- -------tapedump1 /dev/nrmt4 REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"tape, 625 MB, dump device   16          3             0        0   20000ID="IN67121"Addingdump devicesRENDERAS="SECT2"Adding a Backup Device   ID="IN72122"Disk devicesadding
ID="IN78123"sp_addumpdevice system procedureREMAP="BO--Body"Use the system procedure MOREINFO="NONE"sp_addumpdevice to add a backup device: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_addumpdevice{ "tape" | "disk"} , device_name, physicalname, size REMAP="BO--Body"The physicalname can be either an absolute pathname or a relative pathname. During dumps and loads, the Backup Server resolves relative pathnames by looking in SQL Server's current working directory.REMAP="BO--Body"The size is the capacity of the tape in megabytes. OpenVMS systems ignore the size parameter if it is specified. Other platforms require this parameter for tape devices but ignore it for disk devices. The Backup Server uses the sizeID="IN21124"Sizetape dump device
 parameter if the dump command does not specify a tape capacity.REMAP="BO--Body"The sizeID="IN68125"Disk devicesadding
ID="INA63126"Addingdump devices
 must be at least five database pages (each page requires 2 megabytes for most platforms, 4 megabytes for Stratus) and should be slightly below the rated capacity for the device.ID="IN43127"Dump devicesdropping
ID="IN39128"Namesdump deviceRENDERAS="SECT2"Redefining a Logical Device NameREMAP="BO--Body"ID="IN23129"Dump devicesredefining
To use an existing logical device name for a different physical device, drop the device with ID="IN65130"sp_dropdevice system procedure
MOREINFO="NONE"sp_dropdevice and then add it with MOREINFO="NONE"sp_addumpdevice. For example:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_dropdevice tapedump2REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addumpdevice "tape", tapedump2, "/dev/nrmt8", 625ID="INA38131"Devicesnames for physical
ID="IN42132"Dump deviceslogical names for
ID="IN82133"dump database commandwhen to useID="X70144" RENDERAS="SECT1"Scheduling Backups of User DatabasesREMAP="BO--Body"One of the major tasks in developing a backup plan is to determine how often to back up your databases. The frequency of your backups determines how much work you can lose in the event of a media failure. This section presents some guidelines about when to dump user databases and transaction logs.RENDERAS="SECT2"ID="IN33134"Scheduling, Serverdatabase dumps
Scheduling Routine BackupsID="IN30135"Time intervaldatabase backupsREMAP="BO--Body"Dump each user database just after you create it, to provide a base point, and on a fixed schedule thereafter. Daily backups of the transaction log and weekly database backups are the minimum recommended. Many installations with large and active databases make database dumps every day and transaction log dumps every half hour or hour.REMAP="BO--Body"Interdependent databases--databases where there are cross-database transactions, triggers, or referential integrity--should be backed up at the same time, during a period when there is no cross-database data modification activity. If one of these databases fails and needs to be reloaded, they should all be reloaded from these simultaneous dumps.Always dump both databases immediately after adding, changing, or removing a cross-database constraint or dropping a table that contains a cross-database constraint.RENDERAS="SECT2"Other Times to Back Up a DatabaseREMAP="BO--Body"In addition to routine dumps, you should dump a database each time you create a new index, perform an unlogged operation, or run the MOREINFO="NONE"dump transaction MOREINFO="NONE" with no_log or MOREINFO="NONE"dump transaction with truncate_only.ID="IN18136"Indexesrebuilding
ID="IN39137"Indexesdatabase dumping after creatingRENDERAS="SECT3"Dumping a Database After Creating an IndexREMAP="BO--Body"When you add an index to a table, the MOREINFO="NONE"create indexID="IN76138"create index commanddatabase dumping and
 command is recorded in the transaction log. As it fills the index pages with information, however, SQL Server does not log the changes. REMAP="BO--Body"If your database device fails after you create an index, theMOREINFO="NONE" load transaction command may take as long to reconstruct the index as the MOREINFO="NONE"create index command took to build it. To avoid lengthy delays, dump each database immediately after creating an index on one of its tables.ID="IN34139"Transaction logsunlogged commands
ID="IN17140"Unlogged commandsRENDERAS="SECT3"Dumping A Database After Unlogged OperationsREMAP="BO--Body"SQL Server writes the data for the following commands directly to disk:ID="IN73141"writetext commanddatabase dumping andMARK="BULL" REMAP="BU--Bullet"Non-loggedMOREINFO="NONE" writetextID="IN75142"select into commanddatabase dumping and
MOREINFO="NONE"select MOREINFO="NONE"into on a permanent tableID="IN119143"bcp (bulk copy utility)dump database command and"Fast" bulk copy
 (MOREINFO="NONE"bcp into a table with no triggers or indexes)REMAP="BO--Body"Because these changes are not recorded in the transaction log, you cannot recover them from a transaction log dump or recover any changes made to the database after one of these commands. To ensure that these commands are recoverable, issue a MOREINFO="NONE"dump database command immediately after executing any of these operations.RENDERAS="SECT3"Dumping a Database When the Log Has Been TruncatedID="IN113144"dump transaction commandwith no_log optionREMAP="BO--Body"The MOREINFO="NONE"dump transaction with truncate_only and MOREINFO="NONE"dump transaction with MOREINFO="NONE"no_log commands remove transactions from the log without making a backup copy. To ensure recoverability, you must dump the database each time you are forced to run either command by lack of disk space. SQL Server prohibits you from copying the transaction log until you have done so.REMAP="BO--Body"If the MOREINFO="NONE"trunc log on chkpt database option is set to true, SQL Server automatically truncates the log each time an automatic checkpoint occurs. If this option is set on, you must dump the entire database-not the transaction log-to ensure recoverability.ID="X51990" RENDERAS="SECT1"Scheduling Backups of masterID="IN80145"Recovery of master databasescheduling backups
ID="IN74146"master databasebacking upREMAP="BO--Body"Backups of the MOREINFO="NONE"master database are used as part of the recovery procedure in case of a failure that affects the MOREINFO="NONE"master database. If you don't have a current backup of master, you may be forced to reconstruct vital system tables at a time when you are under pressure to get your databases up and running again. Be prepared; back up the master database regularly and frequently.RENDERAS="SECT2"Dumping master After Each ChangeID="IN58147"Changingmaster databaseREMAP="BO--Body"Back up the MOREINFO="NONE"master database with MOREINFO="NONE"dump databaseID="IN45148"Database objectscontrolling user creation of
 each time you change it. Although you can restrict the creation of database objects in master, system procedures such as MOREINFO="NONE"sp_addlogin and MOREINFO="NONE"sp_droplogin, sp_password and MOREINFO="NONE"sp_modifylogin allow users to modify its system tables. Be sure to back up the master database on a frequent basis to record these changes.ID="IN74149"master databasecommands that change theREMAP="BO--Body"Back up the MOREINFO="NONE"master database after each command that affects disks, storage, databases, or segments. Always back up master after issuing any of the following commands and system procedures:MARK="BULL" REMAP="BU--Bullet"ID="IN110150"disk init commandbacking up master after
MOREINFO="NONE"disk init, MOREINFO="NONE"sp_addumpdevice and MOREINFO="NONE"sp_dropdeviceAll disk mirroring commandsThe segment system procedures MOREINFO="NONE"sp_addsegment, sp_dropsegment and MOREINFO="NONE"sp_extendsegmentMOREINFO="NONE"create procedure and MOREINFO="NONE"drop procedureMOREINFO="NONE"sp_logdevice MOREINFO="NONE"sp_configure ID="IN116151"create database commandbacking up master after
MOREINFO="NONE"create databaseID="IN115152"alter database commandbacking up master after
 and MOREINFO="NONE"alter database RENDERAS="SECT2"Saving Scripts and System TablesID="IN36153"ScriptsScriptsfor backupsbackupsREMAP="BO--Body"For further protection, save the scripts containing all of your MOREINFO="NONE"disk init, MOREINFO="NONE"create database, and MOREINFO="NONE"alter database commands and make a hardcopy of your sysdatabases, sysusages, and sysdevices tables each time you issue one of these commands. REMAP="BO--Body"Changes that result from these commands cannot be recovered automatically with MOREINFO="NONE"buildmaster. If you keep your scripts-files containing Transact-SQL statements-you can run them to recreate the changes. Otherwise, you must re-issue each command against the rebuilt master database.ID="IN69154"syslogins tablebackup and recoveryREMAP="BO--Body"You should also keep a hardcopy of the syslogins. When you recover ID="IN74155"Recovery of master databaseuser IDs and
masterID="IN101156"User IDscomparing after backup and recovery
 from a dump, compare the hardcopy to your current version of the table to be sure that users retain the same user IDs.ID="IN66157"Transaction logsmaster database
ID="IN76158"master databasebacking up transaction logRENDERAS="SECT2"Truncating master's Transaction LogREMAP="BO--Body"Since the master database's transaction log is on the same database devices as the data, you cannot back up its transaction log separately. You cannot move the log of the master database. You must always use MOREINFO="NONE"dump databaseID="IN154159"dump transaction commanddump transaction commandin master databasemaster database
 to back up the master database. Use MOREINFO="NONE"dump transaction with the MOREINFO="NONE"truncate_only option periodically (for instance, after each database dump) to purge the transaction log of the masterID="IN72160"master databasebacking up
 database. ID="X16162" RENDERAS="SECT1"Scheduling Backups ID="IN73161"model databasebacking up
of model REMAP="BO--Body"Keep a current database dump of the model database. Each time you change model, make a new backup. If model is damaged and you do not have a backup, you must re-do all of the changes you have made in order to restore model. ID="IN65162"Transaction logsmodel database
ID="IN75163"model databasebacking up transaction logRENDERAS="SECT2"Truncating model's Transaction LogREMAP="BO--Body"model, like master, stores its transaction log on the same database devices as the data. You must always use MOREINFO="NONE"dump database to back up the modelID="IN152164"dump transaction commanddump transaction commandin model databasemodel database
 database and MOREINFO="NONE"dump transaction with the MOREINFO="NONE"truncate_onlyID="IN71165"model databasebacking up
 option to purge the transaction log after each database dump. ID="IN82166"sybsystemprocs databasebacking upRENDERAS="SECT1"Scheduling Backups of sybsystemprocsREMAP="BO--Body"The sybsystemprocsID="IN118167"installmaster scriptsybsystemprocs recovery with
 database stores only system procedures. It is very easy to restore this database by running the MOREINFO="NONE"installmaster script, unless you make changes to the database.REMAP="BO--Body"If you change permissions on some system procedures, or create your own system procedures in sybsystemprocs, your two recovery choices are:MARK="BULL" REMAP="BU--Bullet"Run the MOREINFO="NONE"installmaster script, and then re-do all of your changes by re-creating your procedures, or re-executing your MOREINFO="NONE"grant andMOREINFO="NONE" revoke commands.Back up sybsystemprocs each time your change it.REMAP="BO--Body"Both of these recovery options are described in LINKEND="X40994"Chapter 9,  "Backing Up and Restoring the System Databases"
.REMAP="BO--Body"Like other system databases, sybsystemprocs stores its transaction log on the same device as the data. You must always use MOREINFO="NONE"dump database to back up the sybsystemprocs database. By default, the MOREINFO="NONE"trunc log on chkpt option is turned on in sybsystemprocs, so you should not need to truncate the transaction log. If you change this database option, be sure to truncate the log when you dump the database.REMAP="BO--Body"If you are running on a UNIX system or on a PC and have only one SQL Server that can communicate with your Backup Server, be sure that the entire dump of sybsystemprocs fits on a single dump device. Signalling volume changes requires the MOREINFO="NONE"sp_volchanged system procedure, and you cannot use this procedure on a server while the sybsystemprocs database is in the process of recovery.ID="IN80168"dump database commandwhen to use
ID="IN80169"sybsystemprocs databasebacking up
ID="IN30170"Statisticsbackup and recoveryRENDERAS="SECT1"Gathering Backup StatisticsREMAP="BO--Body"Once you have finished reading this chapter, you should read LINKEND="X32898"Chapter 8,  "Backing Up and Restoring User Databases"
 and LINKEND="X40994"Chapter 9,  "Backing Up and Restoring the System Databases"
. Then practice using the backup and load commands. REMAP="BO--Body"Use MOREINFO="NONE"dump database to make several practice backups of an actual user database and MOREINFO="NONE"dump transaction to back up a transaction log. Recover the database with the MOREINFO="NONE"load database command and apply successive transaction log dumps with the MOREINFO="NONE"load transaction command. REMAP="BO--Body"Keep statistics on how long each dump and load takes and how much space it requires.The more closely you approximate real-life backup conditions, the more meaningful your predictions will be. ID="IN16171"BackupsplanningREMAP="BO--Body"Once you have developed and tested your backup procedures, commit them to paper. Determine a reasonable backup schedule and adhere to it. If you develop, document, and test your backup procedures ahead of time, you will be much better prepared to get your databases online when disaster strikes.REMAP="BO--Body"REMAP="BO--Body"NUMBER="8" ID="X32898"Backing Up and Restoring User DatabasesRENDERAS="SECT1"IntroductionREMAP="BO--Body"Regular and frequent backups are your only protection against database damage that results from failure of your database devices. REMAP="BO--Body"This chapter is part of a four-chapter unit on backup and recovery. It describes how to use the dump and load commands for backup, recovery, and log truncation. It includes information on command syntax and step-by-step procedures for recovering databases after a device failure.  TOCENTRY="1"LBL="Table 8-1: " ID="X37896"Further Information About Backup and RecoveryCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="11*"COLNAME="C2" COLWIDTH="9*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"For more information aboutCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SeeVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Backup and recovery issues to address 
before productionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LINKEND="X31864"Chapter 7,  "Developing a Backup 
and Recovery Plan"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Backing up and restoring the system 
databasesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LINKEND="X40994"Chapter 9,  "Backing Up and 
Restoring the System Databases"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Using thresholds to automate backupsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LINKEND="X63254"Chapter 10,  "Managing Free 
Space with Thresholds"RENDERAS="SECT1"Dump and Load Command SyntaxID="IN811"dump database commandREMAP="BO--Body"The MOREINFO="NONE"dump databaseID="IN842"dump transaction command
, MOREINFO="NONE"dump transactionID="IN813"load database command
, MOREINFO="NONE"load databaseID="IN844"load transaction command
, and MOREINFO="NONE"load transaction commands have parallel syntax. Routine dumps and loads require the name of a database and at least one dump device. The commands can also include the following options:MARK="BULL" REMAP="BU--Bullet"MOREINFO="NONE"at server_name to specify the remote Backup ServerMOREINFO="NONE"density, MOREINFO="NONE"blocksize, and MOREINFO="NONE"capacity to specify tape storage characteristicsMOREINFO="NONE"dumpvolume to specify the volume name of the ANSI tape labelMOREINFO="NONE"file = filename to specify the name of the file to dump to or load fromMOREINFO="NONE"stripe on stripe_device to specify additional dump devicesMOREINFO="NONE"dismount, MOREINFO="NONE"unload, MOREINFO="NONE"init, and MOREINFO="NONE"retaindays to specify tape handlingMOREINFO="NONE"notify to specify whether Backup Server messages are sent to the MOREINFO="NONE"client that initiated the dump or load or to the MOREINFO="NONE"operator_consoleREMAP="BO--Body"LINKEND="X86488"Table 8-2
ID="IN805"Device failuredump transaction command after
 shows the syntax for routine database and log dumps and for dumping the log after a device failure. It indicates what type of information each part of the MOREINFO="NONE"dump database and MOREINFO="NONE"dump transaction statement provides.PGWIDE=1 TOCENTRY="1"LBL="Table 8-2: " ID="X86488"Syntax for Routine Dumps and for Log Dumps After Device FailureCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="9*"COLNAME="C3" COLWIDTH="9*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Information ProvidedCOLNAME="C2" NAMEST="C2" NAMEEND="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TaskCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Routine Database or Log DumpCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Log Dump After Device FailureVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CommandCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump {database | transaction}COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump transactionCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Database nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"database_name COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"database_name COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Dump deviceCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"to stripe_deviceCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"to stripe_deviceCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Remote Backup ServerCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[at server_name]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[at server_name]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Tape device characteristicsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[density = density,
blocksize = number_bytes,
capacity = number_kilobytes]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[density = density,  
blocksize = number_bytes,  
capacity = number_kilobytes]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Volume nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, dumpvolume = volume_name]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, dumpvolume = volume_name]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"File nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, file = file_name]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, file = file_name]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Characteristics of 
additional devices (up to 31 
devices; one set per device)COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[stripe on stripe_device   
[at server_name] 
[density = density,
blocksize = number_bytes,  
capacity = number_kilobytes,  
file = file_name,  
dumpvolume = volume_name]]
...COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[stripe on stripe_device 
[at server_name] 
[density = density,  
blocksize = number_bytes, 
capacity = number_kilobytes,  
file = file_name, 
dumpvolume = volume_name]]
...COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Options that apply to 
entire dumpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[with {
density = density,   
blocksize = number_bytes,
capacity = number_kilobytes,  
file = file_name,
[nodismount | dismount],
[nounload | unload],
[retaindays = number_days],
[noinit | init],
file = file_name,
dumpvolume = volume_nameCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[with {
density = density,  
blocksize = number_bytes,
capacity = number_kilobytes,  
file = file_name,
[nodismount | dismount],
[nounload | unload],
[retaindays = number_days],
[noinit | init],
file = file_name,
dumpvolume = volume_name,COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Do not truncate logCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"no_truncateCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Message destinationCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, notify = {client | 
operator_console}]}]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, notify = {client | 
operator_console}]}]REMAP="BO--Body"LINKEND="X84649"Table 8-3
 shows the syntax for loading a database, applying transactions from the log, and returning information about dump headers and files:PGWIDE=1 TOCENTRY="1"LBL="Table 8-3: " ID="X84649"Syntax for the Load CommandsCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="9*"COLNAME="C3" COLWIDTH="9*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Information Provided COLNAME="C2" NAMEST="C2" NAMEEND="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TaskCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"Load Database or 
Apply Recent TransactionsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"Return Header or File 
Information But Do Not Load BackupVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CommandCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"load {database | transaction}COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"load {database | transaction}COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Database nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"database_name COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"database_nameCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Dump deviceCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"from stripe_deviceCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"from stripe_deviceCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Remote Backup ServerCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[at server_name]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[at server_name]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Tape device characteristicsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[density = density,  
blocksize = number_bytes]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[density = density,   
blocksize = number_bytes]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Volume nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, dumpvolume = volume_name]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, dumpvolume = volume_name]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"File nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, file = file_name]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, file = file_name]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Characteristics of 
additional devices
 (up to 31 devices; one set 
per device)COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[stripe on stripe_device   
[at server_name]
[density = density,
blocksize = number_bytes,
file = file_name,
dumpvolume = volume_name]] 
...COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[stripe on stripe_device  
[at server_name]  
[density = density,
blocksize = number_bytes,  
file = file_name,
dumpvolume=volume_name]]  
...COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Tape handlingCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[with{
[density = density,
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name,
[nodismount | dismount],
[nounload | unload]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[with{
[density = density,
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name,
[nodismount | dismount],
[nounload | unload]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Provide header 
informationCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, headeronly]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"List dump filesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, listonly [= full]]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Message destinationCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, notify = {client | 
operator_console}]}]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[, notify = {client | 
operator_console}]}]REMAP="BO--Body"LINKEND="X37895"Table 8-4
 shows the syntax for truncating a log:MARK="BULL" REMAP="BU--Bullet"That is not on a separate segmentWithout making a backup copyWith insufficient free space to successfully complete a MOREINFO="NONE"dump transaction or MOREINFO="NONE"dump transaction with truncate_only command:PGWIDE=1 TOCENTRY="1"LBL="Table 8-4: " ID="X37895"Special dump transaction OptionsCOLS="4" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="8*"COLNAME="C2" COLWIDTH="13*"COLNAME="C3" COLWIDTH="13*"COLNAME="C4" COLWIDTH="16*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Information 
ProvidedCOLNAME="C2" NAMEST="C2" NAMEEND="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TaskCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Truncate Log On Same 
Segment as DataCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"Truncate Log Without Making 
a CopyCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"Truncate Log with 
Insufficient Free SpaceVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CommandCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump transactionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump transactionCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump transactionCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Database nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"database_nameCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"database_name COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"database_name COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Do Not Copy LogCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"with truncate_onlyCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"with truncate_only COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"with no_logREMAP="BO--Body"The remainder of this chapter provides greater detail about the information specified in dump and load commands and volume change messages. Routine dumps and loads are described first, followed by log dumps after device failure and the special syntax for truncating logs without making a backup copy. REMAP="BO--Body"For information about the permissions required to execute the dump and load commands, refer to LINKEND="X86868""Designating Responsibility for Backups" in Chapter 7,  "Developing a Backup and Recovery Plan"
ID="IN706"dump database commandbackup device
ID="IN707"dump database commanddatabase nameRENDERAS="SECT1"Specifying the Database and Dump DeviceID="IN1008"Dump devicesspecifyingREMAP="BO--Body"At minimum, all dump and load commands must include the name of the database being dumped or loaded. Commands that dump or load data (rather than just truncating a transaction log) must also include a dump device:PGWIDE=1 TOCENTRY="1"LBL="Table 8-5: "Indicating the Database Name and Dump DeviceCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="3*"COLNAME="C2" COLWIDTH="5*"COLNAME="C3" COLWIDTH="5*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"Backing Up a Database or LogCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"Loading a Database or LogVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Database name
Dump deviceCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump {database | tran} database_name
to stripe_deviceCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"load {database | tran} database_name from stripe_deviceCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[at server_name]  
[density = density,  
blocksize = number_bytes,  
capacity = number_kilobytes,  dumpvolume = volume_name,  
file = file_name]  
[stripe on stripe_device  
[at server_name]  
[density = density,
blocksize = number_bytes,  
capacity = number_kilobytes,  
dumpvolume = volume_name,  
file = file_name] ...]   
[with{
density = density,
blocksize = number_bytes,
capacity = number_kilobytes,
dumpvolume = volume_name,file = file_name,
[nodismount | dismount],
[nounload | unload],
retaindays = number_days,  
[noinit | init],
[notify = {client | operator_console}]}]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[at server_name]
[density = density,
blocksize = number_bytes
dumpvolume = volume_namefile = file_name] 
[stripe on stripe_device   
[at server_name]
[density = density,
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name] ...]
[with{
density = density,
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name,
[nodismount | dismount],
[nounload | unload],
[notify = {client | operator_console}]}]ID="IN649"Dump, databasedatabase nameRENDERAS="SECT2"Rules for Specifying Database NamesREMAP="BO--Body"The database name can be specified as a literal, a local variable, or a parameter to a stored procedure. REMAP="BO--Body"If you are loading a database from a dump:MARK="BULL" REMAP="BU--Bullet"The database must exist. You can create a database with the MOREINFO="NONE"for load option of MOREINFO="NONE"create database, or load over an existing database. Loading a database always over-writes all of the information in the existing database.You do not need to give the same database name as the name of the database you dumped. For example, you can dump the MOREINFO="NONE"pubs2 database, create another database called MOREINFO="NONE"pubs2_archive, and load the dump into the new database.You should never change the name of a database that contains primary keys for references from other databases. If you must load a dump from such a database and provide a different name, first drop the references to it from other databases.ID="IN3710"Dump devicesspecifyingRENDERAS="SECT2"Rules for Specifying Dump DevicesREMAP="BO--Body"Use the following rules when specifying the dump device:MARK="BULL" REMAP="BU--Bullet"You can specify the dump device as a literal, a local variable, or a parameter to a stored procedure. You cannot dump to or load from the "null device" (on UNIX, /dev/null; on OpenVMS, any device name beginning with NL; not applicable to PC platforms).When dumping to or loading from a local device, you can use any of the following forms to specify the dump device:MARK="DASH" REMAP="BS--BulletSub"An absolute pathnameA relative pathnameA logical device name from the sysdevices system tableREMAP="UN--Under"The Backup Server resolves relative pathnames using SQL Server's current working directory.ID="IN4311"Networksdumps acrossWhen dumping or loading across the network:MARK="DASH" REMAP="BS--BulletSub"You must specify the absolute pathname of the dump device. (You cannot use a relative pathname or a logical device name from the sysdevices system table.)The pathname must be valid on the machine on which the Backup Server is running. If the name includes any characters except letters, numbers or the underscore (_), you must enclose it in quotes.RENDERAS="SECT2"ExamplesREMAP="BO--Body"The following examples use a single device for dumps and loads. (It is not necessary to use the same device for dumps and loads.)REMAP="BO--Body"On UNIX:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump database pubs2 to "/dev/nrmt4"REMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database pubs2 from "/dev/nrmt4"REMAP="BO--Body"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump database pubs2 to "MTA0:"REMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database pubs2 from "MTA0:"REMAP="BO--Body"For PC platform examples, refer to the System Administration Guide SupplementID="IN3512"Dump devicesspecifying
.RENDERAS="SECT1"Specifying a Remote Backup ServerID="IN3713"Networksbackups across
ID="IN4414"at optionREMAP="BO--Body"Use the MOREINFO="NONE"at  server_name clause to send dump and load requests across the network to a Backup Server running on another machine:  PGWIDE=1 TOCENTRY="1"LBL="Table 8-6: "Dumping to or Loading from a Remote Backup ServerCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="3*"COLNAME="C2" COLWIDTH="5*"COLNAME="C3" COLWIDTH="5*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Backing Up a Database or LogCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Loading a Database or LogVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump {database | tran} database_name
to stripe_deviceCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"load {database | tran} database_name from stripe_deviceCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Remote Backup 
ServerCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[at server_name]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[at server_name]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[density = density,
blocksize = number_bytes,
capacity = number_kilobytes,
dumpvolume = volume_name,
file = file_name]
[stripe on stripe_device[at server_name]
[density = density,
blocksize = number_bytes,
capacity = number_kilobytes,
dumpvolume = volume_name,
file = file_name] ...]
[with{
density = density,
blocksize = number_bytes,
capacity = number_kilobytes,
dumpvolume = volume_name,
file = file_name,
[nodismount | dismount], 
[nounload | unload], 
retaindays = number_days, 
[noinit | init],  
[notify = {client | operator_console}]}]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[density = density,
blocksize = number_bytes,
dumpvolume = volume_name,file = file_name]
[stripe on stripe_device   
[at server_name]
[density = density,
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name] ...]
[with{
density = density,
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name,  
[nodismount | dismount],
[nounload | unload],
[notify = {client | operator_console}]}]COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"REMAP="BO--Body"This is ideal for installations that use a single machine with multiple tape devices for all backups and loads. Operators can be stationed at these machines, ready to service all tape change requests.ID="IN2015"Backup ServerremoteREMAP="BO--Body"The server_name ID="IN6416"Interfaces fileBackup Server
must appear in the interfaces file on the computer where SQL Server is running, but does not need to appear in the sysservers table. REMAP="BO--Body"The following examples dump to and load from the remote Backup Server REMOTE_BKP_SERVER:REMAP="BO--Body"On UNIX:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump database pubs2        to "/dev/nrmt0" at REMOTE_BKP_SERVERREMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database pubs2        from "/dev/nrmt0" at REMOTE_BKP_SERVERREMAP="BO--Body"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump database pubs2    to "MTA0:" at REMOTE_BKP_SERVERREMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database pubs2    from "MTA0:" at REMOTE_BKP_SERVERREMAP="BO--Body"For PC platform examples, refer to the System Administration Guide Supplement.ID="IN3517"Networksbackups acrossRENDERAS="SECT1"Specifying Tape Density, Blocksize, and CapacityREMAP="BO--Body"In most cases, the Backup Server uses a default tape density and blocksize that are optimal for your operating system; we recommend that you use themID="IN6318"density option
. The MOREINFO="NONE"density andID="IN6519"blocksize option
MOREINFO="NONE" blocksize ID="IN6420"capacity option
options allow you to override these defaults when they are not appropriate for particular devices. The MOREINFO="NONE"capacity option allows you to specify tape capacity on platforms that do not reliably detect the end-of-tape marker. REMAP="BO--Body"You can specify a density, blocksize, and capacity for each dump device. You can also specify the MOREINFO="NONE"density, MOREINFO="NONE"blocksize, and MOREINFO="NONE"capacity options in the MOREINFO="NONE"withID="IN11021"Precedencedump and load characteristics
 clause, for all dump devices. Characteristics that are specified for an individual tape device take precedence over those specified in the MOREINFO="NONE"with clause.PGWIDE=1 TOCENTRY="1"LBL="Table 8-7: "Specifying Tape Density, Blocksize, and CapacityCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="3*"COLNAME="C2" COLWIDTH="5*"COLNAME="C3" COLWIDTH="5*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Backing Up a Database or LogCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Loading a Database or LogVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump {database | tran} database_nameto stripe_device [at server_name]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"load {database | tran} database_name 
from stripe_device [at server_name]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Characteristics of a 
Single Tape DeviceCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[density = density,
blocksize = number_bytes,
capacity = number_kilobytes,COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[density = density,
blocksize = number_bytes,COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dumpvolume = volume_name,
file = file_name]
[stripe on stripe_device]  
[at server_name] 
[density = density, 
blocksize = number_bytes, 
capacity = number_kilobytes, 
dumpvolume = volume_name,
file = file_name] ...]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dumpvolume = volume_name,
file = file_name]
[stripe on stripe_device]
[at server_name]
[density = density,
blocksize = number_bytes,
dumpvolume = volume_name, 
file = file_name] ...]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Characteristics of All 
Dump DevicesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[with{ 
density = density,
blocksize = number_bytes,
capacity = number_kilobytes,COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[with{
density = density,
blocksize = number_bytes,COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dumpvolume = volume_name,
file = file_name,
[nodismount | dismount],
[nounload | unload],
retaindays = number_days,
[noinit | init],
[notify = {client | operator_console}]}]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dumpvolume = volume_name,
file = file_name,
[nodismount | dismount],
[nounload | unload],
[notify = {client | operator_console}]}]REMAP="BO--Body"The following sections provide greater detail about the MOREINFO="NONE"density, MOREINFO="NONE"blocksize, and MOREINFO="NONE"capacity options.RENDERAS="SECT2"Overriding the Default DensityREMAP="BO--Body"The dump and load commands use the default tape density for your operating system. In most cases, this is the optimal density for tape dumps.REMAP="BO--Body"When dumping to tape on OpenVMS systems, you can override the default density with the MOREINFO="NONE"density = density option. Valid densities are 800, 1600, 6250, 6666, 10000, and 38000. Not all densities are valid for all tape drives; specify a value that is correct for your drive.REMAP="BO--Body"This option has no effect on OpenVMS tape loads or on UNIX and PC platform dumps or loads. Specify tape density only when using the init tape handling option. For more information on this option, see the section LINKEND="X38417""Reinitializing a Volume Before a Dump"
 in this chapter.ID="IN6122"density optionRENDERAS="SECT2"Overriding the Default BlocksizeREMAP="BO--Body"By default, the dump and load commands choose the "best" blocksize for your operating system. Wherever possible, use these defaults.REMAP="BO--Body"You can use the MOREINFO="NONE"blocksize = number_bytes ID="IN2623"Pages (data)blocksize and
option to override the default blocksize for a particular dump device. The blocksize must be at least one database page (2048 bytes for most systems, 4096 for Stratus), and must be an exact multiple of the database page size.REMAP="BO--Body"For OpenVMS systems, you can specify a blocksize only for dumps. Use a blocksize less than or equal to 16384.REMAP="BO--Body"For UNIX systems, you can specify a blocksize on both dump and load commands. When loading a dump, you must specify the same blocksize that was used to make the dump.ID="IN6324"blocksize optionRENDERAS="SECT2"Specifying Tape Capacity for Dump CommandsID="IN5525"End-of-tape markerREMAP="BO--Body"By default, OpenVMS systems write until they reach the physical end-of-tape markerMOREINFO="NONE", then signal that a volume change is required. For UNIX platforms that cannot reliably detect the end-of-tape marker, you must indicate how many kilobytes can be dumped to a tapeMOREINFO="NONE".REMAP="BO--Body"If you specify the physical pathname of the dump device, you must include theMOREINFO="NONE" capacity = number_kilobytes parameter in the dump command. If you specify the logical dump device name, the Backup Server uses the size parameter stored in the sysdevices system table unless you override it with the MOREINFO="NONE"capacity = number_kilobytes parameter.ID="IN6226"capacity optionREMAP="BO--Body"The specified capacity must be at least five database pages (each page requires 2048 bytes for most platforms, 4096 for Stratus). We recommend that you specify a capacity that is slightly below the rated capacity for your device.ID="IN7027"dump database commandvolume labels
ID="IN1528"Volume handling
ID="IN2929"Tape dump devicesvolume name
ID="IN7030"dump database commandtape handlingRENDERAS="SECT1"Specifying the Volume NameREMAP="BO--Body"Use the ID="IN5231"dumpvolume option
MOREINFO="NONE"with dumpvolume = volume_name option to specify the volume name. The MOREINFO="NONE"dump database and MOREINFO="NONE"dump transaction commands write the volume name to the SQL tape label. The MOREINFO="NONE"load database and MOREINFO="NONE"load transaction commands check the label; if the wrong volume is loaded, Backup Server generates an error message.REMAP="BO--Body"You can specify a volume name for each dump device. You can also specify a volume name in the MOREINFO="NONE"with clause for all devices. Volume names specified for individual devices take precedence over those specified in the MOREINFO="NONE"with clause.PGWIDE=1 TOCENTRY="1"LBL="Table 8-8: "Specifying the Volume NameCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="10*"COLNAME="C2" COLWIDTH="11*"COLNAME="C3" COLWIDTH="11*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Backing Up a Database or LogCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Loading a Database or LogVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump {database | tran} database_name   
to stripe_device 
[at server_name]
[density =density,
blocksize = number_bytes,
capacity =number_kilobytes,COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"load {database | tran} 
database_name 
from stripe_device  
[at server_name]
[density = density,
blocksize = number_bytes,COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Volume name for single 
deviceCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dumpvolume = volume_name,COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dumpvolume = volume_name,COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"file = file_name]
[stripe on stripe_device
[at server_name]
[density = density,
blocksize = number_bytes,
capacity = number_kilobytes,
dumpvolume = volume_name,
file = file_name] ...]
[with{
density = density,
blocksize = number_bytes,
capacity = number_kilobytes,COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"file = file_name]
[stripe on stripe_device
[at server_name]
 [density = density,
 blocksize = number_bytes,
 dumpvolume = volume_name,
file = file_name]...]
[with {
density = density,
blocksize = number_bytes,COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Volume name for all 
devicesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dumpvolume = volume_name,COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dumpvolume = volume_name,COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"file = file_name,
[nodismount | dismount],
[nounload | unload],
retaindays = number_days,
[noinit | init],
[notify = {client | 
operator_consoleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"file = file_name,
[nodismount | dismount],
[nounload | unload],
[notify = {client | 
operator_consoleID="IN3132"Namingdump files
ID="IN8433"Dump, databasefile nameRENDERAS="SECT1"Identifying a DumpID="IN3134"Filesnaming dumpREMAP="BO--Body"When you dump a database or transaction log, Backup Server creates a default file name for the dump by concatenating the:MARK="BULL" REMAP="BU--Bullet"Last seven characters of the database name Two-digit year numberThree-digit day of the year (1 through 366) Number of seconds since midnight, in hexadecimal ID="IN6035"file optionREMAP="BO--Body"You can override this default using the MOREINFO="NONE"file = file_name option. The file name cannot exceed 17 characters and must conform to the file naming conventions for your operating system. REMAP="BO--Body"You can specify a file name for each dump device. You can also specify a file name for all devices in the MOREINFO="NONE"with clause. File names specified for individual devices take precedence over those specified in the MOREINFO="NONE"with clause.PGWIDE=1 TOCENTRY="1"LBL="Table 8-9: "Specifying the File Name for a DumpCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="10*"COLNAME="C3" COLWIDTH="9*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Backing Up a Database or LogCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Loading a Database or LogVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump {database | tran}database_name
to stripe_device
[at server_name]
[density = density,
blocksize = number_bytes,
capacity = number_kilobytes,
dumpvolume = volume_name,COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"load {database | tran} 
database_name 
from stripe_device
[at server_name]
[density = density,
blocksize = number_bytes,
dumpvolume = volume_name,COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"File name for single 
deviceCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"file = file_name]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"file = file_name]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[stripe on stripe_device  
[at server_name] 
[density = density, 
blocksize = number_bytes,
capacity = number_kilobytes,
dumpvolume = volume_name,
file = file_name] ...]
[with{
density = density,  
blocksize = number_bytes, 
capacity = number_kilobytes, 
dumpvolume = volume_name,COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[stripe on stripe_device]
[at server_name]
[density = density,
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name] ...]
[with{
density = density,  
blocksize = number_bytes,
dumpvolume = volume_name,COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"File name for all devicesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"file = file_name,COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"file = file_name,COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[nodismount | dismount],
[nounload | unload],
retaindays = number_days,  
[noinit | init],
[notify = {client | operator_console}]}]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[nodismount | dismount],
[nounload | unload],  
[notify = {client | operator_console}]}]REMAP="BO--Body"The following examples dump the transaction log for the publications database without specifying a file name. The default file name, cations930590E100, identifies the database and the date and time the dump was made:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig8_1.xwd"LBL="Figure 8-1: "Default File Naming Convention for Database and Transaction Log DumpsREMAP="BO--Body"Backup Server sends the file name to the default message destination or to the MOREINFO="NONE"notifyID="IN6336"Dump devicesmultiple
 location for the dump command. Be sure to label each backup tape with the volume name and file name before storing it.REMAP="BO--Body"When you load a database or transaction log, you can use theMOREINFO="NONE" file = file_name clause to specify which dump to load from a volume that contains multiple dumps:REMAP="BO--Body"When loading the dump from a multi-file volume, you must specify the correct file name:REMAP="BO--Body"On UNIX:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump tran publications    to "/dev/nrmt3"load tran publications    from "/dev/nrmt4"    with file = "cations930590E100"REMAP="BO--Body"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump tran publications    to "MTA01"     REMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database mydb    from "MTA01:"    with file = "cations930590E100"REMAP="BO--Body"The following examples use a user-defined file naming convention. The 15-character file name, mydb93jul201800, identifies the database (mydb), the date (July 20, 1993), and time (18:00, or 6:00 pm) the dump was made. The load command advances the tape to mydb93jul201800 before loading:REMAP="BO--Body"On UNIX:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump database mydb    to "/dev/nrmt3"    with file = "mydb93jul201800"REMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database mydb    from "/dev/nrmt4"    with file = "mydb93jul201800"REMAP="BO--Body"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump database mydb    to "MTA01"    with file = "mydb93jul201800"REMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database mydb    from "MTA01:"    with file = "mydb93jul201800"REMAP="BO--Body"For PC platform examples, refer to the System Administration Guide SupplementID="IN5837"file option
ID="IN2938"Namingdump files
ID="IN2939"Filesnaming dump
ID="IN8040"Dump, databasefile name
.ID="IN6541"stripe on optionRENDERAS="SECT1"Specifying Additional Dump Devices: the stripe on ClauseREMAP="BO--Body"Dump striping
 allows you to use multiple dump devices for a single dump or load command. Use a separate MOREINFO="NONE"stripe on clause to specify the name (and, if desired, the characteristics) of each device. REMAP="BO--Body"Each dump or load command can have up to 31 MOREINFO="NONE"stripe onID="IN6242"Number (quantity of)dump devices
 clauses (for a maximum of 32 dump devices):PGWIDE=1 TOCENTRY="1"LBL="Table 8-10: "Using More Than One Dump DeviceCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="3*"COLNAME="C2" COLWIDTH="5*"COLNAME="C3" COLWIDTH="5*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Backing Up a Database or LogCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Loading a Database or LogVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump {database | tran} database_name 
to stripe_device  
[at server_name]  
[density  = density,  
blocksize = number_bytes,  
capacity = number_kilobytes,  
dumpvolume = volume_name,  
file = file_name]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"load {database | tran} database_name 
from  stripe_device  
[at server_name]  
[density = density,  
blocksize = number_bytes, 
dumpvolume = volume_name,
file = file_name] COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Characteristics of an 
additional tape 
device
(one set per device; 
up to 31 devices)COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[stripe on stripe_device  
[at server_name] 
[density = density, 
blocksize = number_bytes, 
capacity = number_kilobytes, 
dumpvolume = volume_name, 
file = file_name] ...]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[stripe on stripe_device  
[at server_name]  
[density = density,  
blocksize = number_bytes, 
dumpvolume = volume_name,
file = file_name] ...]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[with{
density = density,
blocksize = number_bytes,
capacity = number_kilobytes,
dumpvolume = volume_name,  
file = file_name,  
[nodismount | dismount],  
[nounload | unload],  
retaindays = number_days, 
[noinit | init],
[notify = {client | operator_console}]}]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[with{
density = density,
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name,
[nodismount | dismount],
[nounload | unload],
[notify = {client | operator_console}]}]RENDERAS="SECT2"Dumping to Multiple DevicesID="INA3143"Backup Serverdump striping andREMAP="BO--Body"The Backup Server divides the database into approximately equal portions and sends each portion to a different device. Dumps are made concurrently on all devices, reducing the time required to dump an individual database or transaction log. Because each tape stores just a portion of the database, it is less likely that new tapes must be mounted on a particular device.RENDERAS="SECT2"Loading from Multiple DevicesREMAP="BO--Body"You can use up to 32 devices to load a database or transaction log. Using multiple devices decreases both the time required for the load and the likelihood of having to mount multiple tapes on a particular device.RENDERAS="SECT2"Using Fewer Devices to Load than to DumpREMAP="BO--Body"You can load a database or log even if one of your dump devices becomes unavailable between the dump and load. Specify fewer stripe clauses in the load command than you did in the dump command. ID="IN2644"Networksdump striping andWhen you dump and load across the network, you must use the same number of drives for both operations.REMAP="BO--Body"The following examples use three devices to dump a database but only two to load it:REMAP="BO--Body"On UNIX:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump database pubs2 to ""dev/nrmt0"    stripe on "/dev/nrmt1"    stripe on "/dev/nrmt2"REMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database pubs2 from "/dev/nrmt0"    stripe on "/dev/nrmt1"REMAP="BO--Body"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump database pubs2 to "MTA0:"    stripe on "MTA1:"    stripe on "MTA2:"REMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database pubs2 from  "MTA0:"    stripe on "MTA1:"REMAP="BO--Body"For PC platform examples, refer to the System Administration Guide Supplement.REMAP="BO--Body"After the first two tapes are loaded, a message notifies the operator to load the third.RENDERAS="SECT2"Specifying the Characteristics of Individual DevicesID="IN6245"at optiondump striping andREMAP="BO--Body"Use a separate MOREINFO="NONE"at server_name clause for each stripe device attached to a remote Backup Server. If you do not specify a remote Backup Server name, the local Backup Server looks for the dump device on the local machine. If necessary, you can also specify separate tape device characteristics (MOREINFO="NONE"density, MOREINFO="NONE"blocksize, MOREINFO="NONE"capacity, MOREINFO="NONE"dumpvolume, andMOREINFO="NONE" file) for individual stripe devices. REMAP="BO--Body"The following examples use three dump devices, each attached to the remote Backup Server REMOTE_BKP_SERVER:REMAP="BO--Body"On UNIX:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump database pubs2        to "/dev/nrmt0" at REMOTE_BKP_SERVER        stripe on "/dev/nrmt1" at REMOTE_BKP_SERVER        stripe on "/dev/nrmt2" at REMOTE_BKP_SERVERREMAP="BO--Body"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump database pubs2    to "MTA0:" at REMOTE_BKP_SERVER    stripe on "MTA1:" at REMOTE_BKP_SERVER    stripe on "MTA2:" at REMOTE_BKP_SERVERREMAP="BO--Body"For PC platform examples, refer to the System Administration Guide SupplementID="IN2546"Dump striping
.ID="IN3347"Dump devicesmultiple
ID="IN6348"stripe on optionRENDERAS="SECT1"Tape Handling OptionsREMAP="BO--Body"The tape handling options, which appear in the MOREINFO="NONE"with clause, apply to all devices used for the dump or load. They include:MARK="BULL" REMAP="BU--Bullet"ID="IN6649"nodismount option
MOREINFO="NONE"nodismount to keep the tape available for additional dumps or loadsID="IN7350"nounload | unload option
MOREINFO="NONE"unload to rewind and unload the tape following the dump or loadID="IN6651"retaindays option
MOREINFO="NONE"retaindays to protect files from being overwrittenID="IN6052"init option
MOREINFO="NONE"init to reinitialize the tape rather than appending the dump files after the last end-of-tape mark:PGWIDE=1 TOCENTRY="1"LBL="Table 8-11: "Tape Handling OptionsCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="3*"COLNAME="C2" COLWIDTH="5*"COLNAME="C3" COLWIDTH="5*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Backing Up a Database or LogCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Loading a Database or LogVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump {database | tran} database_name
to stripe_device 
[at server_name]  
[density = density, 
blocksize = number_bytes, 
capacity = number_kilobytes  
dumpvolume = volume_name,  
file = file_name]  
[stripe on stripe_device  
[at server_name] 
[density = density, 
blocksize = number_bytes, 
capacity = number_kilobytes, 

dumpvolume = volume_name, 
file = file_name] ...]  
[with{
density = density,
blocksize = number_bytes,
capacity = number_kilobytes,
dumpvolume = volume_name,
file = file_name,COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"load {database | tran} database_name 
from stripe_device 
[at server_name] 
[density = density, 
blocksize = number_bytes  
dumpvolume = volume_name
file = file_name]  
[stripe on stripe_device  
[at server_name]  
[density = density, 
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name] ...]
[with{
density = density,
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name,COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Tape Handling 
OptionsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[nodismount | dismount],
[nounload | unload],
retaindays = number_days,
[noinit | init],COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"nodismount | dismount],
[nounload | unload],COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[notify = {client | operator_console}]}]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[notify = {client | operator_console}]}]ID="IN7153"Tape dump devicesdismountingRENDERAS="SECT2"Specifying Whether to Dismount the TapeREMAP="BO--Body"On platforms that support logical dismounts, such as OpenVMS, tapes are dismounted when a dump or load completes. Use the MOREINFO="NONE"nodismount option to keep the tape mounted and available for additional dumps or loads. This command has no effect on UNIID="IN6454"nodismount option
X or PC systems.RENDERAS="SECT2"Rewinding the TapeID="IN2755"Tape dump devicesrewindingREMAP="BO--Body"By default, both dump and load commands use the MOREINFO="NONE"nounload tape handling option. ID="IN1556"TapesrewindingREMAP="BO--Body"On UNIX systems, this prevents the tape from rewinding after the dump or load completes. This allows you to dump additional databases or logs to the same volume, or to load additional databases or logs from that volume. Use theMOREINFO="NONE" unload option for the last dump on the tape, to rewind and unload the tape when the command completes.REMAP="BO--Body"On OpenVMS systems, tapes are always rewound after a dump or load completes. Use the MOREINFO="NONE"unload option to unthread the tape and eject it from the drive. (This action is equivalent to the /UNLOAD qualifier for the OpenVMS DISMOUNTID="IN7157"nounload | unload option
 command.)ID="X41242" RENDERAS="SECT2"Protecting Dump Files from Being OverwrittenID="IN3558"Tapesprotection against overwritesREMAP="BO--Body"The MOREINFO="NONE"tape retention configuration variable specifies the number of days that must elapse between the creation of a tape file and the time at which you can overwrite it with another dump. This server-wide variable, which is set with the MOREINFO="NONE"sp_configure system procedure, applies to all dumps requested from a single SQL Server.REMAP="BO--Body"Use the MOREINFO="NONE"retaindays = number_days option to override the MOREINFO="NONE"tape retention variable for a single database or transaction log dump. The number of days must be a positive integer, or zero if the tape can be overwritten immediately.ID="IN12759"Dump devicestape retention and retaindays meaningful for
MOREINFO="NONE"tape retention and MOREINFO="NONE"retaindaysID="INA5060"Backup Servermulti-file media and tape expiration
ID="IN6461"retaindays option
 are meaningful only for disk, quarter-inch cartridge, and single-file media. On multi-file media, the Backup Server only checks the expiration date of the first file.ID="X38417" RENDERAS="SECT2"Reinitializing a Volume Before a DumpREMAP="BO--Body"By default, each dump is appended to the tape following the last end-of-tape mark. Tape volumes are not reinitialized. This allows you to dump multiple databases to a single volume. (New dumps can be appended only to the last volume of a multi-volume dump.) REMAP="BO--Body"Use the MOREINFO="NONE"init option to overwrite any existing contents of the tape. If you specify MOREINFO="NONE"init, the Backup Server reinitializes the tape without checking for:MARK="BULL" REMAP="BU--Bullet"ANSI access restrictionsFiles that have not yet expiredNon-Sybase data ("foreign" tapes on OpenVMS)REMAP="BO--Body"The default, MOREINFO="NONE"noinit, checks for all three conditions and sends a volume change prompt if any are present. REMAP="BO--Body"The following examples initialize two devices, overwriting the existing contents with the new transaction log dumps:REMAP="BO--Body"On UNIX:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump transaction pubs2    to "/dev/nrmt0"    stripe on "/dev/nrmt1"    with initREMAP="BO--Body"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump transaction pubs2    to "MTA0:"    stripe on "MTA1:"    with initREMAP="BO--Body"For PC platform examples, refer to the System Administration Guide Supplement.ID="INA4262"Dump, databasemultiple to a single volumeRENDERAS="SECT2"Dumping Multiple Databases to a Single VolumeREMAP="BO--Body"Follow these steps to dump multiple databases to the same tape volume:ID="IN4063"Tape dump devicesreinitializing volumesNUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Use the MOREINFO="NONE"init option for the first database. This overwrites any existing dumps and places the first dump at the beginning of the tape.Use the default (MOREINFO="NONE"noinit and MOREINFO="NONE"nounload) option for subsequent databases. This places them one after the other on the tape.Use the MOREINFO="NONE"unload option for the last database on the tape. This rewinds and unloads the tape after the last database is dumped.REMAP="BO--Body"LINKEND="X31567"Figure 8-2
ID="IN4564"Backupsmultiple databases to a single volume
 illustrates which options to use to dump three databases to a single tape volume:          ID="INA5865"init optionFLOAT="0"FORMAT="UNKNOWN" FILEREF="fig8_2.xwd"LBL="Figure 8-2: " ID="X31567"Dumping Several Databases to the Same VolumeID="IN7366"MessagesBackup ServerRENDERAS="SECT1"Overriding the Default Message DestinationID="IN6267"notify optionREMAP="BO--Body"Backup Server messages inform the operator when to change tape volumes and how the dump or load is progressing. The default destination for these messages depends on whether the operating system offers an operator terminal feature. The MOREINFO="NONE"notify option, which appears in the MOREINFO="NONE"with clause, allows you to override the default message destination for a dump or load.ID="IN3868"OpenVMS systemsvolume change messagesREMAP="BO--Body"On operating systems, such as OpenVMS, that offer an operator terminal feature, volume change messages are always sent to an operator terminal on the machine where the Backup Server is running. (OpenVMS routes messages to terminals that are enabled for TAPES, DISKS, or CENTRAL.) UseMOREINFO="NONE" notify = client to route other Backup Server messages to the terminal session where the MOREINFO="NONE"dump or MOREINFO="NONE"load request initiated.REMAP="BO--Body"On systems such as UNIX that do not offer an operator terminal feature, messages are sent to the client that initiated the dump or load request. Use MOREINFO="NONE"notify = operator_console to route messages to the terminal where the remote Backup Server was started.PGWIDE=1 TOCENTRY="1"LBL="Table 8-12: "Overriding the Default Message DestinationCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="3*"COLNAME="C2" COLWIDTH="5*"COLNAME="C3" COLWIDTH="5*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Backing Up a Database or LogCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Loading a Database or LogVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump {database | tran} database_name
to stripe_device
[at server_name]
[density = density, 
blocksize = number_bytes, 
capacity = number_kilobytes, 
dumpvolume = volume_name, 
file = file_name] 
[stripe on  stripe_device 
[at server_name] 
[density = density, 
blocksize = number_bytes,
capacity = number_kilobytes, 
dumpvolume = volume_name,
file = file_name] ...]
[with{
density = density,
blocksize = number_bytes,
capacity = number_kilobytes,
dumpvolume = volume_name,
file = file_name,
[nodismount | dismount],
[nounload | unload],
retaindays = number_days, [noinit | init],COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"load {database | tran} 
database_name 
from stripe_device
[at server_name]
[density = density,
blocksize = number_bytes
dumpvolume = volume_name
file = file_name]
[stripe on stripe_device
[at server_name]
[density = density,
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name] ...]
[with{
density = density,
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name,
[nodismount | dismount],
[nounload | unload],COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Message destinationCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[notify = {client | operator_console}]}]COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[notify = {client | operator_console}]}]ID="IN4269"Listingdump files on a tapeRENDERAS="SECT1"Getting Information About Dump FilesREMAP="BO--Body"If you are unsure of the contents of a tape, use the ID="IN6670"headeronly option
MOREINFO="NONE"with headeronly orID="INA6471"listonly option
MOREINFO="NONE" with listonly option of the load commands to request a report with this information.TOCENTRY="1"LBL="Table 8-13: "Listing Dump Headers or File NamesCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="11*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Listing Information About a DumpVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"load {database | tran}
database_namefrom stripe_device[at server_name]
[density = density,
blocksize = number_bytesdumpvolume = volume_namefile = file_name]
[stripe on stripe_device[at server_name]
[density = density,
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name] ...]
[with{
density = density,
blocksize = number_bytes,
dumpvolume = volume_name,
file = file_name,
[nodismount | dismount],
[nounload | unload],COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"List header information
List files on tapeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[headeronly [,file = filename]][listonly [=fullCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[notify = {client | operator_console}]}]Neither MOREINFO="NONE"with headeronly nor MOREINFO="NONE"with listonly loads the dump files after displaying the report.RENDERAS="SECT2"Requesting Dump Header InformationREMAP="BO--Body"MOREINFO="NONE"with headeronly returns the header information for a single file. If you do not specify a file name, MOREINFO="NONE"with headeronly returns information about the first file on the tape. ID="IN3372"Character setsdatabase dumps and
ID="IN2973"Sort orderdatabase dumps andREMAP="BO--Body"The header indicates whether the dump is for a database or transaction log, the database ID, the file name, and the date the dump was made. For database dumps, it also shows the character set, sort order, page count and next object ID. For transaction log dumps, it shows the checkpoint location in the log, the location of the oldest MOREINFO="NONE"begin transaction record and the old and new sequence dates.REMAP="BO--Body"The following examples return header information for the first file on the tape and then for the file mydb9229510945:REMAP="BO--Body"On UNIX:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database mydb    from "/dev/nrmt4"     with headeronlyREMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database mydb    from "/dev/nrmt4"    with headeronly, file = "mydb9229510945"REMAP="BO--Body"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database mydb    from "MTA01:"    with headeronlyREMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database mydb    from "MTA01:"    with headeronly, file = "mydb9229510945"REMAP="BO--Body"For PC platform examples, refer to the System  Administration  Guide  Supplement.REMAP="BO--Body"Here is sample output from MOREINFO="NONE"headeronly:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Backup Server session id is: 44. Use this value when executing the `sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Backup Server: 4.28.1.1: Dumpfile name `mydb9232610BC8 ` section number 0001 mounted on device `backup/SQL_SERVER/mydb.db.dump'REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"This is a database dump of database ID 5 from Nov 21 1992 7:02PM.REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Database contains 1536 pages; checkpoint RID=(Rid pageid = 0x404; row num = 0xa); next object ID=3031; sort order ID=50, status=0; charset ID=1.RENDERAS="SECT2"Determining the Database, Device, File Name, and DateREMAP="BO--Body"MOREINFO="NONE"with listonly returns a brief description of each dump file on a volume. It includes the name of the database, the device used to make the dump, the file name, the date and time the dump was made, and the date and time it can be overwritten. MOREINFO="NONE"with listonly = fullID="IN1674"Labelstape, SQL
 provides greater detail. Both reports are sorted by SQL tape label.REMAP="BO--Body"Following is sample output of a MOREINFO="NONE"load database command MOREINFO="NONE"with listonly:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Backup Server: 4.36.1.1: Device `/dev/nrst0':File name: `model9320715138  `Create date & time: Monday, Jul 26, 1993, 23:58:48Expiration date & time:  Monday, Jul 26, 1993, 00:00:00Database name: `model                         `REMAP="BO--Body"and sample output from MOREINFO="NONE"with listonly = full:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Backup Server: 4.37.1.1: Device `/dev/nrst0':     Label id: `HDR1'File name:`model9320715138  `Stripe count:0001Device typecount:01REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Archive volume number:0001Stripe position:0000Generation number:0001Generation version:00Create date & time:Monday, Jul 26, 1993, 23:58:48Expiration date & time:Monday, Jul 26, 1993, 00:00:00Access code:` `File block count:000000Sybase id string:`Sybase  `Reserved:`       `REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Backup Server: 4.38.1.1: Device `/dev/nrst0':Label id:`HDR2'Record format:`F'Max. bytes/block:55296Record length:02048Backup format version:01Reserved:`   `Database name:`model                         `Buffer offset length:00Reserved:`                            `REMAP="BO--Body"After listing all files on a volume, the Backup Server sends a volume change request:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"Backup Server: 6.30.1.2: Device /dev/nrst0: Volume cataloguingcomplete.Backup Server: 6.51.1.1: OPERATOR: Mount the next volume to search.Backup Server: 6.78.1.1: EXECUTE sp_volchangedREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"          @session_id = 5,          @devname = `/dev/nrst0',          @action = { `PROCEED' | `RETRY' | `ABORT' },          @fname = `   REMAP="BO--Body"The operator can mount another volume and signal the volume change with MOREINFO="NONE"sp_volchanged, or use MOREINFO="NONE"sp_volchangedID="IN4075"Listingdump files on a tape
ID="IN6476"headeronly option
 to terminate the search operation for all stripe devices. ID="IN6277"listonly optionRENDERAS="SECT1"ID="IN5478"Failures, mediacopying log device after
ID="IN15379"Transaction logsdumping after media failure
Copying the Log After a Device FailureREMAP="BO--Body"Normally, the MOREINFO="NONE"dump transaction command truncates the inactive portion of the log after copying it. Use the MOREINFO="NONE"with no_truncate option to copy the log without truncating it. REMAP="BO--Body"ThID="IN12580"with no_truncate option, dump transaction
MOREINFO="NONE"e no_truncateID="IN11881"dump transaction commandwith no_truncate option
 MOREINFO="NONE"option allows you to copy the transaction log after failure of the device that holds your data. It uses pointers in the sysdatabases and sysindexesID="IN4782"RecoveryRecoveryfrom current logcurrent log
 system tables to determine the physical location of the transaction log. It can be used only if your transaction log is on a separate segment and your master database is accessible.Use MOREINFO="NONE"no_truncate only if media failure makes your data segment inaccessible. Never use MOREINFO="NONE"no_truncate on a database that is in use.REMAP="BO--Body"After copying the log MOREINFO="NONE"with no_truncate, you must follow the steps described in it was made. These steps are described in the section LINKEND="X77588""Volume Change Prompts for Loads"
 in this chapter.TOCENTRY="1"LBL="Table 8-14: "Copying the Log After a Device FailureCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="3*"COLNAME="C2" COLWIDTH="5*"VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump transaction database_name
to stripe_device
[at server_name]
[density = density,
blocksize = number_bytes,
capacity = number_kilobytes,
dumpvolume = volume_name,
file = file_name]
[stripe on stripe_device
[at server_name]
[density = density,
blocksize = number_bytes,
capacity = number_kilobytes,
dum pvolume = volume_name,
file = file_name] ...]
[with{
density = density,
blocksize = number_bytes,
capacity = number_kilobytes,
dumpvolume = volume_name,
file = file_name,
[nodismount | dismount],
[nounload | unload],
retaindays = number_days, [noinit | init],COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Do not truncate logCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"no_truncate,COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"[notify = {client | operator_console}]}]REMAP="BO--Body"You can use MOREINFO="NONE"no_truncate with striped dumps, tape initialization, and remote Backup Servers. Here is an example: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump transaction mydb to "/dev/nrmt0" at REMOTE_BKP_SERVERwith init, no_truncate,notify = "operator_console"ID="IN14983"Transaction logsdumping after media failure
ID="IN12384"with no_truncate option, dump transaction
ID="IN11385"with truncate_only option, dump transaction
ID="IN5286"Failures, mediacopying log device afterRENDERAS="SECT1"ID="INA7587"Transaction logsTransaction logson same devicesame device
ID="IN4188"Transaction logstruncating
Truncating a Log That Is Not on a Separate SegmentREMAP="BO--Body"If a database does not have a separate log segment, you cannot use MOREINFO="NONE"dump transaction to copy the log and then truncate it. For these databases, you must:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Use the special MOREINFO="NONE"with truncate_only option of MOREINFO="NONE"dump transaction to truncate the log so that it does not run out of space.UseMOREINFO="NONE" dump database to copy the entire database, including the log.REMAP="BO--Body"Because it copies no data, the MOREINFO="NONE"with truncate_only option requires only the name of the database:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump transaction database_name with truncate_onlyREMAP="BO--Body"The following example dumps the database mydb, which does not have a separate log segment, then truncates the log:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump database mydb to mydeviceID="IN7389"Transaction logsTransaction logson same devicesame deviceREMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump transaction mydb with truncate_onlyRENDERAS="SECT1"Truncating the Log In Early Development EnvironmentsID="IN7690"dump transaction commandmaximizing space
ID="IN12091"dump transaction commandwith truncate_only option
ID="IN11392"with truncate_only option, dump transactionREMAP="BO--Body"In early development environments, the transaction log is quickly filled by the process of creating, dropping and recreating stored procedures and triggers and checking integrity constraints. Recovery of data may be less important than ensuring that there is adequate space on database devices.REMAP="BO--Body"The MOREINFO="NONE"with truncate_only option of MOREINFO="NONE"dump transaction is often useful in these environments. It allows you to truncate the transaction log without making a backup copy:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump transaction database_name with truncate_onlyREMAP="BO--Body"After you run MOREINFO="NONE"dump transaction with truncate_only, SQL Server requires you dump the database before you can run a routine log dump.RENDERAS="SECT1"ID="IN2493"Transaction logspurging
Truncating a Log That Has No Free SpaceREMAP="BO--Body"ID="IN3394"Databasesrunning out of space in
ID="INA10695"with no_log option, dump transaction
ID="IN11396"dump transaction commandwith no_log option
When the log is very full, you may not be able to use your usual method to dump the transaction log. If you have tried MOREINFO="NONE"dump transaction or MOREINFO="NONE"dump transaction with truncate_only and the command fails because of insufficient log space, use the special MOREINFO="NONE"with MOREINFO="NONE"no_log option of MOREINFO="NONE"dump transaction:REMAP="UI--UserInput" FORMAT="LINESPECIFIC" ID="INA3997"Pages (data)filling up transaction log
ID="IN2098"Spacerunning out of
dump transaction database_name with no_logREMAP="BO--Body"This special option truncates the log without logging the dump transaction event. Because it copies no data, it requires only the name of the database.Use MOREINFO="NONE"dump transaction with no_log only as a last resort.ID="X38617" RENDERAS="SECT2"Dangers of Using with truncate_only and with no_logREMAP="BO--Body"MOREINFO="NONE"with truncate_only and MOREINFO="NONE"with no_log allow you to truncate a log that has become disastrously short of free space. Neither option provides a means to recover your databases. REMAP="BO--Body"After running MOREINFO="NONE"dump transaction with truncate_only or MOREINFO="NONE"with no_log, you have no way to recover transactions that have committed since the last routine dump.Run MOREINFO="NONE"dump database at the earliest opportunity to ensure that your data can be recovered.REMAP="BO--Body"The following example truncates the transaction log for mydb and then dumps the database:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump transaction mydb    with no_logREMAP="UI--UserInput" FORMAT="LINESPECIFIC"dump database mydbID="IN3999"Transaction logstruncatingRENDERAS="SECT2"Providing Enough Log SpaceREMAP="BO--Body"Every use of MOREINFO="NONE"dump transaction... with no_log is considered an error, and is recorded in the server's error log. If you have created your databases with separate log segments, written a last-chance threshold procedure that dumps your transaction log often enough, and allocated enough space to your log and database, you should not have to use this option.RENDERAS="SECT1"Responding to Volume Change RequestsID="IN52100"Backup Servervolume handling messagesREMAP="BO--Body"On UNIX and PC systems, use the MOREINFO="NONE"sp_volchanged ID="IN65101"sp_volchanged system procedure
ID="IN121102"OpenVMS systemsREPLY command
system procedure to notify the Backup Server when the correct volumes have been mounted. On OpenVMS systems, use the REPLY command. REMAP="BO--Body"To use MOREINFO="NONE"sp_volchanged, log into any SQL Server that can communicate with both the Backup Server that issued the volume change request and the SQL Server that initiated the dump or load. RENDERAS="SECT2"sp_volchanged SyntaxREMAP="BO--Body"Use the following syntax for MOREINFO="NONE"sp_volchanged:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_volchanged session_id, device_name , action [ ,filename [, volume_name] ]MARK="BULL" REMAP="BU--Bullet"Use the session_id and device_name parameters specified in the volume change request. The action specifies whether to MOREINFO="NONE"abort, MOREINFO="NONE"proceed with, or MOREINFO="NONE"retry the dump or load.The filename specifies which file to load. If you do not specify a file name MOREINFO="NONE"sp_volchanged, the Backup Server loads the MOREINFO="NONE"file = filename parameter of the load command. If neither MOREINFO="NONE"sp_volchanged nor the load command specifies which file to load, the Backup Server loads the first file on the tape.The Backup Server writes the volume_name in the ANSI tape label when overwriting an existing dump, dumping to a brand new tape, or dumping to a tape whose contents are not recognizable. During loads, the Backup Server uses the volume_name to confirm that the correct tape has been mounted. If you do not specify a volume_name with MOREINFO="NONE"sp_volchanged, the Backup Server uses the volume name specified in the dump or load command. If neither MOREINFO="NONE"sp_volchangedide nor the command specifies a volume name, the Backup Server does not check this field in the ANSI tape label.ID="IN92103"Dump, transaction logsp_volchanged prompts
ID="IN85104"Dump, databasesp_volchanged prompts
ID="IN76105"Listsp_volchanged messagesRENDERAS="SECT2"Volume Change Prompts for DumpsREMAP="BO--Body"This section describes the volume change prompts that occur while dumping a database or transaction log. For each prompt, it indicates the possible operator actions and the appropriate MOREINFO="NONE"sp_volchanged response.MARK="BULL" REMAP="BU--Bullet"MOREINFO="NONE"Mount the next volume to search.REMAP="UN--Under"ID="IN62106"Messagessp_volchanged list
When appending a dump to an existing volume, the Backup Server issues this message if it cannot find the end-of-file mark.COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="117*"COLNAME="C2" COLWIDTH="342*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The operator canCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"By replyingVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Abort the dumpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, abortCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mount a new volume 
and proceed with the 
dumpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, proceed
[, file_name [, volume_name]] MOREINFO="NONE"Mount the next volume to write.REMAP="UN--Under"The Backup Server issues this message when it reaches the end of the tape. This occurs when it detects the end-of-tape mark, or dumps the number of kilobytes specified by the MOREINFO="NONE"capacity parameter of the dump command, or dumps the high value specified for the device in the sysdevices system table.COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="117*"COLNAME="C2" COLWIDTH="342*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The operator canCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"By replyingVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Abort the dumpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, abortCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mount the next 
volume and proceed 
with the dumpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, proceed
[, file_name [, volume_name]]MOREINFO="NONE"Volume on device MOREINFO="NONE"device_nameMOREINFO="NONE" has restricted access (code MOREINFO="NONE"access_codeMOREINFO="NONE").REMAP="UN--Under"Dumps that specify the MOREINFO="NONE"init option overwrite any existing contents of the tape. Backup Server issues this message if you try to dump to a tape with ANSI access restrictions without specifying the MOREINFO="NONE"init option.COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="117*"COLNAME="C2" COLWIDTH="342*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The operator canCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"By replyingVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Abort the dumpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, abortCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mount another volume 
and retry the dumpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, retry 
[, file_name [, volume_name]]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Proceed with the 
dump, overwriting 
any existing contents COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, proceed
[, file_name [, volume_name]] MOREINFO="NONE"Volume on device MOREINFO="NONE"device_nameMOREINFO="NONE" is expired and will be overwritten.REMAP="UN--Under"Dumps that specify the MOREINFO="NONE"init option overwrite any existing contents of the tape. During dumps to single-file media, Backup Server issues this message if you have not specified the MOREINFO="NONE"init option and the tape contains a dump whose expiration date has passed.COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="117*"COLNAME="C2" COLWIDTH="342*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The operator canCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"By replyingVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Abort the dumpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, abortCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mount another volume 
and retry the dumpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, retry 
[, file_name [, volume_name]]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Proceed with the 
dump, overwriting 
any existing contentsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, proceed
[, file_name [, volume_name]] MOREINFO="NONE"Volume to be overwritten on 'MOREINFO="NONE"device_nameMOREINFO="NONE"' has not expired: creation date on this volume is MOREINFO="NONE"creation_dateMOREINFO="NONE", expiration date is MOREINFO="NONE"expiration_dateMOREINFO="NONE".REMAP="UN--Under"On single-file media, the Backup Server checks the expiration date of any existing dump unless you specify the MOREINFO="NONE"init option. The Backup Server issues this message if the dump has not yet expired.COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="117*"COLNAME="C2" COLWIDTH="342*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The operator canCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"By replyingVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Abort the dumpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, abortCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mount another volume 
and retry the dumpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, retry 
[, file_name [, volume_name]]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Proceed with the 
dump, overwriting 
any existing contentsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, proceed
[, file_name [, volume_name]] MOREINFO="NONE"Volume to be overwritten on `MOREINFO="NONE"device_nameMOREINFO="NONE"' has unrecognized label data.REMAP="UN--Under"Dumps that specify the MOREINFO="NONE"init option overwrite any existing contents of the tape. Backup Server issues this message if you try to dump to a new tape or a tape with non-Sybase data without specifying the MOREINFO="NONE"init option.COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="117*"COLNAME="C2" COLWIDTH="342*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The operator canCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"By replyingVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Abort the dumpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, abortCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mount another volume 
and retry the dumpCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, retry 
[, file_name [, volume_name]]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Proceed with the 
dump, overwriting 
any existing contentsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, proceed
[, file_name [, volume_name]] ID="IN83107"Dump, databasesp_volchanged prompts
ID="IN90108"Dump, transaction logsp_volchanged prompts
ID="INA74109"Listsp_volchanged messagesID="X77588" RENDERAS="SECT2"Volume Change Prompts for LoadsREMAP="BO--Body"Following are the volume change prompts and possible operator actions during loads:MARK="BULL" REMAP="BU--Bullet"MOREINFO="NONE"Dumpfile 'MOREINFO="NONE"file_nameMOREINFO="NONE"' section MOREINFO="NONE"volume_nameMOREINFO="NONE" found instead of 'MOREINFO="NONE"file_nameMOREINFO="NONE"' section MOREINFO="NONE"volume_nameMOREINFO="NONE".REMAP="UN--Under"The Backup Server issues this message if it cannot find the specified file on a single-file medium.COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="117*"COLNAME="C2" COLWIDTH="342*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The operator canCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"By replyingVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Abort the loadCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, abortCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mount another volume 
and try to load itCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, retry 
[, file_name [, volume_name]]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Load the file on the 
currently mounted 
volume, even though it 
is not the specified file 
(not recommended)COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, proceed
[, file_name [, volume_name]] COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"Mount the next volume to read.REMAP="UN--Under"The Backup Server issues this message when it is ready to read the next section of the dump file from a multi-volume dump.COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="117*"COLNAME="C2" COLWIDTH="342*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The operator canCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"By replyingVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Abort the loadCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, abortCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mount the next 
volume and proceed 
with the loadCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, proceed 
[, file_name [, volume_name]]MOREINFO="NONE"Mount the next volume to search.REMAP="UN--Under"The Backup Server issues this message if it cannot find the specified file on multi-file medium.COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="117*"COLNAME="C2" COLWIDTH="342*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The operator canCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"By replyingVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Abort the loadCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, abortCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mount another volume 
and proceed with the 
loadCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sp_volchanged session_id, device_name, proceed
[, file_name [, volume_name]] ID="IN50110"Backup Servervolume handling messages
ID="IN48111"Recoverystep-by-step instructionsRENDERAS="SECT1"Recovering a Database: Step-by-Step InstructionsID="IN26112"Failures, mediadiagnosingREMAP="BO--Body"The symptoms of media failure are as variable as the causes. If only a single block on the disk is bad, ID="IN95113"dbcc (Database Consistency Checker)database maintenance and
your database may appear to function perfectly for some time after the corruption appears, unless you're running MOREINFO="NONE"dbcc commands frequently. If an entire disk or disk controller is bad, you will not be able to MOREINFO="NONE"useID="IN65114"master databasedamage symptoms
 a database. SQL Server marks it as suspect and displays a warning message. If the disk storing the master database fails, users will not be able to log into the server, and users already logged in will not be able to perform any actions that access the system tables in master.REMAP="BO--Body"This section describes what to do when a database device fails. The recommended procedure consists of the following steps:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Get a current log dump of every database on the device.Examine the space usage of every database on the device.Once you have gathered this information for all databases on the device, drop each database.Drop the failed device.Initialize new devices.Recreate the databases, one at a time.Lock users out of each database.Load the most recent database dump into each database.Apply each transaction log dump in the order it was created.REMAP="BO--Body"These steps are described in greater detail in the following sections.RENDERAS="SECT2"Getting a Current Dump of the Transaction LogREMAP="BO--Body"Use MOREINFO="NONE"dump transaction with no_truncate to get a current transaction log dump for each database on the failed device. For example, to get a current transaction log dump of mydb:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"dump transaction mydbto "/dev/nrmt0" at REMOTE_BKP_SERVERwith init, no_truncate,notify = "operator_console"RENDERAS="SECT2"Examining the Device AllocationsREMAP="BO--Body"The following steps are recommended, but not required, to determine which devices your database uses, how much space is allocated on each device, and whether the space is used for data, log, or both. You can use this information when recreating your databases, to ensure that your log, data, and indexes reside on separate devices.ID="IN40115"Spaceinformation on usage
ID="IN80116"sysusages tabledatabase space allocations andNUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"In MOREINFO="NONE"master, use the following query to examine the device allocations and uses for the damaged database: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select segmap, size from sysusages     where dbid = db_id("database_name") ID="IN69117"Numberssegment valueExamine the output of the query. Each row with a MOREINFO="NONE"segmap of 3 represents a data allocation; each row with a MOREINFO="NONE"segmapID="IN21118"Segmentsuser-defined
 of 4 in the represents a log allocation. (Higher values indicate user-defined segments; treat these as data allocations.) The MOREINFO="NONE"size column indicates the number of 2K blocks of data. To find the number of megabytes, divide by 512 on most systems, or by 256 on Stratus. Note the order, use and size of each disk piece. For example, this output: REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"segmap        size-------       --------     3          10240     3           5120     4           5120     3           1024     4           2048REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"ID="IN52119"Space allocationunitsREMAP="UN--Under"translates into these sizes and uses, in megabytes: TOCENTRY="1"LBL="Table 8-15: "Sample Device AllocationCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="6*"COLNAME="C2" COLWIDTH="7*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Device 
AllocationCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MegabytesVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DataCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DataCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LogCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DataCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LogCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4ID="IN50120"Space allocationmatching new database to existingIf the segmap column contains 7s, your data and log are on the same device, and you can only recover up to the point of the most recent database dump. MOREINFO="NONE"Do not use the MOREINFO="NONE"log on option toMOREINFO="NONE" create databaseID="IN35121"Space allocationbackup methods and
. Just be sure that you allocate as much (or more) space than the total reported from sysusagesID="IN38122"Spaceinformation on usage
. ID="IN26123"NamesdeviceRun MOREINFO="NONE"sp_helpdb database_name for the database. This query lists the devices on which the data and logs are located: REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"name       db_size owner   dbid    created -------    ------- ------  ----    -----------mydb       46.0 MB sa        15    Apr  9 1991 REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"status          device_fragments    size          usage--------------  ----------------    ------        ------------no options set  datadev1            20 MB         data only                datadev2           10 MB          data only                datadev3            2 MB          data only                logdev1            10 MB          log only                logdev1             4 MB          log onlyRENDERAS="SECT2"Dropping the DatabasesID="IN113124"drop database commanddrop database commandfor failed devicesfailed devices
ID="IN37125"DatabasesdroppingREMAP="BO--Body"Once you have performed these steps for all databases on the failed device, use the MOREINFO="NONE"drop database command to drop each database. If tables in other databases contain references to any tables in the database you are trying to drop, you must remove the referential integrity constraints with MOREINFO="NONE"alter table before you can drop the database.REMAP="BO--Body"If the system reports errors because the database if damaged when you issue the MOREINFO="NONE"drop databaseID="IN98126"dropdb option, dbcc dbrepair
 command, use the MOREINFO="NONE"dropdbID="IN91127"dbrepair option, dbcc
 option of the MOREINFO="NONE"dbcc MOREINFO="NONE"dbrepair command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dbcc dbrepair (mydb, dropdb) REMAP="BO--Body"See the Troubleshooting Guide
 for more information on using MOREINFO="NONE"dbcc dbrepair.ID="IN165128"DroppingdevicesRENDERAS="SECT2"Dropping the Failed DevicesREMAP="BO--Body"After you have dropped each database, use MOREINFO="NONE"sp_dropdevice to drop the failed device. See Volume 2 of the SQL Server Reference Manual for information on this system procedure. RENDERAS="SECT2"Initializing New DevicesREMAP="BO--Body"Use MOREINFO="NONE"disk init to initialize the needed new database devices. See LINKEND="X45883"Chapter 3,  "Managing Physical Resources"
 for full information.ID="IN29129"Recoveryrecreating databasesRENDERAS="SECT2"Recreating the DatabasesREMAP="BO--Body"Use the following steps to recreate each database using the segment information you collected earlier. If you chose not to gather information about segment usage, useMOREINFO="NONE" create database for load to create a new database at least as large as the original. ID="IN104130"sysusages tablecreate database andNUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Use the MOREINFO="NONE"create database command with the MOREINFO="NONE"for load option. Duplicate all segment mappings and sizes for each row of your database from the MOREINFO="NONE"sysusages table, up to and including the first log device. Be sure to use the order of the rows as they appear in MOREINFO="NONE"sysusages. (The results of MOREINFO="NONE"sp_helpdb are in alphabetical order by device name, not in order of allocation.) For example, to recreate the mydb database: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"create database mydb     on datadev1 = 20,       datadev2 = 10log on logdev1 = 10 for loadID="IN39131"Database devicesassigning databases to
ID="IN57132"alter database commandUse the MOREINFO="NONE"alter database command with the MOREINFO="NONE"for load ID="IN26133"Space allocationassigning
ID="IN72134"Space allocationSpace allocationon an existing deviceexisting device
option to recreate the remaining entries. In this example, to allocate more data space on MOREINFO="NONE"datadev3, the command is: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"alter database on datadev3 = 2 for loadREMAP="UN--Under"To re-create the final log allocation on MOREINFO="NONE"logdev1, use this command: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"alter database mydb log on logdev1 = 4 for loadRENDERAS="SECT2"Locking the DatabasesREMAP="BO--Body"If users perform logged transactions between loading the database and the first log dump, or between the loading of two transaction log dumps, the load fails. Lock each database before you load it to ensure that users do not make changes.REMAP="BO--Body"Use MOREINFO="NONE"sp_dboption to set the MOREINFO="NONE"no chkpt on recovery, dbo use only, andMOREINFO="NONE" read only options to TRUE. Do not reset these options until the last transaction log has been loaded.MOREINFO="NONE"create database... for load temporarily locks users out of the newly created database, but this protection is removed once MOREINFO="NONE"load database completes. ID="IN25135"Load, databaseRENDERAS="SECT2"Loading the DatabaseREMAP="BO--Body"Reload the database using MOREINFO="NONE"load databaseID="IN29136"Recoveryspace allocation and
ID="IN76137"load database commandautomatic remapping
ID="IN27138"Space allocationrecreating
ID="IN66139"Space allocationsegments and
ID="IN27140"Segmentsplacing objects on
ID="IN38141"Database objectsplacement on segments
ID="IN37142"Segmentsdatabase object placement on
. If the original database stored objects on user-defined segments (sysusages reports a segmap ID="IN28143"Recoveryautomatic remapping
> 4) and your new segment allocations do not match those in the dumped database, SQL Server remaps these segments as needed. This remapping may mix log and data on the same physical device, making recovery of the current log impossible.ID="IN24144"Recoveryfailures duringREMAP="BO--Body"If an additional failure occurs while a database is being loaded, SQL Server does not recover the partially loaded database, and notifies the user. You must restart the database load by repeating the MOREINFO="NONE"load command. ID="IN36145"Load, transaction logorder of dumpsRENDERAS="SECT2"Loading the Transaction LogsREMAP="BO--Body"Use MOREINFO="NONE"load transaction to apply transaction log backups in the same sequence in which they were madeID="IN42146"Timestamps, order of transaction log dumps
. Load the most current dump last.ID="IN40147"Transaction logsmodifying between loadsREMAP="BO--Body" SQL Server checks the timestamps on each dumped database and transaction log. If the dumps are loaded in the wrong order, or if user transactions have modified the transaction log between loads, the load fails.REMAP="BO--Body"Once you have brought a database up to date, use MOREINFO="NONE"dbcc commands to check its consistency.RENDERAS="SECT2"Unlocking the DatabasesREMAP="BO--Body"After you have applied all transaction log dumps to a database, unlock it so that users can access it. UseMOREINFO="NONE" sp_dboption to reset the MOREINFO="NONE"no chkpt on recovery, dbo use only andMOREINFO="NONE" read only options to FALSEID="IN46148"Recoverystep-by-step instructions
. REMAP="BO--Body"ID="IN82149"dump transaction command
ID="INA79150"dump database command
ID="IN79151"load database command
ID="IN82152"load transaction commandREMAP="BO--Body"NUMBER="9" ID="X40994"Backing Up and Restoring the System DatabasesRENDERAS="SECT1"IntroductionREMAP="BO--Body"This chapter is part of a three-chapter unit on backup and recovery. It explains how to restore the master, model and sybsystemprocs databases.REMAP="BO--Body"Depending on the database involved and the problems that you have on your system, recovery may include:MARK="BULL" REMAP="BU--Bullet"Using MOREINFO="NONE"load database to load backups of these databases.Using MOREINFO="NONE"buildmaster, MOREINFO="NONE"installmaster and MOREINFO="NONE"installmodel to restore the initial state of these databases.A combination of both.TOCENTRY="1"LBL="Table 9-1: "Further Information About Backup and RecoveryCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="11*"COLNAME="C2" COLWIDTH="9*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"For more information aboutCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SeeVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Backup and recovery issues to address 
before productionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LINKEND="X31864"Chapter 7,  "Developing a Backup 
and Recovery Plan"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"dump, MOREINFO="NONE"load, and MOREINFO="NONE"sp_volchanged syntaxCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LINKEND="X32898"Chapter 8,  "Backing Up and 
Restoring User Databases"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Using thresholds to automate backupsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LINKEND="X63254"Chapter 10,  "Managing Free 
Space with Thresholds"ID="X27899" RENDERAS="SECT1"Symptoms of a Damaged master Database   ID="IN1311"Damage symptoms, master database. See master databaseREMAP="BO--Body"A damaged master database can be caused by a media failure in the area on which MOREINFO="NONE"master is stored, or by internal corruption in the database. A damaged MOREINFO="NONE"master database makes itself known in one or more of these ways:MARK="BULL" REMAP="BU--Bullet"SQL Server cannot start. ID="IN392"Errorssegmentation
ID="IN193"Errorsinput/output
ID="IN104"I/O errorsThere are frequent or debilitating segmentation faults or input/output errors.MOREINFO="NONE"dbcc (the database consistency checker) reports damage during a regularly-scheduled check of your databases.ID="IN905"Recovery of master databasevolume changes during backupRENDERAS="SECT1"Avoiding Volume Changes During Backup and RecoveryREMAP="BO--Body"When you dump the master database, be sure that the entire dump fits on a single volume, unless you have more than one SQL Server able to communicate with your Backup Server. You must start SQL Server in single-user mode before loading the master database. This does not allow a separate user connection to respond to Backup Server's volume change messages during the load. Since master is usually small in size, placing its backup on a single tape volume is typically not a problem.RENDERAS="SECT1"ID="IN866"Recovery of master database
Recovering the master DatabaseREMAP="BO--Body"This section describes the step to recover the master database in two situations:MARK="BULL" REMAP="BU--Bullet"When the database is corrupt but the master device has not been damaged. This process does not affect the model database. Recovering model is covered later in this chapter.When the master device is damaged, and you must restore the entire device. You can also use these procedures to move your master database to a larger master device.REMAP="BO--Body"Special procedures are needed because of the central, controlling nature of the master database and the master device. Tables in master configure and control all of SQL Server's functions, databases, and data devices. The recovery process:MARK="BULL" REMAP="BU--Bullet"Restores master to the default state on a newly-installed server.Restores master to its condition at the time of your last backup.Performs very special procedures to recover changes to devices and databases since the last backup.REMAP="BO--Body"During the early stages of recovering the master database, you will not be able to use the system stored procedures.REMAP="BO--Body"If you have user databases that you have not backed up on your master device, you may not be able to use these procedures to recover. You should call Technical Support for assistance.ID="IN1017"System Administratorsteps to restore master databaseRENDERAS="SECT2"Summary of Recovery ProcedureREMAP="BO--Body"System Administrators must use the following steps to restore a damaged MOREINFO="NONE"master database. Each of these steps is discussed in more detail in the following pages. NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Make hard copies of vital system tables needed to restore disks, databases and logins.If there are other databases on the master device, and they are accessible, back them up with MOREINFO="NONE"dump database.Use MOREINFO="NONE"buildmaster to build a new MOREINFO="NONE"master database or master device. ID="IN418"Serverssingle-user mode
ID="IN629"startserver utility commandRestart SQL Server in single-user mode with the MOREINFO="NONE"startserver command. If your master database is larger than 3 Mb, re-create its allocations in sysusages exactly. The size of master might be larger because of MOREINFO="NONE"alter database commands, or because earlier upgrades of SQL Server required a larger master database.If your Backup Server's network name (the name in the interfaces file) is not SYB_BACKUP, change the network name in sysservers.Check to see that your Backup Server is running.Use MOREINFO="NONE"load database to load the most recent database dump of MOREINFO="NONE"master. SQL Server stops automatically after successfully loading master.Restart SQL Server in single-user mode again with MOREINFO="NONE"startserver.If you have added database devices since the last dump of master, issue the MOREINFO="NONE"disk reinit command to rebuild sysdevices.If you have run MOREINFO="NONE"disk reinit, or if MOREINFO="NONE"create database or MOREINFO="NONE"alter database has been used since the last dump, make hard copies of MOREINFO="NONE"sysusages and MOREINFO="NONE"sysdatabases and then issue the MOREINFO="NONE"disk refit command to rebuild these system tables.Check for consistency: compare your hard copy of MOREINFO="NONE"sysusages and MOREINFO="NONE"sysdatabases with the new on-line version, run MOREINFO="NONE"dbcc MOREINFO="NONE"checkalloc on each database, and examine important tables in each database.If you restored the entire master device, restore the model database.Reload any affected user databases.Check syslogins if you have added new logins since the last backup of master.If everything is correct, stop the server and useMOREINFO="NONE" startserver to restart SQL Server for multi-user use.Dump the master database.ID="IN9910"System Administratorsteps to restore master databaseREMAP="BO--Body"The following sections describe these steps in greater detail.RENDERAS="SECT2"Saving Copies of System TablesREMAP="BO--Body"If you can log into your server, save copies of the following system tables to a disk file: sysdatabases, sysdevices, sysusages, sysloginroles and syslogins. You can use these to guarantee that your system has been fully restored at the completion of this process.REMAP="BO--Body"You can use MOREINFO="NONE"isql (use MOREINFO="NONE"select * from tablename) or MOREINFO="NONE"bcp (copy the tables in character mode) to make copies to disk files. If possible, make a copy of sysusages ordered by vstart:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * from sysusages order by vstartREMAP="BO--Body"For more information on the MOREINFO="NONE"isql and MOREINFO="NONE"bcp programs, see the SQL Server Utility Programs manual for your operating system.RENDERAS="SECT2"Dumping User Databases on the Master DeviceREMAP="BO--Body"If there are user databases on the master device, and they are accessible, use MOREINFO="NONE"dump database to dump them.ID="IN7811"Master devicebuildmaster initialization of
ID="IN13312"Recovery of master databaserebuildingID="X48229" RENDERAS="SECT2"Building a New master Database   REMAP="BO--Body"If you are rebuilding only your master database, you use a special option to MOREINFO="NONE"buildmaster that only affects master. If you are rebuilding the entire master device, you use MOREINFO="NONE"buildmaster without this option.RENDERAS="SECT3"Rebuilding Only the master DatabaseID="IN6213"buildmaster utility commandREMAP="BO--Body"Run MOREINFO="NONE"buildmaster -m (UNIX and PCs) or MOREINFO="NONE"buildmaster /master (OpenVMS) to replace the damaged MOREINFO="NONE"master database with a copy of a "generic" MOREINFO="NONE"master database. Give the full name for your master device, and the full size of the device. You must give buildmaster a size at least as large, or larger, then the size originally used to configure SQL Server. If you recorded this information in your SQL Server Installation Guide, use that size. If the size you provide is too small, you will get error messages when you try to load your databases.REMAP="BO--Body"This example rebuilds the master database on a 17 Mb (8704 2-K pages) master device:REMAP="BO--Body"On UNIX platforms:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"buildmaster -d /dev/rsd1f -s8704 -mREMAP="BO--Body"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"buildmaster/disk=dua0:[devices.master]d_master.dat/size=8704/masterREMAP="BO--Body"For PC platform examples, refer to the System Administration Guide  Supplement.REMAP="BO--Body"After you run MOREINFO="NONE"buildmasterID="IN8014"System Administratorpassword and buildmaster
ID="IN9515"Ò saÓ  loginsa loginpasswordpassword
ID="IN2916"Null passwords
, the password for the default "sa" account reverts to NULL.REMAP="BO--Body"For details on the MOREINFO="NONE"buildmaster utility, see the SQL Server  Utility Programs manual for your operating system.RENDERAS="SECT3"Rebuilding the Entire Master DeviceID="IN7617"Master devicerebuilding with buildmasterREMAP="BO--Body"If you are rebuilding a damaged master device, or moving your master database to another device, run MOREINFO="NONE"buildmaster without using the "master" option.RENDERAS="SECT2"Starting SQL Server in Master-Recover Mode   ID="IN2718"Serversmaster-recover mode
ID="IN1919"Master-recover modeREMAP="BO--Body"Start SQL Server in master-recover mode with the MOREINFO="NONE"-m (UNIX and PCs) or MOREINFO="NONE"/masterrecover (OpenVMS) options. See the SQL Server Utility Programs manual for your operating system for complete syntax.REMAP="BO--Body"On UNIX platforms:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"startserver -f RUN_server_name -mREMAP="BO--Body"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"startserver /server = server_name /masterrecoverID="IN4720"System Administratorsingle-user mode of Server
ID="IN2421"Serverssingle-user modeREMAP="BO--Body"When you start SQL Server in master-recover mode, only one login of one user-the System Administrator-is allowed. Immediately after a MOREINFO="NONE"buildmaster command on the master database, only the "sa" account exists, and its password is NULL.REMAP="BO--Body"This special master-recover mode is necessary because the generic MOREINFO="NONE"master database created with MOREINFO="NONE"buildmaster does not match the actual situation on SQL Server: it doesn't know about any of your database devices, for example! Any operations on the MOREINFO="NONE"master database could make recovery impossible, or at least much more complicated and time-consuming. REMAP="BO--Body"A SQL Server started in master-recover mode is automatically configured to allow direct updates to the system tables. Certain other operations (for example, the checkpoint process) are disallowed. ID="IN8722"System tablesupdating
ID="IN2223"Changingsystem tablesAd hoc changes to the system tables are dangerous-some changes can render SQL Server unable to run. Make only the changes described in this chapter, and always make the changes in a user-defined transaction.RENDERAS="SECT2"Re-creating Devices Allocations for masterID="IN6224"sysusages tablerecovery andREMAP="BO--Body"Look at a hard copy of sysusages created before you ran MOREINFO="NONE"buildmaster, or your most recent copy of this table. If it has only one line for dbid 1, your master database size has not been changed, and you can skip to the next step, LINKEND="X62910""Checking Your Backup Server sysservers Information" 
.If you have increased the size of masterID="IN12425"Master devicerecovery and
, and have user databases on the master device that are not backed up, you have a difficult recovery situation. You should call Technical Support for assistance before you proceed.REMAP="BO--Body"If you have more than one row for dbid 1 in your hardcopy of sysusages, you need to increase the size of master so that you can load the dump. You must duplicate the vstart value for each allocation for master in sysusages. This is easiest to do if you have a copy of sysusages ordered by vstart.REMAP="BO--Body"In the simplest cases, additional allocations to master only require the use of MOREINFO="NONE"alter database. In more complicated situations, you must allocate space for other databases in order to reconstruct the exact vstart values needed to recover master.REMAP="BO--Body"In addition to the master database, tempdb (dbid =2 ) and model (dbid = 3) are located wholly or completely on the master device. In addition, there may be user databases wholly or partially on the device.ID="IN6526"Allocation unitsAllocation unitson master devicemaster deviceRENDERAS="SECT3"Determining Which Allocations Are on the Master DeviceREMAP="BO--Body"To determine which vstart values represent allocations on the master device, look at your hardcopy of the sysdevices table. It shows the low and high values for each device (the rows for tape devices aren't included in this sample):FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig9_a.xwd"REMAP="BO--Body"Page numbers on the master device are between 0 and 8703, so any database allocation with sysusages.vstart values in this range represent allocations on the master device.RENDERAS="SECT3"A Simple Case: Only master AlteredREMAP="BO--Body"Check all rows for master (except the first) in your saved sysusages output. Here is sample sysusages information, ordered by vstart: FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig9_b.xwd"REMAP="BO--Body"In this simple example, the first four rows have vstart values between 0 and 8703. Only dbid 4 is on another device. REMAP="BO--Body"MOREINFO="NONE"buildmaster re-creates the first three rows, so sysusages in your newly-rebuilt master database should match your hardcopy.REMAP="BO--Body"The fourth row shows an additional allocation for master, with vstart = 3588 and size = 1024.REMAP="BO--Body"LINKEND="X98887"Figure 9-1
 shows the storage allocations for the above sysusages data.  FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig9_1.xwd"LBL="Figure 9-1: " ID="X98887"Allocations on a Master DeviceREMAP="BO--Body"In this simple case, you only need to issue an MOREINFO="NONE"alter database command to increase the size of the master database. To determine the size to provide for this command, look at the size column for the second allocation to master. Divide by 512 (use 256 on Stratus).   In this example, the additional row for master indicates an allocation of 1024 data pages, so the correct parameter is 2, the result of 1024/512. REMAP="BO--Body"Use that result for the MOREINFO="NONE"alter databaseID="IN5927"Ò saÓ  loginsa login
 command. Log on to the server as "sa". Remember that MOREINFO="NONE"buildmaster set the password for this account to NULL. Issue the MOREINFO="NONE"alter database command. For the example above, use:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"alter database on master = 2REMAP="BO--Body"Check the size and vstart values for the new row in sysusages.RENDERAS="SECT3"A More Complex AllocationREMAP="BO--Body"Your output from sysusages will have more allocations on the master device if: ID="IN4628"Upgrade, recovery afterMARK="BULL" REMAP="BU--Bullet"Your SQL Server has been upgraded from earlier SQL Server releasesA System Administrator has increased the size of master, model and/or tempdb on the master device.A user database has been created or altered on the master device.REMAP="BO--Body"You must restore these allocations up to the last row for the master database, dbid 1. Here is an example of sysusages showing additional allocations on the master device, in order by vstart:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig9_c.xwd"REMAP="BO--Body"This copy of sysusages shows the following allocations on the master device, (excluding the three created by MOREINFO="NONE"buildmaster):MARK="BULL" REMAP="BU--Bullet"One for master, dbid = 1, size = 512, vstart = 3588One for a user database, dbid = 5, size = 1024, vstart = 4100 (consult your hardcopy sysdatabases to find the name of this database)One for tempdb, dbid = 2, size = 1024, vstart = 5124Another allocation for master, dbid = 1, size = 512, vstart = 6148REMAP="BO--Body"The final allocation in this output is not on the master device.REMAP="BO--Body"LINKEND="X10068"Figure 9-2
 shows the allocations on the master device.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig9_2.xwd"LBL="Figure 9-2: " ID="X10068"Complex Allocations on a Master DeviceREMAP="BO--Body"You need to issue a set of MOREINFO="NONE"alter database and MOREINFO="NONE"create database commands to recreate all of the allocations. If your sysusages table lists additional allocations on the master device after the last allocation for master, note that you do not have to recreate them. REMAP="BO--Body"To determine the size for the MOREINFO="NONE"create database and MOREINFO="NONE"alter database commands, divide the value shown in the size column of the sysusages output by 512 (256 on Stratus). To reconstruct the allocation, issue these commands, in this order:REMAP="BO--Body"To restore the first allocation to master, dbid 1, size = 512:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"alter database master on default = 1REMAP="BO--Body"To create a user database, dbid 5, size = 1024:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"create database userdb on default = 2REMAP="BO--Body"To allocate more space to tempdb, dbid 2, size = 1024:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"alter database tempdb on default = 2REMAP="BO--Body"To add the final allocation to master, dbid 1, size = 512:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"alter databse master on default = 1REMAP="BO--Body"You only need to restore all allocations up to and including the last line for the master device. When you load the backup of master, this table is completely restored from the dump.This set of steps will wipe out the data in the user database. on the master device. If it has not been backed up since it was last changed, do not proceed. Technical Support may be able to recover for you.REMAP="BO--Body"At this point, carefully check the current sysusages values with the values in your hardcopy:MARK="BULL" REMAP="BU--Bullet"If all of the vstart values for master match, proceed to the next step.If the values do not match, an attempt to load the master database will almost certainly fail. Shut down the server, and begin again by running MOREINFO="NONE"buildmaster. See LINKEND="X48229""Building a New master Database" REMAP="BO--Body"If your sysusages values look correct, proceed to the next step.ID="IN2529"Networksrestoring across
ID="IN2630"Backup Servernetwork nameID="X62910" RENDERAS="SECT2"Checking Your Backup Server sysservers InformationREMAP="BO--Body"Log on to the server as "sa", using the NULL password.REMAP="BO--Body"If the network name of your Backup Server is not SYB_BACKUP, you must update sysservers so that your SQL Server can communicate with its Backup Server. Check the Backup Server name in your interfaces file, and issue this command on SQL Server:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * from sysserverswhere srvname = "SYB_BACKUP"REMAP="BO--Body"Check the srvnetname in the output from this command. If it matches the interfaces file entry for the Backup Server for your server, skip to the next step. REMAP="BO--Body"If the srvnetname reported by this command is not the same as the name of your Backup Server in the interfaces file, you must update sysservers.The example below changes the Backup Server's network name to PRODUCTION_BSRV:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"begin transactionREMAP="UI--UserInput" FORMAT="LINESPECIFIC"update sysserversset srvnetname = "PRODUCTION_BSRV"where srvname = "SYB_BACKUP"REMAP="BO--Body"Execute this command, and check to see that it modified only one row. Issue the MOREINFO="NONE"select command again, and check to be sure that the correct row was modified, and that it contains the correct value. If the MOREINFO="NONE"update command modified more than one row, or if it modified the wrong row, issue a MOREINFO="NONE"rollback transaction command, and attempt the update again.REMAP="BO--Body"If the command correctly modified the Backup Server's row, issue a MOREINFO="NONE"commit transaction command.ID="IN6131"showserver utility command
ID="IN7332"Backup Serverchecking with showserverRENDERAS="SECT2"Checking for a Running Backup ServerREMAP="BO--Body"Use the MOREINFO="NONE"showserver command from your operating system to verify that your Backup Server is running, and restart your Backup Server if necessary. See MOREINFO="NONE"showserver and MOREINFO="NONE"startserver in the SQL Server Utility Programs manual for your operating system. RENDERAS="SECT2"Loading a Backup of master ID="IN14933"load database commandload database commandfor master databasemaster databaseREMAP="BO--Body"Load the most recent backup of the MOREINFO="NONE"master database with MOREINFO="NONE"load database. Here are examples of the load commands: REMAP="BO--Body"On UNIX platforms:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database master from "/dev/nrmt4"REMAP="BO--Body"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database master from "MTA0:"REMAP="BO--Body"See LINKEND="X32898"Chapter 8,  "Backing Up and Restoring User Databases"
 for information on command syntax. See the System Administration Guide Supplement for PC platform examples.REMAP="BO--Body"After the MOREINFO="NONE"load database command completes successfully, SQL Server automatically shuts itself down. Watch for any error messages during the load, and during the shutdown.ID="IN8234"startserver utility commandmaster-recover modeRENDERAS="SECT2"Restarting SQL Server in Master-Recover ModeREMAP="BO--Body"Use MOREINFO="NONE"startserver to restart SQL Server in master-recover mode. Watch for error messages during recovery.REMAP="BO--Body"Check the sysusages, sysdatabases and sysdevices tables in your recovered server against your hardcopy. Look especially for these problems:MARK="BULL" REMAP="BU--Bullet"If there are devices in your hardcopy that are not included in the restored sysdevices, then you have added devices since your last backup, and you must run MOREINFO="NONE"disk reinit and MOREINFO="NONE"disk refit.If there are databases listed in your hardcopy that are not listed in your restored sysdatabases table, you have added a database since the last time you backed up master. You must run MOREINFO="NONE"disk refit.REMAP="BO--Body"Loading the backup of master restores the "sa" account to its previous state. It restores the password on the "sa" account, if any. If you used MOREINFO="NONE"sp_lockloginID="IN5935"Ò saÓ  loginsa login
 to lock this account before the backup was made, the "sa" account will now be locked. Perform the rest of these steps using an account with the System Administrator role.ID="X22579" RENDERAS="SECT2"Re-Adding Database Devices ID="IN2936"Database devicesrecovery andREMAP="BO--Body"If you have added any database devices since the last dump-that is, if you have issued a MOREINFO="NONE"disk initID="IN6537"disk reinit command
 command-you must add each new device to sysdevices with the MOREINFO="NONE"disk reinit command. If you save scripts from your original MOREINFO="NONE"disk init commands, use them to determine the parameters for the MOREINFO="NONE"disk reinit command. If the size you provide is too small, you may corrupt your database.REMAP="BO--Body"If you do not save your MOREINFO="NONE"disk init scripts, look at your most recent hardcopy of sysdevices to determine the correct parameters for MOREINFO="NONE"disk reinit. TOCENTRY="1"LBL="Table 9-2: "Using sysdevices to Determine disk reinit ParametersCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="12*"COLNAME="C2" COLWIDTH="9*"COLNAME="C3" COLWIDTH="20*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"disk reinit parameterCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysdevices dataCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NotesVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"nameCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Use the same name, especially if you 
have any scripts which create or 
alter databases, or add segments.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"physnameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"phynameCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Must be full path to device.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"vdevnoCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"low/16777216COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Not necessary to use the same value 
for vdevno, but you must be sure to 
use a value not already in use.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sizeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"(high-low) +1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Extremely important to provide 
correct size information.REMAP="BO--Body"If you store your sybsystemprocs database on a separate physical device, be sure to include a MOREINFO="NONE"disk reinit command for sybsystemprocs if it is not listed in sysdevices at this point.REMAP="BO--Body"After running MOREINFO="NONE"disk reinit, compare your sysdevices table to the copy you made before running MOREINFO="NONE"buildmaster.REMAP="BO--Body"MOREINFO="NONE"disk reinit can only be run from the master database, and only by a System Administrator. Permission cannot be transferred to other users. Its syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"disk reinit   name = "MOREINFO="NONE"device_name",   physname = "MOREINFO="NONE"physical_name",   vdevno = MOREINFO="NONE"virtual_device_number,   size = MOREINFO="NONE"number_of_blocks   [, vstart = MOREINFO="NONE"virtual_address,   cntrltype = MOREINFO="NONE"controller_number]REMAP="BO--Body"For more on MOREINFO="NONE"disk reinit, see the discussion of MOREINFO="NONE"disk init in LINKEND="X45883"Chapter 3,  "Managing Physical Resources"
, or Volume 1 of the SQL Server  Reference  Manual.ID="IN11338"sysusages tabledisk refit andID="X81004" RENDERAS="SECT2"Rebuilding sysusages and ID="IN11639"sysdatabases tabledisk refit and
sysdatabaseREMAP="BO--Body"If you have added database devices or created or altered databases since the last database dump, use MOREINFO="NONE"disk refit to rebuild the MOREINFO="NONE"sysusages and sysdatabases tables.REMAP="BO--Body"MOREINFO="NONE"disk refit can be run only from the masterID="IN11440"sysdatabases tabledisk refit and
ID="IN11141"sysusages tabledisk refit and
 database and only by a System Administrator. Permission cannot be transferred to other users. Its syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"disk refit Providing inaccurate information in the MOREINFO="NONE"disk reinit command may lead to permanent corruption when you update your data! Be sure to check your SQL Server with MOREINFO="NONE"dbcc after running MOREINFO="NONE"disk refit.RENDERAS="SECT2"Checking SQL Server   REMAP="BO--Body"Check SQL Server carefully: NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Compare your hard copy of MOREINFO="NONE"sysusages with the new on-line version. Compare your hard copy of sysdatabases with the new on-line version.Run MOREINFO="NONE"dbcc MOREINFO="NONE"checkalloc on each database. Examine important tables in each database. ID="IN6642"sysusages tablediscrepancies inIf you find discrepancies in sysusages, call Technical Support for help.REMAP="BO--Body"If you find other problems, rerun MOREINFO="NONE"disk reinit andMOREINFO="NONE" disk refitID="INA7643"disk refit command
 and check your SQL Server again. RENDERAS="SECT2"Restoring modelREMAP="BO--Body"If you are restoring only the master database, you can skip this step.REMAP="BO--Body"If you are restoring the entire master device, you must also restore model:MARK="BULL" REMAP="BU--Bullet"Load your backup of model, if you keep a backup.If you do not have a backup:ID="IN11044"installmodel scriptMARK="DASH" REMAP="BS--BulletSub"Run the MOREINFO="NONE"installmodel script:On UNIX platforms:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"cd $SYBASE/scriptssetenv DSQUERY server_nameisql -Usa -Ppassword -Sserver_name < installmodelOn OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"set default sybase_system:[sybase.scripts]define dsquery server_nameisql/user="sa"/password="password" /input=installmodelRe-do any changes you have made to model.REMAP="BO--Body"For PC platform examples, refer to the System Administration Guide Supplement.RENDERAS="SECT2"Loading User DatabasesREMAP="BO--Body"If you had user databases stored on the master device, and had to issue MOREINFO="NONE"create database commands during the previous steps, reload your user databases with your usual load commands. ID="IN4445"User IDscomparing after backup and recoveryRENDERAS="SECT2"Restoring Server User IDsREMAP="BO--Body"Check your hardcopy of syslogins and your restored syslogins table. Look especially for the following:ID="IN6946"Usersadded, and recovery of masterMARK="BULL" REMAP="BU--Bullet"If you have added server logins since the last backup of masterID="IN8847"sp_addlogin system procedurereissuing after recovery
, reissue the MOREINFO="NONE"sp_addlogin commands.ID="IN8048"Recovery of master databasedropped users and 
ID="IN7149"Usersdropped, and recovery of master
ID="INA8950"sp_droplogin system procedurereissuing after recoveryIf you have dropped server logins, reissue the MOREINFO="NONE"sp_droplogin commands.ID="IN8951"sp_locklogin system procedurereissuing after recoveryIf you have locked server accounts, reissue the MOREINFO="NONE"sp_locklogin commands.There may be other differences due to use of the MOREINFO="NONE"sp_modifylogin procedure, by users or by System Administrators.REMAP="BO--Body"It is very important to ensure that users receive the same suid. Mismatched suid ID="INA6252"Permissionsmismatched suids
values in databases can lead to permission problems, and users may not be able to access tables or run commands.REMAP="BO--Body"An effective technique for checking existing suid values is to perform a MOREINFO="NONE"union on the sysusers tables in your user databases. You can include master in this procedure, if users have permission to use master. REMAP="BO--Body"For example:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select suid, name from master..sysusersunionselect suid, name from sales..sysusersunionselect suid, name from parts..sysusersunion select suid, name from accounting..sysusersREMAP="BO--Body"If your resulting list shows skipped suid values in the range where you need to redo the logins, you must add placeholders for the skipped values, and then drop them with MOREINFO="NONE"sp_droplogin, or lock them with MOREINFO="NONE"sp_locklogin.RENDERAS="SECT2"Restarting SQL ServerREMAP="BO--Body"Once you have finished restoring the master database, use the MOREINFO="NONE"shutdown command to shut down SQL Server. Then useMOREINFO="NONE" startserver to restart in multi-user mode. ID="IN8453"Recovery of master database
ID="IN7854"Recovery of master databasebacking up afterRENDERAS="SECT2"Backing Up masterREMAP="BO--Body"When you have completely restored the master database and have run full MOREINFO="NONE"dbcc integrity checks, back up the database using your usual dump commands.ID="IN7155"Recoverymodel database
ID="IN7256"model databaserestoringRENDERAS="SECT1"Recovering the model DatabaseREMAP="BO--Body"This section describes recovery of the model database when only the model database needed to be restored. It includes instructions for these scenarios:MARK="BULL" REMAP="BU--Bullet"You have not made any changes to model, so you only need to restore the generic model database.You have changed model, and have a backup.You have changed model, and do not have a backup.RENDERAS="SECT2"Restoring the Generic model DatabaseREMAP="BO--Body"MOREINFO="NONE"buildmaster can restore the model database without affecting master. You must always shut down the server before using MOREINFO="NONE"buildmaster.Be sure to shut down SQL Server before running buildmaster.REMAP="BO--Body"On UNIX platforms:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"buildmaster -d /devname -xREMAP="BO--Body"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"buildmaster /disk = physicalname /modelREMAP="BO--Body"For PC platform examples, refer to the System Administration Guide Supplement.RENDERAS="SECT2"Restoring model from a BackupREMAP="BO--Body"If you can issue the MOREINFO="NONE"use model command successfully, you can restore your model ID="IN14757"load database commandload database commandfor model databasemodel database
database from a backup with the MOREINFO="NONE"load database command.REMAP="BO--Body"If you cannot use the database:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Follow the instructions above for using MOREINFO="NONE"buildmaster to restore the model database.If you have changed the size of model, re-issue the MOREINFO="NONE"alter database commands.Load the backup with MOREINFO="NONE"load database.RENDERAS="SECT2"Restoring model with No BackupREMAP="BO--Body"If you have changed your model database and do not have a backup, you should:MARK="BULL" REMAP="BU--Bullet"Follow the steps above for restoring a generic model database.Re-issue all of the commands you issued to change modelID="IN7058"model databaserestoring
.ID="IN6959"Recoverymodel database
ID="IN8160"sybsystemprocs databaserestoring
ID="IN8061"Recoverysybsystemprocs databaseRENDERAS="SECT1"Recovering the sybsystemprocs DatabaseREMAP="BO--Body"The sybsystemprocs database stores the system procedures that are used to modify and report on system tables. If your routine MOREINFO="NONE"dbcc checks on this database report damage, and you do not keep a backup of this database, you can restore it using MOREINFO="NONE"installmaster. If you do keep backups of sybsystemprocs, you can restore it with MOREINFO="NONE"load database.RENDERAS="SECT2"Restoring sybsystemprocsID="IN11262"installmaster script
 with installmasterNUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Check to see what logical device currently stores the database. If you can still use MOREINFO="NONE"sp_helpdb, issue this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpdb sybsystemprocsREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"name                db_size       owner            dbid        created        status------------------- ------------- ---------------- ------sybsystemprocs            10.0 MB sa                    4        Aug 07, 1993        trunc log on chkpt device_fragments   size        usage            free kbytes------------------ ----------- ---------------- -----------sprocdev           10.0 MB     data and log            3120REMAP="UN--Under"The device_fragments column indicates that the database is stored on sprocdev. REMAP="UN--Under"If you cannot use MOREINFO="NONE"sp_helpdb, this query reports the devices used by the database, and the amount of space on each device:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select sysdevices.name, sysusages.size / 512from sysdevices, sysdatabases, sysusageswhere sysdatabases.name = "sybsystemprocs"  and sysdatabases.dbid = sysusages.dbid  and sysdevices.low <= sysusages.size + vstart  and sysdevices.high >= sysusages.size + vstart -1REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"name             ---------------- -------sprocdev              10REMAP="UN--Under"On Stratus, use "256" instead of "512" on the first line in the query above.Drop the database:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"drop database sybsystemprocsREMAP="UN--Under"If the physical disk is damaged, use MOREINFO="NONE"sp_dropdevice to drop the deviceMOREINFO="NONE". If necessary, use MOREINFO="NONE"disk init to initialize a new database device. See LINKEND="X45883"Chapter 3,  "Managing Physical Resources"
, for more information on MOREINFO="NONE"disk init Re-create the sybsystemprocs database on the device, using the size returned by the query above:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"create database sybsystemprocs    on sprocdev = 10Run the MOREINFO="NONE"installmaster script.REMAP="UN--Under"On UNIX platforms:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"cd $SYBASE/scriptssetenv DSQUERY server_nameisql -Usa -Ppassword -Sserver_name < installmasterREMAP="UN--Under"On OpenVMS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"set default sybase_system:[sybase.scripts]define dsquery server_nameisql/user="sa"/password="password"     /input=installmasterREMAP="UN--Under"For PC platform examples, refer to the System Administration Guide Supplement.If you have made any changes to permissions in sybsystemprocs, or if you have added your own procedures to the database, you must re-do the changes.RENDERAS="SECT2"Restoring sybsystemprocs with load databaseREMAP="BO--Body"If you write system procedures and store them in the sybsystemprocs database, you have two ways to recover them if the database is damaged:MARK="BULL" REMAP="BU--Bullet"Restore the database from MOREINFO="NONE"installmasterMOREINFO="NONE", as described above, and then re-create the procedures by re-issuing the MOREINFO="NONE"create procedure commands.ID="IN16563"load database commandload database commandfor sybsystemprocs databasesybsystemprocs databaseKeep backups of the database, and load them with MOREINFO="NONE"load databaseREMAP="BO--Body"If you choose to keep a backup of the database, you should insure that the complete backup fits on one tape volume, or that you have more than one SQL Server able to communicate with your Backup Server. If a dump spans more than one tape volume, you issue the change-of-volume command using system procedure, MOREINFO="NONE"sp_volchanged, which is stored in sybsystemprocs. You can't issue that command in the middle of recovering this database.REMAP="BO--Body"Here are sample load commands:REMAP="BO--Body"On UNIX:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database sybsystemprocs from "/dev/nrmt4"REMAP="BO--Body"On OpenVMS:ID="IN7964"sybsystemprocs databaserestoring
ID="IN7865"Recoverysybsystemprocs databaseREMAP="UI--UserInput" FORMAT="LINESPECIFIC"load database sybsytemprocs from "MTA0:"REMAP="BO--Body"For PC platform examples, refer to the System Administration Guide SupplementID="IN3066"Backups
.REMAP="BO--Body"NUMBER="10" ID="X63254"Managing Free Space with ThresholdsRENDERAS="SECT1"IntroductionID="IN781"ThresholdsREMAP="BO--Body"When you create or alter a database, you allocate a finite amount of space for its data and log segments. As you create objects and insert data, the amount of free space in the database decreases.REMAP="BO--Body"This chapter is part of a four-chapter unit on backup and recovery. It explains how to use thresholds to monitor the amount of free space in a database segment. It describes the last-chance threshold
, which helps ensure that you have enough space to dump the transaction log, and explains how to use additional thresholds to detect space shortages. It also provides guidelines for creating threshold procedures.TOCENTRY="1"LBL="Table 10-1: "Further Information About Backup and RecoveryCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="10*"COLNAME="C2" COLWIDTH="9*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"For more information aboutCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SeeVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Backup and recovery issues to 
address before productionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LINKEND="X31864"Chapter 7,  "Developing a Backup 
and Recovery Plan"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump, load, and sp_volchanged syntaxCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LINKEND="X32898"Chapter 8,  "Backing Up and 
Restoring User Databases"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Backing up and restoring the system 
databasesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LINKEND="X40994"Chapter 9,  "Backing Up and 
Restoring the System Databases"ID="IN1832"Thresholdslast-chanceRENDERAS="SECT1"Monitoring Free Space with the Last-Chance ThresholdREMAP="BO--Body"A threshold always has a stored procedure associated with it, and the threshold acts like a trip-wire. When free space on the segment falls below the amount specified by the threshold, SQL Server executes the stored procedure. REMAP="BO--Body"Each database that stores its transaction log on a separate segment has a last-chance threshold. The threshold is an estimate of the number of free log pages that would be required to back up the transaction log. SQL Server automatically adjusts the last-chance threshold as you allocate more space to the log segment.ID="IN703"sp_thresholdaction system procedureREMAP="BO--Body"When the amount of free space in the log segment falls below the last-chance threshold, SQL Server automatically executes a special stored procedure called MOREINFO="NONE"sp_thresholdaction. (You can specify a different last-chance threshold procedure with MOREINFO="NONE"sp_modifythreshold.) REMAP="BO--Body"LINKEND="X93748"Figure 10-1
 illustrates a log segment with a last-chance threshold. The shaded area represents log space that has already been used; the unshaded area, free log space. The last-chance threshold has not yet been crossed:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig10_1.xwd"LBL="Figure 10-1: " ID="X93748"Log Segment with a Last-Chance ThresholdRENDERAS="SECT2"Crossing the ThresholdREMAP="BO--Body"As users execute transactions, the amount of free log space decreases. When the amount of free space crosses the last-chance threshold, SQL Server automatically executes MOREINFO="NONE"sp_thresholdaction: FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig10_2.xwd"LBL="Figure 10-2: " ID="X46627"Executing sp_thresholdaction when the Last-chance Threshold is ReachedRENDERAS="SECT2"Controlling How Often sp_thresholdaction Executes ID="IN1704"Thresholdshysteresis valueREMAP="BO--Body"SQL Server uses a "hysteresis value", the global variable
  @@thresh_hysteresis, to control how sensitive thresholds are to variations in free space. Once a threshold executes its procedure, it is deactivated. The threshold remains inactive until the amount of free space in the segment rises @@thresh_hysteresis pages above the threshold. This prevents thresholds from executing their procedures repeatedly in response to minor fluctuations in free space.REMAP="BO--Body"When the threshold in LINKEND="X46627"Figure 10-2
 executes MOREINFO="NONE"sp_thresholdaction, it is deactivated. In LINKEND="X38205"Figure 10-3
, the threshold is reactivated when the amount of free space increases by @@thresh_hysteresis pages:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig10_3.xwd"LBL="Figure 10-3: " ID="X38205"Free Space must Rise by @@thresh_hysteresis to Reactivate ThresholdRENDERAS="SECT1"Choosing Whether to Abort or Suspend ProcessesREMAP="BO--Body"By design, the last-chance threshold allows enough free log space to record a MOREINFO="NONE"dump transactionID="IN525"Processes (Server tasks)suspending when log is full
 command. There may not be enough room to record additional user transactions against the database.REMAP="BO--Body"When the last-chance threshold is crossed, SQL Server suspends user processes and displays the message:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC" Space available in the log segment has fallen critically low in database 'mydb'. All future modifications to this database will be suspended until the log is successfully dumped and space becomes available.REMAP="BO--Body"Only commands that are not recorded in the transaction log (MOREINFO="NONE"select, fast MOREINFO="NONE"bcp, MOREINFO="NONE"readtext, and MOREINFO="NONE"writetext) and commands that might be necessary to free additional log space (MOREINFO="NONE"dump transaction, MOREINFO="NONE"dump database, and MOREINFO="NONE"alter database) can be executed.ID="X63476" RENDERAS="SECT2"Aborting ProcessesID="IN1246"Processes (Server tasks)aborting when log is fullREMAP="BO--Body"To abort user processes rather than suspending them, use ID="IN747"Database optionsabort tran on log full
the MOREINFO="NONE"abort tran on log full option of MOREINFO="NONE"sp_dboptionID="IN1378"sp_dboption system procedureabort tran on log full database option
ID="IN789"sp_dboption system procedurethresholds and
 followed by the MOREINFO="NONE"checkpoint commandMOREINFO="NONE". For example, to abort processes in mydb when the last-chance threshold is crossed:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_dboption mydb, "abort tran on log full", trueREMAP="UI--UserInput" FORMAT="LINESPECIFIC"use mydbREMAP="UI--UserInput" FORMAT="LINESPECIFIC"checkpointRENDERAS="SECT1"Waking Suspended ProcessesREMAP="BO--Body"Once the MOREINFO="NONE"dump transaction command frees sufficient log space, suspended processes automatically awaken and complete. If fast MOREINFO="NONE"bcp, MOREINFO="NONE"writetext, or MOREINFO="NONE"select into has resulted in unlogged changes to the database since the last backup, the last-chance threshold procedure cannot execute a MOREINFO="NONE"dump transaction command. When this occurs, make a copy of the database with MOREINFO="NONE"dump database, then truncate the log with MOREINFO="NONE"dump transaction.REMAP="BO--Body"If this does not free enough space to awaken the suspended processes, it may be necessary to increase the size of the transaction log. Use the MOREINFO="NONE"log on option of the MOREINFO="NONE"alter database command to allocate additional log space. ID="IN11110"sp_who system procedureLOG SUSPEND status
ID="IN9911"LOG SUSPEND status, sp_who andREMAP="BO--Body"As a last resort, System Administrators can use the MOREINFO="NONE"sp_whoID="INA3512"Processes (Server tasks)awakening 
 command to determine which processes are suspended and the following statement to awaken sleeping processes:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select lct_admin("unsuspend", db_id)Use the lct_admin function with extreme caution. REMAP="BO--Body"After you issue this command, the transactions continue, and may completely fill up the transaction log. In order to kill suspended processes, first issue the MOREINFO="NONE"kill command, and then execute the command above. See LINKEND="X39060""Killing Processes" 
 for more information.ID="INA9913"CreatingthresholdsRENDERAS="SECT1"Adding, Changing, and Deleting ThresholdsID="IN2514"Thresholdsmaximum numberREMAP="BO--Body"The Database Owner or System Administrator can create additional thresholds to monitor free space on any segment in the database. Each database can have up to 256 thresholds, including the last-chance threshold.REMAP="BO--Body"The MOREINFO="NONE"sp_addthreshold, MOREINFO="NONE"sp_modifythreshold, and MOREINFO="NONE"sp_dropthreshold system procedures allow you to create, change, and delete thresholds. To prevent users from accidentally affecting thresholds in the wrong database, these procedures all require you to specify the name of the current database.RENDERAS="SECT2"ID="IN3115"Information (Server)thresholds
ID="IN2816"Thresholdsinformation about
Displaying Information About Existing ThresholdsID="IN3917"Thresholdsdisplaying information about
ID="IN7718"Thresholdssp_helpthreshold information on
ID="IN7919"sp_helpthreshold system procedureREMAP="BO--Body"Use the system procedure MOREINFO="NONE"sp_helpthreshold for information about all thresholds in a database. Use MOREINFO="NONE"sp_helpthreshold  segment_nameID="IN3120"Segmentslisting thresholds for
 for information about the thresholds on a particular segment.ID="IN7021"Segmentssp_helpthreshold report onREMAP="BO--Body"The following example displays information about the thresholds on the database's default segment. Since "default" is a reserved word, it must be enclosed in quotation marks. The output of shows that there is one threshold on this segment set at 200 pages. The zero in the last chance column indicates that this is not a last-chance threshold:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpthreshold "default"REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"name        free_space  last chance?   proc_name-----       ----------  -----------    --------- default     200         0             space_dataseg (1 row affected)ID="IN9922"ThresholdsaddingRENDERAS="SECT2"Adding a ThresholdREMAP="BO--Body"Use the system procedure MOREINFO="NONE"sp_addthreshold to create new thresholdsMOREINFO="NONE". Its syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_addthreshold database_name, segment_name, free_pages, proc_name REMAP="BO--Body"The database_name must specify the name of the current database. The remaining parameters specify the segment whose free space is being monitored, the size of the threshold in database pages, and the name of a stored procedure. ID="IN7323"Threshold procedurespermissions forREMAP="BO--Body"When the amount of free space on the segment falls below the threshold, an internal SQL Server process executes the associated procedure. This process has the permissions of the user who created the threshold, at the time he or she executed MOREINFO="NONE"sp_addthreshold, less any permissions that have since been revoked. ID="IN3224"Threshold procedureslocation ofREMAP="BO--Body"Thresholds can execute a procedure in the same database, in another user database, in sybsystemprocs or in master. They can also call a remote procedure on an Open Server.MOREINFO="NONE" sp_addthreshold does not verify that the threshold procedure exists at the time you create the threshold. ID="IN11025"ThresholdschangingRENDERAS="SECT2"Changing a ThresholdREMAP="BO--Body"Use the system procedure MOREINFO="NONE"sp_modifythreshold to associate a threshold with a new threshold procedure, free-space value, or segment. MOREINFO="NONE"sp_modifythreshold drops the existing threshold and creates a new one in its place. Its syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_modifythreshold database_name, segment_name,free_pages [, new_procedure [, new_free_pages [, new_segment]]] REMAP="BO--Body"database_name must be the name of the current database. segment_name, and free_pages identify which threshold you want to change. REMAP="BO--Body"For example, to execute a threshold procedure when free space on the segment falls below 175 pages rather than below 200 pages:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_modifythreshold mydb, "default", 200, NULL, 175REMAP="BO--Body"In this example, NULL acts as a placeholder so that new_free_pages falls in the correct place in the parameter list. The name of the threshold procedure is not changed.ID="INA7326"Threshold procedurespermissions forREMAP="BO--Body"The person who modifies the threshold becomes the new threshold owner. When the amount of free space on the segment falls below the threshold, SQL Server executes the threshold procedure with the owner's permissions at the time he or she executed MOREINFO="NONE"sp_modifythreshold, less any permissions that have since been revoked.ID="IN4827"Last-chance thresholdsprocedure, specifying newRENDERAS="SECT2"Specifying a New Last-Chance Threshold ProcedureREMAP="BO--Body"You can use MOREINFO="NONE"sp_modifythreshold to change the name of the procedure associated with the last-chance threshold. You cannot use it to change the amount of free space or the segment name for the last-chance threshold.REMAP="BO--Body"MOREINFO="NONE"sp_modifythreshold requires that you specify the number of free pages associated with the last-chance threshold. UseMOREINFO="NONE" sp_helpthresholdID="IN4728"Last-chance thresholdsnumber of free pages for
 to determine this value.REMAP="BO--Body"The following example displays information about the last-chance threshold, then specifies a new procedure, MOREINFO="NONE"sp_new_thresh_proc, to execute when the threshold is crossed:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpthreshold logsegmentREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"segment name   free pages   last chance?   threshold procedure ------------   ----------   ------------   -------------------logsegment      40                    1   sp_thresholdaction (1 row affected, return status = 0)REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_modifythreshold mydb, logsegment, 40, sp_new_thresh_procRENDERAS="SECT2"ID="IN10829"Thresholdsremoving
Dropping a ThresholdID="IN6830"sp_dropthreshold system procedureREMAP="BO--Body"Use the system procedure MOREINFO="NONE"sp_dropthreshold to remove a free-space threshold from a segment. Its syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_dropthreshold database_name, segment_name, free_pagesREMAP="BO--Body"The database_name must specify the name of the current database. You must specify both the segment name and the number of free pages, since there can be several thresholds on a particular segment. For example:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_dropthreshold mydb, "default", 200RENDERAS="SECT1"Creating an Additional Threshold for the Log SegmentID="IN8831"Thresholdsadding for log segmentREMAP="BO--Body"When the last-chance threshold is crossed, all transactions are aborted or suspended until sufficient log space is freed. In a production environment, this can have a heavy impact on users. Adding a second, correctly placed threshold on your log segment can minimize the chances of crossing the last-chance threshold (and of blocking user transactions). REMAP="BO--Body"The additional threshold should dump the transaction log often enough so that the last-chance threshold is rarely crossed. It should not dump it so often that restoring the database requires the loading of too many tapes.REMAP="BO--Body"This section helps you determine the best place for a second log threshold. It starts by adding a threshold set at 50% of log capacity, and adjusts this threshold based upon space usage at your site.RENDERAS="SECT2"Adding a Log Threshold at 50% of Available SpaceREMAP="BO--Body"Use the following procedure to add a log threshold at 50% of capacity:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Use the following query to determine the log's capacity in pages:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select sum(size)from master..sysusageswhere dbid = db_id("database_name")and (segmap & 4) = 4UseMOREINFO="NONE" sp_addthreshold to add a new threshold at 50% of log capacity. For example, if the log's capacity is 2048 pages, add a threshold at 1024 pages:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addthreshold mydb, logsegment, 1024, thresh_procUse theMOREINFO="NONE" create procedure statement to create a simple threshold procedure that dumps the transaction log to the appropriate devices. (For more information about creating threshold procedures, see the section LINKEND="X90788""Creating Threshold Procedures"
 later in this chapter.)RENDERAS="SECT2"Testing and Adjusting the New ThresholdREMAP="BO--Body"Use the MOREINFO="NONE"dump transaction command to make sure your transaction log is less than 50% full. Then use the following procedure to test the new threshold:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Fill the transaction log by simulating routine user action. Use automated scripts that perform typical transactions at the projected rate. REMAP="UN--Under"When the 50% threshold is crossed, your threshold procedure will dump the transaction log. Since this is not a last-chance threshold, transactions will not be suspended or aborted; the log will continue to grow during the dump.While the dump is in progress, useMOREINFO="NONE" sp_helpsegment to monitor space usage on the log segment. Record the maximum size of the transaction log just before the dump completes.If there was considerable space left in the log when the dump completed, you may not need to dump the transaction log so soon:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig10_4.xwd"LBL="Figure 10-4: "Transaction Log with Additional Threshold at 50%REMAP="UN--Under"Try waiting until only 25% of log space remains: FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig10_5.xwd"LBL="Figure 10-5: "Moving Threshold Leaves Less Free Space after DumpREMAP="UN--Under"Use MOREINFO="NONE"sp_modifythreshold to adjust the free space value to 25% of log capacity. For example:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_modifythreshold mydb, logsegment, 512,     thresh_procDump the transaction log and test the new free space value. If the last chance threshold is crossed before the dump completes, you are not beginning the MOREINFO="NONE"dump transaction soon enough:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig10_6.xwd"LBL="Figure 10-6: "Additional Log Threshold Doesn't Begin Dump Early EnoughREMAP="UN--Under"25% free space is not enough. Try initiating the dump transaction when the log has 37.5% fee space:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig10_7.xwd"LBL="Figure 10-7: "Moving Threshold Leaves Enough Free Space to Complete DumpREMAP="UN--Under"Use MOREINFO="NONE"sp_modifythreshold to change the free-space value to 37.5% of log capacity. For example:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_modifythreshold mydb, logsegment, 768,     thresh_procID="IN8432"Thresholdsadding for log segmentRENDERAS="SECT1"Creating Additional Thresholds on Other Segments ID="IN5433"Data segments, thresholds andREMAP="BO--Body"You can also create thresholds on data segments. For example, you might create a threshold on the default segment used to store tables and indexes. You would also create an associated stored procedure to print messages in your error log when space on the default segment falls below this threshold. If you monitor the error log for these messages, you can add space to the database device when you need it-before your users encounter problems.REMAP="BO--Body"The following example creates a threshold on the default segment of mydb. When the free space on this segment falls below 200 pages, SQL Server executes the procedure space_dataseg:ID="IN6334"Thresholdscreating
ID="IN7935"sp_addthreshold system procedure
ID="INA5936"ThresholdsaddingREMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addthreshold mydb, "default", 200, space_datasegRENDERAS="SECT2"Determining Threshold PlacementID="IN7737"Thresholdsspace between
ID="IN8738"Hysteresis value, @@thresh_hysteresis global variable
ID="IN14239"@@thresh_hysteresis global variable[atatthresh_hysteresis global variable
ID="IN5940"Midpoint between thresholdsREMAP="BO--Body"Each new threshold must be at least 2 times @@thresh_hysteresis pages from the next closest threshold:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig10_8.xwd"LBL="Figure 10-8: "Determining Where to Place a Threshold REMAP="BO--Body"Use this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC" select @@thresh_hysteresis REMAP="BO--Body"to see the hysteresis value for a database.REMAP="BO--Body"In the following example, a segment has a threshold set at 100 pages. The hysteresis value for the database is 64 pages. The next threshold must be at least 100 + (2 * 64), or 228 pages.REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select @@thresh_hysteresisREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"-----------         64REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addthreshold user_log_dev, 228,     sp_thresholdaction ID="IN7341"Thresholdsspace between
ID="IN19442"Threshold procedurescreatingID="X90788" RENDERAS="SECT1"Creating Threshold ProceduresREMAP="BO--Body"Sybase does not supply MOREINFO="NONE"sp_thresholdaction or other threshold procedures. You must create these procedures yourself to ensure that they are tailored to your site's needs. REMAP="BO--Body"Suggested actions for MOREINFO="NONE"sp_thresholdaction include writing to the server's error log and dumping the transaction log to increase the amount of log space. You can also design the threshold procedure to execute remote procedure calls to an Open Server, sending mail to the appropriate individuals when a threshold is crossed. REMAP="BO--Body"This section provides some guidelines for writing threshold procedures. It includes two sample procedures.ID="IN13343"sp_thresholdaction system procedureparameters passed toRENDERAS="SECT2"Declaring Procedure ParametersREMAP="BO--Body"SQL Server passes four parameters to a threshold procedure:MARK="BULL" REMAP="BU--Bullet"@dbname, varchar(30), which contains the database name.@segmentname, varchar(30), which contains the segment name.@space_left, int, which contains the space-left value for the threshold.@status, int, which has a value of 1 for last-chance thresholds and 0 for other thresholds.REMAP="BO--Body"These parameters are passed by position rather than by name. Your procedure can use other names for these parameters, but must declare them in the order shown and with the datatypes shown.ID="IN15944"Error messagesthresholds andRENDERAS="SECT2"Generating Error Log MessagesREMAP="BO--Body"Executing a threshold procedure does not automatically generate any log messages: if your procedure does not contain a MOREINFO="NONE"print or MOREINFO="NONE"raiserror statement, the error log will not contain any record of the threshold event. You should include a MOREINFO="NONE"print statement near the beginning of your procedure to record the database name, segment name, and threshold size in the error log.REMAP="BO--Body"The process that executes threshold procedures is an internal SQL Server process. It does not have an associated user terminal or network connection. If you test your threshold procedures by executing them directly (that is, using MOREINFO="NONE"execute procedure_name) during a terminal session, you see the output from the MOREINFO="NONE"print and MOREINFO="NONE"raiserror messages on your screen. When the same procedures are executed by reaching a threshold, the messages go to the error log. The messages in the log include the date and time.REMAP="BO--Body"For example, if MOREINFO="NONE"sp_thresholdaction includes this statement:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"print "LOG DUMP: log for '%1!' dumped", @dbnameREMAP="BO--Body"SQL Server writes this message to the error log:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"00: 92/09/04 15:44:23.04 server: background task message: LOG DUMP: log for 'pubs2' dumpedID="IN22645"sp_thresholdaction system proceduredumping transaction log
ID="IN4846"Threshold proceduresdumping transaction log andRENDERAS="SECT2"Dumping the Transaction LogREMAP="BO--Body"If your MOREINFO="NONE"sp_thresholdaction procedure includes a MOREINFO="NONE"dump transaction command, SQL Server dumps the log to the devices named in the procedure. The MOREINFO="NONE"dump transaction command truncates the transaction log by removing all pages from the beginning of the log, up to the page just before the page that contains an uncommitted transaction recordID="IN3147"Transaction logsthresholds andREMAP="BO--Body"Once there is enough log space, suspended transactions are awakened. If you abort transactions rather than suspending them, users must resubmit them.REMAP="BO--Body"Generally, dumping to a disk is not recommended, especially to a disk that is on the same machine or the same disk controller as the database disk. However, since threshold-initiated dumps can take place at any time, you may wish to dump to disk and then copy the resulting files to off-line media. (You will have to copy the files back to the disk in order to reload them.) REMAP="BO--Body"Your choice will depend on:MARK="BULL" REMAP="BU--Bullet"Whether you have a dedicated dump device online, loaded and ready to receive dumped dataWhether you have operators available to mount tape volumes during all times when your database is availableThe size of your transaction logYour transaction rateYour regular schedule for dumping databases and transaction logsAvailable disk spaceOther site-specific dump resources and constraintsID="IN15948"sp_thresholdaction system proceduresample procedureRENDERAS="SECT2"A Simple Threshold ProcedureREMAP="BO--Body"Following is a simple procedure that dumps the transaction log and prints a message to the error log. Because this procedure uses a variable (@dbname) for the database name, it can be used for all databases on a SQL Server:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"create procedure sp_thresholdaction    @dbname varchar(30),    @segmentname varchar(30),    @free_space int,    @status intasdump transaction @dbname     to tapedump1print "LOG DUMP: '%1! for '%2!' dumped",         @segmentname, @dbname ID="X75933" RENDERAS="SECT2"A More Complex ProcedureREMAP="BO--Body"The next threshold procedure performs different actions, depending on the value of the parameters passed to it. Its conditional logic allows it to be used with both log and data segments.REMAP="BO--Body"This procedure:MARK="BULL" REMAP="BU--Bullet"Prints a "LOG FULL" message if the procedure was called as the result of reaching the log's last-chance threshold. The status bit is 1 for the last-chance thresholds and 0 for all other thresholds. The test MOREINFO="NONE"if (@status&1) = 1 returns a value of true only for the last-chance threshold.Verifies that the segment name provided is the log segment. The segment ID for the log segment is always 2, even if the name has been changed.Prints "before" and "after" size information on the transaction log. If the log did not shrink significantly, a long-running transaction may be causing the log to fill.Prints the time the transaction log dump started and stopped, helping gather data about dump durations.Prints a message in the error log if the threshold is not on the log segment. The message gives the database name, the segment name and the threshold size, letting you know that the data segment of a database is filling up.REMAP="UIW--UserInputWide" FORMAT="LINESPECIFIC"create procedure sp_thresholdaction     @dbname           varchar(30),     @segmentname      varchar(30),     @space_left       int,     @status           intasdeclare @devname varchar(100),           @before_size int,            @after_size int,           @before_time datetime,           @after_time datetime,           @error int /*** if this is a last-chance threshold, print a LOG FULL msg** @status is 1 for last-chance thresholds,0 for all others*/if (@status&1) = 1begin      print "LOG FULL: database '%1!'", @dbnameend/*** if the segment is the logsegment, dump the log** log segment is always "2" in syssegments*/if @segmentname = (select name from syssegments               where segment = 2)begin     /* get the time and log size      ** just before the dump starts     */       select  @before_time = getdate(),       @before_size = reserved_pgs(id, doampg)      from sysindexes      where sysindexes.name = "syslogs"       print "LOG DUMP: database '%1!', threshold '%2!'",        @dbname, @space_leftREMAP="UIW--UserInputWide" FORMAT="LINESPECIFIC"select @devname = "/backup/" + @dbname + "_" +         convert(char(8), getdate(),4) + "_" +         convert(char(8), getdate(), 8)REMAP="UIW--UserInputWide" FORMAT="LINESPECIFIC"dump transaction @dbname to @devname     /* error checking */    select @error = @@error    if @error != 0    begin           print "LOG DUMP ERROR: %1!", @error      end /* get size of log and time after dump */      select @after_time = getdate(),            @after_size = reserved_pgs(id, doampg)            from sysindexes            where sysindexes.name = "syslogs"            /* print messages to error log */      print "LOG DUMPED TO: device '%1!", @devname      print "LOG DUMP PAGES: Before: '%1!', After '%2!'",            @before_size, @after_size      print "LOG DUMP TIME: %1!, %2!", @before_time, @after_timeend        /* end of 'if segment = 2' section */else       /* this is a data segment, print a message */begin      print "THRESHOLD WARNING: database '%1!', segment '%2!' at '%3!' pages", @dbname, @segmentname, @space_leftendID="IN15549"sp_thresholdaction system proceduresample procedure
ID="IN3250"Threshold procedureslocation ofRENDERAS="SECT2"Deciding Where to Put a Threshold ProcedureID="IN3751"Thresholdsdefining default procedure
ID="IN11852"systhresholds tableREMAP="BO--Body"Although you can create a separate procedure to dump the transaction log for each threshold, it is far easier to create a single threshold procedure that is executed by all of your log segment thresholds. When the amount of free space on a segment falls below a threshold, SQL Server reads the systhresholds table in the affected database for the name of the associated stored procedure. The entry in systhresholds can specify any of the following:ID="IN3753"Remote procedure callsthresholds andMARK="BULL" REMAP="BU--Bullet"A remote procedure call to an Open ServerA procedure name qualified by a database name (for example, sybsystemprocs.dbo.sp_thresholdaction)An unqualified procedure nameREMAP="BO--Body"If the procedure name does not include a database qualifier, SQL Server looks in the database where the shortage of space occurred. If it cannot find the procedure there, and if the procedure name begins with the characters "sp_", SQL Server looks for the procedure in the ID="IN7254"sybsystemprocs databasethresholds and
sybsystemprocs database and then in master database.ID="IN9155"sp_thresholdaction system procedurecreating
ID="INA5456"Last-chance thresholdsprocedure, creating
ID="IN4157"Threshold procedurescreatingREMAP="BO--Body"If SQL Server cannot find the threshold procedure, or cannot execute it, it prints a message in the error log.ID="IN3458"Segmentsfree space accounting and
ID="INA2859"Thresholdsdisabling non-logID="X31617" RENDERAS="SECT1"Disabling Free Space Accounting for Data SegmentsID="IN10960"no free space acctg option, sp_dboptionREMAP="BO--Body"Use the MOREINFO="NONE"no free space acctgID="IN9561"sp_dboption system proceduredisabling free space accounting
 option to MOREINFO="NONE"sp_dboption, followed by theMOREINFO="NONE" checkpoint commandMOREINFO="NONE", ID="IN3762"Performancefree-space accounting and
ID="IN3963"Recoverytime and free space accounting
to disable free space accounting on non-log segments. You cannot disable free-space accounting on the log segment.REMAP="BO--Body"When you disable free space accounting, only the thresholds on your log segment monitor space usage. Crossing thresholds on your data segments will not cause your threshold procedures to be executed. Disabling free space accounting speeds recovery time because free-space counts are not recomputed during recovery for any segment except the log segment. REMAP="BO--Body"The following example turns off free-space accounting for the production database:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_dboption production,     "no free space acctg", trueSystem procedures cannot provide accurate information about space allocation when free-space accounting is disabled.ID="IN15464"Last-chance thresholdscreatingRENDERAS="SECT1"Creating a Last-Chance Threshold for Existing DatabasesREMAP="BO--Body"When you upgrade an existing database, it does not automatically acquire a last-chance threshold. Use theMOREINFO="NONE" lct_admin system function in existing databases to create a last-chance threshold. Its syntax is:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select lct_admin ("lastchance", db_id())Only databases that store their logs on a separate segment can have a last-chance threshold. See LINKEND="X29150""Moving the Transaction Log to Another Device"
 for more information.ID="IN17565"Thresholdslast-chance
ID="IN7466"ThresholdsREMAP="BO--Body"NUMBER="11" ID="X57130"Diagnosing System ProblemsRENDERAS="SECT1"IntroductionREMAP="BO--Body"This chapter discusses diagnosing and fixing system problems. Topics covered include: ID="IN1351"ErrorsErrorsSee also Error logs; Error messages!see also Error logs; Error messages
ID="IN1122"Information messages (Server). See Error messages; Severity levels
ID="IN1093"System problemsSystem problemsSee also Errors!see also ErrorsMARK="BULL" REMAP="BU--Bullet"How SQL Server responds to system errors ID="IN784"Backtracing errors. See Error logsThe SQL Server and Backup Server error logsID="IN915"System messages. See Error messages; MessagesError messages ID="IN816"Levels, severity. See Severity levels
ID="IN897"Mistakes, user. See Errors; Severity levels
ID="IN888"User mistakes. See Errors; Severity levelsTypes of error messages (severity levels) Killing SQL Server processes ID="IN499"System problemsServer responses to
ID="INA4010"ErrorsServer responses toRENDERAS="SECT1"How SQL Server Responds to System ProblemsREMAP="BO--Body"When SQL Server encounters a problem-whether caused by the user or the system-it displays information about the problem, how serious it is, and what you can do to fix it. This information consists of: MARK="BULL" REMAP="BU--Bullet"A message number
, which uniquely identifies the error messageA severity level number between 10 and 24An ID="IN2011"Errorsstate numbers
error state number
, which allows unique identification of the line of SQL Server code at which the error was raisedAn error message, which tells you what the problem is, and which may suggest how to fix itREMAP="BO--Body"For example, here's what happens if you make a typing error and try to access a table that doesn't exist: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * from pulbishers REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Msg 208, Level 16, State 1: Invalid object(table) name pulbishersID="IN1512"ErrorsmultipleREMAP="BO--Body"In some cases, there can be more than one error message for a single query. If there is more than one error in a batch or query, SQL Server usually reports only the first one. Subsequent errors are caught the next time you execute the batch or query.ID="IN5113"sysmessages tableREMAP="BO--Body"The error messages are stored in MOREINFO="NONE"master..sysmessages, which is updated with each new release of SQL Server. Here are the first few rows (from a server with us_english as the default language): REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select error, severity, description from sysmessages where error >=101 and error <=106and langid is nullREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"101 15 Line %d: SQL syntax error.102 15 Incorrect syntax near '%.*s'.103 15 The %S_MSG that starts with '%.*s' is too long. Maximum       length is %d.104 15 Order-by items must appear in the select-list if the       statement contains set operators.105 15 Unclosed quote before the character string '%.*s'.106 16 Too many table names in the query. The maximum allowable       is %d. (6 rows affected)REMAP="BO--Body"You can generate your own list by querying MOREINFO="NONE"sysmessages. Here is some additional information for writing your query:MARK="BULL" REMAP="BU--Bullet"If your server supports more than one language, sysmessages stores each message in each language. The column langid is NULL for us_english and matches the syslanguages.langid for other languages installed on the server. For information about languages on your server, use MOREINFO="NONE"sp_helplanguage.The dlevel column in sysmessages is currently unused.The sqlstate column stores the SQLSTATE value for error conditions and exceptions defined in ANSI SQL `92.Message numbers 17000 and greater are system procedure error messages and message strings.ID="INA4914"Information (Server)error messages
ID="INA5815"Messagessystem
ID="INA2816"Error messagesRENDERAS="SECT2"Error Messages and Message Numbers   ID="IN4917"Error messagesnumbering ofREMAP="BO--Body"The combination message number (error) and the language ID (langid) uniquely identifies each error message. Messages with the same message number, but a different language IDs are translations.REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select error, description, langid from sysmessages where error = 101REMAP="UI--UserInput" FORMAT="LINESPECIFIC"error description                            langid----- -------------------------------------- ------  101 Line %d: SQL syntax error.               NULL  101 Ligne %1!: erreur de syntaxe SQL.           1  101 Zeile %1!: SQL Syntaxfehler.                2 (3 rows affected)REMAP="BO--Body"The error message text is a description of the problem. The descriptions often include a line number, a reference to a kind of database object (a table, column, stored procedure, etc.), or the name of a particular database object. REMAP="BO--Body"In the descriptionID="IN5118"sysmessages table
 field of MOREINFO="NONE"sysmessagesID="IN9319"Percent sign (%)place holder in error message
ID="IN3420"% (percent sign)in error messages
, a percent symbol (%) followed by a character or character string serves as a place holder for these pieces of data, which SQL Server supplies when it encounters the problem and generates the error message. "%d" is a place holder for a number; "%S_MSG" is a place holder for a kind of database object; "%.*s"-all within quotes-is a place holder for the name of a particular database object. LINKEND="X58146"Table 11-1
 lists place holders and what they represent.REMAP="BO--Body"For example, the description field for message number 103 is: REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"The %S_MSG that starts with '%.*s' is too long. Maximum length is %d. REMAP="BO--Body"The actual error message as displayed to a user might be: REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"The column that starts with 'title' is too long. Maximum length is 80. REMAP="BO--Body"For errors that you report, it is important to include the numbers, object types, and object names. (See the section LINKEND="X49338""Reporting Errors" 
.) ID="IN5321"VariablesVariablesin error messageserror messagesRENDERAS="SECT2"Variables in Error Message TextREMAP="BO--Body"The following chart explains the abbreviations that appear in the error message text provided with each error message explanation:TOCENTRY="1"LBL="Table 11-1: " ID="X58146"Error Text Abbreviation KeyCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="11*"COLNAME="C2" COLWIDTH="29*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Symbol COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Stands ForVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"%d,%DCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"a decimal numberCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"%x, %X, %.*x, %lx, 
%04x, %08lxCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"a hexadecimal numberCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"%sCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"a null-terminated stringCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"%.*s, %*s, %*.sCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"a string, usually the name of a particular database objectCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"%S_typeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"a -defined structureCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"%cCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"a single characterCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"%fCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"a floating point numberCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"%ld COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"a long decimalCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"%lfCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"a double floating point numberID="INA1422"Errorslogging
ID="IN1523"Fileserror log
ID="IN2924"Information (Server)problemsRENDERAS="SECT2"Error Logging   ID="INA2225"Serverserror messagesREMAP="BO--Body"Most error messages from SQL Server go only to the user's screen. ID="IN3926"Audit trailbacktrace of error messages
ID="IN3427"Fatal errorsbacktrace from kernel
ID="IN2128"Kernel error messagesREMAP="BO--Body"The backtrace from fatal error messages (severity levels 19 and higher), and error messages from the kernel
 are sent to an error log file. The name of this file varies; see the System Administration Guide Supplement for your platform or the SYBASE Utility Commands manual.ID="IN3329"Error logscreation and ownershipThe error log file is owned by the user who installed SQL Server (or to the person who started the server after an error log was removed). Permissions or ownership problems with the error log at the operating system level can block successful startup of SQL Server. REMAP="BO--Body"SQL Server creates an error log for you if it does not already exist. The location of this log depends on how you start the server:MARK="BULL" REMAP="BU--Bullet"If you use MOREINFO="NONE"startserver and the "runserver" file created by the SQL Server installation process, the MOREINFO="NONE"dataserver command includes a flag that specifies the location of the error log.If you type the MOREINFO="NONE"dataserver command (or MOREINFO="NONE"sqlsrvr for PC platforms) from the operating system, you can include the flag that specifies the location of the errorlog ( MOREINFO="NONE"-e for UNIX and PC platforms; MOREINFO="NONE"/errorfile in OpenVMS).If you do not include the error log flag, the error log is created in the directory where you start SQL Server.ID="IN6930"Restarts, ServerRestarts, Serverfrom same directorysame directoryYou should always restart SQL Server from the same directory, or with the "runserver" file, or the error log flag, so that you can locate your error logs. ID="IN1831"Error logspurgingREMAP="BO--Body"Each time you start a particular server, boot messages in the error log provide information on the success (or failure) of the start and the recovery of each database on the server. Subsequent fatal error messages and all kernel error messages are appended to the error log file. If you need to reduce the size of the error log (throw out old or unneeded messages) you must prune the log while SQL Server is shut down.ID="INA1732"Error logsformatRENDERAS="SECT3"Error Log Format   REMAP="BO--Body"Entries in the error log include the following information: ID="IN4533"Enginesidentification numbersMARK="BULL" REMAP="BU--Bullet"The engine involved for each log entry. The engine number is indicated by a two digit number followed by a colon at the beginning of each line. ID="IN3034"Datesformat in error messagesThe date, displayed in this format: yy/mm/dd, which allows you to sort error messages by date. The time, displayed in 24-hour format. The time format includes seconds and hundredths of a second. The error message itself. REMAP="BO--Body"The following is an example of a line from the error log: REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"00: 94/02/18 13:40:28.13 server: Recovery complete. REMAP="BO--Body"The entry "00:" at the beginning of the line shows that the message was produced by engine number 0. The date is February 18, 1994, and the time is 1:40 p.m., 28 seconds, and 13 hundredths of a second.ID="IN5135"Serverserror message severity levels
ID="IN12436"Information (Server)severity levels
ID="IN4737"Error messagesseverity levels ofRENDERAS="SECT2"Severity Levels   REMAP="BO--Body"The severity level provides information about the kind of problem SQL Server has encountered. For maximum integrity, when SQL Server responds to error conditions it displays messages from MOREINFO="NONE"sysmessages but takes action according to an internal table. Because a few corresponding messages differ in severity levels, occasionally you may notice a difference in expected behavior if you are developing applications or procedures that refer to SQL Server messages and severity levels. ID="IN3638"Error messagescreating user-defined
ID="INA3639"Changingsystem messages, dangers of
ID="IN3940"Error messagesaltering Server-providedYou can create your own error numbers and messages based on SQL Server error numbers (say by adding 20,000 to the SQL Server value), but do not alter the SQL Server-supplied system messages in sysmessages. ID="IN3641"Creatinguser-defined error messagesID="IN2142"Messagesuser-definedID="IN2743"Error messagesuser-definedID="IN3644"User databasesuser-defined messagesREMAP="BO--Body"Add user-defined error messages to MOREINFO="NONE"sysusermessages with the stored procedureMOREINFO="NONE" sp_addmessage. See Volume 2 of the SQL Server Reference Manual for more information. ID="IN8945"isql utility commandstatus and informational messagesREMAP="BO--Body"In MOREINFO="NONE"isqlID="IN2346"Data Workbench messages
ID="IN5847"Open Client DB-Library applicationsinformational messages
ID="IN4548"Information (Server)Open Client applications
ID="IN4049"Client (DB-Library) application messages
 and Data Workbench, severity level 10 ("status" or "informational") messages do not display their message number or severity level. In Open Client   applications, SQL Server returns "0" for severity level 10.ID="IN1150"Errorsuser
ID="IN2751"User errorsREMAP="BO--Body"Severity levels through 16 indicate problems caused by mistakes in what users have entered. REMAP="BO--Body"Severity levels over 16 indicate software or hardware errors. If the number is 17 or 18, you'll be able to continue the work you're doing (though you may not be able to execute a particular command). ID="IN11152"ErrorsfatalREMAP="BO--Body"Problems with severity levels 19 or over are system problems. They are fatal errors, which means that the process (the program code that is running in order to accomplish the task that you specified in your command) is no longer running. The process freezes its state before it stops, recording information about what was happening. It is then killed and disappears. REMAP="BO--Body"These errors break the user's connection to SQL Server. Depending on the problem, a user may or may not be able to reconnect and resume working. Some problems with severity levels in this range affect only one user and one process. Others affect all the processes in the database. In some cases, it will be necessary to restart SQL Server. These problems don't necessarily damage a database or its objects, but they can. They may also result from earlier damage to a database or its objects. Still other problems are caused by hardware malfunctions. ID="INA3453"Fatal errorsbacktrace from kernel
ID="IN3954"Audit trailbacktrace of error messages
ID="IN2155"Kernel error messages
ID="IN1056"Error logsREMAP="BO--Body"A backtrace of fatal error messages from the kernel is directed to the error log file, where the System Administrator can review it. ID="IN9357"System Administratorerror responsibilities ofREMAP="BO--Body"Users should be instructed to inform the System Administrator whenever problems that generate severity levels of 17 and over occur. The System Administrator is responsible for resolving them and tracking their frequency. The System Administrator should monitor all problems that generate severity levels of 17 through 24. ID="IN9058"dbcc (Database Consistency Checker)database damage andREMAP="BO--Body"If the problem has affected an entire database, the System Administrator may have to use the Database Consistency Checker (MOREINFO="NONE"dbcc) to determine the extent of the damage. The MOREINFO="NONE"dbcc may identify some objects that have to be removed. It can repair some damage, but the database may also have to be reloaded. MOREINFO="NONE"dbcc is discussed in more detail in LINKEND="X97415"Chapter 6,  "Checking Database Consistency"
. Loading a user database is discussed in LINKEND="X32898"Chapter 8,  "Backing Up and Restoring User Databases"
; loading system databases is discussed in LINKEND="X40994"Chapter 9,  "Backing Up and Restoring the System Databases"
. ID="IN10559"ErrorsfatalREMAP="BO--Body"The next subsections discuss each severity level. ID="IN5060"System problemsseverity level 10-18RENDERAS="SECT2"Levels 10 Through 18   ID="IN8161"ErrorsuserREMAP="BO--Body"Error messages with severity levels 10 through 16 are generated by problems caused by user errors, and can always be corrected by the user. Severity levels 17 and 18 do not terminate the user's session. ID="IN1662"Reporting errors
ID="IN4163"Database Ownerserror responsibilities ofREMAP="BO--Body"Error messages with severity levels 17 or higher should be reported to the System Administrator or Database Owner. ID="IN8664"Information (Server)status (Severity level 10)RENDERAS="SECT3"Level 10: Status Information   REMAP="BO--Body"Messages with severity level 10 are not errors at all. They provide additional information after certain commands have been executed and typically do not display the message number or severity level. For example, after a MOREINFO="NONE"create database command has run, SQL Server displays a message telling the user how much space has actually been allocated for the new database. RENDERAS="SECT3"Level 11: Specified Database Object Not Found   ID="IN4965"Database objectsfindingREMAP="BO--Body"Messages with severity level 11 indicate that SQL Server can't find an object referenced in the command. ID="IN4866"Namingdatabase object
ID="IN1667"Current databaseREMAP="BO--Body"This is often because the user has made a mistake in typing the name of a database object, because the user did not specify the object owner's name, or because of confusion about which database is current. Check spelling of object names, use owner names if the object is not owned by you or "dbo", and make sure you're in the correct database. RENDERAS="SECT3"Level 12: Wrong Datatype Encountered   REMAP="BO--Body"Messages with severity level 12 indicate a problem with datatypes. For example, the user may have tried to enter a value of the wrong datatype
 into a column, or to compare columns of different (and incompatible) datatypes. ID="INA2868"Comparisondatatype problemsREMAP="BO--Body"To correct comparison problems, use the MOREINFO="NONE"convert function with MOREINFO="NONE"select. For information on MOREINFO="NONE"convert, see the Volume 1 of the SQL Server Reference
 Manual
 or the Transact-SQL User's Guide
. ID="IN3869"Serverssyntax errors
ID="IN2970"Transactionserror (Level 13)RENDERAS="SECT3"Level 13: User Transaction Syntax Error   REMAP="BO--Body"Messages with severity level 13 indicate that something is wrong with the current user-defined transaction. For example, you may have issued a MOREINFO="NONE"commit MOREINFO="NONE"transaction command without having issued a MOREINFO="NONE"begin transactionID="IN2771"Savepointserror (Level 13)
, or you may have tried to roll a transaction back to a savepoint that has not been defined (sometimes there may be a typing or spelling mistake in the name of the savepoint). ID="IN972"DeadlocksREMAP="BO--Body"Severity level 13 can also indicate a deadlock
, in which case the deadlock victim's process is rolled back. The user must restart his or her command. ID="IN2373"Insufficient permissionRENDERAS="SECT3"Level 14: Insufficient Permission to Execute Command   ID="INA5574"PermissionsdenyingREMAP="BO--Body"Messages with severity level 14 mean you don't have the permission necessary to execute the command or access the database object. You can ask the owner of the database object, the owner of the database, or the System Administrator to grant you permission to use the command or object in question. RENDERAS="SECT3"Level 15: Syntax Error in SQL Statements   REMAP="BO--Body"ID="IN3875"Serverssyntax errors
Messages with severity level 15 indicate that the user has made a mistake in the syntax of the command. The text of these error messages includes the line numbers on which the mistake occurs, and the specific word near which it occurs. ID="IN2476"Miscellaneous user errorRENDERAS="SECT3"Level 16: Miscellaneous User Error   REMAP="BO--Body"Error messages with severity level 16 reflect that the user has made some kind of non-fatal mistake that doesn't fall into any of the other categories. ID="IN5477"Columnsunqualified names ofREMAP="BO--Body"For example, the user may have tried to update a view in a way that violates the restrictions. Another error that falls into this category is unqualified column names in a command that includes more than one table with that column name. SQL Server has no way to determine which one the user intends. Check command syntax and working database context. ID="IN4678"System Administratorresolving system problems
ID="IN6079"System Administratorerror responsibilities ofThe System Administrator should monitor occurrences of errors with severity levels 17 through 24. Levels 17 and 18 are usually not reported in the error log. Users should be instructed to notify the System Administrator when errors of level 17 and 18 occur.ID="IN3980"Insufficient resource errors (Level 17)RENDERAS="SECT3"Level 17: Insufficient Resources   REMAP="BO--Body"Error messages with severity level 17 mean that the command has caused SQL Server to run out of resources (usually space for the database on the disk) or to exceed some limit set by the System Administrator. REMAP="BO--Body"These system limits include the number of databases that can be open at the same time and the number of connections allowed to SQL Server. They are stored in system tables, and can be checked with the MOREINFO="NONE"sp_configure command. See LINKEND="X26541"Chapter 12,  "Fine-Tuning Performance and Operations"
, for more information on changing configuration variables.ID="IN1681"Reporting errors
ID="IN4182"Database Ownerserror responsibilities of
ID="IN2083"Spacerunning out ofREMAP="BO--Body"The Database Owner can correct level 17 error messages indicating that you have run out of space. Other level 17 error messages should be corrected by the System Administrator. ID="IN4784"Serversnon-fatal internal errors
ID="IN3985"Internal error, non-fatalRENDERAS="SECT3"Level 18: Non-Fatal Internal Error Detected   REMAP="BO--Body"Error messages with severity level 18 indicate some kind of internal software bug. However, the command runs to completion, and the connection to SQL Server is maintained. An example of a situation that generates severity level 18 is SQL Server detecting that a decision about the access path for a particular query has been made without a valid reason. ID="IN4886"System problemsseverity level 10-18
ID="IN7587"Errorsuser
ID="IN3788"Internal error, non-fatal
ID="IN4589"Serversnon-fatal internal errorsREMAP="BO--Body"Since problems that generate such messages don't keep users from their work, they may have a tendency not to report them. Users should be instructed to inform the System Administrator every time an error message with this severity level (and higher levels) occurs, so that the System Administrator can report them.ID="IN8990"Serversfatal errors and
ID="IN9291"All processes, errors affectingRENDERAS="SECT2"Severity Levels 19 Through 24   ID="IN4592"Error messagesfor fatal errors
ID="IN7993"ErrorsfatalREMAP="BO--Body"Fatal problems generate error messages with severity levels 19 and higher. They break the user's connection to SQL Server. To continue working, the user must restart the client program. RENDERAS="SECT3"Level 19: SQL Server Fatal Error in ResourceREMAP="BO--Body"Error messages with severity level 19 indicate that some non-configurable internal limit has been exceeded, and that SQL Server cannot recover gracefully. You must reconnect to SQL Server. See your System Administrator. RENDERAS="SECT3"Level 20: SQL Server Fatal Error in Current ProcessREMAP="BO--Body"Error messages with severity level 20 mean that SQL Server has encountered a bug in some command. The problem has affected only the current process; it is unlikely that the database itself has been damaged. Run MOREINFO="NONE"dbcc diagnostics. You must reconnect to SQL Server. See your System Administrator. RENDERAS="SECT3"Level 21: SQL Server Fatal Error in Database ProcessesREMAP="BO--Body"Error messages with severity level 21 mean that SQL Server has encountered a bug that affects all the processes in the current database. However, it is unlikely that the database itself has been damaged. Restart SQL Server and run the MOREINFO="NONE"dbcc diagnostics. You must reconnect to SQL Server. See your System Administrator. ID="IN6094"Database objectserrors affectingRENDERAS="SECT3"Level 22: SQL Server Fatal Error: Table Integrity SuspectID="IN2695"Tablesintegrity damage to
ID="IN1596"IndexessuspectREMAP="BO--Body"Error messages with severity level 22 mean that the table or index specified in the message has been damaged at some previous time by a software or hardware problem. ID="IN8297"dbcc (Database Consistency Checker)when to use
ID="IN9098"dbcc (Database Consistency Checker)database damage andREMAP="BO--Body"The first step is to restart SQL Server and run MOREINFO="NONE"dbcc to determine if other objects in the database are also damaged. Whatever the report from MOREINFO="NONE"dbccID="IN1599"Procedure cache
, it's possible that the problem is in the cache only, and not on the disk itself. If so, restarting SQL Server will fix the problem. REMAP="BO--Body"If restarting doesn't help, the problem is on the disk as well. Sometimes the problem can be solved by dropping the object specified in the error message. For example, if the message tells you that SQL Server has found a row with length 0 in a nonclustered index, the table owner can drop the index and re-create it. REMAP="BO--Body"You must reconnect to SQL Server. See your System Administrator. ID="IN28100"Databasesintegrity concernsRENDERAS="SECT3"Level 23: SQL Server Fatal Error: Database Integrity SuspectREMAP="BO--Body"Error messages with severity level 23 mean that the integrity of the entire database is suspect due to damage caused at some previous time by a software or hardware problem. Restart SQL Server and run the MOREINFO="NONE"dbcc diagnostics. ID="INA36101"Cachesdata and procedureREMAP="BO--Body"Even when a level 23 error indicates that the whole database is suspect, the damage may be confined to the cache, and the disk itself may be fine. If so, restarting SQL Server with MOREINFO="NONE"startserver will fix the problem. ID="IN85102"System tablescorruptionRENDERAS="SECT3"Level 24: Hardware Error or System Table CorruptionID="IN15103"Hardwareerrors
ID="IN15104"Failures, mediaREMAP="BO--Body"Error messages with severity level 24 reflect some kind of media failure or (in rare cases) the corruption of MOREINFO="NONE"sysusagesID="IN38105"ErrorsServer responses to
ID="IN47106"System problemsServer responses to
ID="IN53107"Error messages
ID="IN27108"Messagessystem
ID="IN45109"Error messagesseverity levels of
ID="IN118110"Information (Server)severity levels
ID="IN49111"Serverserror message severity levels
ID="IN58112"System Administratorerror responsibilities of
ID="IN88113"All processes, errors affecting
ID="IN75114"Errorsfatal
ID="IN43115"Error messagesfor fatal errors
ID="IN85116"Serversfatal errors and
ID="IN47117"Information (Server)error messages
. The System Administrator may have to reload the database. It may be necessary to call your hardware vendor. ID="IN36118"Errorsreporting ofID="X49338" RENDERAS="SECT2"Reporting ErrorsREMAP="BO--Body"When you report an error be sure to include the following information: MARK="BULL" REMAP="BU--Bullet"The message number, level number, and state number. Any numbers, database object types, or database object names that are included in the error message.The context in which the message was generated-which command was running at the time. You can help by providing a hard copy of the backtrace from the error log.ID="IN23119"Backup Servererror logRENDERAS="SECT1"Backup Server Error LoggingREMAP="BO--Body"Like SQL Server, Backup Server creates an error log for you if it does not already exist. The location of this log depends on how you start the server:MARK="BULL" REMAP="BU--Bullet"If you use MOREINFO="NONE"startserver and the "runserver" file created by the installation process, the MOREINFO="NONE"backupserver command includes a flag that specifies the location of the error logIf you type the MOREINFO="NONE"backupserver command from the operating system, you can include the flag that specifies the location of the errorlog (MOREINFO="NONE"-e for UNIX and PC platforms; MOREINFO="NONE"/errorfile in OpenVMS)If you do not include the error log flag, the error log is created in the directory where you start Backup Server.REMAP="BO--Body"Backup Server error message are in the form:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"MMM DD YYY: Backup Server:N.N.N.N: Message TextID="IN28120"Backup Servererror messagesREMAP="BO--Body"Backup Server message numbers consist of 4 integers separated by periods, in the form N.N.N.N. Messages in the form N.N.N are sent by Open Server.REMAP="BO--Body"The four components of a Backup Server error message are major.minor.severity.state. MARK="BULL" REMAP="BU--Bullet"The major component generally indicates the functional area of the Backup Server code where the error occurred:MARK="DASH" REMAP="BS--BulletSub"1 - System errors2 - Open Server event errors.3 - Backup Server remote procedure call errors.4 - I/O service layer errors.5 - Network data transfer errors.6 - Volume handling errors.7 - Option parsing errors.REMAP="UN--Under"Major error categories 1-6 may result from Backup Server internal errors or a variety of system problems. Major errors in category 7 are almost always due to problems in the options you specified to your dump or load command.minor numbers are assigned in order within a major category.severity is one of the following:MARK="DASH" REMAP="BS--BulletSub"1 - Informational, no user action necessary.2, 3 - An unexpected condition, possibly fatal to the session, has occurred. Error may have occurred with any or all of usage, environment or internal logic. 4 - An unexpected condition, fatal to the execution of the Backup Server, has occurred. The Backup Server must exit immediately.state codes have a one-to-one mapping to instances of the error report within the code. If you need to contact Technical Support about Backup Server errors, the state code helps determine the exact cause of the error.ID="IN71121"Processes (Server tasks)ID="X39060" RENDERAS="SECT1"Killing ProcessesID="INA72122"kill commandREMAP="BO--Body"A process is a task being carried out by SQL Server. Processes can be initiated by a user giving a command, or by SQL Server itself. Each process is assigned a unique process identification number when it starts. These ID numbers, and other information about each process, are stored in MOREINFO="NONE"master..sysprocesses. You can see most of the information by running the system procedure MOREINFO="NONE"sp_who.REMAP="BO--Body"The MOREINFO="NONE"kill command gets rid of an ongoing process. The most frequent reason for killing a process is that it interferes with other users and the person responsible for running it isn't available. The process may hold locks that block access to database objects, or there may be many sleeping processes occupying the available user connections. A System Administrator can kill processes that are:MARK="BULL" REMAP="BU--Bullet"Waiting for an alarm, such as a MOREINFO="NONE"waitfor commandWaiting for network sends or receivesWaiting for a lockMost running or runnable processesREMAP="BO--Body"SQL Server allows you to kill processes only if it can cleanly roll back any uncompleted transactions and release all system resources that are used by the process.REMAP="BO--Body"Running MOREINFO="NONE"sp_who on a single-engine server shows the MOREINFO="NONE"sp_who process "running" and all other processes "runnable" or in one of the sleep states. In multi-engine servers, there can be a "running" process for each engine. REMAP="BO--Body"The following table shows the values that MOREINFO="NONE"sp_who reportsMOREINFO="NONE":TOCENTRY="1"LBL="Table 11-2: "Status Values Reported by sp_who COLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="2*"COLNAME="C3" COLWIDTH="2*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StatusCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ConditionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Effects of kill CommandVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"recv sleepCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"waiting on a network readCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"immediateCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"send sleepCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"waiting on a network sendCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"immediateCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"alarm sleepCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"waiting on an alarm, such as 
MOREINFO="NONE"waitfor delay "10:00"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"immediateCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"lock sleepCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"waiting on a lock acquisitionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"immediateCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sleepingCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"waiting disk I/O, or some 
other resource. Probably 
indicates a process that is 
running, but doing 
extensive disk I/OCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"killed when it "wakes up", 
usually immediate; a few 
sleeping processes do not 
wake up, and require a Server 
reboot to clearCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"runnableCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"in the queue of runnable 
processesCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"immediateCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"runningCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"actively running on one on 
the Server enginesCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"immediateCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"infectedCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server has detected serious 
error condition; extremely 
rareCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"kill command not 
recommended. Server reboot 
probably required to clear 
processCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"backgroundCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"a process, such as a 
threshold procedure, run by 
SQL Server rather than by a 
user processCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"immediate; use MOREINFO="NONE"kill with 
extreme care. Recommend a 
careful check of sysprocesses 
before killing a background 
processCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"log suspendCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"processes suspended by 
reaching the last-chance 
threshold on the logCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"killed when it "wakes up": 1) 
when space is freed in the log 
by a MOREINFO="NONE"dump transaction 
command or 2) when an SA 
uses the MOREINFO="NONE"lct_admin function to 
wake up "log suspend" 
processesREMAP="BO--Body"Only a System Administrator can issue the MOREINFO="NONE"kill command: permission to use it cannot be transferred. REMAP="BO--Body"The syntax is: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"kill spidREMAP="BO--Body"You can kill only one process at a time. A MOREINFO="NONE"kill command is not reversible, and cannot be included in a user-defined transaction. spid must be a numeric constant; you cannot use a variable. Here is some sample output from MOREINFO="NONE"sp_who:REMAP="COW--CompOutWide" FORMAT="LINESPECIFIC" spid status    loginame hostname blk dbname cmd   ---- --------  -------- -------- --- ------ --------------    1 recv sleep  bird     jazzy    0   master AWAITING COMMAND    2 sleeping    NULL              0   master NETWORK HANDLER    3 sleeping    NULL              0   master MIRROR HANDLER    4 sleeping    NULL              0   master AUDIT PROCESS    5 sleeping    NULL              0   master CHECKPOINT SLEEP    6 recv sleep  rose     petal    0   master AWAITING COMMAND    7 running     sa       helos    0   master SELECT    8 send sleep  daisy    chain    0   pubs2  SELECT    9 alarm sleep lily     pond     0   master WAITFOR   10 lock sleep  viola    cello    7   pubs2  SELECTREMAP="BO--Body"Processes 2-5 cannot be killed: they are system processes. The login name NULL and the lack of hostname identify them as system processes. You will always see NETWORK HANDLER, MIRROR HANDLER and CHECKPOINT SLEEP (or rarely, CHECKPOINT). AUDIT PROCESS becomes activated if you enable auditing.REMAP="BO--Body"Processes 1, 6, 8, 9 and 10 can be killed, since they have the status values "recv sleep", "send sleep", "alarm sleep" and "lock sleep".REMAP="BO--Body" In MOREINFO="NONE"sp_who output, you cannot tell whether a process whose status is "recv sleep" belongs to a user who is using SQL Server, but may be pausing to examine the results of a command, or whether the process indicates that a user has rebooted a PC or other terminal, and left a stranded process.You can learn more about a questionable process by querying the sysprocesses table for information. For example, this query shows the host process ID and client software used by process 8:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select hostprocess, program_name     from sysprocesseswhere spid = 8REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC" hostprocess program_name      ----------- ---------------- 3993        isql             REMAP="BO--Body"This query, plus the information about the user and host from the MOREINFO="NONE"sp_who results, provides additional information for tracking down the process from the operating system level.RENDERAS="SECT2"Using sp_lock to Examine Blocking ProcessesREMAP="BO--Body"In addition to MOREINFO="NONE"sp_who, described above, the system procedure MOREINFO="NONE"sp_lock can help identify processes that are blocking other processes. If the blk column in the MOREINFO="NONE"sp_who report indicates that another process is blocked waiting to acquire locks, MOREINFO="NONE"sp_lock can display information about the blocking process. For example, process 10 in the MOREINFO="NONE"sp_who output above is blocked by process 7. To see information about process 7, execute:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_lock 7REMAP="BO--Body"For more information about locking in SQL Server, see LINKEND="X71792"Chapter 13,  "Locking"
.ID="IN69123"Processes (Server tasks)
ID="IN70124"kill commandRENDERAS="SECT1"Shutting Down ServersID="IN43125"Serversshutting down
ID="IN65126"shutdown commandREMAP="BO--Body"A System Administrator can shut down SQL Server or a Backup Server with the MOREINFO="NONE"shutdown command. The syntax is:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"shutdown [backup_server_name] [with {wait|nowait}]REMAP="BO--Body"The default for the MOREINFO="NONE"shutdown command is MOREINFO="NONE"with wait, that is, MOREINFO="NONE"shutdown and MOREINFO="NONE"shutdown with wait do exactly the same thing.ID="IN15127"StoppingServerRENDERAS="SECT2"Shutting Down SQL ServerREMAP="BO--Body"If you do not give a server name, MOREINFO="NONE"shutdown shuts down the SQL Server you are using. When you issue a MOREINFO="NONE"shutdown command, SQL Server:MARK="BULL" REMAP="BU--Bullet"Disables logins, except for System AdministratorsPerforms a checkpoint in each database, flushing pages that have changed from memory to diskWaits for currently executing SQL statements or procedures to finishREMAP="BO--Body"This minimizes the amount of work that automatic recovery must do when you restart SQL Server.ID="IN98128"with nowait option, shutdownREMAP="BO--Body"The MOREINFO="NONE"with no_wait option shuts down SQL Server immediately. User processes are aborted, and recovery may take longer after a MOREINFO="NONE"shutdown with nowait. You can help minimize recovery time by issuing a MOREINFO="NONE"checkpoint command before you issue a MOREINFO="NONE"shutdown with nowait command.ID="IN22129"StoppingBackup ServerRENDERAS="SECT2"Shutting Down a Backup ServerID="IN27130"Backup Servershutting downREMAP="BO--Body"To shut down a Backup Server, give the Backup Server's name:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"shutdown SYB_BACKUPREMAP="BO--Body"The default is MOREINFO="NONE"with wait, so any dumps or loads in progress will complete before the Backup Server process halts. Once you issue a MOREINFO="NONE"shutdown command, no new dump or load sessions can be started on the Backup Server.REMAP="BO--Body"To see the names of Backup Servers accessible from your SQL Server, execute MOREINFO="NONE"sp_helpserver. Use the value in the name column in the MOREINFO="NONE"shutdown command. You can only shut down a Backup Server that is:MARK="BULL" REMAP="BU--Bullet"Listed in sysservers on your SQL Server, andListed in your local interfaces file.REMAP="BO--Body"Use MOREINFO="NONE"sp_addserver to add a Backup Server to sysservers.RENDERAS="SECT3"Checking for Active Dumps and LoadsREMAP="BO--Body"To see the activity on your Backup Server before executing a shutdown command, run MOREINFO="NONE"sp_who on the Backup Server:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"SYB_BACKUP...sp_whoREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"spid   status   loginame hostname   blk cmd              ------ -------- -------- ---------- --- ----------------      1 sleeping NULL     NULL       0   CONNECT HANDLER       2 sleeping NULL     NULL       0   DEFERRED HANDLER      3 runnable NULL     NULL       0   SCHEDULER             4 runnable NULL     NULL       0   SITE HANDLER          5 running  sa       heliotrope 0   NULL             RENDERAS="SECT3"Using nowait on a Backup ServerID="IN98131"with nowait option, shutdownREMAP="BO--Body"The MOREINFO="NONE"shutdown MOREINFO="NONE"backup_serverMOREINFO="NONE" with nowait command shuts down the Backup Server, regardless of current activity. Use it only in severe circumstances. It can leave your dumps or loads in incomplete or inconsistent states.REMAP="BO--Body"If you use MOREINFO="NONE"shutdown...with nowait during a log or database dump, check for the message indicating that the dump completed. If you did not receive this message, or you are uncertain, your next dump should be a MOREINFO="NONE"dump database, not a transaction dump. This guarantees that you will not be relying on possibly inconsistent dumps.REMAP="BO--Body"If you use MOREINFO="NONE"shutdown with nowait during a load of any kind, and you did not receive the message indicating that the load completed, you may not be able to issue further MOREINFO="NONE"load transaction commands on the database. Be sure to run a full database consistency check (MOREINFO="NONE"dbcc) on the database before you use it. You may have to re-issue the full set of load commands, starting with MOREINFO="NONE"load database.ID="IN63132"shutdown commandREMAP="BO--Body"NUMBER="12" ID="X26541"Fine-Tuning Performance and OperationsID="IN641"Capacity. See Memory
ID="IN1742"checkpoint commandcheckpoint commandSee also Checkpoint process!see also Checkpoint process
ID="IN1213"Database optionsDatabase optionsSee also Individual option names!see also
ID="IN814"Database performance. See Performance
ID="IN1995"Direct updates to system tablesDirect updates to system tablesSee also allow updates configuration variable!see also
ID="IN896"Dynamic system table. See syscurconfigs table
ID="IN637"Fields. See Columns
ID="IN778"Tuning, database. See PerformanceRENDERAS="SECT1"Introduction REMAP="BO--Body"The System Administrator or Database Owners may want to allocate SQL Server resources to optimize performance. In part, this may involve being able to estimate the size of tables and indexes in a database, and the placement of these objects on separate physical disks. REMAP="BO--Body"Once your application is up and running, the System Administrator monitors its performance, and may want to customize and fine-tune it. SQL Server provides software tools for these purposes. This chapter explains: MARK="BULL" REMAP="BU--Bullet"Setting query processing options with the MOREINFO="NONE"set commandSetting database options with the system procedure MOREINFO="NONE"sp_dboptionID="IN369"Performancemonitoring
ID="IN4510"Monitoringperformance (system)Monitoring SQL Server activity with ID="IN12311"Global variablesGlobal variablesSee also individual variable names!see also
MOREINFO="NONE"sp_monitorUsing MOREINFO="NONE"update statistics to ensure that SQL Server makes the best use of existing indexesChanging system variables with MOREINFO="NONE"sp_configure and the MOREINFO="NONE"reconfigure commandPlacing objects on segments to improve performanceID="IN13612"Formulas, user requirements andFormulas, user requirements andSee also Overhead!see also
ID="IN9913"OverheadOverheadSee also Formulas!see also FormulasEstimating the size of database objectsID="X48557" RENDERAS="SECT1"Tuning Queries and Stored Procedures   ID="INB4914"Stored proceduresquery options and
ID="IN8215"Optionsfor processing queries
ID="IN7616"Performanceset options for
ID="IN4717"Changingquery processing optionsREMAP="BO--Body"The query processing options allow you to instruct SQL Server to handle queries and stored procedures in a variety of unusual ways. They are turned on or off for the duration of the user's work session with the Transact-SQL MOREINFO="NONE"setID="IN7118"set command
 command. No permissions are required for using the MOREINFO="NONE"set command. ID="IN6719"set commandsyntaxREMAP="BO--Body"The MOREINFO="NONE"set command syntax allows certain options to be grouped in one command. The groups are:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set ansinull  {on | off}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set ansi_permissions {on | off}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set arithabort [overflow | numeric_truncation]{on | off}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set arithignore [overflow] {on | off}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set {chained, close on endtran, nocount, noexec, parseonly, procid, self_recursion, showplan}{on | off}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set char_convert {off | on [with {error | no_error}] |charset [with {error | no_error}]}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set cursor rows number for cursor_nameREMAP="SY--Syntax" FORMAT="LINESPECIFIC"set {datefirst MOREINFO="NONE"number, dateformat MOREINFO="NONE"format,language MOREINFO="NONE"language}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set dup_in_subquery {on | off}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set fipsflagger {on | off}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set identity_insert [database.[owner.]]table_name{on | off}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set offsets {MOREINFO="NONE"selectMOREINFO="NONE", MOREINFO="NONE"fromMOREINFO="NONE", MOREINFO="NONE"orderMOREINFO="NONE", MOREINFO="NONE"computeMOREINFO="NONE", MOREINFO="NONE"tableMOREINFO="NONE",MOREINFO="NONE"procedureMOREINFO="NONE", MOREINFO="NONE"statement, param, execute} {on | off}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set quoted_identifier {on | off}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set role {"sa_role" | "sso_role" | "oper_role"}{on | off}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set {rowcount MOREINFO="NONE"number, textsize MOREINFO="NONE"number}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set statistics {io, time} {on | off}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set string_rtruncation {on | off}REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set transaction isolation level {1 | 3}REMAP="BO--Body"For example, this statement causes SQL Server to return a description of the processing plan for each query, but not execute it: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"set showplan, noexec on REMAP="BO--Body"This statement causes SQL Server to stop processing each query after it returns the first ten rows: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"set rowcount 10 REMAP="BO--Body"See Volume 1 of the SQL Server Reference ManualID="IN6520"set commandsyntax
 for more information and examples. ID="IN6821"set commandoptionsREMAP="BO--Body"Here are brief explanations of the MOREINFO="NONE"set options (in alphabetic order): MARK="BULL" REMAP="BU--Bullet"ID="IN9022"ansinull option, set
MOREINFO="NONE"ansinullID="INA2123"Null valuescomparing
ID="IN3124"Comparisonnull-valued operands
 - determines whether or not evaluation of NULL-valued operands in SQL equality (=) or inequality (!=) comparisons or aggregate functions, also called set functions, is ANSI-compliant. By default MOREINFO="NONE"ansinull is set MOREINFO="NONE"off. This option does not affect how SQL Server evaluates NULL values in other kinds of SQL statements, such as MOREINFO="NONE"create table. ID="IN9825"ansi_permissions option, set
MOREINFO="NONE"ansi_permissions - determines what types of permissions SQL Server requires to execute MOREINFO="NONE"update and MOREINFO="NONE"delete statements. By default MOREINFO="NONE"ansi_permissions is set MOREINFO="NONE"off. MOREINFO="NONE"update statements require MOREINFO="NONE"update permission on the columns being changed. MOREINFO="NONE"delete statements require MOREINFO="NONE"delete permission on the table.REMAP="UN--Under"TurnMOREINFO="NONE" ansi_permissions on to perform additional permissions checks required for ANSI compliance. In addition to the existing permissions requirements, both MOREINFO="NONE"update and MOREINFO="NONE"delete statements require MOREINFO="NONE"select permission on all columns in the MOREINFO="NONE"where clause; MOREINFO="NONE"update statements require MOREINFO="NONE"select permission on columns on the right side of the MOREINFO="NONE"set clause.MOREINFO="NONE"arithabortID="IN6926"Overflow errorsset arithabort and
 - determines how SQL Server behaves when an arithmetic error occurs. The two MOREINFO="NONE"arithabort options, MOREINFO="NONE"arithabort arith_overflow and MOREINFO="NONE"arithabort numeric_truncation, handle different types of arithmetic errors. You can set each option independently, or set both options with a single MOREINFO="NONE"set arithabort MOREINFO="NONE"on orMOREINFO="NONE" set arithabort off statement. MARK="DASH" REMAP="BS--BulletSub"ID="IN14627"arithabort option, setarith_overflow and
MOREINFO="NONE"arithabort arith_overflow - specifies behavior following a divide-by-zero error or a loss of precision
 during either an explicit or an implicit datatype conversion. This type of error is considered serious. The default setting,MOREINFO="NONE" arithabort arith_overflow on, rolls back the entire transaction or batch in which the error occurs. If you set MOREINFO="NONE"arithabort arith_overflow off, SQL Server aborts the statement that causes the error but continues to process other statements in the transaction or batch.MOREINFO="NONE"arithabort numeric_truncation - specifies behavior following a loss of scale
 by an exact numeric type during an implicit datatype conversion. (When an explicit conversion results in a loss of scale, the results are truncated without warning.) The default setting, MOREINFO="NONE"arithabort numeric_truncation on, aborts the statement that causes the error but continues to process other statements in the transaction or batch. If you set MOREINFO="NONE"arithabort numeric_truncation off, SQL Server truncates the query results and continues processing.ID="IN14728"arithignore option, setarith_overflow and
MOREINFO="NONE"arithignore arith_overflow - determines whether SQL Server displays a message after a divide-by-zero error or a loss of precision. The default setting,MOREINFO="NONE" off, displays a warning message after these errors. Setting MOREINFO="NONE"arithignore arith_overflow on suppresses warning messages after these errors. The optional MOREINFO="NONE"arith_overflow keyword can be omitted without any effect. TheMOREINFO="NONE" arithabort and MOREINFO="NONE"arithignore options have been redefined for Release 10.0. If your application is based on a previous SQL Server release use these options, examine them to be sure they still produce the desired effect.ID="IN8929"chained option, set
MOREINFO="NONE"chained - begins a transaction just before the first data retrieval or modification statement at the beginning of a session and after a transaction ends. In chained mode, SQL Server implicitly executes a MOREINFO="NONE"begin transaction before the following statements: MOREINFO="NONE"delete, MOREINFO="NONE"fetch, MOREINFO="NONE"insert,MOREINFO="NONE" open, MOREINFO="NONE"select, and MOREINFO="NONE"update. You cannot execute MOREINFO="NONE"set chained within a transaction.ID="IN9430"char_convert option, set
MOREINFO="NONE"char_convert - turns off and on character set conversion between SQL Server and a client. See Chapter 13 for a full discussion of this option. ID="IN9831"close on endtran option, set
MOREINFO="NONE"close on endtran - causes SQL Server to close all cursors opened within a transaction at the end of that transaction. A transaction ends by using either the Transact-SQL MOREINFO="NONE"commit or the MOREINFO="NONE"rollback statement. ID="IN9332"cursor rows option, set
MOREINFO="NONE"cursor rows - causes SQL Server to return the number of rows for each cursor MOREINFO="NONE"fetch request from a client application. You can MOREINFO="NONE"set the MOREINFO="NONE"cursor rows option for a cursor whether it is open or closed. ID="IN9133"datefirst option, set
MOREINFO="NONE"datefirstID="IN2434"Weekday date valuefirst
ID="IN1935"Datesentry formats
ID="IN1936"us_english language
 - sets the first weekday to a number from one through seven. The us_english default is 1 (Sunday).ID="IN9237"dateformat option, set
MOREINFO="NONE"dateformatID="INA3738"OrderOrderof date partsdate parts
ID="IN1939"Date partsorder of
 - sets the order of the date parts month/day/year for entering datetime or smalldatetime data. Valid arguments are MOREINFO="NONE"mdy, MOREINFO="NONE"dmy, MOREINFO="NONE"ymd, MOREINFO="NONE"ydm, MOREINFO="NONE"myd, or MOREINFO="NONE"dym. ID="IN1940"us_english language
The us_english default is MOREINFO="NONE"mdy. MOREINFO="NONE"dup_in_subquery - ID="INA7741"dup_in_subquery option, set
controls whether a subquery using an MOREINFO="NONE"in clause returns duplicate values. The default is MOREINFO="NONE"off; duplicate rows are not returned. Prior to Release 10.0, SQL Server returned a row for each matching row in the subquery. ANSI specifies removing duplicate values from the result set. This option is provided as a workaround until you can re-write your queries for 10.0 behavior; it will not be supported in future releases.ID="IN9342"fipsflagger option, set
MOREINFO="NONE"fipsflagger - determines whether SQL Server displays a warning message when Transact-SQL extensions to SQL are used. By default, SQL Server does not tell you when you use non-ANSI SQL. ID="IN9743"identity_insert option, set
MOREINFO="NONE"identity_insert - determines whether inserts into a table's ID="INA5044"IDENTITY columns
IDENTITY column are allowed. (Note that updates to an IDENTITY column are never allowed.) This option can be used only with base tables. It cannot be used with views or set within a trigger. Setting MOREINFO="NONE"identity_insert on allows the table owner, Database Owner, or a System Administrator to insert a value into the IDENTITY column. ID="IN4645"Language defaults
ID="IN9046"language option, set
MOREINFO="NONE"language - is the official name of the language that displays system messages. The language must be available on the server.   The MOREINFO="NONE"sybinit installation program sets the default language.ID="IN8947"nocount option, set
MOREINFO="NONE"nocountID="IN11548"@@rowcount global variable[atatrowcount global variable
 - turns off the display of the number of "rows affected" from a query that returns rows. The global variable MOREINFO="NONE"@@rowcount is updated even when MOREINFO="NONE"nocount is on. ID="IN8849"noexec option, set
MOREINFO="NONE"noexec - compiles each query into a query tree but does not execute it. MOREINFO="NONE"noexec is often used with MOREINFO="NONE"showplan and MOREINFO="NONE"statistics io. Once MOREINFO="NONE"noexec is turned on, no subsequent commands are executed (including other MOREINFO="NONE"set commands) until MOREINFO="NONE"noexec is turned off. ID="IN8950"offsets option, set
MOREINFO="NONE"offsetsID="IN2151"KeywordsTransact-SQL
 - returns the offset (position in relation to the beginning of the query) of specified keywords in Transact-SQL statements. The keyword list is a comma-separated list that can include any of the following Transact-SQL reserved words: MOREINFO="NONE"select, MOREINFO="NONE"from, MOREINFO="NONE"order, MOREINFO="NONE"compute, MOREINFO="NONE"table, MOREINFO="NONE"procedure, MOREINFO="NONE"statement, MOREINFO="NONE"param, and MOREINFO="NONE"execute. This option is meant to be used in Open Client DB-Library. ID="IN9152"parseonly option, set
MOREINFO="NONE"parseonly - checks the syntax of each query and returns any error messages, without generating a sequence tree, compiling, or executing the query. It returns offsets if the MOREINFO="NONE"offset option is set MOREINFO="NONE"on and there are no errors. MOREINFO="NONE"parseonlyID="IN7853"Stored proceduresset parseonly restriction
ID="IN6954"Triggersset parseonly restriction
 should not be used inside a stored procedure or trigger. ID="IN8855"procid option, set
MOREINFO="NONE"procid - returns the ID number of the stored procedure to Open Client DB-Library (not to the user) before sending rows generated by that stored procedure. ID="IN3456"Identifiersdelimited, identifying
ID="IN3457"Delimited identifiers, recognizing
ID="IN9958"quoted_identifier option, set
MOREINFO="NONE"quoted_identifier - determines whether SQL Server recognizes delimited identifiers. By default, MOREINFO="NONE"quoted_identifier is set MOREINFO="NONE"off and all identifiers must conform to the rules for valid identifiers. If you MOREINFO="NONE"set quoted_identifier on, you can use table, view, and column names that begin with a non-alphabetic character, include characters that would not otherwise be allowed, or are reserved words. You must enclose the identifiers within double quotation marks. Delimited identifiers cannot exceed 28 bytes, cannot be used as parameters to system procedures, cannot be used with MOREINFO="NONE"bcp, and may not be recognized by all front-end products.REMAP="UN--Under"WhenMOREINFO="NONE" quoted_identifier is MOREINFO="NONE"on, all character strings enclosed within double quotes are treated as identifiers. Use single quotes around character or binary strings.ID="IN2459"Operatoractivating role
ID="IN3960"System Security Officeractivating role
ID="IN2461"Rolesturning on and off
ID="IN13562"role option, set
ID="IN3663"System Administratoractivating role
MOREINFO="NONE"role - turns the specified role on or off during the current session. When you log in, all roles granted to you are automatically enabled. Use MOREINFO="NONE"set role to turn any of these options off or back on again. For example, if you have been granted the System Administrator role, you assume the identity of Database Owner within the current database. If you wish to assume your "real" user identity, execute MOREINFO="NONE"set role "sa_role" off. If you are not a user in the current database, and if there is no "guest" user, you will be unable to turn off MOREINFO="NONE"sa_role, because there is no server user ID for you to assume.REMAP="UN--Under"The available roles are MOREINFO="NONE"sa_role, MOREINFO="NONE"sso_role, and MOREINFO="NONE"oper_role.ID="IN9064"rowcount option, set
MOREINFO="NONE"rowcount - causes SQL Server to stop processing the query after the specified number of rows is returned. To turn this option off so that all rows are returned, use this command:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"set rowcount 0 ID="IN9665"self_recursion option, set
MOREINFO="NONE"self_recursionID="IN4366"Triggersself recursion
 - determines whether or not SQL Server allows a trigger to cause itself to fire again (called self recursion). By default, SQL Server does not allow self recursion in triggers. You can turn this option on only for the duration of a current client session; its effect is limited by the scope of the trigger or stored procedure that sets it. For example, if the trigger that sets MOREINFO="NONE"self_recursion MOREINFO="NONE"on returns or causes another trigger to fire, this option reverts to off.ID="IN9067"showplan option, set
MOREINFO="NONE"showplan - generates a description of the processing plan for the query and immediately processes it unless MOREINFO="NONE"noexec is set. MOREINFO="NONE"showplan is often used in conjunction with MOREINFO="NONE"statistics MOREINFO="NONE"io. MOREINFO="NONE"showplan allows you to see whether the query uses the indexes that are in place; MOREINFO="NONE"statistics io gives you an idea of the effectiveness of the indexes. (If the indexes are not being used, you may want to issue the MOREINFO="NONE"update statistics command, discussed later in this chapter.) MOREINFO="NONE"showplanID="IN7768"Stored proceduresset showplan restriction
ID="IN6869"Triggersset showplan restriction
 should not be used inside a stored procedure or trigger. ID="IN9570"statistics io option, set
MOREINFO="NONE"statistics io - displays the number of table scans, logical accesses (cache reads), and physical accesses (disk reads) for each table referenced in the statement. It also displays the number of pages written (including pages in the transaction log). If the query is being run efficiently, the number of scans should be small. If the cache is being used well, the number of disk reads should be small in relation to the number of cache reads. Turning this option on slows down execution, so it should not be used all the time. ID="IN9771"statistics time option, set
MOREINFO="NONE"statistics time - displays the CPU time it took to parse and compile each command. It also displays the CPU time it took to execute each step of the command. CPU times are given in units of ticks, which are machine dependent. ID="IN7272"Truncationset string_rtruncation and
ID="IN10073"string_rtruncation option, set
MOREINFO="NONE"string_rtruncation - determines if SQL Server raises an exception error when an insert or update truncates a char or varchar string. If the truncated characters consist only of spaces, no exception is raised. The default setting,MOREINFO="NONE" off, does not raise the exception error and the character string is silently truncated. ID="IN9074"textsize option, set
MOREINFO="NONE"textsizeID="IN7075"text datatypesize returned in query
 - specifies the size in bytes of textID="IN7176"image datatypesize returned in query
 or image type data to be returned with a MOREINFO="NONE"selectID="IN11577"@@textsize global variable[atattextsize global variable
 statement. The @@textsize global variable stores the current setting. ID="IN2978"Isolation levelstransactions
ID="IN10879"transaction isolation level optionset
MOREINFO="NONE"transaction isolation level - causes SQL Server to automatically apply a MOREINFO="NONE"holdlock to all MOREINFO="NONE"select operations in a transaction when set to isolation level 3. By default, SQL ServerID="IN2980"Transactionsisolation levels
ID="IN6681"set commandoptions
's transaction isolation level is 1 which allows shared locks on data. You cannot change an isolation level within a transaction.REMAP="BO--Body"ID="IN7882"set commandoption categories
The MOREINFO="NONE"set options can be divided into these categories: MARK="BULL" REMAP="BU--Bullet"MOREINFO="NONE"parseonly, MOREINFO="NONE"noexec, MOREINFO="NONE" showplan, MOREINFO="NONE"rowcount, MOREINFO="NONE"textsize and MOREINFO="NONE"nocount control the way a query is executed. It doesn't make sense to set both MOREINFO="NONE"parseonly and MOREINFO="NONE"noexec to MOREINFO="NONE"on. REMAP="UN--Under"The default setting for MOREINFO="NONE"rowcount is 0 (return all rows) and for MOREINFO="NONE"textsize is 32768 (32K). To restore default behavior after changing these settings, set the value to 0. (Some client software sets MOREINFO="NONE"textsize to other values as part of logging in to SQL Server.) REMAP="UN--Under"The default for MOREINFO="NONE"parseonly, MOREINFO="NONE"noexec, MOREINFO="NONE"showplan and MOREINFO="NONE"nocount is MOREINFO="NONE"off. ID="IN9583"statistics io option, setThe MOREINFO="NONE"statistics io and MOREINFO="NONE"statistics time options display performance statistics after each query. The default setting for these options is MOREINFO="NONE"off. ID="IN9284"arithabort option, set
MOREINFO="NONE"arithabortID="IN9385"arithignore option, set
 and MOREINFO="NONE"arithignore determine how to handle arithmetic errors.MOREINFO="NONE"datefirst, MOREINFO="NONE"dateformat, and MOREINFO="NONE"language ID="IN1486"Date functions
ID="IN3587"Defaultslanguage
affect date functions, date order, and message display. In the default language, us_english, MOREINFO="NONE"datefirst is 1 (Sunday), MOREINFO="NONE"dateformat is MOREINFO="NONE"mdy, and messages are displayed in us_english. MOREINFO="NONE"set  MOREINFO="NONE"language implies that SQL Server should use the first weekday and date format of the language it specifies, but it will not override an explicit MOREINFO="NONE"set MOREINFO="NONE" datefirst or MOREINFO="NONE"set MOREINFO="NONE" dateformat command issued earlier in the current session. Open Client DB-Library usesMOREINFO="NONE" offsets and MOREINFO="NONE"procid to interpret results from SQL Server. The default setting for these options is MOREINFO="NONE"on. MOREINFO="NONE"char_convert controls character set conversion between SQL Server and a client. MOREINFO="NONE"cursor rows and MOREINFO="NONE"close on endtran affect the way SQL Server handles cursors. The default setting for MOREINFO="NONE"cursor rows with all cursors is 1. The default setting for MOREINFO="NONE"close on endtran is MOREINFO="NONE"off.MOREINFO="NONE"identity_insert allows or prohibits inserts that affect a table's IDENTITY column.MOREINFO="NONE"chained andMOREINFO="NONE" transaction isolation level allow SQL Server to handle ANSI-compliant transactionsMOREINFO="NONE".MOREINFO="NONE"self_recursion allows a trigger to fire as a result of the data modification of the trigger itself. (The MOREINFO="NONE"sp_configure variable MOREINFO="NONE"nested trigger must also be set on.) The default setting for MOREINFO="NONE"self_recursion is MOREINFO="NONE"off.MOREINFO="NONE"string_rtruncation MOREINFO="NONE"on causes SQL Server to raise a SQLSTATE exception error when truncating a char or nchar string.MOREINFO="NONE"ansinullID="IN2188"Null valuescomparing
ID="IN3189"Comparisonnull-valued operands
 on causes SQL Server to issue warning when eliminating nulls from aggregate functions and SQL equality (=) or inequality (!=) comparisons. MOREINFO="NONE"fipsflagger MOREINFO="NONE"on causes SQL Server to flag the use of non-ANSIID="INA7690"set commandoption categories
 SQL.MOREINFO="NONE"role activates and deactivates roles for the current session.REMAP="BO--Body"If you use the MOREINFO="NONE"set ID="IN5991"Triggersset commands in
ID="IN6892"Stored proceduresset commands in
 command inside a trigger or stored procedure, the option reverts to its former setting after the trigger or procedure executes. REMAP="BO--Body"All MOREINFO="NONE"set ID="IN10493"showplan option, set
 options except MOREINFO="NONE"showplanID="IN9494"char_convert option, set
 and MOREINFO="NONE"char_convert take effect immediately. MOREINFO="NONE"showplan takes effect in the following batch. Here is an example using MOREINFO="NONE"set MOREINFO="NONE" show plan  MOREINFO="NONE"on:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"set showplan on select * from publishers go REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"pub_id  pub_name             city         state ------  -------------        ----------   ----0736    New Age Books        Boston       MA 0877    Binnet & Hardley     Washington   DC 1389    Algodata Infosystems Berkeley     CA  (3 rows affected)REMAP="BO--Body"If the two statements are put in separate batches, here's what happens: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"set showplan on go select * from publishers go REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"STEP 1 the type of query is SELECT FROM TABLE publishers nested iteration Table Scan REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"pub_id  pub_name             city        state ------  -------------        ----------  -----0736    New Age Books        Boston      MA 0877    Binnet & Hardley     Washington  DC 1389    Algodata Infosystems Berkeley    CA ID="IN4595"Changingquery processing options
ID="IN4396"Monitoringperformance (system)
ID="IN7497"Performanceset options for
ID="IN3498"Performancemonitoring
ID="IN7899"Optionsfor processing queries
ID="IN47100"Stored proceduresquery options and
ID="IN102101"showplan option, set
ID="IN69102"set commandREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"(3 rows affected)   ID="IN72103"Optionsdatabase
ID="IN39104"Changingdatabase options
ID="IN150105"Reset configuration. See Configuration variables; reconfigure command
ID="IN96106"Server information options. See Information (Server)RENDERAS="SECT1"The Database Options   ID="IN31107"Databasesoptions
ID="IN88108"sp_dboption system procedureREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_dboption changes settings for an entire database. These options remain in effect until they are changed. (The MOREINFO="NONE"set commands described above, which remain active only for a session, or for the duration of a stored procedure. Configuration variables, described later in this chapter, affect the entire server.)REMAP="BO--Body"The procedure:MARK="BULL" REMAP="BU--Bullet"Displays a list of the settable database options when it is used without a parameterChanges a database option when used with parametersID="IN74109"master databasechanging option settings
ID="IN69110"Changingoption settings for masterREMAP="BO--Body"You can only change options for user databases, you cannot change options for the MOREINFO="NONE"master database. However, to change a database option in a user database (or to display a list of the database options), MOREINFO="NONE"sp_dboption must be executed while using the MOREINFO="NONE"master database. REMAP="BO--Body"The syntax for MOREINFO="NONE"sp_dboption is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_dboption [MOREINFO="NONE"dbname, MOREINFO="NONE"optname, {true | false}] ID="IN69111"model databasechanging options viaREMAP="BO--Body"To make an option or options take effect for every new database, change the option in the model database. ID="IN39112"Defaultsdatabase options
ID="IN51113"Information (Server)database options
ID="IN27114"Database optionsdisplayingRENDERAS="SECT2"Listing the Database Options   REMAP="BO--Body"All users with access to the MOREINFO="NONE"master database can execute MOREINFO="NONE"sp_dboption with no parameters in order to display a list of the database options. The report from MOREINFO="NONE"sp_dboption looks like this: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_dboptionREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Settable database options. -------------------- abort tran on log full allow nulls by default auto identitydbo use only ddl in tran no chkpt on recovery no free space acctg read only select into/bulkcopy single user trunc log on chkpttrunc. log on chkpt.ID="IN41115"Database optionsmeaning ofREMAP="BO--Body"Here's what the database options mean:   MARK="BULL" REMAP="BU--Bullet"ID="IN84116"abort tran on log full database option
MOREINFO="NONE"abort tran on log full determines the fate of a transaction that is running when the last-chance threshold is crossed. The default value is MOREINFO="NONE"false, meaning that the transaction is suspended and is awakened only when space has been freed. If you change the setting to MOREINFO="NONE"true, all user queries that need to write to the transaction log are killed until space in the log has been freed.ID="IN84117"allow nulls by default database optionSetting MOREINFO="NONE"allow nulls by default to MOREINFO="NONE"true changes the default nulltype of a column from MOREINFO="NONE"not null to MOREINFO="NONE"null, in compliance with the ANSI standard. The Transact-SQL default value for a column is MOREINFO="NONE"not null, meaning that null values are not allowed in a column unless MOREINFO="NONE"null is specified in the column definition.ID="IN75118"auto identity database optionWhile the MOREINFO="NONE"auto identity option is MOREINFO="NONE"true, a 10-digit IDENTITY column is defined in each new table that is created without specifying either a MOREINFO="NONE"primary key, a MOREINFO="NONE"unique constraint, or an IDENTITY column. The column is not visible when you select all column with theMOREINFO="NONE" select * statement. To retrieve it, you must explicitly mention the column name,  SYB_IDENTITY_COL, in the select list.ID="IN74119"dbo use only database optionWhile the MOREINFO="NONE"dbo use only option is set on (or true), only the Database Owner can use the database.SettingID="INA73120"ddl in tran database option
MOREINFO="NONE" ddl in tran option is to MOREINFO="NONE"true allows the following commands to be used inside a user-defined transaction:Data definition statements must lock system tables for the duration of a transaction, and can result in performance problems.TOCENTRY="1"LBL="Table 12-1: "DDL Commands Allowed in TransactionsCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="1*"COLNAME="C3" COLWIDTH="1*"VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"alter tableCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create tableCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"drop ruleCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create default COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create triggerCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"drop tableCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create indexCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create viewCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"drop triggerCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create procedureCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"drop defaultCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"drop viewCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create ruleCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"drop indexCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"grant COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create schemaCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"drop procedureCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"revokeREMAP="UN--Under"The following commands cannot be used inside a user-defined transaction under any circumstances: TOCENTRY="1"LBL="Table 12-2: "DDL Commands Not Allowed in TransactionsCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="1*"COLNAME="C3" COLWIDTH="1*"VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"alter databaseCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"load databaseCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"truncate tableCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create databaseCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"load transactionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"update statisticsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"disk initCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"reconfigureCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"drop databaseCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"select intoCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"no free space acctgID="IN81121"no free space acctg database option
 suppresses free space accounting and execution of threshold actions for the non-log segments. This speeds recovery time because the free-space counts will not be recomputed for those segments. It disables updating the rows-per-page value stored for each table, so system procedures that estimate space usage may report inaccurate values.ID="IN101122"Checkpoint processno chkpt on recovery database option
ID="IN82123"no chkpt on recovery database optionThe MOREINFO="NONE"no chkpt on recoveryID="IN40124"Recoveryup-to-date database copy method
ID="IN16125"Primary database
ID="IN18126"Secondary database
ID="IN47127"Transaction logsprimary and secondary database
ID="IN52128"Automatic operationsprimary and secondary databases
 option is set on (true) when an up-to-date copy of a database is kept. In these situations, there is a "primary" and a "secondary" database. Initially, the primary database is dumped and loaded into the secondary database. Then, at intervals, the transaction log of the primary database is automatically dumped and loaded into the secondary database. ID="IN32129"Restarts, Servercheckpoints and
ID="IN26130"Databasessequence numbersREMAP="UN--Under"If this option is set off (false)-the default condition-a checkpoint record is added to the database after it is recovered due to restarting SQL Server. This checkpoint, which ensures that the recovery mechanism won't unnecessarily be re-run, changes the sequence number on the database. If the sequence number on the secondary database has changed, a subsequent dump of the transaction log from the primary database could not be loaded into it. REMAP="UN--Under"Turning on this option for the secondary database causes it not to get a checkpoint from the recovery process, so that subsequent transaction log dumps from the primary database can be loaded into it. ID="IN71131"read only database optionThe MOREINFO="NONE"read only option means that users can retrieve data from the database, but can't modify anything. ID="IN71132"select into/bulkcopy database optionThe MOREINFO="NONE"select into/bulkcopyID="IN88133"Transaction logsselect into/bulkcopy database option
 option must be set on in order to perform operations that do not keep a complete record of the transaction in the log:ID="IN124134"writetext commandselect into/bulkcopy database optionMARK="DASH" REMAP="BS--BulletSub"To use the MOREINFO="NONE"writetext utilityID="IN126135"select into commandselect into/bulkcopy database optionTo MOREINFO="NONE"select MOREINFO="NONE" into a permanent table ID="IN125136"bcp (bulk copy utility)select into/bulkcopy option and To do a "fast" bulk copy with MOREINFO="NONE"bcpID="IN71137"bcp (bulk copy utility)fast version
. "Fast" MOREINFO="NONE"bcp is used by default on tables which do not have indexes.REMAP="UN--Under"SQL Server performs minimal logging for these commands, recording only page allocations and de-allocations, but not the actual changes that are made on the data pages.ID="IN92138"Temporary tablesselect into/bulkcopy database option andREMAP="UN--Under"You do not have to set the MOREINFO="NONE"select into/bulkcopy option on in order to MOREINFO="NONE"select  MOREINFO="NONE"into a temporary table, since MOREINFO="NONE"tempdb is never recovered. The option does not need to be set in order to run MOREINFO="NONE"bcp on a table that has indexes, because inserts are logged. ID="IN44139"Order of commandsfor database and log dumpsREMAP="UN--Under"After you have run a MOREINFO="NONE"select intoID="IN20140"Losing unlogged data
ID="IN21141"Non-logged operations
ID="IN28142"Changingdata while unlogged
ID="IN20143"Datalosing unlogged
 command or performed a bulk copy in a database, you won't be able to perform a regular transaction log dump. Once you have made minimally-logged changes to your database, you must perform a MOREINFO="NONE"dump database since changes would not be recoverable from transaction logs.ID="IN99144"select into/bulkcopy database optiontransaction log dumping andREMAP="UN--Under"Just setting the MOREINFO="NONE"select into/bulkcopy option doesn't block log dumping, but making minimally-logged changes to data does block the use of a regular MOREINFO="NONE"dump transaction. You can still use MOREINFO="NONE"dump transaction...with no_log and MOREINFO="NONE"dump transaction...with truncate_only, however.REMAP="UN--Under"By default, the MOREINFO="NONE"select into/bulkcopy option is off in newly created databases. To change the default situation, turn this option on in the ID="IN74145"model databasechanging database options
MOREINFO="NONE"model database. ID="IN98146"single user database option
ID="IN22147"Userssingle-user modeWhen MOREINFO="NONE"single user is set to TRUE, only one user at a time can access the database. ID="IN95148"Transaction logstrunc log on chkpt option and
ID="IN131149"dump transaction commandtrunc log on chkpt and
ID="IN103150"Checkpoint processtrunc log on chkpt database option
ID="IN94151"trunc log on chkpt database optionThe MOREINFO="NONE"trunc log on chkpt option means that the transaction log is truncated (committed transactions are removed) every time the MOREINFO="NONE"checkpointID="IN118152"checkpoint commandtrunc log on chkpt option and
 checking process occurs (usually more than once per minute). When the Database Owner runs MOREINFO="NONE"checkpoint manually, however, the log is not truncated.ID="IN43153"Sizetransaction logs
ID="IN20154"Spacerunning out ofREMAP="UN--Under"It may be useful to turn this option on while doing development work during which backups of the transaction log are not needed. If this option is off (the original default condition) and the transaction log is never dumped, the transaction log continues to grow and you may run out of space in your database.REMAP="UN--Under"When the MOREINFO="NONE"trunc log on chkpt option is on, you cannot dump the transaction log because changes to your data are not recoverable from transaction log dumps. In this situation, issuing the MOREINFO="NONE"dump transaction command produces an error message instructing you to use MOREINFO="NONE"dump database instead. REMAP="UN--Under"By default, the MOREINFO="NONE"trunc log on chkpt option is off in newly created databases. To change the default situation, turn this option on in the MOREINFO="NONE"modelID="IN101155"Checkpoint processtrunc log on chkpt database option
ID="IN93156"Transaction logstrunc log on chkpt option and
ID="IN129157"dump transaction commandtrunc log on chkpt and
ID="IN92158"trunc log on chkpt database option
 database. If you turn MOREINFO="NONE"trunc log on chkpt on in MOREINFO="NONE"model, and need to load a set of database and transaction logs into a newly created database, be sure to turn the option off in the new database.ID="IN27159"Database optionsdisplayingID="IN89160"sp_helpdb system proceduredatabase option informationREMAP="BO--Body"For a report on which database options are set in a particular database, execute the system procedure MOREINFO="NONE"sp_helpdbID="IN49161"Information (Server)database options
ID="IN39162"Database optionsmeaning of
ID="IN37163"Defaultsdatabase options
 in that database. ID="IN51164"Database optionschanging and settingRENDERAS="SECT2"Setting the Database Options   REMAP="BO--Body"Only a System Administrator or Database Owner can change a user database's options by executing MOREINFO="NONE"sp_dboption. You must be using the master database to execute MOREINFO="NONE"sp_dboption. Then, in order for the change to take effect, you must issue the ID="IN82165"checkpoint commandsetting database options and
MOREINFO="NONE"checkpoint command while using the database for which the option was changed. REMAP="BO--Body"Remember that none of the MOREINFO="NONE"master database's options can be changed. REMAP="BO--Body"Here's how you'd use MOREINFO="NONE"sp_dboption to change the MOREINFO="NONE"pubs2ID="IN60166"read only database option
 database to MOREINFO="NONE"read only: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"use master sp_dboption pubs2, "read only", trueREMAP="BO--Body"Then run the MOREINFO="NONE"checkpoint command in the database that was changed:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"use pubs2REMAP="UI--UserInput" FORMAT="LINESPECIFIC"checkpointID="IN38167"Namespartial, in option specification
ID="IN24168"Option names, specifyingREMAP="BO--Body"For the MOREINFO="NONE"optnameID="IN25169"Optionsunique string for
 parameter, SQL Server understands any unique string that is part of the option name. To set the MOREINFO="NONE"trunc log on chkpt option, you can issue this command: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"use master  sp_dboption pubs2, trunc, true REMAP="BO--Body"If you enter a value for MOREINFO="NONE"optname that is ambiguous, an error message is displayed. For example, two of the database options are MOREINFO="NONE"dbo use only and MOREINFO="NONE"read only. Using "only" for the MOREINFO="NONE"optname parameter generates a message because it matches both names. The complete names that match the string supplied are printed out so you can see how to make the MOREINFO="NONE"optname more specific. REMAP="BO--Body"More than one database option can be set on at a time. YouID="IN37170"Changingdatabase options
ID="IN68171"Optionsdatabase
ID="IN86172"sp_dboption system procedure
ID="IN29173"Databasesoptions
ID="IN49174"Database optionschanging and setting
 cannot change database options inside a user-defined transaction.    ID="IN84175"Reportssp_monitor global variables
ID="IN82176"Monitoringperformance (system)
ID="IN91177"Statistical data summarysp_monitor report
ID="IN87178"sp_monitor system procedure
ID="IN85179"Serversmonitoring activity ofRENDERAS="SECT1"Monitoring SQL Server Activity    REMAP="BO--Body"SQL Server keeps track of how much work it has done in a series of pre-defined global variables, distinguished from local variables by having two @ signs preceding their names, for example, MOREINFO="NONE"@@error,MOREINFO="NONE" @@rowcount. ID="IN86180"Global variablessp_monitor report onREMAP="BO--Body"Executing MOREINFO="NONE"sp_monitor displays the current values of some of these global variables, and how much they have changed since the last time the System Administrator ran the procedure. You can also query the global variables directly. REMAP="BO--Body"The MOREINFO="NONE"sp_monitor procedure takes no parameters. Here's how you use it, and a sample report from it: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_monitor REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"last_run             current_run          seconds-------------------- -------------------  -------Jan 29 1993 10:11AM  Jan 29 1993 10:17AM  314 REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"cpu_busy         io_busy   idle ---------------- --------- --------------- 4250(215)-68%    67(1)-0%  109(100)-31% REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"packets_received packets_sent packet_errors ---------------- ------------ ------------ 781(15)          10110(9596)  0(0) REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"total_read  total_write total_errors  connections ----------  ----------- ------------  ----------- 394(67)     5392(53)    0(0)          15(1)REMAP="BO--Body"For each column, the statistic is printed in the form MOREINFO="NONE"number(number) orMOREINFO="NONE" number(number)-number%.REMAP="BO--Body"The first number refers to the number of seconds (for cpu_busy, io_busy, and idle) or the total number (for the other variables) since SQL Server was restarted. The number in parentheses refers to the number of seconds or total number since the last time MOREINFO="NONE"sp_monitor was run. The percentage is the percent of time since MOREINFO="NONE"sp_monitor was last run. ID="IN74181"Time intervalsince sp_monitor last runREMAP="BO--Body"For example, this report shows cpu_busy as 4250(215)-68%. This means that the CPU has been busy 4250 seconds since SQL Server was last started up and 215 seconds since MOREINFO="NONE"sp_monitor was last run. The 68% means that the CPU has been busy 68% of the time since MOREINFO="NONE"sp_monitor was last run. REMAP="BO--Body"For the MOREINFO="NONE"total_read variable, the value 394(67) means there have been 394 disk reads since SQL Server was restarted, 67 of them since the last time MOREINFO="NONE"sp_monitor was run. REMAP="BO--Body"Here are the columns in the MOREINFO="NONE"sp_monitor report, the equivalent global variables, if any, and their meanings: TOCENTRY="1"LBL="Table 12-3: "Meaning of Columns in an sp_monitor ReportCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="4*"COLNAME="C2" COLWIDTH="4*"COLNAME="C3" COLWIDTH="11*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column NameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"VariableCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MeaningVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"last_runCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The clock time at which the MOREINFO="NONE"sp_monitor procedure was last run.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"current_runCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The current clock time.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"secondsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The number of seconds since MOREINFO="NONE"sp_monitor was last run.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cpu_busyCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"@@cpu_busyCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The number of seconds in CPU time that 
's CPU was doing SQL Server 
work. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"io_busyCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"@@io_busyCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The number of seconds in CPU time that 
 has spent doing input and 
output operations. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"idleCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"@@idleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The number of seconds in CPU time that 
 has been idle. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"packets_receive
dCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"@@pack_receivedCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The number of input packets read by SQL Server. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"packets_sentCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"@@pack_sentCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The number of output packets written by SQL Server. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"packet_errorsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"@@packet_errorsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The number of errors detected by SQL Server while reading and writing packets. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"total_readCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"@@total_readCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The number of disk reads by SQL Server. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"total_writeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"@@total_writeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The number of disk writes by SQL Server. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"total_errorsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"@@total_errorsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The number of errors detected by SQL Server while reading and writing. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"connectionsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"@@connectionsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The number of logins or attempted logins to SQL Server. ID="IN30182"Global variables
ID="IN28183"Numbersglobal variable unit
ID="IN13184"Machine ticksREMAP="BO--Body"The global variables report time in machine ticks, while MOREINFO="NONE"sp_monitor reports seconds of CPU time. The global variable @@timeticks ID="IN84185"Global variablessp_monitor report on
reports the number of microseconds per tick on your platform.REMAP="BO--Body"Here's how to query a global variable directly: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select @@cpu_busy REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"----------------            42506 REMAP="BO--Body"There are some other global variables, whose values are not reported by MOREINFO="NONE"sp_monitor. They are: MARK="BULL" REMAP="BU--Bullet"ID="IN127186"@@char_convert global variable[atatchar_convert global variable
MOREINFO="NONE"@@char_convert - contains 0 if character set conversion not in effect. Contains 1 if character set conversion is in effect. ID="IN130187"@@client_csname global variable[atatclient_csname global variable
MOREINFO="NONE"@@client_csname - client's character set name. Set to NULL if client character set has never been initialized; otherwise, it contains the name of the most recently used character set. ID="IN124188"@@client_csid global variable[atatclient_csid global variable
MOREINFO="NONE"@@client_csid - client's character set id. Set to NULL if client character set has never been initialized. Otherwise, it contains the most recently used client character set's MOREINFO="NONE"id from MOREINFO="NONE"syscharsets. ID="IN106189"@@error global variable[ataterror global variable
MOREINFO="NONE"@@errorID="IN25190"Errorschecking status of
ID="IN21191"Numberserror message
 - contains the last error number generated by the system. The MOREINFO="NONE"@@error global variable is commonly used to check the error status (succeeded or failed) of the most recently executed statement. A statement such as:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"if @@error != 0 return REMAP="UN--Under"causes an exit if an error occurs. ID="IN115192"@@identity global variable[atatidentity global variable
MOREINFO="NONE"@@identity - last value inserted into an IDENTITY column by anMOREINFO="NONE" insert or MOREINFO="NONE"select into statement. ID="IN118193"@@isolation global variable[isolation global variable
MOREINFO="NONE"@@isolation - current isolation level of the Transact-SQL program. @@isolation takes the value of the active level (1 or 3).ID="IN109194"@@langid global variable[atatlangid global variable
MOREINFO="NONE"@@langid - defines the local language id of the language currently in use (specified in syslanguages.langid). ID="IN115195"@@language global variable[atatlanguage global variable
MOREINFO="NONE"@@language - defines the name of the language currently in use (specified in syslanguages.name). ID="IN121196"@@maxcharlen global variable[atatmaxcharlen global variable
MOREINFO="NONE"@@maxcharlen - maximum length of multibyte character in SQL Server's character set. ID="IN147197"@@max_connections global variable[atatmax_connections global variable
MOREINFO="NONE"@@max_connectionsID="IN91198"Number (quantity of)user connections (@@max_connections)
ID="IN49199"Number (quantity of)simultaneous SQL connections
ID="IN31200"Connectionsmaximum user number
 - the maximum number of simultaneous connections that can be made with SQL Server in this computer environment. The user can configure SQL Server for fewer connections with MOREINFO="NONE"sp_configure. ID="IN118201"@@ncharsize global variable[atatncharsize global variable
MOREINFO="NONE"@@ncharsize - average length of a national character. ID="IN118202"@@nestlevel global variable[atatnestlevel global variable
MOREINFO="NONE"@@nestlevelID="IN14203"Nestinglevels
 - nesting level of current execution (initially zero). Each time a stored procedure or trigger calls another stored procedure or trigger, the nesting level is incremented. If the maximum of 16 is exceeded, the transaction aborts. ID="IN109204"@@procid global variable[atatprocid global variable
MOREINFO="NONE"@@procid - contains the stored procedure ID of the currently executing procedure. ID="IN115205"@@rowcount global variable[atatrowcount global variable
MOREINFO="NONE"@@rowcount - contains the number of rows affected by the last command. ID="IN141206"@@servername global variable[atatservername global variable
MOREINFO="NONE"@@servernameID="IN12207"Namesserver
 - the name of this SQL Server. To define a server name, a System Security Officer must run MOREINFO="NONE"sp_addserver and then re-start the server. ID="IN103208"@@spid global variable[spid global variable
MOREINFO="NONE"@@spid - server process ID number of the current process. ID="IN118209"@@sqlstatus global variable[sqlstatus global variable
MOREINFO="NONE"@@sqlstatus - contains status information resulting from the last MOREINFO="NONE"fetch statement. ID="IN135210"@@textsize global variable[atattextsize global variable
MOREINFO="NONE"@@textsizeID="IN92211"Sizetext and image data
ID="IN70212"text datatypesize returned in query
 - the maximum size in bytes of textID="IN71213"image datatypesize returned in query
 or imageID="IN71214"select commandsize of returned data
ID="IN58215"Sizeselect return data
 data to be returned with a MOREINFO="NONE"select statement. The default value depends on the client software, the MOREINFO="NONE"isql default is 32K bytes. Can be changed on a per-session basis with MOREINFO="NONE"set textsize.ID="IN142216"@@thresh_hysteresis global variable[thresh_hysteresis global variable
@@thresh_hysteresis - change in free space required to activate a threshold.ID="IN118217"@@timeticks global variable[atattimeticks global variable
MOREINFO="NONE"@@timeticks - the number of microseconds per tick. ID="IN124218"@@tranchained global variable[tranchained global variable
MOREINFO="NONE"@@tranchained - current transaction mode of the Transact-SQL program.ID="IN118219"@@trancount global variable[atattrancount global variable
MOREINFO="NONE"@@trancount - contains the number of currently active transactions for the current user. ID="IN118220"@@transtate global variable[transtate global variable
MOREINFO="NONE"@@transtate - current state of a transaction after a statement executes. ID="IN112221"@@version global variable[atatversion global variable
MOREINFO="NONE"@@versionID="IN28222"Global variables
 - contains the version string of the current version of SQL Server. ID="IN114223"Monitoringspt_monitor tableREMAP="BO--Body"Any user can query the global variables. However, only System Administrators can execute MOREINFO="NONE"sp_monitorID="IN105224"master databasesp_monitor effect on
. The procedure updates a table in the MOREINFO="NONE"master database called MOREINFO="NONE"spt_monitorID="IN89225"Statistical data summarysp_monitor report
ID="IN78226"Monitoringperformance (system)
ID="IN82227"Reportssp_monitor global variables
ID="IN85228"sp_monitor system procedure
ID="IN81229"Serversmonitoring activity of
. RENDERAS="SECT1"ID="IN85230"update statistics command
update statistics ID="IN32231"Queriesoptimizing
ID="IN30232"Updatingindexes
ID="IN77233"Indexesupdate statistics onREMAP="BO--Body"The MOREINFO="NONE"update statistics command helps SQL Server make the best decisions about which indexes to use when it processes a query, by providing information about the distribution of the key values in the indexes. MOREINFO="NONE"update statistics is automatically run when you create or recreate an index on a table that already contains data. It can be used when a large amount of data in an indexed column has been added, changed, or deleted. The crucial element is that the optimization of your queries depends on the accuracy of the distribution steps, and if there is significant change in the key values in your index, you should re-run MOREINFO="NONE"update statistics on that index. REMAP="BO--Body"Only the table owner or System Administrator can issue the MOREINFO="NONE"update statistics command.REMAP="BO--Body"Its syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"update statistics MOREINFO="NONE"table_name [MOREINFO="NONE"index_name] REMAP="BO--Body"If you do not specify an index name, the command updates the distribution statistics for all the indexes in the specified table. Giving an index name updates statistics for that index only. ID="IN91234"LockingLockingand update statisticsupdate statisticsREMAP="BO--Body"Try to run MOREINFO="NONE"update statistics at a time when the tables you need to specify are not heavily used. MOREINFO="NONE"update statistics acquires locks on the tables and indexes as it reads the data.REMAP="BO--Body"You can find the names of indexes by using the MOREINFO="NONE"sp_helpindex system procedure. This procedure takes a table name as a parameter. ID="IN75235"sp_helpindex system procedureREMAP="BO--Body"To list the indexes for the MOREINFO="NONE"authors table, and then update the statistics for all of the indexes in the table, type: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpindex authors update statistics authors REMAP="BO--Body"To update the statistics only for the index on the au_id column, type: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"update statistics authors auidindID="IN26236"Indexesnaming
ID="IN83237"update statistics command
ID="IN75238"Indexesupdate statistics on
ID="IN28239"Updatingindexes
ID="IN30240"QueriesoptimizingREMAP="BO--Body"Since Transact-SQL does not require index names to be unique in a database, you must give the name of the table with which the index is associated. REMAP="BO--Body"After running MOREINFO="NONE"update statistics, run MOREINFO="NONE"sp_recompile on the table so that triggers and procedures that use the indexes will use the new distribution:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_recompile authorsID="IN47241"Configuration variablesresettingRENDERAS="SECT1"Resetting the Configuration Variables   ID="IN42242"Serversvalues for configuration variables
ID="IN76243"Configuration variablesdefault settings ofREMAP="BO--Body"The configuration variables control various aspects of SQL Server's memory allocation and performance. The System Administrator or System Security Officer can reset these configuration variables in order to fine-tune performance and refine storage allocation. In the absence of intervention by the System Administrator, SQL Server supplies default values for all these variables that are reasonable given the following assumptions: MARK="BULL" REMAP="BU--Bullet"At least 10-megabyte of RAM dedicated to SQL ServerAn application in which there is a great deal of update activityAn application in which a relatively small number of stored procedures are used repeatedlyREMAP="BO--Body"If your application differs significantly from these assumptions, you should reset the configuration variables immediately after installation. System variables are set by: MARK="BULL" REMAP="BU--Bullet"Executing the system procedure MOREINFO="NONE"sp_configure, which updates the MOREINFO="NONE"values field of the system table MOREINFO="NONE"master..sysconfigures. Issuing the MOREINFO="NONE"reconfigure command. Note that the MOREINFO="NONE"allow updates configuration variable requires MOREINFO="NONE"reconfigure with override, since this option allows you to edit system tables directly. ID="IN53244"Restarts, Serverconfiguration variable resetting and
ID="IN35245"Non-dynamic configuration variablesRestarting SQL Server for most of the configuration variables. Only a few of the configuration variables are dynamic, meaning that they can be changed using only MOREINFO="NONE"sp_configure and MOREINFO="NONE"reconfigure, and do not require a server reboot.RENDERAS="SECT2"The sysconfigures and syscurconfigs Tables   ID="IN67246"sysconfigures tableREMAP="BO--Body"The MOREINFO="NONE"master..sysconfiguresID="IN67247"syscurconfigs table
 and MOREINFO="NONE"master..syscurconfigs system tables store configuration variables. The MOREINFO="NONE"value field contains the value that has been set by executing MOREINFO="NONE"sp_configure (though it does not reflect the value SQL Server is using if MOREINFO="NONE"reconfigure was not run). REMAP="BO--Body"The MOREINFO="NONE"status field of MOREINFO="NONE"sysconfigures cannot be updated by the user. Status 1 means "dynamic," indicating that new values for these configuration variables take effect immediately when the MOREINFO="NONE"reconfigure command is issued. The rest of the configuration variables-those with status "0"-take effect only after the MOREINFO="NONE"reconfigure command is issued and SQL Server is next restarted. REMAP="BO--Body"The MOREINFO="NONE"sysconfigures table does not reflect the values currently being used by SQL Server, for two reasons:MARK="BULL" REMAP="BU--Bullet"The System Administrator may have updated MOREINFO="NONE"sysconfigures by issuingMOREINFO="NONE" sp_configure commands, but not issued the MOREINFO="NONE"reconfigure command and/or not restarted SQL Server, orThe default for many values in MOREINFO="NONE"sysconfigures is 0, which indicates that SQL Server calculates default values for that variable.REMAP="BO--Body"The run values are stored in the "phantom" system table MOREINFO="NONE"syscurconfigs. This table is created dynamically when it is queried.The system procedure MOREINFO="NONE"sp_configure can perform a join on sysconfigures and syscurconfigsID="IN10248"Run values
 to display the values that are currently in use-the run valuesID="IN65249"syscurconfigs table
ID="IN65250"sysconfigures table
-and the configured values. RENDERAS="SECT2"ID="IN93251"Changingconfiguration variables
ID="IN89252"sp_configure system procedure
Changing the Configuration Variables: sp_configure and reconfigureID="IN44253"Information (Server)configuration variables
ID="IN41254"Configuration variableslisting values ofREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_configure displays and resets configuration values. You can use it in these ways:MARK="BULL" REMAP="BU--Bullet"If you use it without any arguments, it displays all the configuration variables, their minimum and maximum values, the configuration value, and the "run value", the value that SQL Server is currently using.If you give a configuration variable name, it prints the values for that variable. You do not have to type the entire name, you only have to type enough characters to make your input unique.If you give a non-unique fragment of a variable name, it prints a list of all of the variable names that match the fragment.If you give a variable name and a value, it resets the configuration value of that option in the system tables. For nearly all of the configuration options, you must run MOREINFO="NONE"reconfigureID="IN53255"Restarts, Serverconfiguration variable resetting and
 and restart the server to make the new values to take effect. REMAP="BO--Body"The MOREINFO="NONE"sp_configure syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_configure [MOREINFO="NONE"optname [, MOREINFO="NONE"optvalue]]REMAP="BO--Body"Any user can execute MOREINFO="NONE"sp_configure with the first parameter (optname) or with no parameters. System Administrators can execute MOREINFO="NONE"sp_configure with both parameters, except for the MOREINFO="NONE"password expiration interval, audit queue size, MOREINFO="NONE" allow updates, and MOREINFO="NONE"remote access variables, for which you must be a System Security Officer. REMAP="BO--Body"The sample output below shows the kind of information that MOREINFO="NONE"sp_configure prints when you execute it with no parameters. The values that it prints will vary, depending on your platform and on what values you have already changed.TOCENTRY="1"LBL="Table 12-4: "sp_configure OutputCOLS="5" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="16*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="7*"COLNAME="C4" COLWIDTH="7*"COLNAME="C5" COLWIDTH="7*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Configuration VariableCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MinimumCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MaximumCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Config. 
ValueCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Run 
Value VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"recovery interval1 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"32767COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"allow updates1 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"user connections2 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"25COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"memory3 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"variesCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varies COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"open databasesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"locksCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5000COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5000 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"open objectsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"100COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"500 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"procedure cacheCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"99COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"fill factorCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"100COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"time sliceCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"50COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1000COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"100 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"database sizeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10000COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tape retentionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"365COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"recovery flagsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"nested triggers1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"devicesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"256COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"remote access1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"remote loginsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"remote sitesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"remote connectionsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"pre-read packetsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"upgrade version1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1001COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1001COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"default sortorder idCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"255COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"50COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"50 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"default language1 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"language in cacheCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"100COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"max online enginesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"32COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"min online enginesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"32COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"engine adjust intervalCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"32COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cpu flush1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"200COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"200 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"i/o flush1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1000COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1000 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"default character set id COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0 COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"255COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"stack sizeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20480COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"28672COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"password expiration interval1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"32767COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"audit queue sizeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"65535COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"100COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"100COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"additional netmemCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"default network packet sizeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"512COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"524288COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"512COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"maximum network packet 
sizeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"512COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"524288COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"512COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"extent i/o buffersCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"214748364
7COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"identity burning set factorCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"9999999COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5000COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5000COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1. Dynamic options, reset by running MOREINFO="NONE"reconfigure. All other options require 
MOREINFO="NONE"reconfigure, plus shutting the server down and restarting it. COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2. The actual maximum value of MOREINFO="NONE"user connections is stored in 
MOREINFO="NONE"@@max_connections. The maximum number of network connections and open 
devices available to  vary according to platform and operating 
system.COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3. The minimum and run_value values for this option vary according to platform. COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID="INA74256"user connections configuration variable
ID="IN136257"@@max_connections global variable[atatmax_connections global variableREMAP="BO--Body"The MOREINFO="NONE"config_value column of the report contains the value to which the configuration variable has been set with MOREINFO="NONE"sp_configure. It changes after you execute MOREINFO="NONE"sp_configure. This is the value in MOREINFO="NONE"sysconfigures.MOREINFO="NONE"value. REMAP="BO--Body"The MOREINFO="NONE"run_value column contains the value SQL Server is using. It changes after you run the MOREINFO="NONE"reconfigureID="IN53258"Restarts, Serverconfiguration variable resetting and
 command and restart the server. This is the value in MOREINFO="NONE"syscurconfigs.MOREINFO="NONE"value. REMAP="BO--Body"The report displayed by MOREINFO="NONE"sp_configure is partially constructed from a table called ID="IN50259"spt_values table
MOREINFO="NONE"spt_values, which is a "work table" in the MOREINFO="NONE"master database that stores records that refer to locks, permissions, configuration variables, and other system information. REMAP="BO--Body"To change the current values of the configuration variables, execute MOREINFO="NONE"sp_configure with its parameters. The MOREINFO="NONE"optname parameter is the name of the configuration variable, as given in the name column of the report from MOREINFO="NONE"sp_configure. You can use the first few characters of the name, as long as they provide a unique pattern. The MOREINFO="NONE"optvalue is its new value, which must be equal to or greater than the minimum and less than or equal to maximum given in the report from MOREINFO="NONE"sp_configureID="IN40260"Toggles, on-off (configuration variable)
. For the options that are on-off toggles (MOREINFO="NONE"allow updates, MOREINFO="NONE"recovery flags, MOREINFO="NONE"nested triggers and MOREINFO="NONE"remote access) the MOREINFO="NONE"optvalue is either "1" for "yes", or "0" for "no". REMAP="BO--Body"Here is how you would decrease the number of user connections (perhaps in order to save memory): REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "user conn", 20 REMAP="BO--Body"After executing MOREINFO="NONE"sp_configure, run the MOREINFO="NONE"reconfigureID="IN87261"sp_configure system procedure
ID="IN89262"Changingconfiguration variables
 command. ID="IN79263"reconfigure commandRENDERAS="SECT2"The reconfigure Command   REMAP="BO--Body"The syntax of MOREINFO="NONE"reconfigure is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"reconfigure [with override] REMAP="BO--Body"Only a System Administrator can execute the MOREINFO="NONE"reconfigure command. REMAP="BO--Body"When the System Administrator issues the MOREINFO="NONE"reconfigure command, SQL Server checks to make sure that the new values in MOREINFO="NONE"sysconfigures are acceptable and reasonable. REMAP="BO--Body"User-supplied values that seem unreasonable to SQL Server cause it to abort the MOREINFO="NONE"reconfigure command and display a warning message. The System Administrator can then re-issue MOREINFO="NONE"sp_configure with a new value, or re-issue the MOREINFO="NONE"reconfigure command with the MOREINFO="NONE"with MOREINFO="NONE" override clause, which causes SQL Server to accept whatever values the System Administrator supplies. The MOREINFO="NONE"reconfigure command performs certain simple sanity checks on configuration values. It is possible, however, for you to allocate so much memory to SQL Server that it cannot be rebooted, or allocate so much memory for certain memory uses that there is little or no room left in the server for page and procedure buffers. You can always restore SQL Server's default configuration variables, and execute your configuration commands again.ID="IN161264"Updatingallow updates database option and reconfigure with override configuration variableID="IN127265"allow updates configuration variablewith override clauseID="IN120266"reconfigure with override optionallow updates andREMAP="BO--Body"One of the configuration variables, MOREINFO="NONE"allow updates, always requires ID="IN102267"with override optionreconfigure
MOREINFO="NONE"reconfigure MOREINFO="NONE" with MOREINFO="NONE" overrideID="IN32268"Updatingdirect to system tables
ID="IN32269"System tableschanges allowed to
ID="IN45270"System tablesupdating
, and can be set only by a System Security Officer.This requirement is meant to supply a small measure of added protection-to cause you to consider the consequences of allowing direct updates to the system tables. ID="IN76271"Configuration variablesdefault settings of
ID="IN53272"sysconfigures tableREMAP="BO--Body"For certain values set to zero in MOREINFO="NONE"sysconfigures, SQL Server calculates a default. For example, if the user gives 0 for the number of MOREINFO="NONE"open databasesID="IN71273"remote access configuration variable
, SQL Server might substitute the value 12. Whenever MOREINFO="NONE"remote access is set to 1, and the other configuration variables that affect remote access are set to 0, SQL Server calculates default values for each of them. (These are listed in LINKEND="X99826"Chapter 15,  "Managing Remote Servers"
.) REMAP="BO--Body"When the MOREINFO="NONE"reconfigure command is accepted, SQL Server writes the new configuration variables to the area of the disk that holds the configuration structure. If you changed the value of a dynamic variable, MOREINFO="NONE"reconfigure ID="IN35274"Non-dynamic configuration variables
updates the run value, and the change takes effect immediately. If you changed a non-dynamic variable, the change takes effect until the next time SQL Server is restarted. ID="IN77275"reconfigure command
ID="IN47276"Configuration variablesdescribedRENDERAS="SECT2"Details on Configuration VariablesREMAP="BO--Body"The following sections give additional information on the configuration variables. RENDERAS="SECT3"ID="IN50277"Recoveryconfiguration variables for
ID="IN98278"Checkpoint processrecovery interval variable and
ID="IN109279"Dynamic configuration variablesrecovery interval
ID="IN100280"recovery interval configuration variable
recovery interval   REMAP="BO--Body"The MOREINFO="NONE"recovery_interval sets the maximum number of minutes per database that SQL Server should use to complete its recovery procedures in case of a system failure. ID="IN18281"Checkpoint process
ID="IN30282"Dirty pagesREMAP="BO--Body"SQL Server uses this number and the amount of activity on each database to decide when to checkpoint each database. When SQL Server checkpoints a database, it writes all dirty pages (data pages which have been changed by data modification commands) to the disk. The checkpoint also performs a few other "housekeeping" tasks, including truncating the log if this option has been set with MOREINFO="NONE"sp_dboptionID="IN88283"Checkpoint processtrunc log on chkpt database option
ID="IN81284"Transaction logstrunc log on chkpt option and
ID="IN60285"trunc log on chkpt option
. About once per minute, the sleeping checkpoint process "wakes up", checks the MOREINFO="NONE"truncate log on checkpoint setting, and checks the recovery interval to determine if it is time to perform a checkpoint. The following illustration shows the logic used by SQL Server during this process.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig12_1.xwd"LBL="Figure 12-1: " ID="X47398"The Checkpoint ProcessREMAP="BO--Body"You may want to change the recovery interval if your application and its usage change. For example, you may want to shorten the recovery interval when there is an increase in update activity on SQL Server. Shortening the recovery interval causes more frequent checkpoints, which slows the system very slightly. (A typical checkpoint takes about one second.) On the other hand, setting the recovery interval too high might cause the time to recover to be unacceptably long. REMAP="BO--Body"The default run value for this variable is 5 (minutes per database). ID="IN111286"reconfigure commandrecovery_interval andREMAP="BO--Body"This variable is dynamic, which means that an updated value takes effect as soon as the System Administrator issues the MOREINFO="NONE"reconfigure command.ID="IN41287"Roll back processesrecovery interval and
ID="IN98288"recovery interval configuration variable
ID="IN107289"Dynamic configuration variablesrecovery interval
ID="IN96290"Checkpoint processrecovery interval variable and
ID="IN48291"Recoveryconfiguration variables forIf failure occurs during a long-running transaction, recovery time may be longer than the specified recovery interval, since SQL Server must roll back the changes during recovery. ID="IN105292"Dynamic configuration variablesallow updatesID="IN96293"allow updates configuration variableID="X60446" RENDERAS="SECT3"allow updates   ID="IN75294"System tablesallow updates variable and
ID="IN79295"Stored proceduresallow updates variable and
ID="IN31296"System tablesdirect updates toREMAP="BO--Body"By default, system tables can be updated only indirectly, using system procedures. The MOREINFO="NONE"allow updates variable allows you to change this situation. This variable can be set only by System Security Officers.REMAP="BO--Body"The MOREINFO="NONE"allow updatesID="IN40297"Toggles, on-off (configuration variable)
 variable is a toggle: it is either on or off. When the value is changed from the default 0 (off) to 1 (on), any user with appropriate permissions can update the system tables directly with ad hoc queries, and can create stored procedures that update the system tables. ID="IN57298"Changingsystem tablesUpdating certain fields in the system tables causes SQL Server to be unable to run. Therefore, allowing direct updates to the system tables is risky. When you update system tables, always include the data modification statements in a user-defined transaction so that you can roll back the changes if necessary. Check the results carefully before you commit the transaction.ID="IN35299"System tablesstored procedures andID="IN43300"Stored proceduressystem tables changes andID="IN83301"Protection systemvulnerability to allow updatesREMAP="BO--Body"Stored procedures that you create while the MOREINFO="NONE"allow updates variable is set on are always able to update the system tables, even after the variable has been set back to off. Whenever you turn the MOREINFO="NONE"allow updatesID="IN23302"Window of vulnerability
 toggle on, you are creating a "window of vulnerability"-a period of time during which SQL Server users can alter the system tables or create a stored procedure with which the system tables can be altered in the future. ID="IN64303"Single-user modeREMAP="BO--Body"Because the system tables are so critical, it is best to turn this toggle on only in highly controlled situations. If you want to guarantee that no other users can access SQL Server while the system tables can be directly updated, you can restart SQL Server in single user mode. For details, see the man pages on MOREINFO="NONE"startserver and MOREINFO="NONE"dataserver in the SQL Server Utility Programs manual for your operating system. ID="IN127304"allow updates configuration variablewith override clauseREMAP="BO--Body"MOREINFO="NONE"allow updatesID="IN102305"with override optionreconfigure
ID="IN120306"reconfigure with override optionallow updates and
 is a dynamic option, which means that a new value takes effect as soon as the System Administrator issues the MOREINFO="NONE"reconfigure MOREINFO="NONE" with MOREINFO="NONE" override command. The MOREINFO="NONE"with MOREINFO="NONE" overrideID="IN94307"allow updates configuration variable
ID="IN103308"Dynamic configuration variablesallow updates
 clause is always required for this configuration variable as an added measure of protection. RENDERAS="SECT3"ID="IN41309"Serversuser connections to
ID="IN99310"user connections configuration variable
user connectionsID="IN144311"Reserved connections. See user connections configuration variable
ID="IN102312"ConnectionsConnectionsSee also Remote servers!see also
   REMAP="BO--Body"This variable sets the maximum number of user connections that can be connected to SQL Server at the same time. It does not refer to the maximum number of processes; that number depends not only on the value of this variable but also on other system activity. ID="IN31313"Connectionsmaximum user number
ID="IN91314"Number (quantity of)user connections (@@max_connections)
ID="IN19315"Network connections
ID="IN16316"File descriptorsREMAP="BO--Body"The maximum allowable number of connections (or file descriptors) is operating system dependent; see the System Administration Guide Supplement for your platform. REMAP="BO--Body"The number available for SQL Server is stored in the global variableID="IN136317"@@max_connections global variable[atatmax_connections global variable
MOREINFO="NONE" @@max_connections. You can get a report on the maximum number of file descriptors that your system can use with this statement: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select @@max_connections REMAP="BO--Body"This number represents the maximum number of file descriptors allowed by the system for your process, minus the following file descriptors used by SQL Server:ID="IN43318"Listeners, network
ID="IN31319"FilesinterfaceMARK="BULL" REMAP="BU--Bullet"One for each configured master network listener (one for every "master" line in the interfaces file entry for that SQL Server)One for standard outputID="IN14320"Errorslogging
ID="IN66321"Error logs@@max_connections andOne for the error log fileOne for internal use (VMS only)ID="IN13322"Site handlers
ID="IN134323"OpenVMS systemsOpenVMS systems@@maxconnections global variableatatmaxconnections global variableREMAP="BO--Body"This value does not include the count of or the number of site handlers active at a given time. (For SQL Servers running on OpenVMS, this value also subtracts one connection for a debug port.)If MOREINFO="NONE"user connectionsID="IN46324"Calls, remote procedure
 is set higher than the result of the computation described below, some SQL Server processes, such as remote procedure calls or periodic dumps to tape or disk files, may fail. Sybase Technical Support can help you reset the maximum number of connections for your configuration. ID="IN32325"MemoryconfiguringID="IN62326"Memoryuser connections andID="IN24327"Overheaduser connectionREMAP="BO--Body"SQL Server allocates approximately 51K of memory as overhead per user connection. If you increase the MOREINFO="NONE"stack size or MOREINFO="NONE"default packet size configuration variables, the amount of memory per user connection increases also.REMAP="BO--Body"In addition, you must reserve a number of connections for:ID="IN63328"Devicesuser connections and
ID="IN69329"Master deviceuser connections andMARK="BULL" REMAP="BU--Bullet"The data devices, including the master deviceBackup ServerID="IN14330"Mirror devicesMirror devicesID="IN13331"Site handlersThe maximum number of site handlers that are active at any given timeREMAP="BO--Body"To determine these values, use these three queries:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select count(*) from master..sysdeviceswhere cntrltype = 0REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select count(*) from sysdeviceswhere mirrorname is not NULLREMAP="UI--UserInput" FORMAT="LINESPECIFIC"select count(*) from sysserverswhere srvname != @@servernameREMAP="BO--Body"The maximum value to which MOREINFO="NONE"user connections can be set is the value of @@max_connections minus the sum of the results of these three queries.ID="IN61332"Usersuser connections and
ID="IN31333"Formulas, user requirements andREMAP="BO--Body"There is no formula for determining how many connections to allow for each user. Rather, you must estimate this number based on the system and user requirements outlined here. You must also take into account that on a system with many users, there is more likelihood that connections needed only occasionally or transiently can be shared among users. ID="IN111334"isql utility commanduser connections andMARK="BULL" REMAP="BU--Bullet"One connection is needed for each user running MOREINFO="NONE"isql. ID="IN18335"Application designApplication developers use one connection for each editing session.ID="IN75336"DB-Library programsuser connections and
ID="IN109337"dbprocess command, user connections andThe number of connections required by users running an application depends entirely on how the application has been programmed. Users executing Open Client programs need one connection for each open DB-Library MOREINFO="NONE"dbprocessID="IN113338"cs_connection command, user connections and
 or Client-Library MOREINFO="NONE"cs_connection. It's a good idea to estimate the maximum number of connections that will be used by SQL Server and to update MOREINFO="NONE"user connectionsID="IN23339"Addingdatabase devices
ID="IN63340"Devicesuser connections and
ID="IN26341"Addingusers to a database
 as you add physical devices or users to the system. Use MOREINFO="NONE"sp_whoID="IN97342"user connections configuration variable
ID="IN39343"Serversuser connections to
 periodically to determine the number of users on your SQL Server.RENDERAS="SECT3"ID="IN89344"memory configuration variable
ID="IN47345"Memoryoptimizing for your system
memory   ID="IN25346"Sizememory
ID="IN23347"MemoryServer needs for
ID="IN32348"Defaultsconfiguration variables
ID="IN43349"Configuration variablesdefault settings ofREMAP="BO--Body"This variable sets the size of memory, in 2K units, that SQL Server allocates from the operating system. The default value of MOREINFO="NONE"memory varies from platform to platform: see the SYBASE SQL Server Installation Guide
 for its value on your operating system. REMAP="BO--Body"The amount of memory configured must be enough for:ID="IN19350"Static memory needsMARK="BULL" REMAP="BU--Bullet"SQL Server's static memory needs (kernel overhead, user stack space, etc.)ID="IN49351"Buffer cacheThe procedure cache and the data cache (also called buffer cache). Changing caches memory allocations is discussed later.Network buffers for each user connection allocated with MOREINFO="NONE"default network packet size, discussed later.Buffers used for MOREINFO="NONE"extent i/o buffers, discusses later.REMAP="BO--Body"The more memory available, the more resources SQL Server has for internal buffers and caches-reducing the number of times the server has to read data from disk for static information or compiled procedure plans. There is no performance penalty for configuring SQL Server to use the maximum memory available to it on your computer. However, you must be sure to assess other memory needs on your system, or SQL Server may not be able to acquire enough memory to boot.ID="IN23352"Serversmemory needs of
ID="IN20353"Serversmemory needsREMAP="BO--Body"To maximize the amount of MOREINFO="NONE"memory for SQL Server on your system:MARK="BULL" REMAP="BU--Bullet"Subtract the memory required for the operating system from the total physical memory on your computer system. ID="IN37354"Performancewindowing systems use and
ID="IN17355"Windowing systemsIf the machine is not wholly dedicated to SQL Server, subtract the memory requirements for other system uses also. (Windowing systems, such as X Windows, require a lot of memory and can interfere with SQL Server performance when used on the same machine as SQL Server.)Subtract memory allocated for MOREINFO="NONE"additional netmem. This is explained in LINKEND="X25794""additional netmem"
.REMAP="BO--Body"The memory left over after SQL Server's static memory needs are met is divided between the procedure cache and the data cache. The percentage allocated to the procedure cache is set by the MOREINFO="NONE"procedure cache configuration variable. REMAP="BO--Body"Change the value of the MOREINFO="NONE"memory configuration variable:MARK="BULL" REMAP="BU--Bullet"When you add or remove memory on the computer systemWhen the use of the computer system changesIf you allocate memory for extent I/O buffers or additional network memory for SQL ServerREMAP="BO--Body"You can also increase the value to enhance the performance of SQL Server when applications need to use a lot of memory (for example, when using large indexes).RENDERAS="SECT3"If SQL Server Cannot BootID="IN22356"Performancememory and
ID="IN32357"Serversboot problems and memoryREMAP="BO--Body"When SQL Server is booted, it acquires as much of the specified memory as the system allows. If this amount of memory is not available, SQL Server acquires as much as it can.If your operating system supports dynamic memory allocation throughout the life of a process, it may allocate additional memory to SQL Server after it has started.
 If the configured size is extremely large relative to the available memory, SQL Server cannot boot because it cannot allocate the requested amount of memory.REMAP="BO--Body" If SQL Server does not boot for this reason, you must run MOREINFO="NONE"buildmaster with the "reconfigure" command line option to reset the configuration block to default values. This resets the run_value of all configuration variables to their default values. The config_value retains the settings you have set. You must reset MOREINFO="NONE"memory value or other configuration values that affect memory use, and then run MOREINFO="NONE"reconfigure and re-boot the server to install the new values that you have changed. See the SQL Server Utilities manual for more information about ID="IN45358"Memoryoptimizing for your system
ID="IN87359"memory configuration variable
ID="IN23360"Sizememory
ID="IN30361"Memoryconfiguring
MOREINFO="NONE"buildmaster.RENDERAS="SECT3"ID="IN83362"open databases configuration variable
open databasesID="IN45363"Number (quantity of)open databases on Server
ID="IN24364"Databasesnumber of openREMAP="BO--Body"This variable sets the maximum number of databases that can be open at one time on SQL Server. The system databases master, model, sybsystemprocs and tempdb are included in the number of open databases. If you have installed auditing, the sybsecurity database must be counted. The sample database pubs2 and the syntax database sybsyntax are optional databases, but you must also count them if they are installed.ID="IN60365"Memoryopen databases andREMAP="BO--Body"The default run value is 12. Setting the number of open databases higher does not have a significant impact on performance or storage requirements. Therefore, don't hesitate to increase this value if you are adding new user databases to your server, or if SQL Server ever displays a message saying that you've exceeded the allowable number of open databases. Each open database requires approximately 17K of memory.RENDERAS="SECT3"ID="IN74366"locks configuration variable
locks ID="IN27367"Locksconfiguring number of
ID="IN52368"Locksnumber of availableREMAP="BO--Body"This variable sets the number of available locks for all users on SQL Server. Locks are not shared the way open databases and database objects are. ID="IN53369"syscurconfigs tableREMAP="BO--Body"The default run value in MOREINFO="NONE"syscurconfigures is 5000. If this number proves insufficient, SQL Server displays a message. REMAP="BO--Body"Setting the number of available locks higher does not have a significant impact on performance or storage requirements. Therefore, don't hesitate to increase this value if SQL Server ever displays a message saying that you've exceeded the allowable number of available locks. RENDERAS="SECT3"ID="IN81370"open objects configuration variable
open objects   ID="IN33371"Number (quantity of)open objects
ID="IN36372"Database objectsmaximum number openREMAP="BO--Body"This variable sets the maximum number of database objects that can be open at one time on SQL Server. REMAP="BO--Body"The default run value is 500. If this number proves insufficient, SQL Server displays a message. REMAP="BO--Body"Setting the number of open database objects higher does not have a significant impact on performance or storage requirements. Therefore, don't hesitate to increase this value if SQL Server ever displays a message saying that you've exceeded the allowable number of open database objects. RENDERAS="SECT3"ID="IN84373"procedure cache configuration variable
procedure cache   ID="IN20374"Serversmemory needs
ID="IN23375"MemoryServer needs for
ID="IN23376"Serversmemory needs of
ID="IN25377"Cachesdata and procedure
ID="IN10378"DatacacheREMAP="BO--Body"This variable gives the percentage of memory allocated to the procedure cache after SQL Server's memory needs are met. SQL Server's memory needs are the sum of memory necessary for locks, user connections, the code itself (which varies slightly from release to release), and other resources. The remaining memory is divided between the procedure cache and the data cache according to the percentage given by this configuration variable. ID="IN37379"Stored proceduresprocedure cache and
ID="IN15380"Procedure cache
ID="IN22381"Memoryprocedure cacheREMAP="BO--Body"SQL Server stores compiled stored procedures in the area of memory called the procedure cache. If the server finds a procedure or a compilation already in the cache, it doesn't need to read it from the disk. SQL Server also uses space in the procedure cache to compile queries and while creating stored procedures.ID="IN26382"Data pages, data cache and
ID="IN26383"Index pagesdata cache and
ID="IN26384"Pages (data)recently usedREMAP="BO--Body"SQL Server loads data pages and index pages into the area of memory called the data cache. If SQL Server finds a data page or index page that has already been called by a user in the cache, it isn't necessary to read it from the disk. The data cache holds most recently-used data and index pages; older pages are copied to disk or flushed as space is needed for new pages.ID="IN18385"LRU/MRU management
ID="IN26386"Storage managementLRU/MRUREMAP="BO--Body"Both caches are managed in a LRU-MRU (least recently used, most recently used) fashion. REMAP="BO--Body"The default run value for MOREINFO="NONE"procedure MOREINFO="NONE" cache is 20, which gives the procedure cache 20% of memory that remains after SQL Server's requirements are met. By default, the data cache gets the other 80%. REMAP="BO--Body"Since the optimum value for this configuration variable is different from application to application, resetting it may improve SQL Server's performance. For example, if you run many different procedures or ad hoc queries, your application will use the procedure cache more heavily, so you may want to increase this value. REMAP="BO--Body"Many applications fall in this category during development. You may want to try setting this variable to 50 during your development cycle, and resetting it to 20 when your application becomes stable.   RENDERAS="SECT3"ID="IN87387"Storage managementpage fillfactor and
ID="IN113388"fillfactor configuration variableindex page size and
fillfactor   ID="IN61389"Spacefillfactor effect on
ID="IN32390"Pages (data)index
ID="IN82391"Pages (data)fillfactor for index
ID="IN21392"Splittingindex pages
ID="IN82393"Indexesfillfactor percentage for
ID="IN142394"create index commandfillfactor configuration variable andREMAP="BO--Body"This variable determines how full SQL Server makes each page when it is creating a new index on existing data (unless the user specifies some other value in the MOREINFO="NONE"create index statement). The MOREINFO="NONE"fillfactorID="IN67395"Performancefillfactor effect on
 percentage affects performance, because SQL Server must take the time to split pages when they fill up. There is seldom a reason to change the MOREINFO="NONE"fillfactor variable, especially since you can override it in the MOREINFO="NONE"create index command. REMAP="BO--Body"The MOREINFO="NONE"fillfactor percentage is used only at the time the index is created, and becomes less important as more changes are made to the data. The pages are not maintained at any particular level of fullness. REMAP="BO--Body"The default MOREINFO="NONE"fillfactorID="IN106396"with fillfactor option, create index
 run value is 0; this is used when you do not include MOREINFO="NONE"with fillfactor in the MOREINFO="NONE"create index statement (unless it has been changed with MOREINFO="NONE"sp_configure). Legal values when specifying a MOREINFO="NONE"fillfactor are 1 to 100. REMAP="BO--Body"If the MOREINFO="NONE"fillfactor is set to 100, SQL Server creates both clustered and nonclustered indexes with each page 100% full. A MOREINFO="NONE"fillfactorID="IN16397"Tablesread-only
 of 100 makes sense only for read-only tables-tables to which no additional data will ever be added. REMAP="BO--Body"A MOREINFO="NONE"fillfactor of 0 does not mean that pages are 0% full. Rather, it is treated like a MOREINFO="NONE"fillfactorID="IN67398"Clustered indexesfillfactor and
ID="IN71399"Non-clustered indexesfillfactor and
ID="IN10400"Leaf pages
 of 100 in that SQL Server creates clustered indexes with completely full data pages, and nonclustered indexes with completely full leaf pages. It is different from 100 in that SQL Server leaves a comfortable amount of space within the index B-tree in both cases. REMAP="BO--Body"Other MOREINFO="NONE"fillfactor values cause SQL Server to create new indexes with pages that are not completely full. For example, a MOREINFO="NONE"fillfactor of 10 might be a reasonable choice if you are creating an index on a table that you know contains a small portion of the data it will eventually hold. Smaller MOREINFO="NONE"fillfactorID="IN85401"Storage managementpage fillfactor and
ID="IN30402"Pages (data)index
ID="IN80403"Pages (data)fillfactor for index
ID="IN80404"Indexesfillfactor percentage for
ID="IN111405"fillfactor configuration variableindex page size and
ID="IN140406"create index commandfillfactor configuration variable and
 values cause each index to take more storage space. RENDERAS="SECT3"ID="IN79407"time slice configuration variable
ID="IN72408"Scheduling, Servertime slice setting
time slice   ID="IN50409"Processes (Server tasks)running time in scheduler
ID="IN17410"ServersschedulerREMAP="BO--Body"This variable sets the number of milliseconds that a user process is allowed to run by SQL Server's scheduler (which is invisible to the user). If MOREINFO="NONE"time sliceID="IN13411"Response time
 is set too low, SQL Server may spend too much time switching processes. If it is set too high, users may experience lengthy response time. REMAP="BO--Body"The default run value is 100 milliseconds. There is seldom reason to change it. RENDERAS="SECT3"ID="IN82412"database size configuration variable
database size   ID="IN45413"Databasesdefault size
ID="IN32414"DatabasessizeREMAP="BO--Body"This variable sets the default number of megabytes allocated to a new user database if the MOREINFO="NONE"create databaseID="IN134415"create database commanddatabase size configuration variable and
 statement is issued without any size parameters. A database size given in a MOREINFO="NONE"create database statement takes precedence over the value set by this configuration variable.REMAP="BO--Body"The default run value is 2 (megabytes). If most of the new databases on your SQL Server require more than 2 megabytes, you may want to increase this value. You must increase the MOREINFO="NONE"database size ID="IN53416"Sizemodel database
ID="IN53417"model databasesize
value if your MOREINFO="NONE"model database grows to be larger than 2 megabytes, since during execution of the MOREINFO="NONE"create database statement SQL Server copies MOREINFO="NONE"model to create a new user database. RENDERAS="SECT3"ID="IN83418"tape retention configuration variable
tape retention   ID="IN90419"Tape dump devicestape retention configuration variable
ID="IN21420"Dump devicestapes as
ID="IN86421"Backup Servertape retention configuration variableREMAP="BO--Body"This variable can be used to set the number of days that you expect to retain each backup tape after it has been used for a database or transaction log dump. If you try to use the tape before that many days have passed, Backup Server issues a warning message to the tape operator. You can override the warning if you wish. REMAP="BO--Body"The default run value is 0. Unless you change it, no warning is issued. A typical value might be 7 (days). REMAP="BO--Body"Both the MOREINFO="NONE"dump database and MOREINFO="NONE"dump transaction commands provide a ID="IN104422"retaindays optiondump transaction
ID="IN101423"retaindays optiondump database
MOREINFO="NONE"retaindays option, which overrides the MOREINFO="NONE"tape retention value for a particular dump. See LINKEND="X41242""Protecting Dump Files from Being Overwritten" 
 for more information.RENDERAS="SECT3"ID="IN83424"recovery flags configuration variable
recovery flags   ID="IN36425"Recoveryconfiguration variables forREMAP="BO--Body"This variable sets a toggle that determines what information SQL Server displays on the console during recovery. The default run value is 0, which means that SQL Server displays only the database name and a message saying that recovery is in progress. The other legal value is 1, which means that SQL Server displays information about each individual transaction, including whether it was aborted or committed. RENDERAS="SECT3"ID="IN84426"nested triggers configuration variable
nested triggers   ID="IN15427"TriggersnestedREMAP="BO--Body"This option is a toggle that controls the use of nested triggers. When the option is 1, data modifications made by triggers can fire other triggers. A MOREINFO="NONE"set option, MOREINFO="NONE"self_recursion, controls whether triggers re-fire on data modifications made Set the option to 0 to disable nested triggers. The default is 1. RENDERAS="SECT3"ID="IN76428"devices configuration variable
devices   ID="IN37429"Number (quantity of)database devices
ID="IN40430"Database devicesnumber of Server usableREMAP="BO--Body"This variable controls the number of database devices that SQL Server can use. It does not include devices used for database dumps.REMAP="BO--Body"If you want to lower the MOREINFO="NONE"devices value after you have added database devices, you must first check to see what devices numbers are already in use by database devices. The following command prints these highest value in use:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select max(low/power(2,24))    from master..sysdevicesREMAP="BO--Body"The master device is device 0, so you must add one to the number that this query returns to find the minimum value you can use to reconfigure the MOREINFO="NONE"devices variable. If you set this value too low, SQL Server will not be able to recover databases that use devices with higher numbers.REMAP="BO--Body"The default value is 10. Each device uses less than 1/2 K of memory.RENDERAS="SECT3"ID="IN85431"remote access configuration variable
remote accessID="IN55432"Remote loginsconfiguration variables for
ID="IN94433"Configuration variablesConfiguration variablesfor remote loginsremote logins
ID="IN40434"Toggles, on-off (configuration variable)REMAP="BO--Body"This variable is a toggle that controls logins from remote SQL Servers. The default value is 1, so that SQL Server can communicate with Backup Server. Only a System Security Officer can set MOREINFO="NONE"remote access.REMAP="BO--Body"Setting the value to 0 disables server-to-server remote procedure calls. Since SQL Server communicates with its Backup Server via remote procedure calls, setting this variable to 0 makes it impossible to back up a database. Since other system administration actions are required to enable servers besides Backup Server to execute remote procedure calls, leaving this option set to 1 does not comprise a security risk.REMAP="BO--Body"The next four options listed by MOREINFO="NONE"sp_configure, MOREINFO="NONE"remote logins, MOREINFO="NONE"remote sites, MOREINFO="NONE"remote connections and MOREINFO="NONE"pre-read packets are set to default values whenever the MOREINFO="NONE"remote access option is 1. See the complete discussion of these options in LINKEND="X99826"Chapter 15,  "Managing Remote Servers"
ID="IN83435"remote access configuration variable
ID="IN53436"Remote loginsconfiguration variables for
ID="IN92437"Configuration variablesConfiguration variablesfor remote loginsremote logins
.RENDERAS="SECT3"ID="IN68438"upgrade version number
upgrade versionREMAP="BO--Body"The upgrade program provided with new releases changes this number. You won't need to change it with MOREINFO="NONE"sp_configure; it merely provides a way to check SQL Server to see that the latest upgrade utility has been run. RENDERAS="SECT3"ID="IN73439"default sortorder id number
default sortorder id ID="IN18440"Numberssort order
ID="IN19441"Defaultssort order
ID="IN66442"Sort orderdefault sortorder id
ID="IN18443"Sort ordernumbersREMAP="BO--Body"This is the number of the sort order that is currently installed as the default on the server. If you want to change the default sort order, see LINKEND="X60641"Chapter 17,  "Language, Sort Order, and Character Set Issues"
. RENDERAS="SECT3"ID="IN85444"default language configuration variable
default language   ID="IN35445"Defaultslanguage
ID="IN19446"us_english language
ID="IN28447"Language defaultsus_englishREMAP="BO--Body"This is the number of the language that is used to display system messages unless a user has chosen another language from those available on the server. us_english always has an ID of 0. Additional languages are assigned unique numbers as they are added. RENDERAS="SECT3"ID="IN75448"language in cache configuration variable
ID="IN19449"Cacheslanguages in
language in cache   ID="IN26450"Languages, alternatecacheREMAP="BO--Body"This number indicates the maximum number of languages that can be simultaneously held in the language cache. The default is 3. RENDERAS="SECT3"ID="IN87451"max online engines configuration variable
max online engines   ID="IN28452"Number (quantity of)engines
ID="IN17453"Enginesnumber ofREMAP="BO--Body"This number controls the number of engines in symmetric multiprocessor environment. The default is 1. See LINKEND="X53199"Chapter 14,  "Managing Multiprocessor Servers"
, for a detailed discussion of how to set this variable for your SMP environment. ID="IN87454"min online engines configuration variableREMAP="BO--Body"The next options, ID="IN76455"min online engines configuration variable
MOREINFO="NONE"min online engines and ID="IN80456"engine adjust interval configuration variable
MOREINFO="NONE"engine adjust interval, are not currently used. RENDERAS="SECT3"ID="IN67457"cpu flush configuration variable
cpu flushID="IN21458"Chargeback accountingREMAP="BO--Body"This number is used in chargeback accounting. It specifies how many machine clock ticks to accumulate before adding usage statistics to syslogins for each user. See LINKEND="X94153""Configuration Variables for Chargeback Accounting" 
 for more information.RENDERAS="SECT3"ID="IN67459"i/o flush configuration variable
i/o flushID="IN21460"Chargeback accountingREMAP="BO--Body"This number is used in chargeback accounting. It specifies how many read or write I/Os to accumulate before flushing the data to syslogins. See LINKEND="X94153""Configuration Variables for Chargeback Accounting" 
 for more information.RENDERAS="SECT3"ID="IN93461"default character set id configuration variable
default character set id   ID="IN32462"Defaultscharacter set ID number
ID="IN24463"Character setsID numberREMAP="BO--Body"This is the number of the default character set used by the server. The default is set at installation time, and can be changed with MOREINFO="NONE"sybinit. See LINKEND="X60641"Chapter 17,  "Language, Sort Order, and Character Set Issues"
 for a discussion of how to change character sets and sort orders. ID="IN68464"stack size configuration variable
ID="IN50465"Sizestack sizeRENDERAS="SECT3"stack sizeID="IN36466"Queriesstack space requirements forREMAP="BO--Body"Certain queries, particularly those with dozens or hundreds of clauses in a MOREINFO="NONE"where column_nameMOREINFO="NONE" inID="IN45467"Roll back processesserver stack capacity and
 clause, can exceed the configured capacity of the server's execution or argument stack. Whenever these queries, or other queries that require large amounts of stack space, are run, SQL Server prints an error message and rolls back the transaction. The two options are to break these large queries into smaller queries, or to increase the size of the server's stack. Changing the stack size affects the amount of memory required for each MOREINFO="NONE"user connection. The following command sets the stack size to 30K:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "stack size", 30720ID="IN113468"reconfigure commandstack size variable andREMAP="BO--Body"When you run MOREINFO="NONE"reconfigure, the server checks the value to determine whether it is an even multiple of your SQL Server's page size. If the value is not an even multiple, MOREINFO="NONE"reconfigure rounds the value up to the nearest page-size multiple, and print an informational message indicating the value.RENDERAS="SECT3"ID="X29469"password expiration interval ID="IN29469"Passwordsexpiration intervalREMAP="BO--Body"This is the number of days that passwords remain in effect after they are changed. If MOREINFO="NONE"password expiration interval is set to 0 (the default value), passwords do not expire. If it is set to a number greater than 0, all passwords expire after the specified number of days. An account's password is considered expired if an interval greater than number_of_days has passed since the last time the password for that account was changed.REMAP="BO--Body"When the number of days remaining before expiration is less than 25% of the value of MOREINFO="NONE"password expiration interval or seven days, whichever is greater, each time the user logs in he or she is greeted with a message giving the number of days remaining before expiration. Of course, users can change their passwords any time before expiration.ID="IN17470"PasswordsexpiredREMAP="BO--Body"When an account's password has expired, the user can still log into SQL Server but cannot execute any commands until the user has used MOREINFO="NONE"sp_password to change his or her password. If the user issues any command other than MOREINFO="NONE"sp_password, the user receives an error message and the command fails. If the System Security Officer changes the user's password while the account is in MOREINFO="NONE"sp_password-only mode, the account returns to normal once the new password is assigned.REMAP="BO--Body"This applies only to login sessions established after the password has expired. Users who are logged in at the time that their passwords expire are not affected until the next time they log in.REMAP="BO--Body"The default for MOREINFO="NONE"password expiration interval is 0 (no expiration). This variable can be set only by System Security Officers.ID="IN85471"audit queue size configuration variableID="X39151" RENDERAS="SECT3"audit queue size ID="IN23472"Auditingqueue, size ofREMAP="BO--Body"The in-memory audit queue holds audit records generated by user processes until the records can be processed and written to the audit trail. A System Security Officer can change the size of the audit queue with the MOREINFO="NONE"audit queue sizeID="IN28473"Performanceaudit queue size
 configuration variable. There is a performance/risk trade-off that must be considered when you configure the queue size. If the queue is too large, records can remain in it for some time. As long as records are in the queue, they are at risk of being lost if the system crashes. However, if the queue is too small it can repeatedly become full, which effects overall system performance: user processes that generate audit records sleep if the audit queue is full. REMAP="BO--Body"The default value is 100, meaning that the audit queue can store up to 100 records. The minimum value is 1, the maximum is 65535.REMAP="BO--Body"Here are some guidelines for determining how big your audit queue should be. You must also take into account the amount of auditing to be done at your site.ID="IN20474"Memoryaudit recordsMARK="BULL" REMAP="BU--Bullet"The memory requirement for a single audit record is 424 bytes. The maximum number of audit records that can be lost in a system crash is the size of the audit queue (in records), plus 20. After records leave the audit queue they remain on a buffer page until they are written to sysaudits, on the disk. The sysaudits pages are flushed to disk at most every 20 records (less if the audit process is not constantly busy).Although the memory requirement for a single audit record is 424 bytes, a record can be as small as 22 bytes when it is written to a data page.ID="IN99475"sysaudits tableextrainfo fieldIn sysaudits, the extrainfo field and fields containing names are of variable length, so audit records that contain full name information are generally larger. REMAP="BO--Body"Thus, the number of audit records that can fit on a page varies roughly from 4 to as many as 80 or more. The memory requirement for the default audit queue size of 100 is approximately 42K. RENDERAS="SECT3"ID="X25794"ID="IN37476"Packet sizeconfiguring
additional netmemREMAP="BO--Body"ID="IN100477"additional netmem configuration variable
MOREINFO="NONE"additional netmem sets the maximum size of additional memory that can be used for network packets that are larger than SQL Server's default packet size. The default value for MOREINFO="NONE"additional netmem is 0, which means that no extra space has been allocated for large packets. See the discussion below, under MOREINFO="NONE"maximum network packet size, for information on setting this configuration variable.REMAP="BO--Body"Memory allocated with MOREINFO="NONE"additional netmem is added to the memory allocated by MOREINFO="NONE"memory. It does not affect other SQL Server memory uses.ID="IN98478"additional netmem configuration variableRENDERAS="SECT3"ID="IN27479"Packet sizesetting default
ID="IN96480"default network packet size configuration variable
default network packet sizeREMAP="BO--Body"This variable configures the default packet size for all SQL Server users. The default value is 512 bytes. You can set MOREINFO="NONE"default network packet size to any multiple of 512 bytes, up to a maximum of 524,288. Values that are not even multiples of 512 are rounded down. REMAP="BO--Body"Memory for all users who log in with the default packet size is allocated from SQL Server's memory pool, set with the MOREINFO="NONE"memory configuration variable. This memory is allocated for network packets when SQL Server boots.REMAP="BO--Body"Each SQL Server user connection uses:MARK="BULL" REMAP="BU--Bullet"1 read buffer1 read overflow buffer1 write bufferREMAP="BO--Body"Each of these buffers requires MOREINFO="NONE"default network packet size bytes. The total amount of memory allocated for network packets is:REMAP="BO--Body"MOREINFO="NONE"user connections * 3 * MOREINFO="NONE"default network packet sizeREMAP="BO--Body"When you provide a new value for this variable, SQL Server requires that amount of memory for each of the three buffers, for each user connection. For example, if you set the MOREINFO="NONE"default network packet size to 1024 bytes, and have 50 user connections, the amount of network memory required is:REMAP="BO--Body"50 * 3 * 1024 = 153600 bytesREMAP="BO--Body"If you increase MOREINFO="NONE"default network packet size, check the MOREINFO="NONE"memory configuration and MOREINFO="NONE"user connections variables to be sure that you leave enough space for other SQL Server memory needs. When you reboot the Server after changing the MOREINFO="NONE"default network packet size, check the messages which report buffer allocation to be sure that you have enough memory remaining.REMAP="BO--Body"If you increase the MOREINFO="NONE"default network packet size, you must also increase theMOREINFO="NONE" maximum network packet size to at least the same size. Execute both MOREINFO="NONE"sp_configure commands, then run MOREINFO="NONE"reconfigure.RENDERAS="SECT3"ID="IN96481"maximum network packet size configuration variable
maximum network packet sizeID="IN27482"Packet sizesetting maximumREMAP="BO--Body"If some of your applications send or receive large amounts of data across the network, these applications can achieve significant performance improvement by using larger packet sizes. Two examples are large bulk copy operations and applications reading or writing large text or image values. Generally, you want to keep the value of MOREINFO="NONE"default network packet size small for users performing short queries, and allow users who send or receive large volumes of data to request larger packet sizes by setting the MOREINFO="NONE"maximum network packet size configuration variable. REMAP="BO--Body"The default value for MOREINFO="NONE"maximum network packet size is 512 bytes. It must always be as large as, or larger than the MOREINFO="NONE"default network packet size. You can reset the maximum size without resetting MOREINFO="NONE"default network packet size. Values that are not even multiples of 512 are rounded down. The maximum value is 524,288 bytes.REMAP="BO--Body"SQL Server guarantees that every user connection will be able to log in at the default packet size. If you increase MOREINFO="NONE"maximum network packet size and MOREINFO="NONE"additional netmem remains set to 0, clients cannot use packet sizes that are larger than the default size: all allocated network memory will be reserved for users at the default size. In this situation, users who request a large packet size when they log in receive a warning message telling them that their application will use the default size.REMAP="BO--Body"To determine the value for ID="IN75483"additional netmem configuration variable
MOREINFO="NONE"additional netmem if your applications use larger packet sizes:MARK="BULL" REMAP="BU--Bullet"Estimate the number of simultaneous users who will request the large packet sizes, and the sizes their applications will request. Multiply this sum by three, since each connection needs three buffers.Add 2% for overhead, rounded up to the next multiple of 512.REMAP="BO--Body"For example, if you estimate these simultaneous needs for larger packet sizes:COLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="171*"COLNAME="C2" COLWIDTH="216*"COLNAME="C3" COLWIDTH="277*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"applicationCOLNAME="C2" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"packet 
sizeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"overheadVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"bcp COLNAME="C2" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"8192COLNAME="C3" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Client-LibraryCOLNAME="C2" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"8192COLNAME="C3" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Client-LibraryCOLNAME="C2" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"4096COLNAME="C3" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Client-LibraryCOLNAME="C2" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"4096COLNAME="C3" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"TotalCOLNAME="C2" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"24576COLNAME="C3" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Multiply by 3 buffers/userCOLNAME="C2" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"*3 73728COLNAME="C3" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Compute 2% overhead and
 round up to a multiple of 512 COLNAME="C2" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"* .02=1474 
     1536COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Add overheadCOLNAME="C2" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"+ 1536COLNAME="C3" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Total additional network memoryCOLNAME="C2" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"75264COLNAME="C3" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"REMAP="BO--Body"You should set MOREINFO="NONE"additional netmem to 75264.REMAP="BO--Body"See MOREINFO="NONE"bcp and MOREINFO="NONE"isql in the SQL Server Utility Programs manual for your platform for information on using larger packet sizes from these programs. Open Client Client-Library documentation includes information on using variable packet sizes.RENDERAS="SECT3"Choosing Packet SizesREMAP="BO--Body"The MOREINFO="NONE"default network packet size andMOREINFO="NONE" maximum network packet size variables must be multiples of 512. In addition, you should choose a Server packet size that works efficiently with the underlying packet size on your network for best performance. The two criteria are:MARK="BULL" REMAP="BU--Bullet"Reducing the number of server reads and writes to the networkReducing unused space in network packets (increasing network throughput)REMAP="BO--Body"For example, if your network packet size carries 1500 bytes of data, setting SQL Server's packet size to 1024 (512*2) will probably achieve better performance than setting it to 1536 (512*3). REMAP="BO--Body"LINKEND="X50907"Figure 12-2: Factors in Determining Packet Size
 shows sample packet sizes.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig12_2.xwd"LBL="Figure 12-2: " ID="X50907"Factors in Determining Packet SizeID="IN35484"Packet sizeconfiguringREMAP="BO--Body"After you determine the available data space of the underlying packets on your network, you should perform your own benchmark tests to determine the optimum size for your configuration. RENDERAS="SECT3"ID="IN76485"extent i/o buffers configuration variable
ID="IN50486"Sizestack size
extent i/o buffers ID="IN25487"Sort buffers, configuringREMAP="BO--Body"MOREINFO="NONE"extent i/o buffers allocates the specified number of extents (8 data pages) for use by the MOREINFO="NONE"create index command. The default value is 0, which means that SQL Server reads and writes individual pages for intermediate sort results and index pages to disk, one page at a time. Allocating extent I/O buffers speeds up indexing by speeding up disk reads and writes. REMAP="BO--Body"All of the buffers are allocated to the first user who creates an index. If multiple users create indexes simultaneously, the first user to start uses extent I/Os; all others uses normal page I/Os. You should try to schedule large index creation at times when few other users are on the system.REMAP="BO--Body"For each extent I/O buffer you configure, the server allocates 8 data pages from memory allocated to the server with the MOREINFO="NONE"memory configuration variable. A reasonable value for a server with 8 Mb of memory and a 20% procedure cache is 10, requiring 160 Kb of memory (10 buffers * 8 pages per buffer * 2048 bytes per page). On Stratus, the total is 320 Kb, 10 buffers * 8 pages * 4K data pages.RENDERAS="SECT3"ID="IN96488"identity burning set factor configuration variable
identity burning set factorREMAP="BO--Body"IDENTITY columns are columns of type numeric and scale zero whose value is generated by SQL Server. Column values can range from a low of 1 to a high determined by the column precision. REMAP="BO--Body"For each table with an IDENTITY column, SQL Server divides the set of possible column values into blocks of consecutive numbers, and makes one block at a time available in memory. Each time you insert a row into a table, SQL Server automatically assigns the IDENTITY column the next available value from the block. When all the numbers in a block have been used, the next block becomes available.REMAP="BO--Body"This method of choosing IDENTITY column values improves server performance. When SQL Server assigns a new column value, it reads the current maximum value from memory and adds 1. Disk access becomes necessary only after all values within the block have been used. Because all remaining numbers in a block are discarded in the event of server failure, this method can lead to gaps in IDENTITY column values.REMAP="BO--Body"Use MOREINFO="NONE"identity burning set factor to change the percentage of potential column values that is made available in each block. This number should be high enough for good performance, but not so high that gaps in column values are unacceptably large. The default value, 5000, releases .05% of the potential IDENTITY column values for use at a time. REMAP="BO--Body"To get the correct value for MOREINFO="NONE"sp_configure, express the percentage in decimal form, then multiply it by 10 7 (10,000,000). For example, to release 15 percent (.15) of the potential IDENTITY column values at a time, you specify a value of .15 times 107 (or 1,500,000) in MOREINFO="NONE"sp_configure:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "identity burning set factor", 1500000ID="IN45489"Configuration variablesresetting
ID="IN45490"Configuration variablesdescribed
ID="INA22491"Segments
ID="IN47492"Storage managementusing segments
ID="IN49493"Database devicesperformance tuningRENDERAS="SECT1"Improving Performance Using Segments ID="IN41494"Space allocationrecovery/performance and
ID="IN65495"Segmentsperformance enhancement and
ID="IN25496"Storage managementissuesREMAP="BO--Body"In a large, multi-database and/or multi-drive SQL Server environment, careful attention to the allocation of space to databases and to the placement of database objects on physical devices can enhance system performance. Preferably, each database will have exclusive use of database devices, that is, it won't share a physical disk with another database. ID="IN32497"Performancespace allocation and
ID="IN22498"Devicesusing separate
ID="IN41499"Performancedatabase object placement andREMAP="BO--Body"Generally, placing a table on one physical device, its nonclustered index on a second physical device, and the transaction log on a third physical device can speed performance. The MOREINFO="NONE"log MOREINFO="NONE"on extension to MOREINFO="NONE"create databaseID="IN64500"sp_logdevice system procedure
 (or MOREINFO="NONE"sp_logdeviceID="IN37501"Database objectsassigning to devices
) handles the placement of the transaction log on a separate physical disk. Placing other database objects on specific physical devices is managed through the use of segments, which provide a technique for labeling collections of database devices. (Placing tables and indexes on segments is explained in LINKEND="X45883"Chapter 3,  "Managing Physical Resources"
.) ID="IN27502"Segmentsplacing objects on
ID="IN37503"Segmentsdatabase object placement on
ID="IN38504"Database objectsplacement on segments
ID="IN39505"Database objectsperformance tuning and
ID="IN41506"Space allocationbalance and split tables
ID="IN38507"Indexesassigning to specific segments
ID="IN35508"Indexessingle device placement forREMAP="BO--Body"Placing objects on segments may improve performance since default placement of objects can split tables and indexes across devices. In particular, a well-tuned database restricts indexes to a single device. RENDERAS="SECT2"ID="IN43509"Multiuser environments, splitting tables in
ID="IN93510"Tablessplitting across segments
Splitting a Large Table Across Segments   ID="IN45511"Devicessplitting tables across
ID="IN31512"Usersmultiple, and performanceREMAP="BO--Body"Performance can be improved for high-volume multi-user applications when large tables are split across segments that are located on separate disk controllers. ID="IN46513"Order of commandsclustered index creation andREMAP="BO--Body"LINKEND="X66405"Figure 12-3: Splitting a Large Table Across Two Segments
 illustrates the process of splitting a table across two segments. First, the devices are initialized with MOREINFO="NONE"disk init, and then assigned to the database with MOREINFO="NONE"alter database. Two segments are created, one on each device. A third segment is created and then extended, so that it labels both devices. The MOREINFO="NONE"system and MOREINFO="NONE"default segments are dropped from both of the devices.ID="IN57514"Clustered indexesClustered indexeson segmentssegments
ID="IN66515"sp_placeobject system procedureREMAP="BO--Body"The table and its clustered index are created on the first segment, and half of the data is loaded. Then, MOREINFO="NONE"sp_placeobject is used to cause all further allocations of disk space to occur on the second segment. Once the data is loaded on the second segment, MOREINFO="NONE"sp_placeobjectID="IN43516"Devicessplitting tables across
ID="IN89517"Tablessplitting across segments
 is used again, this time placing the table on the segments that span both devices. ID="IN46518"Order of commandsclustered index creation andThe order of events is quite important at certain stages. In particular, the clustered index mustID="IN29519"Segmentsclustered indexes on
 be created before the table is placed on the second segment. After that point, creation of a clustered index would cause the entire object to migrate to the second segment. REMAP="BO--Body"If the index is created after the creation of MOREINFO="NONE"seg_bothdisks, the allocation of disk space is unpredictable.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig12_3.xwd"LBL="Figure 12-3: " ID="X66405"Splitting a Large Table Across Two SegmentsID="IN45520"Storage managementusing segments
ID="IN47521"Database devicesperformance tuning
ID="IN20522"SegmentsREMAP="BO--Body"If the table is updated frequently, the balance of disk allocation may change over time. To guarantee that the speed advantages are maintained, it may be necessary to drop and recreate the table.   NUMBER="13" ID="X71792"Locking ID="IN211"LockingRENDERAS="SECT1"IntroductionREMAP="BO--Body"SQL Server protects the tables or data pages currently used by active transactions by locking them. Locking is a concurrency control mechanism: it ensures the consistency of data across transactions. It is needed in a multi-user environment, since several users may be working with the same data at the same time.REMAP="BO--Body"This chapter discusses:MARK="BULL" REMAP="BU--Bullet"The types of consistency issues that arise in multi-user databases, and the SQL Server options for enforcing different levels of consistencyLocks used in SQL ServerUsing the MOREINFO="NONE"set transaction isolation level command to meet ANSI requirementsLocks used by Transact-SQL commandsSystem procedures for examining locks and user processes blocked by locks (MOREINFO="NONE"sp_lock and MOREINFO="NONE"sp_who)SQL Server's handling of deadlocksLocking and performance issues Strategies for reducing lock contentionRENDERAS="SECT1"Overview of LockingID="INA332"Data consistencyREMAP="BO--Body"Consistency of data means that if multiple users repeatedly execute a series of transactions, the results are the same each time. This means that simultaneous retrievals and modifications of data do not interfere with each other.REMAP="BO--Body"For example, assume that the following transactions, T1 and T2, run at approximately the same time:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig13_1.xwd"LBL="Figure 13-1: " ID="X74406"Consistency Levels in TransactionsREMAP="BO--Body"If transaction T2 runs before T1, or after T1, both executions would return the same value. But if T2 could run in the middle of transaction T1 (after the first MOREINFO="NONE"update), the result for transaction T2 would be different by 100. SQL Server prevents this possibility by locking the data used in T1 until the transaction finishes, and only then allowing T2 to complete its query.ID="IN393"Lockingcontrol of
ID="IN204"TransactionslockingREMAP="BO--Body"Locking is handled automatically by SQL Server and is not under user control (with a few exceptions described later). However, you must still know how and when to use transactions to preserve the consistency of your data, while maintaining high performance and throughput. Transactions are described in the Transact-SQL User's Guide and in Volume 1 of the SQL Server Reference Manual.ID="INA295"Isolation levelstransactionsRENDERAS="SECT2"Isolation Levels and TransactionsREMAP="BO--Body"The ANSI standard defines 3 levels of isolation for SQL transactions. Each isolation level specifies the kinds of actions that are not permitted while concurrent transactions execute. Higher levels include the restrictions imposed by the lower levels:ID="IN406"Isolation levelsdirty readsMARK="BULL" REMAP="BU--Bullet"Level 1 prevents dirty reads. "Dirty reads" occur when one transaction modifies a row, and then a second transaction reads that row before the first transaction commits the change. If the first transaction rolls back the change, the information read by the second transaction becomes invalid.REMAP="UN--Under"The example in LINKEND="X74406"Figure 13-1
 shows a case of a "dirty read". The following example describes another case:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig13_2.xwd"LBL="Figure 13-2: "Dirty Reads in TransactionsREMAP="UN--Under"If transaction T4 queries the table after T3 updates it, but before it rolls back the change, the amount calculated by T4 is off by 100.ID="IN587"Isolation levelsnon-repeatable readsLevel 2 prevents non-repeatable reads. "Non-repeatable reads" occur when one transaction reads a row and then a second transaction modifies that row. If the second transaction commits its change, subsequent reads by the first transaction yield different results than the original read. For example: FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig13_3.xwd"LBL="Figure 13-3: "Non-repeatable Reads in TransactionsREMAP="UN--Under"If transaction T6 modifies and commits the changes to the account table after the first query in T5 but before the second one, the same two queries in T5 produce different results.ID="IN508"Isolation levelsphantomsLevel 3 prevents phantoms
. "Phantoms" occur when one transaction reads a set of rows that satisfy a search condition, and then a second transaction modifies the data (through an MOREINFO="NONE"insert, MOREINFO="NONE"delete, or MOREINFO="NONE"update). If the first transaction repeats the read with the same search conditions, it obtains a different set of rows. For example:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig13_4.xwd"LBL="Figure 13-4: "Phantoms in TransactionsREMAP="UN--Under"If transaction T8 inserts rows into the table that satisfy T7's search condition after the T7 executes the first MOREINFO="NONE"select, subsequent reads by T7 using the same query result in a different set of rows.REMAP="BO--Body"By default, SQL Server's transaction isolation level is 1. You can enforce the other isolation levels using the MOREINFO="NONE"holdlock keyword of the MOREINFO="NONE"select statement or using the MOREINFO="NONE"transaction isolation level option of the MOREINFO="NONE"set command. MOREINFO="NONE"holdlock and MOREINFO="NONE"transaction isolation level are described in LINKEND="X96332""holdlock and Isolation Levels"
.ID="IN179"LocksgranularityRENDERAS="SECT2"Granularity of LocksID="IN4010"Lockingconcurrency
ID="IN1611"LockingoverheadREMAP="BO--Body"The granularity of locks in a database refers to how much of the data is locked at one time. In theory, a database server could lock as much as the entire database or as little as a row of data. However, such extremes affect the concurrency (number of users that can access the data) and locking overhead (amount of work to process each lock) in the server.ID="IN1312"Lockssize of
ID="IN2313"Deadlockslock size andREMAP="BO--Body"By increasing the lock size, the amount of work required to obtain a lock becomes smaller, but large locks can degrade performance as more users must wait until the locks are released. By decreasing the lock size, more of the data becomes accessible to other users, but small locks can also degrade performance, since more work is necessary to maintain and coordinate the increased number of locks. Smaller locks also increase the likelihood of deadlocks. To achieve optimum performance, a locking scheme must balance the needs of concurrency and overhead.ID="INC4914"Lockingtemporary tablesREMAP="BO--Body"SQL Server achieves this balance by locking only data pages or tables. It does not lock work or temporary tables because they are always single-user by definition. These locking mechanisms are described in the following sections.RENDERAS="SECT1"Locking in SQL ServerID="INA1815"Lockingcontrol ofREMAP="BO--Body"SQL Server handles all locking decisions. It chooses which type of lock to use after it determines the query plan. However, the way you write a query or transaction can affect the type of lock the server chooses. You can also force the server to choose more or less restrictive locks by including the MOREINFO="NONE"holdlock, MOREINFO="NONE"noholdlock, or MOREINFO="NONE"shared keywords with your queries. Each of these options are described later in this section.ID="IN1416"Lockstypes of
ID="IN2217"Page locksREMAP="BO--Body"SQL Server has two levels of locking: page locks and table locks. Page locks are generally less restrictive (or smaller) than table locks; one table can span multiple data pages. SQL Server attempts to use page locks as frequently as possible to reduce the contention for data among users and to improve concurrency.ID="IN2018"Lockingentire tableREMAP="BO--Body"SQL Server uses table locks to provide more efficient locking when it suspects the whole table may be needed by a statement. For example, the following statement generates one table lock instead of numerous page locks:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"update account set balance = balance * 1.05REMAP="BO--Body"Table locks also provide a way to avoid lock collisions at the page level. SQL Server automatically uses table locks for some commands. REMAP="BO--Body"SQL Server first tries to satisfy requests with page locks whenever possible. However, once a statement accumulates more than 200 page locks, SQL Server attempts to issue a table lock on that object. If it succeeds, the page locks are no longer necessary and are released.ID="IN1019"LockspageRENDERAS="SECT2"Page LocksID="IN1920"Page lockstypes ofREMAP="BO--Body"The following describes the different types of page locks:MARK="BULL" REMAP="BU--Bullet"ID="IN3521"Locksshared page
SharedREMAP="UN--Under"SQL Server applies shared locks for read operations. If a shared lock has been applied to a data page, other transactions can also acquire a shared lock even when the first transaction is not finished. However, no transaction can acquire an exclusive lock on the page until all shared locks on it are released. That is, many transactions can simultaneously read the page, but no one can write to it. REMAP="UN--Under"By default, SQL Server releases shared page locks after the statement completes; it does not hold them until the end of its transaction. Transactions that need an exclusive page lock wait or "block" for the release of the shared page locks before continuing.ID="IN4122"Locksexclusive page
ExclusiveREMAP="UN--Under"SQL Server applies exclusive locks
 for data modification operations. When a transaction gets an exclusive lock, other transactions cannot acquire a lock of any kind on the page until the exclusive lock is released at the end of its transaction. Those other transactions wait or "block" until the exclusive lock is released, before continuing.ID="IN3023"Locksupdate page
UpdateREMAP="UN--Under"SQL Server applies update locks during the initial portion of an MOREINFO="NONE"update or MOREINFO="NONE"delete operation when the pages are being read. The update locks allow shared locks on the page, but do not allow other update locks or exclusive locks. This is an internal lock to help avoid deadlocks. Later, if the pages need to be changed and no other shared locks exist on the pages, the update locks are promoted to exclusive locks.ID="IN2024"Lockingindexes used
ID="IN2525"Search conditionslocking
ID="IN2126"Indexeslocking usingREMAP="BO--Body"In general, read operations acquire shared locks, while write operations acquire exclusive locks. However, SQL Server can only apply page-level exclusive and update locks if the column used in the search argument is part of an index.REMAP="BO--Body"The following examples show what kind of page locks SQL Server uses for the respective statement (assuming indexes are used in their search arguments):REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select balance from account      Shared Page Lockwhere acct_number = 25REMAP="UI--UserInput" FORMAT="LINESPECIFIC"insert account values(34, 500)   Exclusive Page LockREMAP="UI--UserInput" FORMAT="LINESPECIFIC"delete account                   Update Page Lockswhere balance < 0                Exclusive Page LocksREMAP="UI--UserInput" FORMAT="LINESPECIFIC"update account set balance = 0   Update Page Lock,where acct_number = 25           Exclusive Page LockID="IN1127"LockstableRENDERAS="SECT2"Table LocksID="IN2028"Table lockstypes ofREMAP="BO--Body"The following describes the different types of table locks.MARK="BULL" REMAP="BU--Bullet"ID="IN3729"Locksintent table
IntentREMAP="UN--Under"An intent lock
 indicates that certain types of page-level locks are currently held in a table. SQL Server applies an intent table lock with each shared or exclusive page lock. Setting an intent lock prevents other transactions from subsequently acquiring a shared or exclusive lock on the table which contains that locked page. Intent locks are held as long as the concurrent page locks are in effect.ID="IN3730"Locksshared table
SharedREMAP="UN--Under"This lock is similar to the shared page lock, except that it affects the entire table. For example, SQL Server applies shared table locks is with the MOREINFO="NONE"create nonclustered index statement.ID="IN4331"Locksexclusive table
ExclusiveREMAP="UN--Under"This lock is similar to the exclusive page lock, except that it also affects the entire table. SQL Server applies exclusive table locks during the MOREINFO="NONE"create clustered index command, for example. MOREINFO="NONE"update or MOREINFO="NONE"delete statements generate exclusive table locks if their search arguments do not reference indexed columns of the object.REMAP="BO--Body"The following examples show the respective page and table locks issued for each statement:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select balance from account      Intent shared table lock,where acct_number = 25           shared page lockREMAP="UI--UserInput" FORMAT="LINESPECIFIC"insert account values(34, 500)   Intent exclusive table lock,                                 exclusive page lockREMAP="BO--Body"These two examples assume there are indexes on the balance and acct_number; otherwise, SQL Server would just issue exclusive table locks for the statements:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"delete account                   Intent exclusive table lock,where balance < 0                update page locks,                                 exclusive page locksREMAP="UI--UserInput" FORMAT="LINESPECIFIC"update account set balance = 0   Intent exclusive table lock,where acct_number = 25           update page lock,                                 exclusive page lockID="IN2532"LocksdemandRENDERAS="SECT2"Demand LocksID="IN2333"Lockingforcing a writeREMAP="BO--Body"Demand locks prevent any more shared locks from being set.   SQL Server sets a demand lock
 to indicate that a transaction is next in line to lock a table or page. This avoids situations in which read transactions acquire overlapping shared locks, monopolizing a table or page, so that a write transaction waits indefinitely for its exclusive lock.REMAP="BO--Body"After waiting on several different read transactions, SQL Server gives a demand lock to the write transaction. As soon as the existing read transactions finish, the write transaction is allowed to proceed. Any new read transactions must then wait for the write transaction to finish, when its exclusive lock is released. ID="X96332" RENDERAS="SECT2"ID="IN6834"Isolation levelsholdlock keyword
holdlockID="INA5935"Lockingholdlock keyword
 and Isolation LevelsID="IN5936"holdlock keywordlockingREMAP="BO--Body"The MOREINFO="NONE"holdlock keyword, used in MOREINFO="NONE"select and MOREINFO="NONE"readtext statements, makes a shared page or table lock more restrictive. It applies:MARK="BULL" REMAP="BU--Bullet"To shared locksTo the table or view for which it is specifiedFor the duration of the statement or transaction containing the statementID="IN6437"Shared locksholdlock keywordREMAP="BO--Body"In a transaction, MOREINFO="NONE"holdlock instructs SQL Server to hold the shared lock that it has set until the completion of that transaction, instead of releasing the lock as soon as the required table, view, or data page is no longer needed (whether or not the transaction has completed). SQL Server always holds exclusive locks until the end of a transaction.REMAP="BO--Body"When you use MOREINFO="NONE"holdlock with a statement, SQL Server applies shared page locks if the statement's search argument references indexed columns of the object. Otherwise, SQL Server applies a shared table lock. The following example assumes that an index does not exist for acct_number:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select balance                     Shared Table Lockfrom account holdlockwhere acct_number = 25ID="IN3138"LocksreleasingREMAP="BO--Body"SQL Server's default handling of shared locks-releasing page locks as soon as the table or view is no longer needed-allows concurrent access to the database even while a lengthy transaction is proceeding. However, it only enforces ANSI isolation level 1, which prevents "dirty reads". By using the MOREINFO="NONE"holdlock keyword, you can enforce isolation level 3, which prevents "non-repeatable reads" and "phantoms". RENDERAS="SECT3"Preventing Dirty ReadsID="IN2439"Isolation levelsdefaultREMAP="BO--Body"At isolation level 1 (the default), SQL Server prevents "dirty reads" by:MARK="BULL" REMAP="BU--Bullet"Applying exclusive locks on pages or tables being changed. It holds those locks until the end of the transaction.Applying shared locks on pages being searched. It releases those locks after processing the object.REMAP="BO--Body"For example, let's look at the previous case of a "dirty read":FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig13_5.xwd"LBL="Figure 13-5: "Avoiding Dirty Reads in TransactionsREMAP="BO--Body"When the MOREINFO="NONE"update statement in transaction T3 executes, SQL Server applies an exclusive lock (a page-level lock if acct_number is indexed or a table-level lock otherwise) on account. The query in T4 cannot execute until the lock is released, when T3 ends with the MOREINFO="NONE"rollback.RENDERAS="SECT3"Preventing Non-Repeatable Reads and PhantomsREMAP="BO--Body"At isolation level 3, SQL Server also prevents "non-repeatable reads" and "phantoms" by (the restrictions imposed by level 2 are included in level 3):MARK="BULL" REMAP="BU--Bullet"Applying exclusive locks on pages or tables being changedApplying shared locks on pages or tables being searchedREMAP="BO--Body"It holds both exclusive and shared locks until the end of the transaction.REMAP="BO--Body"For example, let's look at the previous case of a "phantom":   FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig13_6.xwd"LBL="Figure 13-6: "Avoiding Phantoms in TransactionsREMAP="BO--Body"In transaction T7, SQL Server applies shared page locks (if an index exists on the acct_number argument) or a shared table lock (if no index exists) and holds those locks until the end of T7. The MOREINFO="NONE"insert in T8 cannot get its exclusive lock until T7 releases those shared locks.ID="IN3640"Transactionsdefault isolation level
ID="IN2441"Isolation levelsdefaultRENDERAS="SECT3"Defining the Default Isolation LevelID="IN10842"transaction isolation level optionsetREMAP="BO--Body"The ANSI standard requires a default transaction isolation level of 3. To enforce this default, Transact-SQL provides the option MOREINFO="NONE"transaction isolation level with the MOREINFO="NONE"set statement. For example, you can make level 3 the default isolation level for a session as follows:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"set transaction isolation level 3REMAP="BO--Body"This instructs SQL Server to automatically apply a MOREINFO="NONE"holdlock to all MOREINFO="NONE"select operations in a transaction. For more information about the MOREINFO="NONE"transaction isolation level option, see "Transactions" in Volume 1 of the SQL Server Reference Manual.ID="IN6143"Lockingnoholdlock keywordRENDERAS="SECT3"Using the noholdlock KeywordID="IN9644"noholdlock keyword, selectREMAP="BO--Body"The MOREINFO="NONE"noholdlock keyword prevents SQL Server from holding any shared locks acquired during the execution of the MOREINFO="NONE"select statement, regardless of the transaction isolation level currently in effect. MOREINFO="NONE"noholdlock is useful in situations when the default isolation level is 3, but your query does not need to hold its shared locks until the end of the transaction.ID="IN1945"Locking and cursors
ID="INA2946"CursorslockingRENDERAS="SECT2"Cursors and LockingID="IN6047"Lockingfor update clauseREMAP="BO--Body"Cursor locking methods are similar to the other locking methods for SQL Server. For cursors declared as MOREINFO="NONE"read only or declared without the MOREINFO="NONE"for update clause, SQL Server uses shared page locks on the data page that includes the current cursor position. For cursors declared with MOREINFO="NONE"for update, SQL Server uses update page locks by default when scanning tables or views referenced with the MOREINFO="NONE"for update clause of MOREINFO="NONE"declare cursor. If the MOREINFO="NONE"for update list is empty, all tables and views referenced in the MOREINFO="NONE"from clause of the select_statement receive update locks. REMAP="BO--Body"SQL Server releases shared and update locks when the cursor position moves off a data page. If a row of an updatable cursor is updated or deleted, SQL Server promotes its shared or update lock to an exclusive lock. Any exclusive locks acquired by a cursor in a transaction are held until the end of that transaction. This also applies to shared or update locks when using the MOREINFO="NONE"holdlock keyword or the MOREINFO="NONE"set isolaMOREINFO="NONE"tion level 3 option. ID="IN2448"Isolation levelscursorsREMAP="BO--Body"The following describes the locking behavior for cursors at each isolation level:MARK="BULL" REMAP="BU--Bullet"At level 1, SQL Server uses a shared or update lock on base table pages that contain a row representing a current cursor position. The page remains locked until the current cursor position moves off the page as a result of MOREINFO="NONE"fetch statements.At level 3, SQL Server uses a shared or update lock on any base table pages which have been read in a transaction through the cursor. SQL Server holds the locks until the transaction ends; it does not release the locks when the data page is no longer needed.ID="INA6649"Cursorsclose on endtran optionREMAP="BO--Body"If you do not set the MOREINFO="NONE"close on endtranID="IN7150"Transactionsclose on endtran option
 option, a cursor remains open past the end of the transaction, and its current page lock remains in effect. It could also continue to acquire locks as it fetches additional rows.ID="IN5751"Lockingshared keywordRENDERAS="SECT3"Using the shared KeywordREMAP="BO--Body"When declaring an updatable cursor using the MOREINFO="NONE"for update clause, you can tell SQL Server to use shared page locks (instead of update page locks) in the cursor's MOREINFO="NONE"declare cursor statement:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"declare cursor_name cursorfor select select_listfrom {table_name | view_name} sharedfor update [of column_name_list]REMAP="BO--Body"This allows other users to obtain an update lock on that table or view. You can only use MOREINFO="NONE"shared with the MOREINFO="NONE"declare cursor statement.ID="IN10552"holdlock keywordshared keyword andREMAP="BO--Body"You can use the MOREINFO="NONE"holdlock keyword in conjunction with MOREINFO="NONE"shared after each table or view name, but MOREINFO="NONE"holdlock must precede MOREINFO="NONE"shared in the MOREINFO="NONE"select statement. For example:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"declare authors_crsr cursorfor select au_id, au_lname, au_fname    from authors holdlock shared    where state != 'CA'    for update of au_lname, au_fnameREMAP="BO--Body"These are the effects of specifying the MOREINFO="NONE"holdlock or MOREINFO="NONE"shared options (of the MOREINFO="NONE"select statement) when defining an updatable cursor:MARK="BULL" REMAP="BU--Bullet"If you omit both options, you can read data on the currently fetched pages only. Other users cannot update, through a cursor or otherwise, your currently fetched pages. Other users can declare a cursor on the same tables you use for your cursor, but they cannot get an update lock on your currently fetched pages.If you specify the MOREINFO="NONE"shared option, you can read data on the currently fetched pages only. Other users cannot update, through a cursor or otherwise, your currently fetched pages.If you specify the MOREINFO="NONE"holdlock option, you can read data on all pages fetched (in a current transaction) or only the pages currently fetched (if not in a transaction). Other users cannot update, through a cursor or otherwise, your currently fetched pages or pages fetched in your current transaction. Other users can declare a cursor on the same tables you use for your cursor, but they cannot get an update lock on your currently fetched pages or pages fetched in your current transaction.ID="IN2753"CursorslockingIf you specify both options, you can read data on all pages fetched (in a current transaction) or only the pages currently fetched (if not in a transaction). Other users cannot update, through a cursor or otherwise, your currently fetched pages. ID="IN1654"Lockssummary of
ID="IN1255"LockslimitsRENDERAS="SECT2"Summary of Lock Types and Lock LimitsREMAP="BO--Body"The following table describes the types of locks SQL Server applies for MOREINFO="NONE"insert and MOREINFO="NONE"create index statements:TOCENTRY="1"LBL="Table 13-1: "Summary of Locks for insert and create index StatementsCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="15*"COLNAME="C2" COLWIDTH="3*"COLNAME="C3" COLWIDTH="3*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"StatementCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Table 
LockCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Page 
LockVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"insert COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"IXCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"XCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create MOREINFO="NONE"clustered index COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"XCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"-COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"create nonclustered index COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"-COLNAME="C1" NAMEST="C1" NAMEEND="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"IX = intent exclusive, S = shared, X = exclusiveCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"REMAP="BO--Body"This next table describes the types of locks SQL Server applies for MOREINFO="NONE"select, MOREINFO="NONE"delete, and MOREINFO="NONE"update statements. It divides the MOREINFO="NONE"select, MOREINFO="NONE"update, and MOREINFO="NONE"delete statements into two groups, since the types of locks they use can vary if the statement's search argument references indexed columns on the object:TOCENTRY="1"LBL="Table 13-2: "Summary of Locks for select, update and delete StatementsCOLS="5" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="10*"COLNAME="C2" COLWIDTH="3*"COLNAME="C3" COLWIDTH="3*"COLNAME="C4" COLWIDTH="3*"COLNAME="C5" COLWIDTH="3*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C2" NAMEST="C2" NAMEEND="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"IndexedCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C4" NAMEST="C4" NAMEEND="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Not IndexedCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StatementCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Table 
LockCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Page 
LockCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Table 
LockCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Page 
LockVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"select COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ISCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ISCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"select with holdlock COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ISCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"-COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"update COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"IXCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"U, XCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"XCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"-COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"delete COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"IXCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"U, XCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"XCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"-COLNAME="C1" NAMEST="C1" NAMEEND="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"IS = intent shared, IX = intent exclusive, S = shared, U = update, X = exclusiveREMAP="BO--Body"Note that the above tables do not describe situations in which SQL Server initially uses table locks (if a query requires the entire table), nor when it promotes to a table lock after 200 page locks.RENDERAS="SECT3"Configuring SQL Server's Lock LimitID="IN8056"sp_configure system procedurelock limits andREMAP="BO--Body"Each lock counts toward SQL Server's limit of total number of locks. By default, SQL Server is configured with 5000 locks. A System Administrator can change this limit using the MOREINFO="NONE"sp_configure system procedure. For example:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure locks, 10000REMAP="BO--Body"You may also need to adjust the MOREINFO="NONE"memory option of MOREINFO="NONE"sp_configure, since more locks use additional memory.REMAP="BO--Body"The number of locks required by a server can vary depending on the number of concurrent processes and the types of actions performed by the transactions. However, a general assumption is that each concurrent process uses about 20 locks. For more information about MOREINFO="NONE"sp_configure, see LINKEND="X26541"Chapter 12,  "Fine-Tuning Performance and Operations"
.ID="IN3257"Lockingexample ofRENDERAS="SECT2"Example of LockingREMAP="BO--Body"This section describes the sequence of locks applied by SQL Server for the two transactions used at the beginning of this chapter:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig13_7.xwd"LBL="Figure 13-7: "Locking Example Between Two TransactionsREMAP="BO--Body"The following sequence of locks assumes an index exists on the acct_number column of the account table, a default isolation level of 1, and 10 rows per data page (50 rows divided by 10 equals 5 data pages):PGWIDE=1 TOCENTRY="1"LBL="Table 13-3: "Sequence of Locks at Isolation Level 1COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="1*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"T1 LocksCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"T2 LocksVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Update lock page 1
Exclusive lock page 1
Intent exclusive table lock on account
Update lock page 5
Exclusive lock page 5
Release all locks at commitCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"
Shared lock page 1 denied, wait for release




Shared lock page 1, release lock page 1
Intent shared table lock on account
Shared lock page 2, release lock page 2
Shared lock page 3, release lock page 3
Shared lock page 4, release lock page 4
Shared lock page 5, release lock page 5
Release intent shared table lockREMAP="BO--Body"If no index exists for acct_number, SQL Server applies exclusive table locks for T1 instead of page locks:PGWIDE=1 TOCENTRY="1"LBL="Table 13-4: "Sequence of Locks at Isolation Level 1 with No IndexCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="1*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"T1 LocksCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"T2 LocksVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Exclusive table lock on account
Release exclusive table lock at commitCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Shared lock page 1 denied, wait for release

Shared lock page 1, release lock page 1
Intent shared table lock on account
Shared lock page 2, release lock page 2
Shared lock page 3, release lock page 3
Shared lock page 4, release lock page 4
Shared lock page 5, release lock page 5
Release intent shared table lockREMAP="BO--Body"If you add a MOREINFO="NONE"holdlock or make isolation level 3 the default using the MOREINFO="NONE"transaction isolation level option for transaction T2, the lock sequence is as follows (assuming an index exists for acct_number):PGWIDE=1 TOCENTRY="1"LBL="Table 13-5: "Sequence of Locks at Isolation Level 3COLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="1*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"T1 LocksCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"T2 LocksVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Update lock page 1
Exclusive lock page 1
Intent exclusive table lock on account
Update lock page 5
Exclusive lock page 5
Release all locks at commitCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"
Shared lock page 1 denied, wait for release




Shared lock page 1
Intent shared table lock on account
Shared lock page 2
Shared lock page 3
Shared lock page 4
Shared lock page 5
Release all locks at commitREMAP="BO--Body"If you add MOREINFO="NONE"holdlock or make MOREINFO="NONE"transaction isolation level 3 for T2 and no index exists for acct_numberID="IN3058"Lockingexample of
, SQL Server applies table locks for both transactions instead of page locks:PGWIDE=1 TOCENTRY="1"LBL="Table 13-6: " Sequence of Locks at Isolation Level 3 with No IndexCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="1*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"T1 LocksCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"T2 LocksVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Exclusive table lock on account
Release exclusive table lock at commitCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Shared table lock denied, wait for release

Shared table lock on account
Release shared table lock at commitID="IN1359"LocksviewingRENDERAS="SECT2"Viewing Locks with sp_lockID="IN5960"sp_lock system procedureREMAP="BO--Body"To get a report on the locks currently being held on SQL Server, use the system procedure MOREINFO="NONE"sp_lock. For example:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_lockREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"The class column will dispaly the cursor name for locks associated with a cursor for the current user and the cursor id for other users.spid  locktype      table_id    page    dbname  class----  -----------   ----------  ----    ------  ---------------1     Ex_intent     1308531695  0       master  Non cursor lock1     Ex_page       1308531695  761     master  Non cursor lock5     Ex_intent     144003544   0       userdb  Non cursor lock5     Ex_page       144003544   509     userdb  Non cursor lock5     Ex_page       144003544   1419    userdb  Non cursor lock5     Ex_page       144003544   1420    userdb  Non cursor lock5     Ex_page       144003544   1440    userdb  Non cursor lock5     Sh_page       144003544   1440    userdb  Non cursor lock5     Sh_table      144003544   0       userdb  Non cursor lock5     Update_page   144003544   1440    userdb  Non cursor lock4     Ex_table      240003886   0       pubs2   Non cursor lock4     Sh_intent     112003436   0       pubs2   Non cursor lock4     Ex_intent-blk 112003436   0       pubs2   Non cursor lockID="IN1461"Lockstypes ofREMAP="BO--Body"The MOREINFO="NONE"locktype column indicates not only whether the lock is a shared lock ("Sh" prefix), an exclusive lock ("Ex" prefix) or an "update" lock, but also whether it is held on a table ("table" or "intent"), or on a "page".REMAP="BO--Body"A "blk" suffix indicates that this process is blocking another process which needs to acquire a lock. As soon as this process completes, the other process(es) move forward. A "demand" suffix indicates that a process will acquire an exclusive lock as soon as all current shared locks are released.ID="INA1662"Blocking processRENDERAS="SECT2"Information about Blocked Processes in sp_whoID="IN7563"sp_who system procedureblocking processREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_who reports on system processes. If a user's command is being blocked by locks held by another process:MARK="BULL" REMAP="BU--Bullet"The status column shows "lock sleep"The blk column shows the process ID of the process that holds the lock or locksID="IN5564"DeadlocksRENDERAS="SECT1"Deadlocks and Concurrency in SQL ServerREMAP="BO--Body"A deadlock occurs when two users each have a lock on a separate object. Each wants to acquire an additional lock on the other user's object. When this happens, the first user is waiting for the second to let go of the lock, but the second user will not let it go until the lock on the first user's object is released. REMAP="BO--Body"For example:FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig13_8.xwd"LBL="Figure 13-8: " ID="X92279"Deadlocks in TransactionsREMAP="BO--Body"If transactions T9 and T10 execute simultaneously and both transactions acquire exclusive locks with their initial MOREINFO="NONE"update statements, they become deadlocked waiting for each other to release their locks, which won't happen until the MOREINFO="NONE"commit transaction.ID="IN1965"DeadlocksdetectionREMAP="BO--Body"SQL Server detects deadlocks and chooses the user whose process has accumulated the least amount of CPU time as the victim. SQL Server rolls back that user's transaction, notifies the application program of this action with message number 1205, and allows the other users' processes to move forward. ID="IN3266"Transactionsdeadlock resolutionREMAP="BO--Body"In a multi-user situation, each user's application program should check every transaction for message 1205. It indicates that the user was selected as the victim of a deadlock. The application program must restart that transaction. ID="IN1867"DeadlocksavoidingRENDERAS="SECT2"Avoiding DeadlocksREMAP="BO--Body"It is possible to encounter deadlocks when many long-running transactions are executed at the same time in the same database. Deadlocks become more common as the lock contention increases between those transactions (decreasing concurrency). Reducing lock contention, such as avoiding table locks and not holding shared locks, is described at the end of the chapter.REMAP="BO--Body"Well-designed applications can avoid deadlocks by always acquiring locks in the same order. Updates to multiple tables should always be performed in the same order, with no table updated twice. REMAP="BO--Body"For example, the transactions described in LINKEND="X92279"Figure 13-8
 could avoid their deadlock by updating either the savings or checking table first in both transactions. That way, one transaction gets the exclusive lock first and proceeds, while the other transaction waits to receive its exclusive lock on the same table when the first transaction ends.REMAP="BO--Body"SQL Server also avoids deadlocks by applying the following locks:ID="IN2668"Update locksdeadlocks andMARK="BULL" REMAP="BU--Bullet"Update page locks permit only one exclusive page lock at a time. Other update or exclusive locks must wait until that exclusive lock is released before accessing the page. However, update locks affect concurrency since the net effect is that all updates on a page happen only one at a time.ID="IN3269"Intent table locksdeadlocks and
ID="INA5170"DeadlocksIntent table locks act as a place holder when shared or exclusive page locks are acquired. They inform other transactions that need table locks whether or not they can be granted without having the server scan the page lock queue. It also helps avoid lock collisions between page level locks and table level locks.ID="IN4371"LockingperformanceRENDERAS="SECT1"Locking and Performance of SQL ServerID="IN4072"LockingconcurrencyREMAP="BO--Body"How locking affects the performance of SQL Server is directly related to the issue of concurrency. An increase in the number of concurrent users of a server may also increase lock contentions which decreases performance. Locks affect performance when:MARK="BULL" REMAP="BU--Bullet"Processes wait for locks to be releasedREMAP="UN--Under"Any time a process waits for another process to complete its transaction and release its locks, the overall response time and throughput is affected. This is what we mean by lock contention.Transactions result in frequent deadlocksREMAP="UN--Under"As described earlier, any deadlock causes one transaction to be aborted which must then be restarted by the application; this severely affects the throughput of applications. Deadlocks cannot be completely avoided. However, redesigning the way transactions access the data can help reduce their frequency.Creating indexes locks tablesREMAP="UN--Under"Creating a clustered index locks all users out of the table until the index is created. Creating a nonclustered index locks out all updates until it is created. Either way, you should create indexes at time when there is little other activity on your server.REMAP="BO--Body"The next section provides some tips on reducing lock contention to increase your server's performance.ID="IN2773"Lockingreducing contentionRENDERAS="SECT2"Reducing Lock ContentionREMAP="BO--Body"Redesigning the tables that have the highest lock contention may also improve performance. For example, assume a table has no index on one of its columns. Any update specifying that column in its search argument generates a table lock. Table locks generate more lock contentions than page locks, since no other process can then access the table. By creating an index on that column, those updates first use page locks, improving the concurrency in accessing the table.ID="IN6474"fillfactor optionlocking andREMAP="BO--Body"Another way to reduce contention is by decreasing the MOREINFO="NONE"fillfactor of your indexes. MOREINFO="NONE"fillfactor (defined by either MOREINFO="NONE"sp_configure or MOREINFO="NONE"create index) determines how full SQL Server makes each data page when it is creating a new index on existing data. When there is more empty space in the index and leaf pages, the chances of lock contention are reduced. REMAP="BO--Body"As the keys are spread out over more pages, it becomes more likely that a page you want is not the page someone else also needs. In addition, since MOREINFO="NONE"fillfactor helps reduce page splits, exclusive locks are also minimized on the index, improving performance. For more information about MOREINFO="NONE"fillfactor, see LINKEND="X26541"Chapter 12,  "Fine-Tuning Performance and Operations"
.ID="INA1875"LockingguidelinesREMAP="BO--Body"The following provides additional guidelines to reducing lock contention:MARK="BULL" REMAP="BU--Bullet"Avoid "hot spots."REMAP="UN--Under""Hot spots" occur when all updates take place at a certain page, as in a "heap" (non-indexed table) where all additions happen at the last page. For example, a history table with no index which is updated by everyone will always have lock contentions on the last page.REMAP="UN--Under"One solution is to create separate history tables for various groups of users, which can reduce the wait on the page. You can also create a clustered index to distribute the data across the table.Avoid writing transactions which include user interaction.REMAP="UN--Under"Since SQL Server holds some locks until the transaction commits, if a user can hold up the commit (even for a short time), there will be higher lock contention.Keep transactions short.REMAP="UN--Under"The longer the transaction, the longer exclusive or update locks are held. This blocks other activity and leads to more possible deadlocks.Keep transactions in one batch.REMAP="UN--Under"Network interaction during a transaction can introduce unnecessary delays in completing the transaction and releasing its locks.Use MOREINFO="NONE"holdlock only when necessary.REMAP="UN--Under"Updates by other transactions may be delayed until a transaction with a MOREINFO="NONE"holdlock releases its shared lock at the end of the transaction. Use MOREINFO="NONE"holdlockID="IN1976"Locking
 only to enforce isolation level 3 when "non-repeatable reads" or "phantoms" may interfere with your results.REMAP="BO--Body"NUMBER="14" ID="X53199"Managing Multiprocessor ServersRENDERAS="SECT1"IntroductionID="IN271"Virtual Server Architecture
ID="IN1082"Parallel processing. See SMP (symmetric multiprocessing) systemsREMAP="BO--Body"SQL Server implements a Virtual Server Architecture, enabling it to take advantage of the parallel processing feature of symmetric multiprocessing (SMP) systems. SQL Server can be run as a single process or as multiple cooperating processes, depending on the number of CPUs available and the demands placed on the server. This chapter describes: ID="IN1033"Processes, SMP. See SMP (symmetric multiprocessing) systems
ID="IN1224"Symmetric multiprocessing systems. See SMP (symmetric multiprocessing) systemsMARK="BULL" REMAP="BU--Bullet"The target machine architecture for the SMP SQL Server SQL Server architecture for SMP environments SQL Server task management in the SMP environment ID="IN705"Server engine. See EnginesManaging multiple engines Application design issues RENDERAS="SECT1"DefinitionsREMAP="BO--Body"Here are the definitions of several terms used in this chapter: MARK="BULL" REMAP="BU--Bullet"ID="INA246"Processes (Server tasks)
Process: An execution environment scheduled onto physical CPUs by the operating system. ID="IN187"Engines
Engine
: A process running a SQL Server that communicates with the other SQL Server processes via shared memory. An engine can be thought of as one CPU's worth of processing power. It does not represent a particular CPU. Also referred to as "server engine
". Task: An execution environment within the SQL Server scheduled onto engines by the SQL Server. ID="IN278"Process affinity
ID="IN289"Affinity, process
Affinity: Describes a process in which a certain SQL Server task runs only on a certain engine, or that a certain engine runs only on a certain CPU. ID="IN8310"Multiprocessor servers, managingRENDERAS="SECT1"Target Architecture ID="IN6611"SMP (symmetric multiprocessing) systemsarchitecture
ID="IN3812"Architecture, Server SMPREMAP="BO--Body"The SMP environment product is intended for machines with the following features: MARK="BULL" REMAP="BU--Bullet"A symmetric multiprocessing operating system ID="IN1313"MemorysharedShared memory over a common bus 1-32 processors No master processor Very high throughput REMAP="BO--Body"ID="IN4214"Serversarchitecture for SMP
ID="IN5815"Operating systemsSYBASE task scheduling and
ID="IN4816"CPU usagesymmetric processing and
SQL Server consists of one or more cooperating processes (called ID="IN4617"Enginesfunctions and scheduling
engines), all running the server program in parallel. See LINKEND="X58125"Figure 14-1
.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig14_1.xwd"LBL="Figure 14-1: " ID="X58125"SMP Environment ArchitectureREMAP="BO--Body"Only one of the engines, engine 0, handles tasks involving network management; otherwise, all engines are peers. The engines communicate via shared memory.REMAP="BO--Body"The server engines perform all database functions, including updates and logging. SQL Server, not the operating system, dynamically schedules client tasks onto available engines. When an engine becomes available, it runs any runnable task. REMAP="BO--Body"The operating system schedules the engine processes onto physical processors. Any available CPU is used for any engine; there is no ID="IN3418"Process affinity
affinity between engines and CPUs. The processing is called symmetricID="IN3619"Architecture, Server SMP
ID="INA6420"SMP (symmetric multiprocessing) systemsarchitecture
ID="IN4021"Serversarchitecture for SMP
ID="INA5622"Operating systemsSYBASE task scheduling and
ID="IN4423"Enginesfunctions and scheduling
ID="IN4624"CPU usagesymmetric processing and
 because the lack of affinity between processes and CPUs creates a symmetrically balanced loadID="IN7225"SMP (symmetric multiprocessing) systemstask management in
ID="IN8126"Serverstask management in SMPRENDERAS="SECT2"SQL Server Task Management for SMP   REMAP="BO--Body"LINKEND="X79909"Figure 14-2: SQL Server Task Management in the SMP Environment
 illustrates SQL Server task management. Here is a brief description of the process: NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"A client application issues a login request. In response, SQL Server creates a user task to handle work from the client.   The client presents SQL Server with work to do, that is, a series of Transact-SQL commands. ID="IN1227"Queues, taskSQL Server adds the client's user task to the runnable task queue. The server engines compete for the user task at the head of the task queue. ID="IN3728"Enginestasks of serverThe server engine that takes the user task from the queue converts the Transact-SQL commands into low level steps, such as disk I/O. ID="IN4029"Blocks, server engine task
ID="IN2330"LockingSMP environmentThe engine executes each step until the task completes or blocks while waiting for I/O or locking. When the task blocks, it yields the server engine to run other user tasks. Once the block is resolved (i.e., disk I/O completes or a lock is acquired), the user task is again added to the runnable task queue. ID="IN1131"Sleep queueAfter the task blocks for the last time, it continues executing until it finishes. At that time the user task yields the server engine and moves to the sleeping task queue until the client presents the server with more work.ID="IN3832"Blocks, server engine taskFLOAT="0"FORMAT="UNKNOWN" FILEREF="fig14_2.xwd"LBL="Figure 14-2: " ID="X79909"SQL Server Task Management in the SMP EnvironmentID="IN7733"Serverstask management in SMP
ID="IN7034"SMP (symmetric multiprocessing) systemstask management in
ID="INA3535"Enginestasks of serverREMAP="BO--Body"The SMP SQL Server is designed in such a way that applications and users see a single database service, no matter how many engines and processors there are. ID="IN7936"SMP (symmetric multiprocessing) systemsenvironment configuration
ID="IN5337"Configuration structureSMP environmentRENDERAS="SECT1"Configuring an SMP Environment   ID="INC3738"StructureconfigurationREMAP="BO--Body"Configuration of the SMP environment is much the same as in the uniprocessor environment, although SMP machines are typically bigger and handle many more users. The SMP environment provides the additional ability to control the number of engines. ID="IN3039"EnginesmanagingRENDERAS="SECT2"Managing Engines   ID="IN3140"Enginesnumber of
ID="IN4141"PerformanceSMP environmentREMAP="BO--Body"To achieve optimum performance from an SMP system, you must maintain the right number of engines. ID="IN4542"CPU usagenumber of engines andREMAP="BO--Body"An engine represents a certain amount of CPU power. It is a configurable resource like memory. An engine does not represent a particular CPU. ID="IN6843"Number (quantity of)engines
ID="IN2744"Enginesresetting number ofRENDERAS="SECT3"Resetting the Number of Engines   ID="IN7845"Master devicebuildmaster initialization ofREMAP="BO--Body"When you create a new master device (specifically, when you run ID="INA6246"buildmaster utility command
MOREINFO="NONE"buildmaster), or when you start an SMP server for the first time on a database that has been upgraded from an earlier release, the system is configured for a single engine. To engage multiple engines, you must reset the number of engines the first time you start the server. You may also want to reset the number of engines at other times. REMAP="BO--Body"For example: MARK="BULL" REMAP="BU--Bullet"You might want to increase the number of engines if current performance is not adequate for an application and there are enough CPUs on the machine. You might want to decrease the number of engines if a hardware failure disables CPUs on the machine. ID="IN7647"max online engines configuration variableREMAP="BO--Body"The MOREINFO="NONE"max online enginesID="IN11848"sp_configure system proceduremax online engines
 configuration variable controls the number of engines. Reset this configuration variable with the MOREINFO="NONE"sp_configure system procedure. For example, to set the number of engines to 3: NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Issue the following command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "max online engines", 3 Run the Transact-SQL MOREINFO="NONE"reconfigure command Stop and restart the server. ID="IN2449"RecoverySMP engines andREMAP="BO--Body"Repeat these steps whenever you need to change the number of engines. Engines other than engine 0 are brought on line after recovery is complete. ID="INA7650"min online engines configuration variableREMAP="BO--Body"The MOREINFO="NONE"min online engines configuration variable is not used in this release, and you cannot currently specify the minimum number of engines. RENDERAS="SECT3"Choosing the Right Number of Engines   REMAP="BO--Body"It is important to choose the right number of engines. Here are some pointers for choosing how many engines to use: MARK="BULL" REMAP="BU--Bullet"Never have more engines than CPUs. Doing so may slow performance. If a CPU goes off line, use MOREINFO="NONE"sp_configure to reduce the MOREINFO="NONE"max online engines configuration variable by one, run MOREINFO="NONE"reconfigure, and restart the server. Have only as many engines as usable CPUs. If there is a lot of processing by the client or other non-server processes, then one engine per CPU may be excessive. Remember, too, that the operating system may take up part of one of the CPUs. Have enoughID="IN2951"Enginesnumber of
ID="IN4352"CPU usagenumber of engines and
 engines. It is good practice to start with few engines and add additional ones when the existing CPUs are almost fully used. If there are too few engines, the capacity of the existing engines will be exceeded and bottlenecks may result. RENDERAS="SECT3"ID="IN4153"CPU usagemonitoring
Monitoring CPU Usage   REMAP="BO--Body"To maintain the correct number of engines, monitor CPU usage with an operating system utility. Consult the System
 Administration Guide Supplement 
ID="IN2854"Enginesmanaging
for the appropriate utility for your operating system. ID="IN3755"MemoryMemoryin SMP sitesSMP sitesRENDERAS="SECT2"Managing Memory   ID="IN6456"memory configuration variableREMAP="BO--Body"The MOREINFO="NONE"memory configuration variable may require special attention in SMP sites. REMAP="BO--Body"Not all platforms require a higher memory configuration variable than before. If your platform does, the installed value of the memory configuration variable reflects this, so you may never need to adjust it. If error message 701, REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"There is insufficient memory to run this query ID="IN5157"Configuration structureSMP environment
ID="IN7758"SMP (symmetric multiprocessing) systemsenvironment configuration
ID="IN3959"PerformanceSMP environment
ID="IN3560"StructureconfigurationREMAP="BO--Body"appears frequently in the error log and at the client terminal, you may wish to increase the amount of memory available. RENDERAS="SECT1"Managing DisksID="IN5861"SMP (symmetric multiprocessing) systemsdisk management in
ID="INA2262"Devicesusing separate
ID="IN5763"Database devicesDatabase devicesin SMP sitesSMP sites
ID="IN7864"create database commandSMP environment andREMAP="BO--Body"The additional processing power of the SMP product may increase demands on the disks. Therefore, it is best to spread data across multiple devices for heavily used databases. Specify these devices when using the MOREINFO="NONE"create databaseID="IN7965"Multiprocessor servers, managing
 command. (See LINKEND="X53199"Chapter 14,  "Managing Multiprocessor Servers"
, for a discussion of MOREINFO="NONE"create database.)ID="IN6666"Application designApplication designfor SMP ServersSMP ServersRENDERAS="SECT1"Application Design ConsiderationsID="IN3667"Serversuniprocessor and SMP serversREMAP="BO--Body"The SMP SQL Server is compatible with uniprocessor SQL Server. Applications that run on uniprocessor servers should run on SMP servers as well. ID="IN2868"Concurrency, SMP environmentRENDERAS="SECT2"ConcurrencyID="INB6169"SMP (symmetric multiprocessing) systemsapplication design inREMAP="BO--Body"Because the increased throughput of the SMP SQL Server makes it more likely that multiple processes may try to access a data page simultaneously, it is especially important to follow principles of good database design in order to avoid contention. The following are some of the application design considerations that are especially important in an SMP environment. ID="IN4570"IndexesmultipleRENDERAS="SECT3"Multiple IndexesID="IN3671"IndexesSMP environment and multipleREMAP="BO--Body"The increased throughput of SMP may result in increased lock contention when tables with multiple indexes are updated. Allow no more than two or three indexes on any table that will be updated often. ID="IN13872"fillfactor configuration variablefillfactor configuration variablein SMP environmentSMP environment
ID="IN12873"create index commandfillfactor configuration variable andRENDERAS="SECT3"Adjusting the fillfactor for create index CommandsID="IN8874"fillfactor configuration variableindex page size andREMAP="BO--Body"You may need to adjust the MOREINFO="NONE"fillfactor in MOREINFO="NONE"create index commands. Because of the added throughput with SMP, setting a lower MOREINFO="NONE"fillfactorID="IN1875"Pages (data)index
ID="IN6876"Pages (data)fillfactor for index
 may reduce contention for the data pages. ID="IN4977"TransactionsTransactionsin SMP sitesSMP sitesRENDERAS="SECT3"Transaction LengthREMAP="BO--Body"Transactions that include many statements or take a long time to run may result in increased lock contention. Keep transactions as short as possible. ID="INA3378"TablestemporaryRENDERAS="SECT3"Temporary TablesID="IN10179"tempdb databasetempdb databasein SMP environmentSMP environmentREMAP="BO--Body"Temporary tables (tables in MOREINFO="NONE"tempdb) do not cause contention, because they are associated with individual users and are not shared. REMAP="BO--Body"NUMBER="15" ID="X99826"Managing Remote ServersID="IN1221"ServersServersSee also Processes (Server tasks); Remote servers!see also
ID="IN762"RPCs. See Remote procedure calls
ID="IN873"Procedure calls. See Remote procedure calls
ID="IN884"Local and remote servers. See Remote servers
ID="IN855"Calls, remote procedureREMAP="BO--Body"Users on a local SQL Server can execute stored procedures on a remote SQL Server. Executing a remote procedure call sends the results of the remote process to the calling process-usually the user's screen. This chapter discusses the steps the System Administrator and System Security Officer of each SQL Server must execute to enable remote procedure calls. They are: REMAP="BO--Body"On the local server: ID="IN506"sysservers tableMARK="BULL" REMAP="BU--Bullet"Both the local server and remote server must be listed in the system table MOREINFO="NONE"master..sysservers (with MOREINFO="NONE"sp_addserver). This must be done by a System Security Officer.The remote server must be listed in the interfaces file for the local server. (The interfaces file, set up when SQL Server is installed, lists the names and addresses of all the servers you can access.) REMAP="BO--Body"On the remote server: MARK="BULL" REMAP="BU--Bullet"The server originating the remote procedure call must be listed in the MOREINFO="NONE"sysservers table (with MOREINFO="NONE"sp_addserver). This is done by a System Security Officer.The user originating the remote procedure must be allowed access to the server (with MOREINFO="NONE"sp_addlogin and MOREINFO="NONE"sp_addremotelogin). MOREINFO="NONE"sp_addlogin is executed by a System Security Officer, MOREINFO="NONE"sp_addremotelogin by a System Administrator.The remote login name must be added as a user of the appropriate database and must have permission to execute the procedure. (If MOREINFO="NONE"execute permission is granted to "public," the user does not need to be granted specific permission.) LINKEND="X25936"Figure 15-1
 illustrates the steps.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig15_1.xwd"LBL="Figure 15-1: " ID="X25936"Setting Up Servers to Allow Remote Procedure CallsID="IN397"Remote serversRENDERAS="SECT1"Managing Remote ServersID="IN1028"System proceduresSystem proceduresfor managing remote serversmanaging remote serversREMAP="BO--Body"Four system procedures are used to manage remote servers: MARK="BULL" REMAP="BU--Bullet"ID="IN719"Addingremote servers
MOREINFO="NONE"sp_addserver: Adds a server name to MOREINFO="NONE"master..sysservers MOREINFO="NONE"sp_dropserver: Drops a server name from MOREINFO="NONE"master..sysservers MOREINFO="NONE"sp_helpserver: Displays information about servers MOREINFO="NONE"sp_serveroption: Displays or changes server options ID="IN2810"ServersremoteRENDERAS="SECT2"Adding a Remote Server   ID="IN8911"sp_addserver system procedureREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_addserverID="IN6412"sysservers table
 adds entries to the MOREINFO="NONE"sysservers table. On the server originating the call, you must add an entry for the local server, and an entry for each remote server that your server will call. Only a System Security Officer can execute MOREINFO="NONE"sp_addserver. When you create entries for a remote server, you can choose to:MARK="BULL" REMAP="BU--Bullet"Always refer to them by the name listed in the interfaces file, orProvide a local name for the remote server. For example, if the name in the interfaces file is "MAIN_PRODUCTION," you may want to call it simply "main." REMAP="BO--Body"Here is the syntax: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_addserver MOREINFO="NONE"server_name [{, local | null} [, network_name]]MARK="BULL" REMAP="BU--Bullet"The ID="IN4313"Namesremote server
MOREINFO="NONE"server_name parameter provides the local "call name" for the remote server. Users will type this name when they issue remote procedure calls. If this name is not the same as the remote server's name in the interfaces file, you must provide that name as the third parameter, network_name.REMAP="UN--Under"The remote server must be listed in the interfaces file on the local machine. If it's not listed, copy the interfaces file entry from the remote server and append it to your existing interfaces file. Be sure to keep the same port numbers. ID="IN7614"local option, sp_addserverThe MOREINFO="NONE"localID="IN2715"Local servers
 option identifies the server being added as a local server. The MOREINFO="NONE"local value is used only once after start-up, or after a reboot, to identify the local server name so that it can appear in messages printed out by SQL Server. MOREINFO="NONE"null specifies that this server is a remote server. For network_name, give the name for the remote server that is listed in the interfaces file for the server named srvnameID="INA2916"Aliasesserver
. This optional third argument permits you to establish local aliases for other SQL Servers, Open Servers, or Backup Servers that you may need to communicate with. If you do not specify a network_name, it defaults to srvname.REMAP="BO--Body"ID="INA12117"@@servername global variable[servername global variable
The server originating a remote procedure call must have a local entry. You must restart SQL Server to set the value of the global variable MOREINFO="NONE"@@servername. REMAP="BO--Body"The following examples create entries for the local server named DOCS:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addserver DOCS, localREMAP="BO--Body"This example creates an entry for a remote server named GATEWAY:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addserver GATEWAY REMAP="BO--Body"Here's how a user could runMOREINFO="NONE" sp_who on GATEWAY:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"GATEWAY.sybsytemprocs.dbo.sp_whoREMAP="UI--UserInput" FORMAT="LINESPECIFIC"orREMAP="UI--UserInput" FORMAT="LINESPECIFIC"GATEWAY...sp_whoREMAP="BO--Body"The following example gives a remote server called MAIN_PRODUCTION the local alias "main":REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addserver main, null, MAIN_PRODUCTIONREMAP="BO--Body"Users can then type:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"main...sp_whoRENDERAS="SECT2"ID="IN2918"Namesserver
Managing Remote Server Names   REMAP="BO--Body"The MOREINFO="NONE"master.dbo.sysservers table has two name columns: ID="IN20019"srvname column, sysservers tableMARK="BULL" REMAP="BU--Bullet"MOREINFO="NONE"srvname is the name that users must supply when executing remote procedure calls. MOREINFO="NONE"srvname must be unique on each server.ID="IN20620"srvnetname column, sysservers table
MOREINFO="NONE"srvnetname is the server's network name, which must match the name in the MOREINFO="NONE"interfaces file. MOREINFO="NONE"srvnetname does not have to be unique, you can have more than one local name for a remote server. REMAP="BO--Body"If you need to add or drop servers from your network, you can use MOREINFO="NONE"sp_addserver to update the srvnetname. If you need to remove the server MAIN_PRODUCTION from the network, and move your remote applications to TEMP_PRODUCTION, here's how to change the network name, while keeping the local alias:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addserver main, null, TEMP_PRODUCTIONREMAP="BO--Body"The MOREINFO="NONE"sp_addserverID="IN8721"sp_addserver system procedure
 procedure prints an informational message to tell you that it is changing the network name of an existing server entry.ID="IN7622"sp_dropserver system procedure
ID="IN4723"Droppingremote serversRENDERAS="SECT2"Dropping Remote Servers: sp_dropserver REMAP="BO--Body"The MOREINFO="NONE"sp_dropserver system procedure drops servers from MOREINFO="NONE"sysservers. The syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_dropserver MOREINFO="NONE"server_name [, droplogins] REMAP="BO--Body"Only System Security Officers can execute ID="IN4524"Droppingremote logins
MOREINFO="NONE"sp_dropserver. The MOREINFO="NONE"droplogins option allows you to drop a remote server and all of that server's remote login information in one step. If you don't use the MOREINFO="NONE"droplogins option, you cannot drop a server which has remote logins associated with it. This statement drops the GATEWAY server, and all of the remote logins associated with it: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_dropserver GATEWAY, droplogins ID="IN10325"drop logins option, sp_dropserverREMAP="BO--Body"The MOREINFO="NONE"droploginsID="INA6226"sysservers table
 option isn't needed if you wish to drop the local server's entry; that entry won't have remote login information associated with it. ID="IN9227"Remote serversoptions for
ID="IN9228"sp_serveroption system procedureRENDERAS="SECT2"Setting Server Options: sp_serveroption REMAP="BO--Body"The MOREINFO="NONE"sp_serveroption system procedure sets the server options MOREINFO="NONE"timeouts and MOREINFO="NONE"net password encryption, which affect connections with remote servers. These options do not affect SQL Server to Backup Server communication.RENDERAS="SECT3"ID="IN5029"timeouts option
The MOREINFO="NONE"timeouts OptionREMAP="BO--Body"ID="IN5730"Calls, remote proceduretimeouts
MOREINFO="NONE"timeouts disables and enables the normal timeout code used by the local server, so the site connection handler does not automatically drop the physical connection after a minute with no logical connection. This option can be set only by a System Administrator.REMAP="BO--Body"By default, MOREINFO="NONE"timeouts is set to TRUE, and the site handler process that manages remote logins times out if there has been no remote user activity for one minute. By setting MOREINFO="NONE"timeouts to FALSE on both of the servers involved in remote procedure calls, the automatic timeout is disabled. This example changes the MOREINFO="NONE"timeouts option to FALSE: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_serveroption GATEWAY, "timeouts", false REMAP="BO--Body"Once you set MOREINFO="NONE"timeouts to FALSE on both servers and a user executes a remote procedure call in either direction, the site handler on each machine runs until one of the servers is shut down. (When the server is brought up again, the option remains FALSE, and the site handler will be re-established the next time a user executes a remote procedure call.) If users on the server execute remote procedure calls frequently, it's probably efficient in terms of system resources to set this option to FALSE, since there is some system overhead involved in setting up the physical connection. RENDERAS="SECT3"ID="IN7531"Passwordsnet password encryption option
ID="IN6532"net password encryption option
The MOREINFO="NONE"net password encryption OptionREMAP="BO--Body"ID="IN2033"Serverspasswords on
ID="IN2534"Verification, user-access
ID="IN2235"Passwordsremote users
MOREINFO="NONE"net password encryptionID="IN3336"Passwordsencryption over network
 specifies whether connections with a remote server are to be initiated with a client-side password encryption handshake or with the normal (unencrypted password) handshake sequence. The default is FALSE. This option can be set only by a System Security Officer.REMAP="BO--Body"If MOREINFO="NONE"net password encryption is set to TRUE, the following occurs:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"The initial login packet is sent without passwords. The client indicates to the remote server that encryption is desired. The remote server sends back an encryption key, which the client uses to encrypt its plaintext passwords.The client then encrypts its own passwords, and the remote server uses the key to authenticate them when they arrive.REMAP="BO--Body"This example sets this option to TRUE:ID="IN9037"sp_serveroption system procedure
ID="IN8838"Remote serversoptions forREMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_serveroption GATEWAY, "net password encryption",     trueREMAP="BO--Body"Setting this option has no effect on SQL Server's interaction with Backup Server.ID="IN6539"Information (Server)remote servers
ID="IN7640"sp_helpserver system procedureRENDERAS="SECT2"Getting Information on Servers: sp_helpserver   REMAP="BO--Body"The system procedure MOREINFO="NONE"sp_helpserverID="IN5041"sysservers table
 reports on servers. When it is used without an argument, it provides information on all the servers listed in MOREINFO="NONE"sysservers. It can take a server name as an argument, and provides information on just that server. REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_helpserver [MOREINFO="NONE"server_name] REMAP="BO--Body"MOREINFO="NONE"sp_helpserver checks for both MOREINFO="NONE"srvname and MOREINFO="NONE"srvnetname in the MOREINFO="NONE"master..sysremoteloginsID="IN10042"System proceduresSystem proceduresfor managing remote serversmanaging remote servers
ID="IN3743"Remote servers
 table. ID="IN6144"Mappingremote usersRENDERAS="SECT1"Adding Remote LoginsREMAP="BO--Body"The System Security Officer and System Administrator of any SQL Server share control over which remote users can access the server, and what identity the remote users will assume. The System Administrator adds remote logins with the MOREINFO="NONE"sp_addremotelogin system procedure. The System Security Officer controls whether password checking will be required with the MOREINFO="NONE"sp_remoteoption system procedure. ID="IN9445"sp_addremotelogin system procedure
ID="INA6946"Addingremote loginsRENDERAS="SECT2"Mapping User's Server IDs: sp_addremoteloginREMAP="BO--Body"Logins from a remote server can be mapped to a local server in three ways:MARK="BULL" REMAP="BU--Bullet"A particular remote login can be mapped to a particular local login name. For example, the user "joe" on the remote server might be mapped to "joesmith", user "judy" to "judyj", and so forth.All logins from one remote server can be mapped to one local name. For example, all users sending remote procedure calls from the MAIN_PRODUCTION server might be mapped to "remusers".All logins from one remote server can use their remote names. REMAP="BO--Body"The first option can be combined with the other two options, and its particular mapping takes precedence over the other two more general mappings. The second two options are mutually exclusive; you may use either, but not both of them. REMAP="BO--Body"The system procedure MOREINFO="NONE"sp_addremotelogin adds remote logins. The syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_addremotelogin MOREINFO="NONE"remoteserver [, MOREINFO="NONE"localname [, MOREINFO="NONE"remotename]] REMAP="BO--Body"Only a System Administrator can execute MOREINFO="NONE"sp_addremotelogin. If the local names are not listed in MOREINFO="NONE"master..syslogins, you must first add them as SQL Server logins with MOREINFO="NONE"sp_addlogin. ID="IN1747"Namesserver user
ID="IN2548"Namesmapping remote userRENDERAS="SECT2"Mapping Remote Logins to Particular Local Names   REMAP="BO--Body"The following example maps the login named "pogo" from a remote system to the local login name "bob." The user logs into the remote system as "pogo"; whenever that user executes remote procedure calls from GATEWAY, the local system maps the remote login name to "bob." REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addlogin bob REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addremotelogin GATEWAY, bob, pogo RENDERAS="SECT2"Mapping All Remote Logins to One Local Name   REMAP="BO--Body"The following example creates an entry that maps all remote login names to the local name "albert." All names are mapped to "albert," except those with specific mapping, as described above. For example, if you mapped "pogo" to "bob," and then the rest of the logins to "albert," "pogo" still maps to "bob." REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addlogin albert REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addremotelogin GATEWAY, albertID="IN2649"ServersremoteMapping more than one remote login to a single local login is not recommended, as it reduces individual accountability on the server. Audited actions can be traced only to the local server login, not to the individual logins on the remote server.RENDERAS="SECT2"Remote Logins Keeping Remote NamesREMAP="BO--Body"If you want remote users to keep their remote login names while using a local server, first use MOREINFO="NONE"sp_addlogin to create a login for each login from the remote server. Then, use MOREINFO="NONE"sp_addremotelogin for the server as a whole: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addremotelogin GATEWAY REMAP="BO--Body"This command creates an entry in ID="IN5550"sysremotelogins table
MOREINFO="NONE"master..sysremotelogins with a null value for the remote login name, and value of -1 for the MOREINFO="NONE"suid. ID="IN7051"sp_dropremotelogin system procedure
ID="IN4552"Droppingremote loginsREMAP="BO--Body"The option of mapping individual remote logins to different local logins takes precedence over the process of giving all remote logins the same name, so you can use some combination of these two options. However, you cannot combine the second two options; they are mutually exclusive. If you want to change from one method to the other, you must use MOREINFO="NONE"sp_dropremoteloginID="IN9253"sp_addremotelogin system procedure
ID="IN6554"Addingremote logins
 to remove the old mapping. RENDERAS="SECT1"An Example of Remote User MappingREMAP="BO--Body"Assume that you have the following servers listed in MOREINFO="NONE"master..sysservers on the SALES server: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select srvid, srvname from sysservers REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"srvid  srvname -----  ----------     0  SALES     1  CORPORATE     2  MARKETING     3  PUBLICATIONS     4  ENGINEERING REMAP="BO--Body"and the following entries in MOREINFO="NONE"master..sysremotelogins: REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"remoteserverid   remoteusername   suid --------------   --------------   ------     1                joel             3     1                freddy           3     1                NULL             4     3                NULL             5     4                NULL             -1 REMAP="BO--Body"and these entries in MOREINFO="NONE"master..syslogins: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select suid, name from sysloginsREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"suid    name ------  ------------     1   sa     2   probe     3   vp     4   peon     5   writer REMAP="BO--Body"The effect is:MARK="BULL" REMAP="BU--Bullet"The logins "joel" and "freddie" from the CORPORATE server are known as "vp." All other logins from CORPORATE are mapped to the name "peon." All logins from PUBLICATIONS are mapped to "writer." All logins from ENGINEERING are looked up in MOREINFO="NONE"master..syslogins by their remote user names. Users from MARKETING cannot run remote procedure calls on this server, since there is no entry for MARKETING in MOREINFO="NONE"sysremotelogins. ID="IN7255"Stored procedurespermissions on
ID="IN5456"Permissionsremote usersREMAP="BO--Body"The remote user mapping procedures and the ability to set permissions for individual stored procedures give you control over which remote users can access local procedures. For example, the "vp" login from CORPORATE could execute certain local procedures, while all of the other logins from CORPORATE could only execute the procedures for which "peon" had permission. Note that in many cases, the passwords for "joel" and "freddie" on the corporate server must match the password for the SALESID="IN5757"Mappingremote users
 login name "vp," as explained in the next section. RENDERAS="SECT1"Password CheckingID="IN7558"Optionsremote logins
 for Remote Users: sp_remoteoptionID="IN8159"sp_remoteoption system procedureREMAP="BO--Body"The system procedure MOREINFO="NONE"sp_remoteoptionID="IN3160"Trusted mode, remote logins and
 determines whether passwords will be checked when remote users log into the local server. By default, passwords are verified ("untrusted" mode). In MOREINFO="NONE"trustedID="INA4361"Passwordsremote users
 mode, the local server accepts remote logins from other servers and front-end applications without user-access verification for the particular login. ID="IN3962"Remote loginstrusted or untrusted modeUsing the MOREINFO="NONE"trusted mode of MOREINFO="NONE"sp_remoteoptionID="INA2563"Verification, user-access
 reduces the security of your server, as passwords from such "trusted" users are not verified.REMAP="BO--Body"When MOREINFO="NONE"sp_remoteoption is used with arguments, it changes the mode for the named user. Here is the syntax: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_remoteoption [MOREINFO="NONE"remoteserver, MOREINFO="NONE"loginame, MOREINFO="NONE"remotename, MOREINFO="NONE"optname, {true | false}] REMAP="BO--Body"Only a System Security Officer can execute MOREINFO="NONE"sp_remoteoption.REMAP="BO--Body"This example sets MOREINFO="NONE"trusted mode for the user "bob": REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_remoteoption GATEWAY, pogo, bob, trusted,     true ID="IN3364"Untrusted mode, remote logins and
ID="INA6965"isql utility commandpasswords andREMAP="BO--Body"The effects of the "untrusted" mode depend on the user's client program. MOREINFO="NONE"isql and some user applications require that logins have the same password on the remote server and the local server. Open Client applications can be written to allow local logins to have different passwords on different servers.ID="IN1866"ChangingpasswordsREMAP="BO--Body"In "untrusted" mode, if you want to change your password you must change it on all the remote systems you access before changing it on your local server.This is because of the password checking; if you change your password on the local server first, when you issue the remote procedure call to execute MOREINFO="NONE"sp_password on the remote server your passwords will no longer match. The syntax for changing your password on the remote server is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"remote_server...sp_password old_passwd, MOREINFO="NONE"new_passwdREMAP="BO--Body"And on the local server:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_password MOREINFO="NONE"old_passwd, new_passwd REMAP="BO--Body"See LINKEND="X83352""Changing Passwords: sp_password" 
ID="IN7167"Optionsremote logins
ID="IN7968"sp_remoteoption system procedure
 for more information about changing your password.ID="IN4169"Information (Server)remote server loginsRENDERAS="SECT1"Getting Information about Remote LoginsID="IN8170"sp_helpremotelogin system procedureREMAP="BO--Body"The stored procedure MOREINFO="NONE"sp_helpremotelogin prints information about the remote logins on a server. The following example shows the remote login "pogo" mapped locally to login name "bob," with all other remote logins keeping their remote names. REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_helpremoteloginREMAP="COW--CompOutWide" FORMAT="LINESPECIFIC"server     remote_user_name     local_user_name      options-------    ----------------     -----------------    -------- GATEWAY    **mapped locally**   **use local name**   untrustedGATEWAY    pogo                 bob                  untrustedRENDERAS="SECT1"ID="IN5571"Remote loginsconfiguration variables for
ID="IN6472"Remote procedure callsconfiguration variables for
ID="IN14273"Configuration variablesdescribed
Configuration Variables for Remote Logins   ID="IN6574"Changingconfiguration variables
ID="INA8275"sp_configure system procedureremote logins andREMAP="BO--Body"Each SQL Server that allows remote logins to execute procedure calls must have certain configuration variables set. These values are changed with MOREINFO="NONE"sp_configure, and the MOREINFO="NONE"reconfigure command.REMAP="BO--Body"The values that affect remote procedure calls are: MOREINFO="NONE"remote access, MOREINFO="NONE"remote loginsMOREINFO="NONE", MOREINFO="NONE"remote sites, MOREINFO="NONE"remote connections, and MOREINFO="NONE"pre-read packets. By default, MOREINFO="NONE"remote access is set to 1, and other values are set to reasonable defaults. You can also accept default values for the last four of these variables by resetting only MOREINFO="NONE"remote access, executing MOREINFO="NONE"reconfigureID="IN7676"Configuration variablesdefault settings of
, and restarting the server. These are the default settings: TOCENTRY="1"LBL="Table 15-1: "Configuration Variables that Affect RPCsCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="13*"COLNAME="C2" COLWIDTH="5*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Configuration VariableCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DefaultVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"remote accessCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0" 1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"remote loginsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"remote sitesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"remote connectionsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"pre-read packets COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0" 3 REMAP="BO--Body"The MOREINFO="NONE"remote access configuration variable can be changed only by a System Security Officer. The other variables can be changed only by a System Administrator. Only a System Administrator can execute the MOREINFO="NONE"reconfigure command.ID="X63548" RENDERAS="SECT2"ID="IN8277"remote access configuration variable
remote access REMAP="BO--Body"The MOREINFO="NONE"remote access variable must be set to 1 to allow remote access to or from a server, including access to the Backup Server: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "remote access", 1 REMAP="BO--Body"If you wish to disallow remote access at any time, the MOREINFO="NONE"remote access variable can be reset to 0: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "remote access", 0 REMAP="BO--Body"If you set MOREINFO="NONE"remote access to 0, and then execute MOREINFO="NONE"reconfigure, the run value of the other four remote-access variables is also set to 0. REMAP="BO--Body"If you don't use the default values, the values for the other remote access configuration variables will depend on your system design and applications.REMAP="BO--Body"Only a System Security Officer can set the MOREINFO="NONE"remote access variable.You cannot perform database or transaction log dumps while the remote access configuration variable is set to 0.RENDERAS="SECT2"ID="IN8278"remote logins configuration variable
remote logins REMAP="BO--Body"The MOREINFO="NONE"remote logins variable controls the number of active user connections from this site to remote servers. Only a System Administrator can set MOREINFO="NONE"remote logins. This command increases MOREINFO="NONE"remote logins to 50:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_configure "remote logins", 50RENDERAS="SECT2"ID="IN8179"remote sites configuration variable
remote sites ID="IN4780"Number (quantity of)remote sitesREMAP="BO--Body"The MOREINFO="NONE"remote sites variable controls the number of simultaneous remote sites that can access this server. All accesses from an individual site are managed by one site handler; this variable controls the number of site handlers, not the number of individual simultaneous procedure calls. If you set MOREINFO="NONE"remote sites to 5, and each site initiates three remote procedure calls, you will have 5 site handler processes listed (use MOREINFO="NONE"sp_who to see them) for the 15 processes. Only a System Administrator can set MOREINFO="NONE"remote sites.RENDERAS="SECT2"ID="IN8781"remote connections configuration variable
remote connections REMAP="BO--Body"The MOREINFO="NONE"remote connections variable controls the limit on active connections initiated to and from this server. This includes those initiated from this server and those from remote sites to this server. Only a System Administrator can set MOREINFO="NONE"remote connections.RENDERAS="SECT2"ID="IN8582"pre-read packets configuration variable
pre-read packets ID="IN1383"Site handlers
ID="IN1784"Packets, pre-read
ID="IN1285"DatapacketsREMAP="BO--Body"All communication between two servers is handled through one site handler to reduce the needed number of connections. This site handler can pre-read and keep track of data packets for each user before the user process that needs them is ready. The MOREINFO="NONE"pre-read packets variable controls how many packets a site handler will pre-read. The default value 3 is adequate in virtually all cases; higher values canID="IN13886"Configuration variablesdescribed
 useID="INA6287"Remote procedure callsconfiguration variables for
 too muchID="IN8188"Calls, remote procedure
 memoryID="IN5389"Remote loginsconfiguration variables for
.ID="IN6790"Addingremote servers
 Only a System Administrator can set MOREINFO="NONE"pre-read packets.REMAP="BO--Body"NUMBER="16" ID="X31147"AuditingRENDERAS="SECT1"IntroductionID="IN221"AuditingREMAP="BO--Body"Auditing is an important part of security in a database management system. Through it, security-related system activity is recorded in an audit trail, which can be used to detect penetration of the system and misuse of resources. By examining the audit trail System Security Officers can inspect patterns of access to objects in databases, and can monitor the activity of specific users. Audit records are traceable to specific users, enabling the audit system to act as a deterrent to users attempting to misuse the system.REMAP="BO--Body"In the sections that follow, the audit system is discussed in detail, including what is audited, how the system works, and how to interpret the audit trail.RENDERAS="SECT1"The Audit SystemREMAP="BO--Body"The audit system consists of:MARK="BULL" REMAP="BU--Bullet"The sybsecurity databaseSystem procedures that set the various auditing optionsThe audit queue, to which audit records are sent before they are written to the audit trailRENDERAS="SECT2"The sybsecurity DatabaseID="IN542"sybsecurity database
ID="IN633"Auditingsybsecurity databaseREMAP="BO--Body"The sybsecurity database is essential to auditing in SQL Server. It is created as part of the auditing installation process. It contains all system tables found in the model database and two additional system tables:MARK="BULL" REMAP="BU--Bullet"sysaudits: the audit trailsysauditoptions: contains the global auditing choicesREMAP="BO--Body"The contents of the audit trail is discussed in detail in LINKEND="X13021""The Audit Trail: sysaudits" 
.RENDERAS="SECT2"The Auditing System ProceduresID="IN304"Auditingsystem procedures forREMAP="BO--Body"Auditing is managed with the following system procedures: TOCENTRY="1"LBL="Table 16-1: " ID="X80119"System Procedures Used to Manage Auditing OptionsCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="11*"COLNAME="C2" COLWIDTH="29*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"System ProcedureCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_auditoption COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Enables and disables system-wide auditing and global 
audit options.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_auditdatabase COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Establishes auditing of different types of events within a 
database, or of references to objects within that database 
from another database.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_auditobject COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Establishes selective auditing of accesses to tables and 
views.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_auditsproc COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Audits the execution of stored procedures and triggers.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_auditlogin COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Audits a user's attempts to access tables and views, or 
the text of commands that the user executes.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sp_addauditrecord COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Allows users to enter user-defined audit records 
(comments) into the audit trail.RENDERAS="SECT2"The Audit QueueID="IN235"Auditingqueue, size of
ID="IN146"Records, auditREMAP="BO--Body"When an audited event occurs, an audit record first goes to the in-memory audit queue, where it is held until it can be processed by the audit process and added to the audit trail. As long as an audit record is in the queue, it can be lost if the system crashes. However, if the queue repeatedly becomes full, overall system performance is affected: if the audit queue is full when a user process tries to generate an audit record, the process sleeps until space in the queue becomes available. Thus, there is a performance/risk trade-off that must be considered when configuring the queue size.REMAP="BO--Body"You can configure the size of the audit queue with the MOREINFO="NONE"audit queue size option to MOREINFO="NONE"sp_configureID="INA747"audit queue size configuration variable
ID="IN1208"sp_configure system procedureaudit queue size and
. See LINKEND="X39151""audit queue size"
 for information on how to configure the size of the audit queue and effects of different queue sizes.RENDERAS="SECT1"Installing the Audit SystemID="INA379"Installingaudit system
ID="IN1910"AuditinginstallingREMAP="BO--Body"The audit system is installed with MOREINFO="NONE"sybinit, the Sybase installation program. Installation and MOREINFO="NONE"sybinit are discussed in the SYBASE Installation Guide for your platform.REMAP="BO--Body"ID="INA2011"Devicesaudit system
ID="IN2012"Auditingdevices for
MOREINFO="NONE"sybinit installs the sybsecurity database on its own device and the sysaudits table on its own segment on that device. This allows you to use the threshold manager to monitor the available space in sysaudits. See LINKEND="X33441""Archiving Audit Data" 
 for more information.Do not put any objects into the sybsecurity database besides those that are automatically installed there. Because sysaudits is so dynamic, you must carefully monitor the space on its device. This is harder to do if there are extra objects on the device.REMAP="BO--Body"Because it is assumed that there will be no extra activity in the sybsecurity database, the MOREINFO="NONE"trunc log on chkpt database option is turned on automatically when sybsecurity is installed. This means that the log in that database is truncated every time the MOREINFO="NONE"checkpoint process occurs, and the transaction log cannot be dumped or recovered. Inserts into the sysauditsID="IN3513"Installingaudit system
 table are not logged.RENDERAS="SECT2"Removing the Audit SystemREMAP="BO--Body"If you need to remove the audit system and reclaim the disk space, follow this procedure:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Disable any current auditing with this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditoption "enable auditing", "off"Remove the audit database with this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"drop database sybsecurityREMAP="BO--Body"You cannot remove sybsecurity if auditing is enabled. Only a System Security Officer can drop sybsecurity.REMAP="BO--Body"If at a later time you wish to reinstall the audit system, run MOREINFO="NONE"sybinit again and access the menus that install auditing.RENDERAS="SECT1"Establishing AuditingREMAP="BO--Body"The System Security Officer manages the audit system. Only a user who has been granted that role can:MARK="BULL" REMAP="BU--Bullet"Execute any of the auditing system procedures (with the exception of MOREINFO="NONE"sp_addauditrecord)Read the audit trailAccess the audit databaseREMAP="BO--Body"The System Security Officer who is going to manage the audit system must also be granted access to the sybsecurity database.RENDERAS="SECT2"Turning Auditing On and OffID="IN2714"Auditingturning on and off
ID="INA3115"Auditingenabling and disablingREMAP="BO--Body"Once you have installed the sybsecurity database and the auditing system procedures, you can set all of the audit options as you wish. No auditing actually occurs, however, until you turn auditing on for the server as a whole using this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditoption "enable auditing", "on"REMAP="BO--Body"Turn server-wide auditing off with this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditoption "enable auditing", "off"REMAP="BO--Body"Turning off this option does not modify your auditing set-up, though all auditing stops when MOREINFO="NONE"enable auditing is set to MOREINFO="NONE"off.REMAP="BO--Body"MOREINFO="NONE"sp_auditoption is discussed in the following section.RENDERAS="SECT2"Setting the Global Audit Options: sp_auditoptionID="IN2316"Auditingglobal options
ID="IN8017"sp_auditoption system procedureREMAP="BO--Body"The global audit options are those that affect the server as a whole. They are enabled and disabled with MOREINFO="NONE"sp_auditoptionID="IN5518"sysauditoptions table
, and information about their current settings is contained in the sybsecurity..sysauditoptions system table.The available options and their syntax are described in LINKEND="X28914"Table 16-2
.PGWIDE=1 TOCENTRY="1"LBL="Table 16-2: " ID="X28914"Global Auditing OptionsCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="9*"COLNAME="C2" COLWIDTH="43*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"OptionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ActionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"enable auditing COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Enables or disables system-wide auditing. A System Security Officer must set the 
MOREINFO="NONE"enable auditing option to MOREINFO="NONE"on before any other auditing can take place. Enabling or 
disabling auditing automatically generates an audit record, so that you can bracket 
time periods when auditing was enabled.    

Syntax: MOREINFO="NONE"sp_auditoption "enable auditing" [, {"on"|"off"}]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"all COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Enables or disables all options exceptMOREINFO="NONE" enable auditing simultaneously. MOREINFO="NONE"enable 
auditing must be set separately. For options that allow selective auditing for 
successful and/or failed executions, setting MOREINFO="NONE"all to MOREINFO="NONE"on is equivalent to setting all 
options to MOREINFO="NONE"on or MOREINFO="NONE"both, depending on the option.   

Syntax: MOREINFO="NONE"sp_auditoption "all" [, {"on"|"off"}]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"logins COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Enables or disables auditing of successful (MOREINFO="NONE"ok), failed (MOREINFO="NONE"fail), or all (MOREINFO="NONE"both) login 
attempts by all users. To audit individual users, use MOREINFO="NONE"sp_auditlogin.

Syntax: MOREINFO="NONE"sp_auditoption "logins" [, {"ok"|"fail"|"both"|"off"}]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"logouts COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Enables or disables auditing of all logouts from the server, including unintentional 
logouts such as dropped connections.

Syntax: MOREINFO="NONE"sp_auditoption "logouts" [, {"on"|"off"}]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"server boots COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Enables or disables generation of an audit record when the server is rebooted.

Syntax: MOREINFO="NONE"sp_auditoption "server boots" [, {"on"|"off"}]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"rpc connections COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"When this option is MOREINFO="NONE"on, it generates an audit record whenever a user from another 
host connects to the local server to run a procedure via a remote procedure call 
(RPC). Auditing can be enabled for all connection attempts (MOREINFO="NONE"both), successful 
attempts only (MOREINFO="NONE"ok), or failed attempts only (MOREINFO="NONE"fail).

Syntax: MOREINFO="NONE"sp_auditoption "rpc connections" [, {"ok"|"fail"|
   "both"|off"}]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"roles COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Audits the use of the MOREINFO="NONE"set role command to turn roles on and off. You can enable 
auditing of all attempts (MOREINFO="NONE"both), successful attempts only (MOREINFO="NONE"ok), or failed attempts only 
(MOREINFO="NONE"fail). See Chapter 2,  "Roles in SQL Server,"' for more information.

Syntax: MOREINFO="NONE"sp_auditoption "roles" [, {"ok"|"fail"|"both"|"off"}]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"{MOREINFO="NONE"sa | MOREINFO="NONE"sso | MOREINFO="NONE"oper| MOREINFO="NONE"navigator 
| MOREINFO="NONE"replication}
 MOREINFO="NONE"commandsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Audits the use of privileged commands-those requiring one of the roles for 
execution. You can enable auditing for successful executions only, failed attempts 
(where failure is due to the user lacking the proper role), or both. See "Roles" in the 
 Reference Manual for a list of the commands that require the various roles.

Syntax: MOREINFO="NONE"sp_auditoption "{sa|sso|oper|navigator|replication}
    commands" [, {"ok"|"fail"|"both"|"off"}]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"{MOREINFO="NONE"sa | MOREINFO="NONE"sso | MOREINFO="NONE"oper MOREINFO="NONE"commandsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Audits the use of privileged commands-those requiring one of the roles for 
execution. You can enable auditing for successful executions only, failed attempts 
(where failure is due to the user lacking the proper role), or both. See "Roles" in the 
 Reference Manual for a list of the commands that require the various roles.COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Syntax: MOREINFO="NONE"sp_auditoption "{sa|sso|oper} commands" 
   [, {"ok"|"fail"|"both"|"off"}]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"errors COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Audits fatal errors (errors that break the user's connection to the server and require 
the client program to be restarted), nonfatal errors, or both kinds of errors. Fatal 
errors do not include server internal fatal software errors (bus errors, segmentation 
faults, etc.) In case of internal errors, information will be contained in the errorlog 
file for the server.

Syntax: MOREINFO="NONE"sp_auditoption "errors" [, {"nonfatal"|"fatal"
   |"both"|"off"}]COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"adhoc records COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Allows users to send text to the audit trail via the MOREINFO="NONE"sp_addauditrecord command.
Syntax:MOREINFO="NONE" sp_auditoption "adhoc records", {"on"|"off"}REMAP="BO--Body"The initial, default value of all options is "off." RENDERAS="SECT2"ExamplesREMAP="BO--Body"Using MOREINFO="NONE"sp_auditoption with no parameters, like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditoptionREMAP="BO--Body"or with the MOREINFO="NONE"all option, like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditoption "all"REMAP="BO--Body"displays the current settings for all of the global audit options. REMAP="BO--Body"Using MOREINFO="NONE"sp_auditoption with the name of any option and no other parameters displays the current setting for that option. For example:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditoption "logins"REMAP="BO--Body"displays the current status of the MOREINFO="NONE"logins option.REMAP="BO--Body"This command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditoption "errors", "fatal"REMAP="BO--Body"establishes auditing of fatal errors. REMAP="BO--Body"This command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditoption "logins", "both"ID="IN7819"sp_auditoption system procedureREMAP="BO--Body"establishes auditing of all attempts to log into SQL Server, both successful and unsuccessful. To audit individual users, use MOREINFO="NONE"sp_auditlogin.RENDERAS="SECT2"Auditing Users: sp_auditloginREMAP="BO--Body"ID="IN7920"sp_auditlogin system procedure
ID="IN2821"Usersauditing
ID="IN2822"Auditingusers
MOREINFO="NONE"sp_auditlogin allows you to audit a SQL Server user's attempts to access tables and views in any database, and the text of commands that the user sends to SQL Server.REMAP="BO--Body"Using MOREINFO="NONE"sp_auditlogin with no parameters, like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditloginREMAP="BO--Body"displays the audit status for all login names in the server.REMAP="BO--Body"Using MOREINFO="NONE"sp_auditlogin with a login name and no other parameters, like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditlogin bobREMAP="BO--Body"displays the audit status for that user.RENDERAS="SECT3"Auditing a User's Table and View AccessesID="INB2123"Viewsauditing use of
ID="IN2224"Tablesauditing use ofREMAP="BO--Body"The syntax for auditing a user's attempts to access tables and views is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_auditlogin [login_name [, "table" | "view" [, "ok"|"fail"|"both"|"off"]]]REMAP="BO--Body"An access is the use of the MOREINFO="NONE"select, insert, update, or MOREINFO="NONE"delete command on a table or view. The MOREINFO="NONE"table option audits login_name's attempts to access tables in any database. MOREINFO="NONE"view audits login_name's attempts to access views in any database. If you use MOREINFO="NONE"table or MOREINFO="NONE"view without the MOREINFO="NONE"ok|MOREINFO="NONE"fail|MOREINFO="NONE"both|MOREINFO="NONE"off parameter, MOREINFO="NONE"sp_auditlogin displays the status of table or view auditing for the named user.REMAP="BO--Body"The MOREINFO="NONE"ok parameter enables auditing for successful table or view accesses only. MOREINFO="NONE"fail establishes auditing of accesses that fail because the user lacks permissions on an object. MOREINFO="NONE"both establishes auditing of both successful and failed accesses. MOREINFO="NONE"off disables auditing of the named type (MOREINFO="NONE"table or MOREINFO="NONE"view).REMAP="BO--Body"For example, this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditlogin "joe", "table", "both"REMAP="BO--Body"audits all of Joe's attempts to access any table on the server. This command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditlogin joe, "table", "fail"REMAP="BO--Body"audits Joe's attempts to access tables on which he has not been granted permission.REMAP="BO--Body"This command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditlogin bob, "table"REMAP="BO--Body"displays the status of table auditing for Joe.RENDERAS="SECT3"Auditing the Text of a User's CommandsREMAP="BO--Body"The syntax for auditing the text of commands that a user sends to SQL Server:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_auditlogin [login_name [, "cmdtext" [, "on"|"off"]]]REMAP="BO--Body"Set MOREINFO="NONE"cmdtext MOREINFO="NONE"on to write the text of a user's SQL Server commands to the audit trail.REMAP="BO--Body"Using the MOREINFO="NONE"cmdtext option without the final parameter, like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditlogin bob, "cmdtext"REMAP="BO--Body"displays the status of MOREINFO="NONE"cmdtext auditing for Bob.ID="IN7725"sp_auditlogin system procedure
ID="IN2626"Usersauditing
ID="IN2627"AuditingusersRENDERAS="SECT2"Auditing Databases: sp_auditdatabaseID="IN8228"sp_auditdatabase system procedure
ID="IN3229"DatabasesauditingREMAP="BO--Body"The MOREINFO="NONE"sp_auditdatabase system procedure permits you to establish selective auditing on databases. These are the auditable events that can occur in or on a database:MARK="BULL" REMAP="BU--Bullet"Use of the MOREINFO="NONE"drop, MOREINFO="NONE"grant, MOREINFO="NONE"revoke, and MOREINFO="NONE"truncate table commands within a databaseUse of the MOREINFO="NONE"drop database and MOREINFO="NONE"use commands on a databaseExecution of SQL commands from within another database that reference the audited databaseRENDERAS="SECT3"sp_auditdatabase SyntaxREMAP="BO--Body"The syntax of MOREINFO="NONE"sp_auditdatabase is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_auditdatabase [dbname [, {"ok"|"fail"|"both"|"off"}[, "d u g r t o"}]]]MARK="BULL" REMAP="BU--Bullet"If you use MOREINFO="NONE"sp_auditdatabase with no parameters, it displays the current audit status for all databases in the server.dbname is the name of the database for which to establish auditing. If you use MOREINFO="NONE"sp_auditdatabase with dbname and no other arguments, it displays the audit settings for the specified database.MOREINFO="NONE"ok establishes auditing of successful executions of the commands specified in the third parameter. MOREINFO="NONE"fail audits access attempts that fail because the user lacks permission to access the database. MOREINFO="NONE"both audits successful and failed executions. MOREINFO="NONE"off turns off the specified type of auditing for the named database.MOREINFO="NONE"d, u, g, r, t, and MOREINFO="NONE"o are the types of database events that you can audit. They are:TOCENTRY="1"LBL="Table 16-3: "Database Auditing OptionsCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="2*"COLNAME="C2" COLWIDTH="17*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Event 
TypeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MeaningVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"d COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Audits execution of the MOREINFO="NONE"drop MOREINFO="NONE"table, MOREINFO="NONE"drop view, MOREINFO="NONE"drop MOREINFO="NONE"procedure, or 
MOREINFO="NONE"drop trigger commands within dbname, and execution of the MOREINFO="NONE"drop 
database command when dbname is being dropped.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"u COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Audits execution of the MOREINFO="NONE"use command on dbname.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"g COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Audits execution of the MOREINFO="NONE"grant command within dbname.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"r COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Audits execution of the MOREINFO="NONE"revoke command within dbname.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"t COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Audits execution of the MOREINFO="NONE"truncate table command within dbname.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"o COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0""Outside access"; audits execution of SQL commands from within 
another database that refer to objects in dbname.REMAP="UN--Under"Choose one or more, in any order. If none are specified, the MOREINFO="NONE"ok | MOREINFO="NONE"fail | MOREINFO="NONE"both |MOREINFO="NONE"off argument applies to all event types.REMAP="UN--Under"For example, this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditdatabase pubs2, "ok", "du"REMAP="UN--Under"enables auditing of successful executions of the MOREINFO="NONE"drop and MOREINFO="NONE"use commands on pubs2. REMAP="BO--Body"You can execute MOREINFO="NONE"sp_auditdatabase more than once on a database, and the options that you set will accumulate with each execution. Therefore, you can set some options for success only, others for failure only, and still others for both success and failure. For example, this sequence:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditdatabase pubs2, "ok", "d"gosp_auditdatabase pubs2, "fail", "u"gosp_auditdatabase pubs2, "both", "gr"goREMAP="BO--Body"establishes auditing on pubs2 of successful MOREINFO="NONE"drop commands, failed MOREINFO="NONE"use commands, and all MOREINFO="NONE"grant and MOREINFO="NONE"revoke commands.REMAP="BO--Body"If, later, you no longer wish to audit execution of the MOREINFO="NONE"drop command, issue this statement:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditdatabase pubs2, "off", "d"REMAP="BO--Body"If you wish to turn off all auditing of pubs2, use this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditdatabase pubs2, "off"ID="IN8030"sp_auditdatabase system procedure
ID="IN3031"DatabasesauditingRENDERAS="SECT2"Auditing Tables and Views: sp_auditobjectREMAP="BO--Body"ID="INA2532"Database objectsauditing
ID="IN3533"Viewsauditing use of
ID="IN3634"Tablesauditing use of
ID="IN3435"Auditingview access
ID="IN3536"Auditingtable access
ID="IN8037"sp_auditobject system procedure
MOREINFO="NONE"sp_auditobject allows you to audit accesses of specified tables and views. An access is the use of the MOREINFO="NONE"select, insert, update, or MOREINFO="NONE"delete command on a table or view. You can establish auditing of specified tables and views, or create default audit settings for newly-created tables and views. REMAP="BO--Body"To establish auditing of an existing table or view, the syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_auditobject [owner.]objname, dbname [, "ok"|"fail"|"both"|"off" [,"{d u s i}"]]REMAP="BO--Body"To establish default audit settings for future tables and views in the current database, the syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_auditobject {"default table"|"default view"},dbname [, "ok"|"fail"|"both"|"off"[, "{d u s i}"]]MARK="BULL" REMAP="BU--Bullet"If you are establishing auditing for an existing table or view, use the objname parameter. objname is the name of an existing table or view in the current database. If you are not the owner of the object, you must qualify its name with the name of the owner, like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC""ownername.objname"If you are establishing default audit settings for future tables or views in the current database, use theMOREINFO="NONE" default table | MOREINFO="NONE"default view parameter. This specifies that these audit settings are to be the defaults for any tables and views that will be created in the future. These default settings are not applied to any tables or views that exist at the time that MOREINFO="NONE"sp_auditobject is executed. If you do not set any default audit settings in a database, newly-created tables and views will have no auditing options set initially.If you are using the objname parameter, dbname must be the name of the current database. You must be in that database to execute MOREINFO="NONE"sp_auditobject, and you must also supply its name.REMAP="UN--Under"If you are using the MOREINFO="NONE"default table | MOREINFO="NONE"default view option, dbname can be the name of any database.MOREINFO="NONE"ok establishes auditing for accesses that are successful. MOREINFO="NONE"fail audits attempts to access the object that fail because the user has not been granted permission on the object. MOREINFO="NONE"both audits both types of access attempts. MOREINFO="NONE"off turns auditing off for the named table or view.ID="IN6538"insert commandauditing use of
ID="INA6539"select commandauditing use of
ID="IN6540"update commandauditing use of
ID="INA6541"delete commandauditing use ofThe MOREINFO="NONE"d u s i parameter indicates what kinds of access to audit. They can be specified in any order, and you can specify any number of them at a time. If you omit these parameters, all four event types will be effected by the MOREINFO="NONE"ok|MOREINFO="NONE"fail|MOREINFO="NONE"both|MOREINFO="NONE"off parameter.The types of access are:TOCENTRY="1"LBL="Table 16-4: "Types of Object AccessCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="1*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ParameterCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MeaningVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"dCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"delete COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"iCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"insert COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"sCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"select COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"uCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"update REMAP="UN--Under"Choose one or more, in any order. If none are specified, the MOREINFO="NONE"ok | MOREINFO="NONE"fail | MOREINFO="NONE"both |MOREINFO="NONE"off argument applies to all four of the event types.RENDERAS="SECT3"Auditing Indirect References to ObjectsID="IN4342"Triggersindirect references to objects and
ID="IN5243"Stored proceduresindirect references to objects and
ID="IN5444"Permissionschecking on indirect references to objects
ID="IN4845"Auditingindirect references to tables and views
ID="INB2946"Tablesindirect references to
ID="IN2847"Viewsindirect references to
ID="IN3048"Tablespermission checking and
ID="IN2949"Viewspermission checking andREMAP="BO--Body"If the named table or view is referenced indirectly, such as through a view or stored procedure, an audit record for that table or view is generated only if a permission check is required. The rules governing permission checks are as follows:MARK="BULL" REMAP="BU--Bullet"If the owner of the stored procedure or view is also the owner of the underlying table or view, the user of the stored procedure or view is not required to have permissions on the underlying table or view. No permission checking is performed on the underlying object. Therefore, no audit record is generated when someone uses this view or stored procedure, even though auditing is enabled for the underlying table or view.If the creator of the stored procedure or view does not own the underlying table or view, the user of the stored procedure or view must have access permissions on the underlying table or view. Permission checking is performed on the underlying object, and an audit record is generated if that table or view is configured to be audited.REMAP="BO--Body"See LINKEND="X53658""Ownership Chains" 
 for information about ownership chains.RENDERAS="SECT3"ExamplesREMAP="BO--Body"This command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditobject authors, pubs2, "both", "dui"REMAP="BO--Body"establishes auditing on the authors table in the pubs2 database. Both successful and failed attempts to execute the MOREINFO="NONE"delete, update, and MOREINFO="NONE"insert commands on authors will be audited.REMAP="BO--Body"You can execute MOREINFO="NONE"sp_auditobject more than once on a table or view, and the options that you set will accumulate with each execution. Therefore, you can set some options for success only, others for failure only, and still others for both success and failure. For example, this sequence:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditobject titles, pubs2, "ok", "id"gosp_auditobject titles, pubs2, "fail", "u"goREMAP="BO--Body"establishes auditing on the titles table so that successful executions of the MOREINFO="NONE"insert and MOREINFO="NONE"delete commands will be audited, and failed attempts to execute MOREINFO="NONE"update commands will be audited.REMAP="BO--Body"This command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditobject titles, pubs2, "off"REMAP="BO--Body"turns off all auditing on the titles table.REMAP="BO--Body"This command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditobject publishersREMAP="BO--Body"displays the current audit settings for the publishers table.REMAP="BO--Body"This command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditobject "default table", pubs2, "fail", "du"REMAP="BO--Body"establishes auditing of failed attempts to execute the MOREINFO="NONE"delete and MOREINFO="NONE"update commands on all new tables in the pubs2 database. Any table created after this command is executed will automatically have these audit settings.REMAP="BO--Body"This command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditobject "default view", pubs2REMAP="BO--Body"displays the default audit settings for views in the pubs2 database.ID="IN7850"sp_auditobject system procedure
ID="INA3251"Auditingview access
ID="IN3352"Auditingtable access
ID="IN3453"Tablesauditing use of
ID="IN3354"Viewsauditing use ofID="X12726" RENDERAS="SECT2"Auditing Stored Procedures: sp_auditsprocID="IN3155"Auditingtriggers
ID="IN4056"Auditingstored procedures
ID="IN4457"Triggersauditing execution of
ID="IN5358"Stored proceduresauditing execution of
ID="IN7959"sp_auditsproc system procedureREMAP="BO--Body"The MOREINFO="NONE"sp_auditsproc system procedure allows you to audit the execution of stored procedures and triggers. The values of any parameters passed to a stored procedure are also audited. You can establish auditing of existing stored procedures or triggers, or create default audit settings for future stored procedures and triggers.REMAP="BO--Body"The syntax to establish auditing of existing stored procedures and triggers is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_auditsproc {sproc_name | "all"},dbname [, {"ok"|"fail"|"both"|"off"}]REMAP="BO--Body"The syntax to establish default audit settings for future stored procedures and triggers in the current database is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_auditsproc "default", dbname [, {"ok"|"fail"|"both"|"off"}]MARK="BULL" REMAP="BU--Bullet"If you are establishing auditing for an existing stored procedure or trigger, use the sproc_name parameter. sproc_name is the name of the stored procedure or trigger on which you want to establish auditing. If you are not the owner of the object, you must qualify its name with the owner's name, like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC""ownername.sproc_name"REMAP="UN--Under"If you wish to establish auditing for all existing triggers and stored procedures in the current database, specify MOREINFO="NONE"all.If you are establishing default audit settings for future stored procedures and triggers in the current database, use the MOREINFO="NONE"default parameter. This specifies that these audit settings are to be the defaults for any stored procedures and triggers that will be created in the future. These default settings are not applied to any stored procedures or triggers that exist at the time that MOREINFO="NONE"sp_auditsproc is executed. If you do not set any default audit settings in a database, newly-created stored procedures and triggers will not be audited.If you are using the sproc_name | MOREINFO="NONE"all parameter, dbname must be the name of the current database. You must be in this database to execute MOREINFO="NONE"sp_auditobject, and you must also supply its name.REMAP="UN--Under"If you are using the MOREINFO="NONE"default parameter, dbname can be the name of any database.MOREINFO="NONE"ok establishes auditing for executions of the named stored procedure or trigger that are successful. MOREINFO="NONE"fail audits attempts to execute the procedure that fail because the user has not been granted permission on the stored procedure, or because the user does not have permission on the underlying table or view. (Permissions are not granted on triggers, so this option does not apply to them.) MOREINFO="NONE"both audits both types of execution attempts. MOREINFO="NONE"off turns auditing off for the named stored procedure or trigger.RENDERAS="SECT3"ExamplesREMAP="BO--Body"Used with no parameters, like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditsprocREMAP="BO--Body"MOREINFO="NONE"sp_auditsproc displays the auditing status of all stored procedures and triggers in the current database.REMAP="BO--Body"Used with the name of a stored procedure or trigger and no other parameters, like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditsproc new_sprocREMAP="BO--Body"MOREINFO="NONE"sp_auditsproc displays the audit status for new_sproc.REMAP="BO--Body"Used with the MOREINFO="NONE"default parameter and no others, like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditsproc defaultREMAP="BO--Body"MOREINFO="NONE"sp_auditsproc displays the default audit settings for stored procedures and triggers in the current database.REMAP="BO--Body"This command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditsproc "all", pubs2, "fail"REMAP="BO--Body"establishes auditing of failed executions of all stored procedures and triggers in the pubs2 database.REMAP="BO--Body"This command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_auditsproc "default", pubs2, "ok"REMAP="BO--Body"sets a default in the pubs2ID="IN2960"Auditingtriggers
ID="INA3861"Auditingstored procedures
ID="IN4262"Triggersauditing execution of
ID="IN5163"Stored proceduresauditing execution of
ID="IN7764"sp_auditsproc system procedure
 database so that successful executions of new stored procedures and triggers will be audited.RENDERAS="SECT2"Adding User-Specified Records to the Audit TrailREMAP="BO--Body"ID="INA4465"Commentsadding to audit trail
ID="IN4166"Audit trailadding comments
ID="IN8367"sp_addauditrecord system procedure
MOREINFO="NONE"sp_addauditrecord allows users to enter user-defined audit records (comments) into the audit trail. The syntax is:REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_addauditrecord [@text="message text"] [, @db_name="db_name"] [, @obj_name="object name"][, @owner_name="object owner"] [, @dbid=database ID] [, @objid=object ID]REMAP="BO--Body"MOREINFO="NONE"All of the parameters are optional.MARK="BULL" REMAP="BU--Bullet"MOREINFO="NONE"@text - is the text of the message that you wish to add to sysaudits. The text is inserted into the extrainfo field of sysaudits.MOREINFO="NONE"@db_name - is the name of the database referred to in the record. This is inserted into the dbname field of sysaudits.MOREINFO="NONE"@obj_name - is the name of the object referred to in the record. This is inserted into the objname field of sysaudits.MOREINFO="NONE"@owner_name - is the owner of the object referred to in the record. This is inserted into the objowner field of sysaudits.MOREINFO="NONE"@dbid - is the database ID number of db_name. This is an integer value, and must not be placed in quotes. MOREINFO="NONE"@dbid is inserted into the dbid field of sysaudits.MOREINFO="NONE"@objid - is the object ID number of obj_name. This is an integer value, and must not be placed in quotes. MOREINFO="NONE"@objid is inserted into the objid field of sysaudits.REMAP="BO--Body"You can use MOREINFO="NONE"sp_addauditrecord if:MARK="BULL" REMAP="BU--Bullet"You have execute permission on MOREINFO="NONE"sp_addauditrecord. (No special role is required.)Auditing is enabled (MOREINFO="NONE"sp_auditoption "enable auditing" is set to MOREINFO="NONE"on).The MOREINFO="NONE"adhoc records option of MOREINFO="NONE"sp_auditoption is set to MOREINFO="NONE"on.REMAP="BO--Body"MOREINFO="NONE"sp_addauditrecord does not check the correctness of the information you enter. For example, it does not check to see if the database ID you have entered is correct for the database name that you specify.REMAP="BO--Body"When the audit system is installed, only a System Security Officer and the Database Owner of sybsecurity can use MOREINFO="NONE"sp_addauditrecord. Permission to execute it may be granted to other users.RENDERAS="SECT3"ExamplesREMAP="BO--Body"The following example adds a record to sysaudits. The message portion is entered into the extrainfo field of sysaudits, "corporate" into the dbname field, "payroll" into the objname field, "dbo" into the objowner field, "10" into the dbid field, and "1004738270" into the objid field:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addauditrecord @text="I gave A. Smith permission to view the payroll table in the corporate database. This permission was in effect from 3:10 to 3:30 pm on 9/22/92.", @db_name="corporate", @obj_name="payroll", @owner_name="dbo", @dbid=10, @objid=1004738270REMAP="BO--Body"The following example inserts information only into the extrainfo and dbname fields of sysaudits:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addauditrecord @text="I am disabling auditing briefly while we reconfigure the system", @db_name="corporate"ID="IN3968"Audit trailadding comments
ID="INA4269"Commentsadding to audit trail
ID="INA8170"sp_addauditrecord system procedureID="X13021" RENDERAS="SECT1"The Audit Trail: sysauditsREMAP="BO--Body"ID="IN7271"Auditingsysaudits table
ID="IN7572"Audit trailsysaudits table
ID="IN6373"sysaudits table
sysaudits is a special system table that exists only in the sybsecurity database and contains the audit trail. The only operations allowed on it are MOREINFO="NONE"select and MOREINFO="NONE"truncate commands, and these may be executed only by a System Security Officer.REMAP="BO--Body"Following are the columns of sysaudits:MARK="BULL" REMAP="BU--Bullet"event: This contains a number corresponding to the event that is being audited. LINKEND="X80120"Table 16-5
 describes the events and the contents of the extrainfo column that correspond to each event.TOCENTRY="1"LBL="Table 16-5: " ID="X80120"Contents and Description of event and extrainfo Columns COLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="2*"COLNAME="C2" COLWIDTH="9*"COLNAME="C3" COLWIDTH="9*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"event 
No.COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Contents of extrainfo ColumnVALIGN="TOP"COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Enable auditingCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULLCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Disable auditingCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULLCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"3COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LoginCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Host nameCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"4COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LogoutCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Host nameCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"5COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server bootCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Names of the server program, 
master device, interfaces file path, 
server, and error log fileCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"6COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"RPC connectionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Remote server name, host nameCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"7COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Use of MOREINFO="NONE"set command to turn roles 
on and offCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Role, new settingCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"8COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command requiring MOREINFO="NONE"sa_role roleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"9COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command requiring MOREINFO="NONE"sso_role roleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"10COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command requiring MOREINFO="NONE"oper_role 
roleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"12COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command requiring MOREINFO="NONE"navigator 
roleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"13COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ErrorCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Error number, severity, and stateCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"14COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Ad hoc audit recordCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User-supplied comment textCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"15COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command requiring MOREINFO="NONE"replication 
roleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"16COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command requiring MOREINFO="NONE"bcpin_labels 
roleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"17COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Attempt to modify a sensitivity 
labelCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"18COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"curread label modification COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"19COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"curwrite label modification COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"20COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Update mode modification COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Previous update mode settingCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"100COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Database reference COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"101COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Table reference COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"102COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"View reference COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"103COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Stored procedure executionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Parameter listCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"104COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Trigger executionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULLCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"105COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User's attempts to access a tableCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"106COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User's attempt to access a viewCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"107COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User's command text auditingCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command batch textCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"108COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Labels at invocation of a trusted 
stored procedure COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"List of parametersCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"109COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Labels at invocation of a trusted 
triggerCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULL eventmod (modifier): This supplements the event field by further categorizing the type of event being audited. For example, this field will contain a different value for a successful login than for a failed login attempt.REMAP="UN--Under"Possible values for the eventmod field are:TOCENTRY="1"LBL="Table 16-6: "Values for the eventmod Field in sysauditsCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="5*"COLNAME="C2" COLWIDTH="15*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Value in 
eventmod FieldCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"No eventmod for this audited event.COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Successful occurrence of this audited event.
For error auditing (event code 12), a nonfatal error.COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Failed occurrence of this audited event.
For error auditing (event code 12), a fatal error.spid (server process ID): The ID number of the server process that caused the audit record to be written.eventtime: The date and time that the audited event occurred.sequence: The sequence number of the record within a single event (some events generate more than one audit record).suid: The server user ID of the user who performed the audited function.dbid: Depending on the type of event being audited, this is the ID of the database in which:MARK="DASH" REMAP="BS--BulletSub"The object, stored procedure, or trigger resides, orThe audited event occurred.objid: The ID of the object accessed by the audited event. When a stored procedure or trigger is being audited, this field contains the ID of the relevant stored procedure or trigger.xactid: The transaction ID of the transaction containing the audited event. This can be useful for associating the audit record to a specific transaction in the transaction log. For a multi-database transaction, this field contains the transaction ID from the database where the transaction originated.loginname: The login name of the user who performed the audited function. dbname: The name of the database corresponding to dbid.objname: The name of the object corresponding to objid.objowner: The name of the owner of the object accessed by the audited event.extrainfo: Additional information regarding the audited event. See LINKEND="X80120"Table 16-5
 for a description of the contents of extrainfo for each event.RENDERAS="SECT2"Reading the Audit TrailID="IN6774"sysaudits tableaccessing data in
ID="IN1975"Audit trailreading
ID="INA1976"Audit trailreadingREMAP="BO--Body"The sysaudits table can be accessed only by a System Security Officer, who can read the audit record by executing SQL commands on it. The only commands that are allowed on sysaudits are MOREINFO="NONE"select and MOREINFO="NONE"truncate.REMAP="BO--Body"For example, this command requests audit records for tasks performed by "bob" on July 5, 1993:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * from sysauditswhere loginname = "bob"and eventtime like "Jul 5% 93"REMAP="BO--Body"This command requests audit records for commands performed on or in the pubs2 database by users with the System Security Officer role (that kind of role auditing is event type 9, as shown in LINKEND="X80120"Table 16-5
):REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * from sysauditswhere event = 9and dbname = "pubs2"ID="IN7077"Auditingsysaudits table
ID="IN7378"Audit trailsysaudits table
ID="IN6179"sysaudits table
ID="X33441" RENDERAS="SECT1"Archiving Audit DataID="IN5980"sysaudits tablearchiving
ID="IN8981"sysaudits tablearchivingREMAP="BO--Body"Because the sysaudits table is added to continuously, it is necessary to archive old audit data from time to time, depending on the size of the device on which sysaudits resides. If the audit device fills up, audited system activity will come to a halt.REMAP="BO--Body"To archive audit data, you have two choices:MARK="BULL" REMAP="BU--Bullet"Use the MOREINFO="NONE"select into command to create a new table and copy data into it.Use the MOREINFO="NONE"insert and MOREINFO="NONE"select commands to copy data from sysaudits into a pre-existing table. REMAP="BO--Body"The archive table should be in a separate database on a separate device from the sybsecurity database. It is preferable that this database be a special archive database, where you can preserve the audit records for as long as you need to.REMAP="BO--Body"The archive procedures are described in the following sections.RENDERAS="SECT2"Using select intoREMAP="BO--Body"The MOREINFO="NONE"select into command creates a new table based on the table from which you are selecting. Before you can use MOREINFO="NONE"select into, you must turn on the MOREINFO="NONE"select into/bulkcopy database option in the archive database (withMOREINFO="NONE" sp_dboption). Use the following procedure to copy sysaudits:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Create the archive database on a separate device from the one containing sysaudits.In that database, use MOREINFO="NONE"sp_dboption to turn on the MOREINFO="NONE"select into/bulk copy option.Copy the contents of sysaudits into this database with a command like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select * into auditarchive7_5from sybsecurity.dbo.sysauditsREMAP="UN--Under"You can further qualify the rows to be selected from sysaudits if you wish to.Delete all rows from sysaudits with this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"truncate table sysauditsREMAP="BO--Body"While the MOREINFO="NONE"select into/bulkcopy option is on, you are not allowed to dump the transaction log, because these operations are not logged and changes are therefore not recoverable from transaction logs. In this situation, issuing the MOREINFO="NONE"dump transaction statement produces an error message instructing you to use MOREINFO="NONE"dump database instead. REMAP="BO--Body"Be certain that you dump your database before you turn off the MOREINFO="NONE"select into/bulkcopy flag. REMAP="BO--Body"See MOREINFO="NONE"select in Volume 1 of the SQL Server Reference Manual for more information.RENDERAS="SECT2"Using insert and select to Copy Into an Archive TableREMAP="BO--Body"You can use this method to copy the audit data into an existing table having the same columns as sysaudits.REMAP="BO--Body"The procedure is:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Create the archive database on a separate device from the one containing sysaudits.Create an archive table with columns identical to those in sysaudits. If such a table does not already exist, you can use MOREINFO="NONE"select into to create an empty one by having a false condition in theMOREINFO="NONE" where clause. For example:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select *into auditarchive7_5from sybsecurity.dbo.sysauditswhere 1 = 2REMAP="UN--Under"The MOREINFO="NONE"where condition is always false, so an empty table is created that is duplicate of sysaudits.REMAP="UN--Under"The MOREINFO="NONE"select into/bulk copy database option must be turned on in the archive database (using MOREINFO="NONE"sp_dboption) before you can use MOREINFO="NONE"select into.Insert all rows from sysaudits into the archive table, like this:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"insert auditarchive7_5select * from sybsecurity.dbo.sysauditsDelete all rows from sysaudits with this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"truncate table sysauditsRENDERAS="SECT2"Using a Threshold Action ProcedureREMAP="BO--Body"sysaudits ID="IN12182"sp_addthreshold system proceduresysaudits table and
ID="IN3383"Auditingthreshold management and
ID="IN3384"Threshold proceduresauditing and
is automatically installed on its own segment on the audit device. Therefore, you can use the MOREINFO="NONE"sp_addthreshold system procedure to specify a user-supplied "threshold action" procedure to be executed when the free space left on the sysaudits segment goes below a specified threshold. (Threshold management is discussed in LINKEND="X63254"Chapter 10,  "Managing Free Space with Thresholds"
.) REMAP="BO--Body"The "threshold action" stored procedure should perform at least these two tasks:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Execute a MOREINFO="NONE"select or MOREINFO="NONE"insert with MOREINFO="NONE"select statement from sysaudits to an archive table, preferably in a separate archive database.Truncate the sysaudits table with the MOREINFO="NONE"truncate table command.REMAP="BO--Body"You can then manage the archived audit data with MOREINFO="NONE"dump and MOREINFO="NONE"load commands as desired.RENDERAS="SECT1"Recovering if sysaudits Fills UpID="IN2185"Recoveryauditing and
ID="IN3686"Auditingrecovering from full device
ID="IN7087"sysaudits tablerunning out of spaceREMAP="BO--Body"If you do not regularly archive your audit data, the sysaudits table may run out of space. This, in turn, causes the audit device to become full. This is what happens next:NUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"The audit process attempts to insert the next audit record into sysaudits. This fails, so the audit process dies. An error message goes to the error log.As each user attempts to perform an auditable event (an event on which auditing has been enabled), the event cannot be completed because no auditing occurs. Each such user process dies. Users who do not attempt to perform an auditable event are unaffected.If you have global login auditing enabled (with MOREINFO="NONE"sp_auditoption "logins"), no one can log into the server, including a System Security Officer.If you are auditing commands requiring System Security Officer privileges (with MOREINFO="NONE"sp_auditoption "sso_role", "on"), a System Security Officer will be unable to execute any SSO-specific commands, such as to turn auditing off.REMAP="BO--Body"The procedure for recovering from this is as follows:REMAP="BO--Body"If the sysaudits device becomes full or the audit process terminates abnormally for any reason, the System Security Officer will immediately gain these special privileges:MARK="BULL" REMAP="BU--Bullet"The System Security Officer becomes exempt from auditing. Every auditable event performed by a System Security Officer after this point will cause a warning message to be sent to the error log file. The message will state the date and time and a warning that an audit has been missed, as well as the user's server user ID, login name, event code, and any information that would go into the extrainfo field.The System Security Officer can execute the MOREINFO="NONE"shutdown command to shut down the server after sysaudits has been archived and truncated. Normally, only the System Administrator can execute MOREINFO="NONE"shutdown.REMAP="BO--Body"If sysaudits is full, the System Security Officer can now archive and truncate sysaudits as described in LINKEND="X33441""Archiving Audit Data" 
. He or she can then execute MOREINFO="NONE"shutdown to stop the server. A System Administrator can then restart the server, which will reestablish auditing.REMAP="BO--Body"If the audit process fails for a reason other than sysauditsID="IN2088"Auditing
 becoming full, please call Sybase Technical Support.REMAP="BO--Body"NUMBER="17" ID="X60641"Language, Sort Order, and Character Set IssuesRENDERAS="SECT1"IntroductionID="INA341"Languages, alternateREMAP="BO--Body"SQL Server supports international installations with a series of language modules that provide a variety of languages, sort orders and character sets for use by SQL Server. This chapter describes the language modules briefly, and summarizes the steps needed to change SQL Server's language, sort order, or character set. ID="INA302"Language Modules
ID="IN533"Languages, alternatelocalization filesRENDERAS="SECT1"International Language ModulesREMAP="BO--Body"The international features of the SQL Server are supported by files that contain translated error messages, character set and sort order definitions, and utilities for converting SQL Server's character set into the appropriate character set for a particular terminal. These files, located in the ID="IN524"charsets directory
charsets and ID="IN515"locales directory
locales directories in the SYBASE directory structure, are called localization files. and they are included when any language module is installed with your SQL Server. A U.S. English-only installation that does not receive these language modules does have some localization files, which are discussed in this chapter.ID="INA656"FileslocalizationRENDERAS="SECT2"Types of Localization FilesREMAP="BO--Body"Several different kinds of localization files are supplied with SQL Server. TOCENTRY="1"LBL="Table 17-1: "Localization FilesCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="9*"COLNAME="C2" COLWIDTH="12*"COLNAME="C3" COLWIDTH="21*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"FileCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LocationCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Purpose/ContentsVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"productname.locCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"In the character set 
subdirectories, under 
each language 
directory in the locales 
directoryCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Error messages translated into the 
local language. If an entry is not 
translated, that error message or 
string appears in U.S. English 
instead of the local language.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"common.locCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"In each language and 
character set directory 
of the locales directory COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Contains the local names of the 
months of the year and their 
abbreviations, and information on 
the local date, time, and money 
formatting.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"charset.locCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"In each character set 
subdirectory of the 
charsets directoryCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Character set definition filesCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"*.srtCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"In each character set 
subdirectory of the 
charsets directoryCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Defines the sort order for alpha-
numeric and special characters, 
including ligatures, diacritics, and 
other language-specific 
considerations.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"*.xltCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Subdirectories under 
charsetsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Terminal-specific character 
translations files for use with 
utilities such as MOREINFO="NONE"bcp and MOREINFO="NONE"isql.These 
files are part of the language 
module for Open Client. For more 
information about how the .xlt files 
are used, see the  Utility 
Programs or Chapter 18,  
"Converting Character Sets 
Between SQL Server and Client".ID="IN247"Terminalsinstalling new
ID="IN258"Sort orderinstalling new
ID="INA229"Serverserror messages
ID="IN3910"Error messagesaltering Server-provided
ID="IN6111"FileslocalizationDo not alter any of the localization files.If you need to install a new terminal definition or sort order, or if you want to alter an error message, contact your local SQL Server distributor.REMAP="BO--Body"The next section describes the directory structure of a language module.ID="IN2812"Structurelocalization filesRENDERAS="SECT2"Language Module Directory StructureREMAP="BO--Body"LINKEND="X29475"Figure 17-1: Language Module Directory Structure
 shows how language module files are arranged under the charsets and localesID="IN3213"Western European Language Module
 directories.This example shows character sets that are included in a Western European language module. Language modules for different regions may include different character sets and different types of .srt files. Supported languages and character sets in any of the language modules you receive are listed by the installation program when you are asked to select the languages and character sets you wish to install on your SQL Server. The sort orders usually available are described in the SQL Server Installation Guide and the System Administration Guide Supplement. FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig17_1.xwd"LBL="Figure 17-1: " ID="X29475"Language Module Directory StructureID="INA2814"Language ModulesID="IN5115"Languages, alternatelocalization filesRENDERAS="SECT1"ID="IN10516"Changingcharacter sets
ID="IN11217"Character setschanging
Changing Sort Orders, Languages, and Character SetsREMAP="BO--Body"A ID="IN9118"sybinit installation programcharacter set changes using
ID="IN8819"sybinit installation programsort order changes using
System Administrator can change the sort order, language, or character set used by SQL Server. Because a sort order is built on a specific character set, changing character sets always involves a change in sort order. However, you can change sort orders without changing character sets, because there may be more than one sort order available for a character set. This section summarizes the steps to take when changing SQL Server's sort order, language, or character set using MOREINFO="NONE"sybinit. See the System Administration Guide Supplement for your platform for more information on using this option.RENDERAS="SECT2"About Changing Character SetsID="IN11720"7-bit ASCII character data, character set conversion for[
ID="IN9121"sybinit installation programcharacter set changes using
ID="IN8822"sybinit installation programsort order changes usingREMAP="BO--Body"The "Configure an existing SQL Server" option of MOREINFO="NONE"sybinit is primarily intended to change character sets for those installations that are currently storing only 7-bit ASCII character data in their SQL Server databases. (Non-7-bit ASCII data includes 8-bit character data or multibyte data.) If you have non-7-bit ASCII data in your databases and you wish to change your character set, contact SYBASE Technical Support. It is safe to change your SQL Server's character set using MOREINFO="NONE"sybinitID="IN4523"ASCII characterscharacter set conversion and
ID="IN4924"Character set conversioncharacters not converted
ID="IN4825"Character set conversionfrom non-character data
 only if all of your current character data is 7-bit ASCII.When you change character sets, existing character data is not converted to the new character set. As a result, changing character sets when you have non-7-bit ASCII data: name='bull' font='symbol' code='168'  charset='fontspecific'      May create partial or illegal charactersname='bull' font='symbol' code='168'  charset='fontspecific'     Changes the appearance of character data because different character sets encode characters in different waysRENDERAS="SECT2"About Changing Sort OrdersID="IN7326"Serverssort order consistency among
ID="IN1727"Binary sort order
ID="INA4728"Character set conversionsort order changes andREMAP="BO--Body"When you consider changing the sort order for character data on a particular SQL Server, keep this in mind: all your organization's SQL Servers should have the same sort order. A single sort order enforces consistency and distributed processing is easier to administer. If different SQL Servers support different non-binary sort orders, you cannot load a database dump from one to another. You can, however, load a database dump from one SQL Server to another SQL Server with a different character set if both servers use binary sort order. However, the character data that is loaded is interpreted as though it is in the new server's character set. No character set conversion is done.REMAP="BO--Body"SQL Server's sort order and character set are first determined when the server is installed, before you load any user data or database objects into it. RENDERAS="SECT2"The Steps InvolvedREMAP="BO--Body"There are several steps involved in changing sort orders, languages, or character sets. RENDERAS="SECT3"Preliminary StepsNUMERATION="ARABIC" REMAP="S1--StepOne" CONTINUATION="RESTARTS" INHERITNUM="IGNORE"Dump all user databases and master. If you have made changes to model or sybsystemprocs, dump it also.Use MOREINFO="NONE"sybload to load the language module if it is not already loaded (see the SQL Server Installation Guide for your platform for complete directions).Move to the install directory of your SQL Server installation and invoke MOREINFO="NONE"sybinit.At the first prompt, select:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"3. Configure a Server productThen, choose:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"1. SQL ServerAnd:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"2. Configure an existing SQL ServerChoose the number of the SQL Server from the list of server names.Complete the password screen.REMAP="BO--Body"At this point, you can choose to configure languages, character sets, or sort order, as well as other options. As you complete each of these steps, you'll return to the same screen. You can complete each of these in turn without repeating the steps above, if you choose.REMAP="BO--Body"The MOREINFO="NONE"sybinit program does not begin making changes until you type Control-A from this screen, and then respond "y" to the question "Execute the SQL Server Configuration now?", so typing the incorrect response to any of the prompts or menus does not start the installation.ID="IN6429"Languages, alternateinstallingRENDERAS="SECT3"Steps to Configure LanguagesREMAP="BO--Body"To configure languages, choose:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"6. CONFIGURE LANGUAGESREMAP="BO--Body"The next screen lists the language modules available in your SYBASE directory. You can choose to:MARK="BULL" REMAP="BU--Bullet"Remove an existing language from the SQL ServerInstall a language on the serverMake a language the default on the serverREMAP="BO--Body"Choose the number of a language from the menu, and reply to each prompt.RENDERAS="SECT3"Steps to Configure Character SetsREMAP="BO--Body"To configure character sets, choose:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"7. CONFIGURE CHARACTER SETSREMAP="BO--Body"The next screen lists the character sets available on your system. REMAP="BO--Body"You can choose to:MARK="BULL" REMAP="BU--Bullet"Remove an already-installed character setInstall additional character setsMake a character set the default for the ServerRENDERAS="SECT3"Steps to Configure a Sort OrderREMAP="BO--Body"To configure a sort order, choose:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"8. CONFIGURE SORT ORDERREMAP="BO--Body"Choose the sort order you wish to install from the menu.RENDERAS="SECT3"Installing the ChangesREMAP="BO--Body"Once you have chosen the languages, character sets, and/or sort order for your server, type Control-A to accept the changes. At the prompt:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Execute the SQL Server Configuration now? REMAP="BO--Body"type "y".ID="IN1530"MessagessystemREMAP="BO--Body"The installation program then boots SQL Server if it is not already running, installs the new values, installs system messages in any language added, and stops and starts SQL Server again to reconfigure. As MOREINFO="NONE"sybinit completes each configuration step, it prints status messages. When the process is finished, this message appears:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"MOREINFO="NONE"SQL Server successfully reconfigured.REMAP="BO--Body"The recovery process following reconfiguration is described in the next section.RENDERAS="SECT3"Setting Users' Default LanguagesID="IN6631"sp_modifylogin system procedureREMAP="BO--Body"If an additional language is installed, users can run MOREINFO="NONE"sp_modifylogin to set that language as their default language rather than SQL Server's default language. Installing additional character sets allows clients on platforms that use those character sets to communicate with this SQL Server using character set conversion. See LINKEND="X10322"Chapter 18,  "Converting Character Sets Between SQL Server and Client"
 for more information on character set conversion. RENDERAS="SECT3"Database Dumps and Configuration ChangesBack up all databases on your server before and after you change sort orders or character sets.ID="IN8932"Recoveryafter reconfigurationID="IN8133"load database commandafter sort order changedID="IN1734"Binary sort orderREMAP="BO--Body"If the old sort order and the new sort order are not the same, you are not allowed to load a database from a dump performed before the sort order was reconfigured. If you attempt to do so, an error message appears and the load is aborted. If the character set was reconfigured, and either the old or the new sort order is not binary, you are not allowed to load a database dump made before the character set was reconfigured. However, if both the old and new character sets use binary sort order, you can restore your databases from backups made before the character set was reconfigured. ID="IN8435"load database commandafter character set changedDo not load a database dump made prior to changing character sets if you have 8-bit character data in that dump. SQL Server interprets all data loaded from a database dump as if it is in the new character set.REMAP="BO--Body"If you installed additional languages but did not change SQL Server's sort order or character set, you have completed the reconfiguration process. If you changed SQL Server's default sort order or character set, go on to the next section.RENDERAS="SECT2"If You Changed the Sort Order or Default Character SetREMAP="BO--Body"This section describes ID="IN3036"Recoveryafter reconfiguration
recovery after reconfiguration and the steps you may need to follow if you changed SQL Server's sort order or default character set.ID="IN7237"Changingsort orders, recovery afterREMAP="BO--Body"If you changed sort orders, you need to do the following after reconfiguring SQL Server:ID="IN1538"Indexessuspect
ID="INA3039"Indexessort order changes andMARK="BULL" REMAP="BU--Bullet"Run MOREINFO="NONE"sp_indsuspect to find user indexes that may no longer be valid.Rebuild suspect user indexes using the MOREINFO="NONE"dbcc MOREINFO="NONE"reindex command.REMAP="BO--Body"For more information, see LINKEND="X64528""Using sp_indsuspect to Find Corrupt Indexes" 
, andLINKEND="X87957""Rebuilding Indexes with dbcc reindex" 
.ID="IN4940"Character setsmultibyteREMAP="BO--Body"If you changed to a multibyte character set from any other character set, you must upgrade any existing text values with MOREINFO="NONE"dbcc MOREINFO="NONE"fix_text (when moving to a multibyte character set from either). REMAP="BO--Body"See LINKEND="X65998""Upgrading text Data with dbcc fix_text" 
 for more information.RENDERAS="SECT3"Recovery after ReconfigurationID="IN3841"Restarts, Serverafter reconfigurationREMAP="BO--Body"Every time SQL Server is stopped and restarted, recovery is performed automatically on each database. Automatic recovery is covered in detail in LINKEND="X31864"Chapter 7,  "Developing a Backup and Recovery Plan"REMAP="BO--Body"After recovery is complete, the new sort order and character set definitions are loaded. ID="IN6842"Restarts, Serverreindexing after
ID="IN1643"Single-user mode
ID="IN3344"System tablesServer restarts and
ID="IN2345"Indexescharacter-basedREMAP="BO--Body"If the sort order has been changed, SQL Server switches to single user mode to allow the necessary updates to system tables and to prevent other users from using the server. Each system table with a character-based index is automatically checked to see if any indexes have been corrupted by the sort order change. Character-based indexes in system tables are automatically rebuilt, if necessary, using the new sort order definition. ID="IN5046"sysindexes tableREMAP="BO--Body"After system indexes are rebuilt, character-based user indexes are marked as "suspect" in the MOREINFO="NONE"sysindexesID="IN1647"Tablesread-only
ID="IN6048"read only database option
ID="IN5049"sysobjects table
 system table without being checked. User tables with suspect indexes are marked as "read only" in MOREINFO="NONE"sysobjects in order to prevent updates to these tables or use of the suspect indexes until the indexes have been checked and rebuilt if necessary. REMAP="BO--Body"Next, the new sort order information replaces the old information in the area of the disk that holds configuration information. SQL Server then shuts down to allow it to start with a clean slate for the next session. ID="IN7650"sp_indsuspect system procedureID="X64528" RENDERAS="SECT3"Using sp_indsuspect to Find Corrupt Indexes   ID="IN6251"IndexesrebuildingREMAP="BO--Body"After SQL Server shuts down, restart it and use MOREINFO="NONE"sp_indsuspect to find the user tables that need to be reindexed. The syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"sp_indsuspect [MOREINFO="NONE"table_name] REMAP="BO--Body"MOREINFO="NONE"table_name is the optional name of a specific table. If MOREINFO="NONE"table_name is missing, then MOREINFO="NONE"sp_indsuspect creates a list of all tables in the current database that have indexes marked suspect when the sort order changed. In this example, running MOREINFO="NONE"sp_indsuspect in MOREINFO="NONE"mydb database yields one suspect index: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_indsuspect  REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Suspect indexes in database mydb Own.Tab.Ind (Obj_ID, Ind_ID) = dbo.holdings.h_name_ix(160048003, 2) ID="X87957" RENDERAS="SECT3"Rebuilding Indexes with dbcc reindex   REMAP="BO--Body"ID="INA3352"Restarts, Serverreindexing after
MOREINFO="NONE"dbcc MOREINFO="NONE"reindexID="IN9053"reindex option, dbcc
ID="IN6654"Indexesreindex integrity check
 allows the System Administrator or table owner to check the integrity of indexes attached to a user table and to rebuild suspect indexes. MOREINFO="NONE"dbcc MOREINFO="NONE"reindexID="IN9355"checktable option, dbcc
ID="IN6156"Tablesdbcc checktable and
 checks each index by running a "fast" version of MOREINFO="NONE"dbcc MOREINFO="NONE"checktable. The function prints a message when it discovers the first index-related error, then rebuilds the inconsistent indexes. REMAP="BO--Body"The syntax is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"dbcc reindex(MOREINFO="NONE"table_name | MOREINFO="NONE"table_id) REMAP="BO--Body"Run this utility on all tables listed as containing suspect indexes by ID="IN6557"sp_indsuspect system procedure
MOREINFO="NONE"sp_indsuspect. Here's an example: REMAP="UI--UserInput" FORMAT="LINESPECIFIC"dbcc reindex(titles) REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"One or more indexes are corrupt. They will be rebuilt.REMAP="BO--Body"In the above example, MOREINFO="NONE"dbcc MOREINFO="NONE"reindex has discovered one or more suspect indexes in the table MOREINFO="NONE"titles. The MOREINFO="NONE"dbcc utility drops and recreates the appropriate indexes. ID="IN2258"Tableswithout indexesREMAP="BO--Body"If the indexes for a table are already correct, or if there are no indexes for the table, MOREINFO="NONE"dbcc MOREINFO="NONE"reindex does not rebuild any indexes. It prints an informational message instead. The command is also aborted if a table is suspected of containing corrupt data. If that happens, an error message appears instructing the user to run MOREINFO="NONE"dbcc MOREINFO="NONE"checktable. REMAP="BO--Body"When MOREINFO="NONE"dbcc MOREINFO="NONE"reindex finishes successfully, all "suspect" marks on the table's indexes are removed. The "read only" mark on the table is removed as well, and the table can be updated. These marks are removed whether or not any indexes have to be rebuilt. REMAP="BO--Body"MOREINFO="NONE"dbcc MOREINFO="NONE"reindexID="IN2859"System tablesreindexing and
ID="IN6560"System tablesdbcc reindex and
ID="INA5861"Indexesrebuilding
 does not perform reindexing of system tables. System indexes are checked and rebuilt, if necessary, as an automatic part of recovery after SQL Server is restarted following a sort order change. ID="IN5462"Updatingtext after character set change
ID="IN9063"text datatypemultibyte character sets and
ID="INA10564"fix_text option, dbccID="X65998" RENDERAS="SECT3"Upgrading text Data with dbcc fix_text You must runMOREINFO="NONE" dbcc fix_textID="IN2665"Single-byte character sets
 if you are changing to a new multibyte character set from either a single-byte or a multibyte character set. You need to run MOREINFO="NONE"dbcc fix_text only on tables that contain text data.ID="IN8966"text datatypechanging character sets andID="IN12067"text values, dbcc fix_text upgrade ofID="IN6568"Sizedbcc fix_text transactionID="INC6169"Multibyte character setschanging toREMAP="BO--Body"Changing to a multibyte character set makes the internal management of text data more complicated. Since a text value can be large enough to cover several pages, SQL Server must be able to handle characters that may span across page boundaries. To do so, the server requires additional information on each of the text pages.REMAP="BO--Body"To see the names of all tables that contain text data, use this query:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select sysobjects.namefrom sysobjects, syscolumnswhere syscolumns.type = 35and sysobjects.id = syscolumns.idREMAP="BO--Body"The System Administrator or table owner must run MOREINFO="NONE"dbcc fix_text to calculate the new values needed. REMAP="BO--Body"The syntax of MOREINFO="NONE"dbcc MOREINFO="NONE"fix_text is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"dbcc fix_text (MOREINFO="NONE"table_name | MOREINFO="NONE"table_id) REMAP="BO--Body"The table named must be in the current database. MOREINFO="NONE"dbcc MOREINFO="NONE"fix_text opens the specified table and for each text value, calculates the character statistics required and adds them to the appropriate page header fields. This process can take a long time, depending on the number and size of text values in a table. MOREINFO="NONE"dbcc MOREINFO="NONE"fix_text can generate a large number of log records, and may fill up the transaction log. MOREINFO="NONE"dbcc fix_text ID="IN2470"Transaction logspurging
performs update in a series of small transactions, so if a log becomes full, only a small amount of work is lost. If you run out of log space, clear out your log (see LINKEND="X32898"Chapter 8,  "Backing Up and Restoring User Databases"
, for details), and restart MOREINFO="NONE"dbcc MOREINFO="NONE"fix_text using the same table that was being upgraded when the original MOREINFO="NONE"dbcc MOREINFO="NONE"fix_text halted. Since each multibyte text value contains information that indicates whether or not it has been upgraded, MOREINFO="NONE"dbcc MOREINFO="NONE"fix_text only upgrades the text values that were not processed in earlier passes.REMAP="BO--Body"If your database stores its log on a separate segment, you can use thresholds to manage clearing the log. See LINKEND="X63254"Chapter 10,  "Managing Free Space with Thresholds"
.REMAP="BO--Body"If MOREINFO="NONE"dbcc MOREINFO="NONE"fix_text does not complete updating a table, the utility generates an error message, such as:REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Not all of the TEXT pages in tablename have been successfully updated, however, dbcc fix_text is restartable. Please issue the command again once any other errors have been addressed.ID="IN5971"Lockingby dbcc commandsREMAP="BO--Body"If the utility is unable to acquire a needed lock on a text page, it reports the problem and continues with the work, like this:ID="IN11872"text values, dbcc fix_text upgrade ofREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Unable to acquire an exclusive lock on text page 408. This text value has not been recalculated.  In order to recalculate those TEXT pages you must release the lock and reissue the dbcc fix_text command.ID="IN2473"Character setsmultibyteRENDERAS="SECT3"Retrieving text Values After Changing Character Sets   REMAP="BO--Body"If you attempt to retrieve text values after changing to a multibyte character set and have not run MOREINFO="NONE"dbcc MOREINFO="NONE"fix_text, the command fails and an error message is generated instructing you to run MOREINFO="NONE"dbcc MOREINFO="NONE"fix_text on the table: ID="IN5274"Updatingtext after character set change
ID="IN8875"text datatypemultibyte character sets and
ID="IN8776"text datatypechanging character sets and
ID="IN10377"fix_text option, dbcc
ID="IN9978"Changingcharacter sets
ID="IN10679"Character setschangingREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"SQL Server is now running a multi-byte character set,and this TEXT column's character counts have not been recalculated using this character set. Use dbcc fix_text before running this query again. ID="IN3680"Languages, alternatedate formats in
ID="IN3381"Addingdate stringsRENDERAS="SECT1"Installing Date Strings for Unsupported LanguagesID="IN4582"Languages, alternatewithout Language Modules
ID="IN6683"sp_addlanguage system procedureREMAP="BO--Body"You can use MOREINFO="NONE"sp_addlanguage to install names for the days of the week and months of the year for languages that do not have language modules. With MOREINFO="NONE"sp_addlanguage you define:MARK="BULL" REMAP="BU--Bullet"A language name, and optionally, an alias for the nameA list of the full names of months, and a list of 3-letter abbreviations for the month namesA list of the full names of the days of the weekThe date format for entering dates (such as month/day/year)The number of the first day of the weekREMAP="BO--Body"This example adds the information for Spanish:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"sp_addlanguage spanish, espanol,"enero,febrero,marzo,abril,mayo,junio,julio,agusto,septiembre,octubre,noviembre,diciembre","ene,feb,mar,abr,mayo,jun,jul,agu,sep,oct,nov,dic","lunes,martes,miercoles,jueves,viernes,sabado,domingo",dmy, 1REMAP="BO--Body"MOREINFO="NONE"sp_addlanguage enforces strict data entry rules. The lists of month names, month abbreviations and days of the week must be comma-separated lists with no spaces or line feeds (returns), and they must contain exactly the right number of elements (12 for the month strings, 7 for the day-of-the-week strings.)REMAP="BO--Body"Valid values for the date formats are: mdy, dmy, ymd, ydm, myd, or dym. "dmy" indicates that dates are in day/month/year order. This format affects only data entry; to change output format, you must use the MOREINFO="NONE"convert function.RENDERAS="SECT2"Server versus Client Side Date InterpretationREMAP="BO--Body"When a user selects date values, SQL Server sends them to the client in internal format, and the client converts them for display, using the common.loc file and other localization files in the corresponding language subdirectory of the locales directory. When a user's default language is set to a language that has been added with MOREINFO="NONE"sp_addlanguage, the client tries to find the correct common.loc file for that language. If the client fails to find the correct file, it usually prints an error message, and still connects to the server. If a client connects without having found the right localization files, and then the user selects date values, the dates are displayed using the date strings for the server's default language. You can use the MOREINFO="NONE"convert function to force the dates to be converted to character data at the server.REMAP="BO--Body"For example, if a user whose default language is "spanish" logged in from a client that couldn't find Spanish localization files, this query would display the dates in SQL Server's default language:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select pubdate from titlesREMAP="BO--Body"The following query returns the date using the Spanish month names:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"select convert(char(19),pubdate) from titlesID="IN3184"Addingdate strings
ID="IN3285"Languages, alternateREMAP="BO--Body"REMAP="BO--Body"NUMBER="18" ID="X10322"Converting Character Sets Between SQL Server and ClientRENDERAS="SECT1"IntroductionID="IN891"Alternate languages. See Languages, alternate
ID="IN402"Character setsiso_1
ID="IN303"Roman 8 character set (roman8)
ID="IN824"Shift-JIS. See Japanese character setsREMAP="BO--Body"Clients that use different character encoding schemes can connect over a network to SQL Server. In a Western European setting, for example, a server that runs in an ISO 8859-1 (iso_1) environment may be connected to a client that runs in a Roman 8 (roman8) environment. In Japan, a server that runs in an EUC JIS (eucjis) environment may be connected to a client that runs in a Shift-JIS (sjis) environment. This chapter describes the character set conversion features of SQL Server and of the utilities MOREINFO="NONE"isql, MOREINFO="NONE"bcp, and MOREINFO="NONE"defncopyID="IN945"Client character set. See Character set conversion
.ID="IN1036"Translation of character sets. See Character set conversion
ID="IN807"Coding. See Character set conversion
ID="IN998"Converting character sets. See Character set conversion
ID="IN829"Encoding. See Character set conversion
ID="IN8910"File conversion. See Character set conversion
ID="IN11711"International language support. See Character set conversion; Languages
ID="IN17312"Copying selected data. See insert command; select command
ID="IN5413"Character set conversionpaths supported
ID="IN6414"Character set conversionbetween client and serverRENDERAS="SECT1"Conversion Paths Supported REMAP="BO--Body"SQL Server supports conversion among a variety of character sets, as shown in LINKEND="X26452"Figure 18-1: Character Set Conversions
ID="IN2315"Japanese character sets
ID="IN8916"Hankaku Katakana. See Japanese character sets
ID="INA8017"EUC JIS. See Japanese character sets
. Conversion among the European character sets ISO 8859-1 (iso_1), Code Page 850 (cp850), Code Page 437 (cp437), Roman 8 (roman8), and Macintosh (mac) is supported. Conversion among the Japanese character sets EUC JIS (eucjis), Shift-JIS (sjis), and DEC Kanji (deckanji) is also supported. ID="IN11718"7-bit ASCII character data, character set conversion for[
ID="IN4519"ASCII characterscharacter set conversion andREMAP="BO--Body"An additional character set, ascii_7, is compatible with all character sets. If either the SQL Server or client's character set is ascii_7, any 7-bit ASCII character is allowed to pass between client and server unaltered. Other characters produce conversion errors.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig18_1a.xwd"LBL="Figure 18-1:        " ID="X26452"Character Set ConversionsID="X91278" RENDERAS="SECT2"ID="IN4920"Character set conversioncharacters not converted
ID="IN5021"Characterswhich cannot be converted
Characters that Cannot Be Converted ID="INA4122"Errorscharacter conversion
ID="INA5823"Character set conversionerrors and problemsREMAP="BO--Body"In converting any character set to another, there are some characters that cannot be converted. Here are two possibilities: ID="IN2324"Macintosh character setMARK="BULL" REMAP="BU--Bullet"The character exists (is encoded) in the source character set, but it does not exist in the target character set. For example, the character "CE," the OE ligature, is part of the Macintosh character set (codepoint 0xCE). This character does not exist in the ISO 8859-1 character set. If "CE" exists in data being converted from the Macintosh to the ISO 8859-1 character set, it causes a conversion error. ID="IN3725"Multibyte character setsincompatible
ID="IN1526"BytescharacterThe character exists in both the source and the target character set, but in the target character set the character is represented by a different number of bytes than in the source character set. LINKEND="X26452"Figure 18-1
ID="IN3127"Japanese character setsEUC JIS
ID="IN3328"Japanese character setsShift-JIS
ID="IN4229"Japanese character setsconversion between
 compares the EUC JIS and Shift-JIS encodings for the same sequence of characters in a Japanese environment. Kanji, Hiragana, Hankaku Romaji, Zenkaku Romaji, and Zenkaku Katakana characters are represented by the same number of bytes in both character sets and can be converted between EUC JIS and Shift-JIS. However, Hankaku Katakana characters (the last set of characters in the example) are represented by two bytes in EUC JIS and by a single byte in Shift-JIS: these characters cannot be converted.       FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig18_1.xwd"LBL="Figure 18-2: " ID="X26451"Comparison of EUC JIS and Shift-JIS Encoding for Japanese CharactersID="IN4030"Japanese character setsHankaku Katakana
ID="IN4631"User databasesuser-defined characters (Gaiji)
ID="IN5232"Character set conversionpaths supported
ID="IN4833"Characterswhich cannot be convertedREMAP="BO--Body"In addition to Hankaku Katakana, user-defined characters (Gaiji) cannot be converted between Japanese character sets. ID="IN5334"Character set conversionerror handlingRENDERAS="SECT1"Error Handling in Character Set Conversion   REMAP="BO--Body"SQL Server's character set conversion filters report conversion errors when a character exists in the client's character set but not in the server's, or vice versa. SQL Server must guarantee that data successfully converted on input to the server can be successfully converted back to the client's character set when the client retrieves that data. To do this effectively, SQL Server must avoid putting suspect data into the database. ID="IN3535"Error messagescharacter conversionREMAP="BO--Body"On encountering a conversion error in data being entered, SQL Server generates this error message: REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Msg 2402, Severity 16 (EX_USER):Error converting client characters into server's character set. Some character(s) could not be converted.ID="IN3636"Queriesconversion errors preventingREMAP="BO--Body"A conversion error prevents query execution.REMAP="BO--Body"When SQL Server encounters a conversion error while sending data to the client, the bytes of the suspect characters are replaced by ASCIIID="IN4237"Question marks (??)for suspect characters
ID="IN4238"?? (question marks)for suspect characters
 question marks ("?"). However, the query batch continues to completion. When the statement is complete, SQL Server sends the following message: REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Msg 2403, Severity 16 (EX_INFO):WARNING! Some character(s) could not be converted into client's character set. Unconverted bytes were changed to question marks (`?'). REMAP="BO--Body"See LINKEND="X47428""Controlling Character Conversion During a Session"
ID="IN3939"Errorscharacter conversion
ID="IN5140"Character set conversionerror handling
ID="IN5641"Character set conversionerrors and problems
 to learn how to turn off error reporting for data being sent from server to client. ID="IN5342"Character set conversionsetting up forRENDERAS="SECT1"Setting up the Conversion Process   ID="IN4243"Loginscharacter set conversion and client
ID="IN9444"char_convert option, set
ID="IN7645"Character set conversionset char_convert
ID="IN9446"set commandchar_convertREMAP="BO--Body"Character set conversion begins at login or when the client requests conversion with the MOREINFO="NONE"set MOREINFO="NONE"char_convertID="IN4447"DB-Library programsclient character set and
 command during a work session. If the client is using a 4.6 or later release of Open Client DB-Library, and the client and SQL Server are using different character sets, conversion is turned on during the login process and set to a default based on the character set that the client is using. Character set conversion can be controlled in the standalone utilities MOREINFO="NONE"isql, MOREINFO="NONE"bcp, and MOREINFO="NONE"defncopy with a command line option. See LINKEND="X32379""Display and File Character Set Command Line Options" 
 for details. ID="IN7848"syslogins tablecharacter set conversion andREMAP="BO--Body"When a client requests a connection, SQL Server checks whether it can convert from the client's character set to its own character set. If it can, it sets up the appropriate character set conversion filters so that any character data read from or sent to the client automatically passes through them. Next, SQL Server checks the user name and password. These have already been read and must be converted. If they cannot be converted, the login is denied. If conversion on the name and password succeeds, SQL Server looks up the converted strings in MOREINFO="NONE"syslogins. REMAP="BO--Body"If SQL Server cannot perform the requested conversions, it sends an error message to the client. The initial message explains why conversion cannot be done and is followed by this message: REMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"Msg #2411, Severity 10 (EX_INFO): No conversions will be done. REMAP="BO--Body"SQL Server next tries to find the user name and password in their unconverted form in MOREINFO="NONE"syslogins. If it cannot find them, the login is denied. If it succeeds, the login is granted but no character set conversion takes place.ID="IN5749"Namesmachine
ID="IN4550"ASCII characterscharacter set conversion and
ID="IN3251"NamesASCII character
ID="IN5552"User namescharacter set conversions and
ID="IN7753"Passwordscharacter set conversion and
ID="IN11854"7-bit ASCII character data, character set conversion for[Machine names, user names, and passwords in heterogeneous environments should be composed entirely of 7-bit ASCII characters. If the client's request for character set conversion fails, the login still succeeds if SQL Server finds the unconverted user name and password in sysloginsID="IN4855"Language defaultsus_english
.  If the request for conversion fails, or if the client's character set is set to ascii_7, the language for the session is forced to us_english. If the user had requested a different language, an informational message appears, stating that the language for the session is being forced to us_english.ID="IN7656"Utility commandschartacter sets andRENDERAS="SECT2"Specifying the Character Set for Utility ProgramsID="IN8457"isql utility commandcharacter set conversion andREMAP="BO--Body"A command line option for the MOREINFO="NONE"isqlID="IN8758"bcp (bulk copy utility)character set conversion and
, MOREINFO="NONE"bcpID="IN8859"defncopy utility commandcharacter set conversion and
, and MOREINFO="NONE"defncopy utilities specifies the client's character set.REMAP="BO--Body"Here are the choices: MARK="BULL" REMAP="BU--Bullet"MOREINFO="NONE"-J charset_nameMOREINFO="NONE" (UNIX and PCMOREINFO="NONE") orMOREINFO="NONE" /clientcharset = charset_name (OpenVMS) sets the client's character set to the MOREINFO="NONE"charset_name. ID="IN1960"Character setsnull
MOREINFO="NONE"-J or MOREINFO="NONE"/clientcharset with no character set name sets the client's character set to NULL. No conversion takes place. No message is sent when this happens.REMAP="BO--Body"Omitting the client character set command line flag sets the character set to a default for the platform. This default may not be the character set that the client is using. See the SQL Server Utility Commands 
for information on the default for your platform. The MOREINFO="NONE"-J flag is used differently on pre-4.9 SQL Servers running on OS/2.RENDERAS="SECT2"ID="X47428"ID="IN9061"Character set conversionset char_convert
ID="IN10862"set commandchar_convert
ID="IN10863"char_convert option, set
Controlling Character Conversion During a SessionREMAP="BO--Body"MOREINFO="NONE"set  MOREINFO="NONE"char_convert allows the user to decide how character set conversion operates during a particular work session. Use MOREINFO="NONE"set char_convert to: MARK="BULL" REMAP="BU--Bullet"Set character set conversion on or off Start conversion into a specific character set Turn error reporting on or off REMAP="BO--Body"The syntax for MOREINFO="NONE"set  MOREINFO="NONE"char_convert is: REMAP="SY--Syntax" FORMAT="LINESPECIFIC"set char_convert {off |               {on [with {error | no_error}]} |              charset [with {error | no_error}]} REMAP="BO--Body"Depending on the arguments, the command:MARK="BULL" REMAP="BU--Bullet"Turns character set conversion on and off between SQL Server and a client, when used with MOREINFO="NONE"off or MOREINFO="NONE"on:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"set char_convert onREMAP="UN--Under"MOREINFO="NONE"set  MOREINFO="NONE"char_convert MOREINFO="NONE" off turns conversion off so that characters are sent and received unchanged. MOREINFO="NONE" set MOREINFO="NONE" char_convert MOREINFO="NONE" on turns conversion back on after it was turned off. If character set conversion was not turned on during the login process or by the MOREINFO="NONE"set MOREINFO="NONE" char_convert MOREINFO="NONE" charset command, then MOREINFO="NONE"set MOREINFO="NONE" char_convert MOREINFO="NONE" on generates an error message.ID="IN3964"Character set conversionerror handling
ID="IN3565"Error messagescharacter conversion
ID="IN10166"with no_error option, set char_convertTurns the printing of error messages when the MOREINFO="NONE"with MOREINFO="NONE" no_error option is included. When a user chooses MOREINFO="NONE"with no_error, SQL Server does not notify the application when characters from SQL Server cannot be converted to the client's character set. Error reporting is initially set to "on" when a client connects with SQL Server: if you do not want error reporting, you must turn it off for each session. To turn error reporting back on within a session, use the MOREINFO="NONE"on with error option. ID="IN8567"Question marks (??)for suspect charactersREMAP="UN--Under"Whether or not error reporting is turned on, the bytes which cannot be converted are replaced with ASCII question marks ("?").Starts conversion between the server character set and a different client character set, when used with a charset value. MOREINFO="NONE"charset can be either the character set's MOREINFO="NONE"id or MOREINFO="NONE"name from MOREINFO="NONE"syscharsets:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"set char_convert "cp850"REMAP="UN--Under"If you request character set conversion with MOREINFO="NONE"set char_convert  charset and SQL Server cannot perform the requested conversions, the session reverts to the state of conversion in effect before the request. For example, if character set conversion is off prior to the MOREINFO="NONE"set char_convert  charset command, conversion remains off if the request fails. ID="IN4868"Language defaultsus_englishREMAP="BO--Body"If the user is using a language other than us_english before entering this command:REMAP="UI--UserInput" FORMAT="LINESPECIFIC"MOREINFO="NONE"set char_convert "ascii_7"ID="IN6269"Character set conversionbetween client and server
ID="IN5170"Character set conversionsetting up for
ID="IN10671"char_convert option, set
ID="IN10672"set commandchar_convert
ID="IN8873"Character set conversionset char_convertREMAP="BO--Body"the language for the session is forced to us_english and an informational message appears. No message appears if the session is already in us_english. ID="X32379" RENDERAS="SECT1" Display and File Character Set Command Line OptionsREMAP="BO--Body"Although the focus of this chapter is on character set conversion between client and SQL Server, character set conversion may be needed in two other places: ID="INA5274"Character set conversionbetween client and terminal
ID="INA3875"Terminalscharacter set conversion forMARK="BULL" REMAP="BU--Bullet"Between the client and a terminal, or ID="IN5576"Character set conversionbetween client and file systemBetween the client and a file system. LINKEND="X54698"Figure 18-3: Where Character Set Conversion May be Needed
ID="IN8477"isql utility commandcharacter set conversion and
 illustrates these different paths, as well as the command line options available in the standalone utilities MOREINFO="NONE"isqlID="IN8778"bcp (bulk copy utility)character set conversion and
, MOREINFO="NONE"bcpID="IN8879"defncopy utility commandcharacter set conversion and
, and MOREINFO="NONE"defncopy. REMAP="BO--Body"As described earlier, the MOREINFO="NONE"-J or MOREINFO="NONE"/clientcharset command line option specifies the character set that the client uses when sending and receiving character data to and from the server. RENDERAS="SECT2"Setting the Display Character SetID="IN5180"Character setstranslation files, terminal-specificREMAP="BO--Body"Use the MOREINFO="NONE"-a command line option (MOREINFO="NONE"/dispcharset on OpenVMS) if you are running the client from a terminal with a character set that differs from the client character set. In this case, the MOREINFO="NONE"-a option and the MOREINFO="NONE"-J option are used together to identify the character set translation file (MOREINFO="NONE".xlt file) needed for the conversion. REMAP="BO--Body"Use the MOREINFO="NONE"-a command line option (MOREINFO="NONE"/dispcharset on OpenVMS) without MOREINFO="NONE"-J (/clientcharset on OpenVMS) only if the client character set is the same as the default character set.RENDERAS="SECT2"Setting the File Character SetREMAP="BO--Body"Use the MOREINFO="NONE"-q command line option (MOREINFO="NONE"/filecharset on OpenVMS) if you are running MOREINFO="NONE"bcp to copy character data to or from a file system that uses a character set different from the client character set. In this case, use the MOREINFO="NONE"-q orMOREINFO="NONE" /filecharset option and the MOREINFO="NONE"-J or MOREINFO="NONE"/clientcharset option together to identify the character set translation file (MOREINFO="NONE".xlt file) needed for the conversion.FLOAT="0"FORMAT="UNKNOWN" FILEREF="fig18_2.xwd"LBL="Figure 18-3: " ID="X54698"Where Character Set Conversion May be NeededREMAP="BO--Body"NUMBER="A" ID="X94212"Reserved WordsID="INA89652"KeywordsREMAP="BO--Body"Keywords are words that have a special meaning. This appendix lists Transact-SQL, APT-SQL, and SQL92 keywords.RENDERAS="SECT1"Transact-SQL Reserved WordsID="INA89563"KeywordsTransact-SQL
ID="INA149384"Reserved wordsTransact-SQL;Transact-SQL:reserved words
ID="INA1490115"Reserved wordsReserved wordsSee also Keywords!see also KeywordsREMAP="BO--Body"The following words are reserved by SQL Server as keywords (command verbs) and cannot be used for the names of database objects such as databases, tables, rules, and defaults. Reserved words can be used for the names of local variables and for stored procedure parameter names. TOCENTRY="1"LBL="Table A-1:" ID="X49156"Transact-SQL Reserved WordsCOLS="4" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="126*"COLNAME="C2" COLWIDTH="81*"COLNAME="C3" COLWIDTH="81*"COLNAME="C4" COLWIDTH="81*"VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"addCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"closeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"diskCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"fromCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"allCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"clusteredCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"distinctCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"gotoCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"alterCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"commitCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"doubleCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"grantCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"andCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"computeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dropCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"groupCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"anyCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"confirmCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dummyCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"havingCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"arith_overflowCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"constraintCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dumpCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"holdlockCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"asCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"continueCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"elseCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"identityCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ascCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"controlrowCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"endCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"identity_insertCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"atCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"convertCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"endtranCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ifCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"authorizationCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"countCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"errlvlCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"inCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"avgCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"createCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"errorexitCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"indexCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"beginCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"currentCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"escapeCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"insertCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"betweenCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cursorCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"exceptCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intersectCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"breakCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"data_pgsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"execCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intoCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"browseCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"databaseCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"executeCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"isCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"bulkCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dbccCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"existsCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"isolationCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"byCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"deallocateCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"exitCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"keyCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cascadeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"declareCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"fetchCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"killCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char_convertCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"defaultCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"fillfactorCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"levelCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"checkCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"deleteCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"forCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"likeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"checkpointCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"descCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"foreignCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"linenoCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"loadCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"permCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"rollbackCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"toCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"maxCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"permanentCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"rowcntCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tranCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"minCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"planCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"rowcountCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"transactionCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"mirrorCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"precisionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"rowsCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"triggerCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"mirrorexitCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"prepareCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ruleCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"truncateCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"nationalCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"primaryCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"saveCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tsequalCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"noholdlockCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"printCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"schemaCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"unionCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"nonclusteredCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"privilegesCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"selectCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"uniqueCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"notCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"procCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"setCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"updateCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"nullCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"procedureCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"setuserCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"used_pgsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"numeric_truncationCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"processexitCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sharedCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"userCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ofCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"publicCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"shutdownCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"user_optionCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"offCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"raiserrorCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"someCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"usingCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"offsetsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"readCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"statisticsCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"valuesCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"onCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"readtextCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"stripeCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varyingCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"onceCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"reconfigureCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sumCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"viewCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"onlyCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"referencesCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"syb_identityCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"waitforCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"openCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"replaceCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"syb_restreeCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"whereCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"optionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"reserved_pgsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tableCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"whileCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"orCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"returnCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tempCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"withCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"orderCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"revokeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"temporaryCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"workCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"overCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"roleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"textsizeCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"writetext ID="INA1490116"Reserved wordsAPT-SQLRENDERAS="SECT1"APT-SQL Keywords   ID="INA890117"KeywordsAPT-SQL;APT-SQL keywords listREMAP="BO--Body"LINKEND="X42846"Table A-2: APT-SQL Keywords
 lists the APT-SQL keywords which are not reserved words in Transact-SQL. If you are planning to use APT-SQL, avoid using these words as identifiers.TOCENTRY="1"LBL="Table A-2:" ID="X42846"APT-SQL KeywordsCOLS="4" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="72*"COLNAME="C2" COLWIDTH="72*"COLNAME="C3" COLWIDTH="72*"COLNAME="C4" COLWIDTH="72*"VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"$channelCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"charindexCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallintCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"$curfieldCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"closesqlCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"interruptsqlCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sqlbeginCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"$curformCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"connectCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"listCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sqlendCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"$curgroupCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"curindexCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"localCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sqlexprCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"$curpickCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cursqlindexCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"logCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sqlrowCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"$dateCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datalengthCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"lowerCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"submitCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"$indexCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datenameCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"mchoiceCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"substringCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"$statusCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datepartCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"menuCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"switchCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"abortCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datetimeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"menubarCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"switchendCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"andCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"defineCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"moneyCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"systemCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"appendCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"disconnectCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"nextqueryCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tabCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"aptCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"enterCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"nomsgCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"textCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"backtabCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"entryCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"opensqlCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"textportCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"bellCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"exitformCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"parentnameCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyintCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"binaryCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"expCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"performCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"traceCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"bitCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"falseCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"positionformCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"transferCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"callCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"fetchsqlCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"postCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"trimCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"callexternCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"fieldCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"printformCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"trueCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"callformCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"floatCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"rchoiceCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"upperCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"callreportCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"foreachCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"remoteCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"useformCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cancelformCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"formCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"resetCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"variableCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"caseCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"globalCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"schoiceCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"channelCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"hiddenCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"scrollCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"charCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"imageCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sharedCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID="INA1489128"Reserved wordsSQL92RENDERAS="SECT1"SQL92 KeywordsREMAP="BO--Body"SQL Server 10.0 includes entry-level SQL92 features. Full SQL92 implementation includes the words listed in the following tables as command syntax. Since upgrading identifiers can be a complex process, we are providing this list for your convenience. The publication of this information does not commit Sybase to providing all of these SQL92 features in subsequent releases, and in addition subsequent releases may include keywords not included in this list.REMAP="BO--Body"LINKEND="X25599"Table A-3
 lists the SQL92 keywords which are not reserved words in Transact-SQL. TOCENTRY="1"LBL="Table A-3:" ID="X25599"SQL92 Keywords That Are Not Transact-SQL Reserved WordsCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="135*"COLNAME="C2" COLWIDTH="119*"COLNAME="C3" COLWIDTH="119*"VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"absolute COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"constraintsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"false COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"action COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"correspondingCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"first COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"allocate COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"crossCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"floatCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"areCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"current_dateCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"foundCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"assertionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"current_time COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"fullCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"bit COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"current_timestamp COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"get COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"bit_length COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"current_user COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"global COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"both COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"date COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"go COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cascaded COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"day COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"hourCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"case COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dec COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"immediate COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cast COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"decimal COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"indicator COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"catalog COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"deferrableCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"initially COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"deferred COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"inner COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"character COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"describe COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"inputCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char_lengthCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"descriptor COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"insensitive COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"character_length COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"diagnosticsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"coalesce COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"disconnect COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"integer COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"collate COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"domainCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intervalCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"collationCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"end-exec COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"joinCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"column COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"exceptionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"language COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"connect COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"external COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"last COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"connection COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"extractCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"leading COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"left COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"preserveCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"time COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"local COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"prior COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"timestamp COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"lowerCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"real COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"timezone_hour COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"match COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"relative COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"timezone_minuteCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"minute COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"restrict COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"trailingCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"module COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"rightCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"translateCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"monthCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"scroll COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"translation COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"names COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"second COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"trim COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"natural COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sectionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"trueCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"nchar COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"session COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"unknownCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"next COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"session_user COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"upper COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"no COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"size COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"usageCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"nullif COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"value COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"numericCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"space COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varcharCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"octet_length COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sql COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"when COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"outerCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sqlcode COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"whenever COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"output COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sqlerror COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"writeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"overlapsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sqlstateCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"yearCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"pad COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"substringCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"zoneCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"partial COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"system_userCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"position COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"then COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID="X91260" RENDERAS="SECT1"Potential SQL92 Reserved WordsREMAP="BO--Body"If you are using the ISO/IEC 9075:1989 standard, also avoid using the words in LINKEND="X49156"Table A-4: Potential Reserved Words
, as these words may become SQL92 reserved words in the future. TOCENTRY="1"LBL="Table A-4:"Potential Reserved WordsCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="101*"COLNAME="C2" COLWIDTH="101*"COLNAME="C3" COLWIDTH="101*"VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"afterCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"modifyCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"routineCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"aliasCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"newCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"rowCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"asyncCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"noneCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"savepointCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"beforeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"objectCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"searchCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"booleanCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"oidCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sensitiveCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"breadthCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"oldCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sequenceCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"completionCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"operationCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"signalCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"callCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"operatorsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"similarCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cycleCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"othersCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sqlexceptionCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dataCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"parametersCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"structureCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"depthCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"pendantCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"testCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dictionaryCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"preorderCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"thereCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"eachCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"privateCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"typeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"elseifCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"protectedCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"underCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"equalsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"recursiveCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"variableCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"generalCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"refCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"virtualCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ignoreCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"referencingCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"visibleCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"leaveCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"resignalCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"waitCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"lessCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"returnCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"withoutCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"limitCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"returnsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"loopCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"roleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID="INA1487149"Reserved words
ID="INA8851610"KeywordsREMAP="BO--Body"NUMBER="B" ID="X56552"The System TablesRENDERAS="SECT1"IntroductionID="IN381"System tablesREMAP="BO--Body"All of the tables in the MOREINFO="NONE"master database are system tables. Some of these tables also occur in user databases-they are automatically created when the MOREINFO="NONE"create database command is issued. REMAP="BO--Body"These system tables occur in all databases: TOCENTRY="1"LBL="Table B-1:" ID="X73014"System tables that occur in all databasesCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="5*"COLNAME="C2" COLWIDTH="15*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"System TableCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Contents VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysalternates COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for SQL Server each  user mapped to a database 
user COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"syscolumns COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each column in a table or view, and for each 
parameter in a procedure COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"syscomments COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One or more rows for each view, rule, default, trigger, and 
procedure, giving SQL definition statement COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysconstraints COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each referential and check constraint 
associated with a table or columnCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysdepends COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each procedure, view, or table that is 
referenced by a procedure, view, or trigger COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysindexes COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each clustered or nonclustered index, and one 
row for each table with no indexes, and an additional row 
for each table containing text or image data. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"syskeys COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each primary, foreign, or common key; set by 
user (not maintained by SQL Server) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"syslogs COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Transaction log COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysobjects COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each table, view, procedure, rule, trigger 
default, log, and (in tempdb only) temporary object COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysprocedures COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each view, rule, default, trigger, and 
procedure, giving internal definition COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysprotects COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User permissions information COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysreferences COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each referential integrity constraint declared 
on a table or columnCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysroles COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Maps server-wide roles to local database groupsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"syssegments COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each segment (named collection of disk 
pieces) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"systhresholds COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each threshold defined for the databaseCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"systypes COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each system-supplied and user-defined 
datatype COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysusermessages COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each user-defined message COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysusers COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each user allowed in the database ID="IN772"System tablesmaster database
ID="IN773"master databasesystem tablesREMAP="BO--Body"These system tables occur in the MOREINFO="NONE"master database only: TOCENTRY="1"LBL="Table B-2:"System tables that occur in the master database onlyCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="5*"COLNAME="C2" COLWIDTH="15*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"System TableCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Contents VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"syscharsets COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each character set or sort order COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysconfigures COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each user-settable configuration parameter COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"syscurconfigs COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Information about configuration parameters currently 
being used by SQL ServerCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysdatabases COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each database on SQL ServerCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysdevices COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each tape dump device, disk dump device, 
disk for databases, and disk partition for databases COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysengines COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each SQL Server engine currently online COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"syslanguages COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each language (except U.S. English) known to 
the server COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"syslocks COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Information about active locks COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysloginroles COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each server login that possesses a system-
defined roleCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"syslogins COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each valid SQL Server user account COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysmessages COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each system error or warning COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysprocesses COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Information about server processes COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysremotelogins COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each remote user COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"syssrvroles COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each server-wide roleCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysservers COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each remote SQL ServerCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysusages COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each disk piece allocated to a database REMAP="BO--Body"These system tables occur in the sybsecurity database only:TOCENTRY="1"LBL="Table B-3:"System tables that occur in the sybsecurity database onlyCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="5*"COLNAME="C2" COLWIDTH="15*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"System TableCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Contents VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysaudits COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each audit recordCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysauditoptions COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One row for each global audit optionREMAP="BO--Body"In the pages that follow, each system table is described in more detail, including a list of their columns and datatypes. In addition, the indexes and the system procedures that reference a particular table are listed. ID="IN334"ColumnsreservedREMAP="BO--Body"The word "reserved" in the column description means that the column is currently not being used by SQL Server. ID="IN285"System tablespermissions on
ID="IN256"Permissionssystem tablesREMAP="BO--Body"Permissions for use of the system tables can be controlled by the database owner, just like permissions on any other tables. REMAP="BO--Body"The SYBASE installation program sets up permissions so that all users can read the system tables, with the exception of a few fields. (See the SQL Server Installation Guide for details.) ID="IN227"Updatingsystem tables
ID="IN328"Updatingdirect to system tables
ID="IN229"System tablesupdating
ID="INA3110"Direct updates to system tablesREMAP="BO--Body"All direct updates on system tables are by default not allowed even for the database owner. Instead, SQL Server supplies system procedures to make any normally needed updates and additions to system tables. ID="IN3011"Updatingsystem procedures and
ID="IN3012"System proceduresupdating and
ID="IN3113"System tablesdirect updates to
ID="IN7514"System tablesallow updates variable and
ID="IN8015"Dynamic configuration variablesallow updates
ID="IN7116"allow updates configuration variableREMAP="BO--Body"You can allow direct updates to the system tables if it becomes necessary to modify them in a way that cannot be accomplished with a system procedure. To accomplish this, a System Security Officer must reset the configuration variable called MOREINFO="NONE"allow updates with the system procedure MOREINFO="NONE"sp_configure, and a System Administrator must then execute the MOREINFO="NONE"reconfigure command. For information, see the System Administration Guide. ID="IN3417"System tableschanges dangerous to
ID="IN7018"syslogs tabledanger of changing the
ID="IN2219"Changingsystem tables
ID="IN6820"Changingsyslogs table, dangers ofREMAP="BO--Body"There are entries in some of the MOREINFO="NONE"master database tables that should not be altered by any user under any circumstances. For example, do not attempt to modify syslogs with a MOREINFO="NONE"delete, MOREINFO="NONE"update, or MOREINFO="NONE"insert command. In addition, an attempt to MOREINFO="NONE"delete all rows from syslogs will put SQL Server into an infinite loop that eventually fills up the entire database. ID="IN4621"Aggregate functionsnot used on virtual tables
ID="IN1422"Virtual tablesREMAP="BO--Body"Note that aggregate functions cannot be used on virtual tables such as syslocks and sysprocessesID="IN3623"System tables
. REMAP="BO--Body"A diagram of the system tables and their relationships is included at the back of the bound System Administration Guide and the SQL ServerReference Manuals Volumes 1 and 2. The diagram is not included with camera-ready copy or CD-ROM versions of the manuals.ID="IN5424"System tablesdescriptions of individual
ID="IN6425"sysalternates tablesysalternates(all databases) DescriptionREMAP="BO--Body"ID="IN6126"Aliasessysalternates table
sysalternates contains one row for each SQL Server user mapped (or aliased) to a user of the current database. When a user tries to access a database, SQL Server looks for a valid MOREINFO="NONE"uidID="IN10627"sysusers tablesysalternates table and
entry in sysusers. If none is found, it looks in sysalternates.suid. If the user's MOREINFO="NONE"suid is found there, he or she is treated as the database user whose MOREINFO="NONE"suid is listed in sysalternates.altsuid. REMAP="BO--Body"On the SQL Server distribution tape, there are no entries in sysalternates. TOCENTRY="1"LBL="Table B-4:"Columns in the sysalternates tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="26*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"suid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server user ID of user being mapped COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"altsuid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server user ID of user to whom another user is 
mapped IndexesREMAP="BO--Body"Unique clustered index on suidReferenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_addalias, sp_adduser, sp_changedbowner, sp_dropalias, sp_dropuser, sp_helpusersysauditoptionsID="IN6428"Auditingsysauditoptions table
ID="IN8029"sysauditoptions table
ID="INA8430"Global audit options, sysauditoptions system table(sybsecurity database) DescriptionREMAP="BO--Body"sysauditoptions contains one row for each global audit option (options set via MOREINFO="NONE"sp_auditoption).These are the system-wide options only, and do not include database, object, stored procedure, trigger, and user audit options. The default value for each option is 0 or "off." sysauditoptions can be accessed only by System Security Officers.TOCENTRY="1"LBL="Table B-5:"Columns in the sysauditoptions tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="3*"COLNAME="C2" COLWIDTH="4*"COLNAME="C3" COLWIDTH="13*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"optn COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Option number. See Table B-6.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"value COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Current value; one of the following:
off = 0
ok = 1
fail = 2
both = 3 (where applicable)
For error auditing (optn=13), the values are:
off = 0
nonfatal = 1
fatal = 2
both = 3COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"min COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Minimum valid value for this optionCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"max COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Maximum valid value for this optionCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of optionCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"svalue COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30)   COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"String equivalent of the current value: for 
example, "on", "off", "nonfatal"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"comment COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(255) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Description of optionREMAP="BO--Body"Possible values for optn are:TOCENTRY="1"LBL="Table B-6:"Audit option values and descriptionsCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="5*"COLNAME="C2" COLWIDTH="31*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Option 
NumberCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Enable or disable auditingCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"UnusedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Login auditingCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Logout auditingCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server boot auditingCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"6COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"RPC connection auditingCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Auditing use of the MOREINFO="NONE"set command to turn roles on and offCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Auditing commands requiring MOREINFO="NONE"sa_role roleCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"9COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Auditing commands requiring MOREINFO="NONE"sso_role roleCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Auditing commands requiring MOREINFO="NONE"oper_role roleCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"12COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Auditing commands requiring MOREINFO="NONE"navigator roleCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"13COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Error auditingCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"14COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Ad hoc auditingCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"15COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Auditing commands requiring MOREINFO="NONE"replication roleIndexesREMAP="BO--Body"NoneReferenced by System Procedures REMAP="BO--Body"ID="IN7831"sysauditoptions table
MOREINFO="NONE"sp_auditoption sysaudits ID="IN5832"Auditingsysaudits table
ID="IN7433"sysaudits table(sybsecurity database)DescriptionREMAP="BO--Body"The sysaudits table contains one row for each audit record. TOCENTRY="1"LBL="Table B-7:"Columns in the sysaudits tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="10*"COLNAME="C3" COLWIDTH="23*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"event COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Type of event being audited. See Table B-8.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"eventmod COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Further information about the event. 
Possible values are:
0 = no modifier for this event
1 = successful occurrence of this event; for 
     error auditing (event=13), a nonfatal error 
2 = failed occurrence of this event; for error 
     auditing (event=13), a fatal error COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"spid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server process ID of the process that caused 
the audit record to be writtenCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"eventtime COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datetime COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Date and time of the audited event COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sequence COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Sequence number of the record within a 
single event; some events require more than 
one audit recordCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"suid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server login ID of the user who performed 
the audited eventCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dbid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Database ID in which the audited event 
occurred or the object/stored 
procedure/trigger resides, depending on 
the type of eventCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"objid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of the accessed object or stored 
procedure/triggerCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"xactid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"binary(6) null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of the transaction containing the audited 
event. For a multi-database transaction, this 
is the transaction ID from the database 
where the transaction originated.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"loginname COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30) null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Login name corresponding to the suidCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dbname COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30) null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Database name corresponding to the dbidCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"objname COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30) null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object name corresponding to the objidCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"objowner COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30) null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of the owner of objidCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"extrainfo COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(255) null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Additional information about the audited 
event; contents vary with the type of event 
audited. (See Table B-8.)REMAP="BO--Body"Possible values for the event column are shown in LINKEND="X99999"Table B-8
, along with the corresponding contents of the extrainfo column. Global audit events have a code of less than 100. All other event types are numbered starting at 100. TOCENTRY="1"LBL="Table B-8:" ID="X99999"Contents of event and extrainfo columns of sysauditsCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="2*"COLNAME="C2" COLWIDTH="9*"COLNAME="C3" COLWIDTH="9*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"event 
No.COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Contents of extrainfo ColumnVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Enable auditingCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULLCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Disable auditingCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULLCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LoginCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Host nameCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LogoutCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Host nameCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server bootCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Names of the server program, 
master device, interfaces file path, 
server, and error log fileCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"6COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"RPC connectionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Remote server name, host nameCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Use of MOREINFO="NONE"set command to turn roles 
on and offCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Role, new settingCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command requiring MOREINFO="NONE"sa_role roleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"9COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command requiring MOREINFO="NONE"sso_role roleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command requiring MOREINFO="NONE"oper_role roleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"12COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command requiring MOREINFO="NONE"navigator roleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"13COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ErrorCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Error number, severity, and stateCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"14COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Ad hoc audit recordCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User-supplied comment textCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"15COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command requiring MOREINFO="NONE"replication 
roleCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"100COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Database reference COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"101COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Table reference COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"102COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"View reference COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"103COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Stored procedure executionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Parameter listCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"104COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Trigger executionCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULLCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"105COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User's attempts to access a tableCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"106COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User's attempt to access a viewCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command typeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"107COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User's command text auditingCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command batch textIndexesREMAP="BO--Body"NoneReferenced by System Procedures ID="IN7234"sysaudits tableREMAP="BO--Body"NonesyscharsetsID="IN7635"syscharsets table
ID="INA7336"Character setssyscharsets system table(master database only) DescriptionREMAP="BO--Body"syscharsetscontains one row for each character set and sort order defined for use by SQL Server. One of the sort orders is marked in master..sysconfigures as the default sort order, which is the only one actually in use. ID="IN1637"Namessort orderID="IN1938"Namescharacter setID="IN6939"Sort ordersyscharsets system tableTOCENTRY="1"LBL="Table B-9:"Columns in the syscharsets tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="8*"COLNAME="C3" COLWIDTH="25*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"type COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The type of entity this row represents. Numbers 
from 1001 to 1999 represent character sets. 
Numbers from 2000 to 2999 represent sort 
orders. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"id COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The ID for a character set or sort order. A sort 
order is defined by the combination of the sort 
order ID and the character set ID (csid). The 
character set is defined by id, which must be 
unique. Sybase reserves ID numbers 0-200. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"csid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"If the row represents a character set, this field is 
unused. If the row represents a sort order, this is 
the ID of the character set that sort order is built 
on. A character set row with this ID must exist 
in this table. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Internal system status information bits. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"A unique name for the character set or sort 
order. Must contain only the 7-bit ASCII letters 
A-Z or a-z, digits 0-9, and underscores (_), and 
begin with a letter. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"description COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(255) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"An optional description of the features of the 
character set or sort order. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"definition COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"imageCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The internal definition of the character set or 
sort order. The structure of the data in this field 
depends on the type. IndexesREMAP="BO--Body"unique clustered index on id, csid, typeunique nonclustered index on nameReferenced by System Procedures REMAP="BO--Body"ID="IN7440"syscharsets table
MOREINFO="NONE"sp_checkreswords, sp_helpsort, sp_serverinfo syscolumnsID="INA7541"syscolumns table(all databases) DescriptionREMAP="BO--Body"syscolumns contains one row for every column in every table and view, and a row for each parameter in a procedure. ID="IN3242"Tablessystem tables entries forID="IN3143"Viewssystem tables entries forTOCENTRY="1"LBL="Table B-10:"Columns in the syscolumns tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="9*"COLNAME="C3" COLWIDTH="24*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"id COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of table to which this column belongs or of 
procedure with which this parameter is 
associated COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"number COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Sub-procedure number when the procedure is 
grouped (0 for non-procedure entries) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"colid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Indicates unique position for bit columns,
whether NULL values are legal in this 
column, and if a check constraint exists for the 
columnCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"type COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Physical storage type; copied from systypes COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"length COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Physical length of data; copied from systypes 
or supplied by user COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"offset COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Offset into the row where this column 
appears, if negative, this is a variable-length 
columnCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"usertype COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User type ID; copied from systypes COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cdefault COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of the procedure that generates default 
value for this column COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"domain COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Constraint ID of the first rule or check 
constraint for this column COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysname COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column name COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"printfmt COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(255) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ReservedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"prec COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of significant digitsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"scale COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of digits to the right of the decimal 
pointIndexes REMAP="BO--Body"unique clustered index onMOREINFO="NONE" id, number, colid Referenced by System Procedures REMAP="BO--Body"MOREINFO="NONE"sp_bindefault, sp_bindrule, sp_changegroup, sp_checknames, sp_checkreswords, sp_column_privileges, sp_columns, sp_commonkey, sp_droptype, sp_dropuser, sp_estspace, sp_foreignkey, sp_help, sp_helpconstraint, sp_helpjoins, sp_helprotect, sp_primarykey, sp_rename, sp_special_columns, sp_sproc_columns, sp_statistics, sp_unbindefault, sp_unbindrule ID="IN7344"syscolumns tablesyscommentsID="INA6245"syscomments table(all databases) DescriptionREMAP="BO--Body"syscommentscontains entries for each view, rule, default, trigger, table constraint, and procedure. The MOREINFO="NONE"text field contains the original definition statements. If the MOREINFO="NONE"text is longer than 255 bytes, the entries will span rows. Each object can occupy up to 65025 rows. ID="IN3146"Viewssystem tables entries forID="INA3147"Rulessystem tables entries forID="IN3448"Defaultssystem tables entries forID="IN3449"Triggerssystem tables entries forID="IN4350"Stored proceduressystem tables entries forTOCENTRY="1"LBL="Table B-11:"Columns in the syscomments tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="6*"COLNAME="C2" COLWIDTH="8*"COLNAME="C3" COLWIDTH="26*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"id COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object ID to which this text applies COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"number COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Sub-procedure number when the procedure is 
grouped (0 for non-procedure entries) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"colid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Sequence of 255 rows for the object COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"texttype COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0 for system-supplied comment (for views, rules, 
defaults, triggers, and procedures). 1 for user-
supplied comment (users can add entries that 
describe an object or column) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"language COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"text COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(255) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Actual text of SQL definition statementCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"colid2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyintCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Indicates next sequence of rows for the object (see 
colid above); object can have up to 255 sequences of 
255 rows each.Indexes REMAP="BO--Body"unique clustered index on MOREINFO="NONE"id, number, colid, texttypeReferenced by System Procedures REMAP="BO--Body"MOREINFO="NONE"sp_helpconstraint, sp_helptext sysconfiguresID="IN7851"sysconfigures table(master database only) DescriptionREMAP="BO--Body"sysconfigures and syscurconfigsID="IN4453"Configuration variablessystem tables values
 contain one row for each user-settable configuration variable.TOCENTRY="1"LBL="Table B-12:"Columns in the sysconfigures tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="6*"COLNAME="C2" COLWIDTH="8*"COLNAME="C3" COLWIDTH="26*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"config COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Configuration variable numberCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"value COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The user-modifiable value for the variable (being 
used by  only if MOREINFO="NONE"reconfigure has been 
run)COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"comment COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(255) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Explanation of the configuration variable COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Either 1 (dynamic, meaning variable takes effect 
when MOREINFO="NONE"reconfigure is issued) or 0 (variable takes 
effect when  is restartedREMAP="BO--Body"Here are the contents of sysconfigures:TOCENTRY="1"LBL="Table B-13:"Contents of sysconfigures COLS="4" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="1*"COLNAME="C3" COLWIDTH="7*"COLNAME="C4" COLWIDTH="1*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"configCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"valueCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"commentCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"statusVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"101COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Maximum recovery interval in minutesCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"102COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Allow updates to system tablesCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"103COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of user connections allowedCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"104COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Size of available physical memory in 2k pagesCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"105COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of open databases allowed among all usersCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"106COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of locks for all usersCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"107COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of open database objectsCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"108COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Percentage of remaining memory used for procedure 
cacheCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"109COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Default fill factor percentageCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"110COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Average time slice per process in millisecondsCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"111COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Default database size in megabytesCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"112COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Tape retention period in daysCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"113COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Recovery flagsCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"115COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Allow triggers to be invoked within triggersCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"116COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of devicesCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"117COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Allow remote accessCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"118COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of remote loginsCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"119COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of remote sitesCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"120COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of remote connectionsCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"121COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of pre-read packets per remote connectionCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"122COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1001COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Upgrade version   COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1   COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"123COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"50COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Default sortorder IDCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"124COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Default languageCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"125COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Language cacheCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"126COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Maximum online enginesCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"127COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Minimum online enginesCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"128COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Engine adjust intervalCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"129COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"200COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CPU accounting flush intervalCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"130COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1000COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"I/O accounting flush intervalCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Default character set IDCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"134COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Stack sizeCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"135COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"System-wide password expiration intervalCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"136COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"100COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Audit queue sizeCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"137COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Additional netmemCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"138COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Default network packet sizeCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"139COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Maximum network packet sizeCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"140COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of extent I/O buffersCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"141COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5000COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Identity burning set factorCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0IndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"config Referenced by System Procedures REMAP="BO--Body"MOREINFO="NONE"sp_configureID="IN7654"sysconfigures table
 sysconstraintsID="IN6555"sysconstraints table(all databases) DescriptionID="IN6656"Constraintssysconstraints tableREMAP="BO--Body"The sysconstraints table has one row for each referential and check constraint associated with a table or column.REMAP="BO--Body"Whenever a user declares a new check constraint or referential constraint using MOREINFO="NONE"create table or MOREINFO="NONE"alter table, SQL Server inserts a row into the sysconstraints table. The row remains until a user executes MOREINFO="NONE"alter table to drop the constraint. Dropping a table by executing MOREINFO="NONE"drop table removes all rows associated with that table from the sysconstraints table.ID="IN8857"Referential integrity constraintssysconstraints tableID="IN7258"Check constraintssysconstraints tableTOCENTRY="1"LBL="Table B-14:"Columns in the sysconstraints tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="6*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="27*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"colid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column number in the tableCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"spare1 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"UnusedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"constrid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object ID of the constraintCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tableid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of the table on which the constraint is declaredCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"error COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Constraint specific error messageCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The type of constraint: 
0x0040 = a referential constraint
0x0080 = a check constraintCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"spare2 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"UnusedIndexesREMAP="BO--Body"clustered index on tableid, colidunique nonclustered index on constridReferenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_bindmsg, sp_bindrule, sp_helpconstraint, sp_unbindmsg, sp_unbindrulesyscurconfigsID="IN6459"syscurconfigs table(master database only) DescriptionREMAP="BO--Body"syscurconfigs is built dynamically when queried. Its structure is identical to that of sysconfiguresID="IN4462"Configuration variablessystem tables values
. It contains an entry for each of the configuration variables, as does sysconfiguresID="IN2363"Configuration structure
, but with the current values rather than the default values. In addition, it contains four rows that describe the configuration structure. ID="IN2360"StructureconfigurationID="IN4461"Information (Server)configuration variablesTOCENTRY="1"LBL="Table B-15:"Columns in the syscurconfigs tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="6*"COLNAME="C2" COLWIDTH="8*"COLNAME="C3" COLWIDTH="26*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"config COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Configuration variable numberCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"value COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The user-modifiable value for the variable (being 
used by  only if MOREINFO="NONE"reconfigure has been 
run)COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"comment COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(255) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Explanation of the configuration variable COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Either 1 (dynamic, meaning variable takes effect 
when MOREINFO="NONE"reconfigure is issued) or 0 (variable takes 
effect when  is restartedReferenced by System Procedures REMAP="BO--Body"MOREINFO="NONE"sp_configure, sp_helpsort, sp_serverinfo sysdatabasesID="INA7764"sysdatabases table(master database only) DescriptionREMAP="BO--Body"sysdatabases contains one row for each database on SQL Server. When SQL Server is installed, sysdatabases contains entries for the MOREINFO="NONE"master database, the MOREINFO="NONE"model database, the sybsystemprocs database and the MOREINFO="NONE"temporary database. If you have installed auditing, it also contains an entry for the sybsecurity databaseMOREINFO="NONE"ID="IN4465"Information (Server)databasesID="IN3566"Databasessystem tables entries forTOCENTRY="1"LBL="Table B-16:"Columns in the sysdatabases tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="8*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="25*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysname COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of the database COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dbid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Database ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"suid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server user ID of database creator COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Control bits; those which the user can set with 
MOREINFO="NONE"sp_dboption are marked "settable." See Table B-17.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"version COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Version of  code under which 
database was created COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"logptr COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Pointer to transaction log COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"crdate COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datetime COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Creation date COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dumptrdate COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datetime COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Date of the last MOREINFO="NONE"dump MOREINFO="NONE"transaction COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status2 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intn COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Additional control bits. See Table B-18.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"audflags COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intn COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Audit settings for databaseCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"deftabaud COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intn COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Bit-mask that defines default audit settings for 
tablesCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"defvwaud COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intn COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Bit-mask that defines default audit settings for 
viewsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"defpraud COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intn COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Bit-mask that defines default audit settings for 
stored proceduresREMAP="BO--Body"The bit representations for the status column are:MOREINFO="NONE"TOCENTRY="1"LBL="Table B-17:"status control bits in the sysdatabases tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="5*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="27*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DecimalCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"HexCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StatusVALIGN="TOP"COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"4COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x04COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"select into/bulkcopy; settableCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"8COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x08COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"trunc log on chkpt; settable COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"16COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x10COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"no chkpt on recovery; settableCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"32COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x20COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"crashed while loading database, instructs recovery 
not to proceed COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"256COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x100COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"database suspect; not recovered; cannot be opened 
or used; can only be dropped with MOREINFO="NONE"dbcc dbrepair COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"512COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x200COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"ddl in tran; settableCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"1024COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x400COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"read only; settableCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"2048COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x800 COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"dbo use only; settable COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"4096COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x1000COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"single user; settable COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"8192COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x2000COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"allow nulls by default; settable COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"16384COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x4000COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dbname has changed REMAP="BO--Body"The bit representations for the status2 column are:MOREINFO="NONE"TOCENTRY="1"LBL="Table B-18:"status2 control bits in the sysdatabases tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="6*"COLNAME="C3" COLWIDTH="27*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DecimalCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"HexCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StatusVALIGN="TOP"COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x01COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"abort tran on log full; settableCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x02COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"no free space acctg; settable COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"4COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x04COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MOREINFO="NONE"auto identity; settable IndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"nameunique nonclustered index on MOREINFO="NONE"dbidReferenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_addlogin, sp_addsegment, sp_addtype, sp_changedbowner, sp_checknames, sp_checkreswords, sp_databases, sp_dboption, sp_dbremap, sp_dropdevice, sp_dropsegment, sp_extendsegment, sp_helpdb, sp_logdevice, sp_renamedb, sp_tables ID="IN4267"Information (Server)databasesID="IN7568"sysdatabases tablesysdependsID="INA6169"sysdepends table(all databases) DescriptionREMAP="BO--Body"ID="IN3270"Database objectsdependencies of
ID="IN8071"Dependencies, database objectsysdepends table
sysdependsID="IN3072"Tablesobject dependencies and
ID="IN4173"Stored proceduresobject dependencies and
ID="IN2974"Viewsobject dependencies and
ID="IN3275"Triggersobject dependencies and
contains one row for each procedure, view, or table that is referenced by a procedure, view, or trigger. TOCENTRY="1"LBL="Table B-19:"Columns in the sysdepends tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="28*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"id COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"number COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Procedure number COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"depid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Dependent object ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"depnumbe
r COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Dependent procedure number COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Internal status information COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"selall COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"bit COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"On if object is used in MOREINFO="NONE"select * statement COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"resultobj COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"bit COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"On if object is being updated COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"readobj COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"bit COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"On if object is being readIndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"id, number, depid, depnumberReferenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_depends sysdevicesID="IN7576"sysdevices table(master database only) DescriptionREMAP="BO--Body"ID="IN6377"Disk devicessysdevices table
ID="IN3378"Devicessystem tables entries for
ID="IN4179"Database devicessystem table entries for
ID="IN6780"Database devicessysdevices table
sysdevicesID="IN6881"Tape dump devicessysdevices table
ID="IN3882"Dump devicessystem tables entries for
ID="IN6783"Dump devicessysdevices table and
 contains one row for each tape dump device, disk dump device, disk for databases, and disk partition for databases. On the SQL Server distribution tape, there are four entries in sysdevices: one for the master device (for databases), one for a disk dump device, and two for tape dump devices. TOCENTRY="1"LBL="Table B-20:"Columns in the sysdevices tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="8*"COLNAME="C2" COLWIDTH="9*"COLNAME="C3" COLWIDTH="23*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"low COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"First virtual page number on database 
device (not used for dump devices) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"high COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Last virtual page number on database 
device or dump device COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Bit map indicating type of device, default 
and mirror status. See Table B-21.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cntrltype COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Controller type (0 if database device, 2 if 
disk dump device or streaming tape, 3­ -8 if 
tape dump device) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysname COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Logical name of dump device or of database 
device COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"phyname COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(127) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of physical device COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"mirrorname COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(127) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of mirror device REMAP="BO--Body"The bit representations for the status column are additive. For example, "3" indicates a physical disk that is also a default. REMAP="BO--Body"The status control bits are:TOCENTRY="1"LBL="Table B-21:"status control bits in the sysdevices tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="15*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DecimalCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Hex COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StatusVALIGN="TOP"COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x01COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"default diskCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x02COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"physical disk COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x04COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"logical disk COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x08COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"skip header COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x10COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dump device COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"32COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x20COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"serial writes COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"64COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x40COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"device mirrored COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"128COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x80COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"reads mirrored COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"256COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x100COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"secondary mirror side onlyCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"512COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x200COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"mirror enabled COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2048COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x800COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"used internallyIndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"name Referenced by System ProceduresREMAP="BO--Body"ID="IN7384"sysdevices table
MOREINFO="NONE"sp_addsegment, sp_addumpdevice, sp_checknames, sp_checkreswords, sp_configure, sp_diskdefault, sp_dropdevice, sp_dropsegment, sp_extendsegment, sp_helpdb, sp_helpdevice, sp_helplog, sp_helpsegment, sp_logdevice, sp_volchangedsysenginesID="IN6185"sysengines table(master database only) DescriptionREMAP="BO--Body"ID="IN3386"Enginessystem tables entries for
ID="IN6987"Enginessysengines table
sysengines contains one row for each SQL Server engine currently on line. TOCENTRY="1"LBL="Table B-22:"Columns in the sysengines tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="8*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="25*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"engine COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Engine number COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"osprocid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Operating system process ID (may be NULL) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"osprocname COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Operating system process name (may be NULL) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One of: online, off-line, in create, in destroy, 
debug COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"affinitied COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of  processes with affinity to 
this engine COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cur_kpid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Kernel process ID of process currently running 
on this engine, if any COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"last_kpid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Kernel process ID of process which previously 
ran on this engineCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"idle_1 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"idle_2 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"idle_3 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"idle_4 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"starttime COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datetime COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Date and time engine came on line IndexesREMAP="BO--Body"none Referenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_monitorsysindexesID="IN7588"sysindexes table(all databases) DescriptionREMAP="BO--Body"ID="IN3389"Indexessystem tables entries for
sysindexesID="IN10290"text datatypesysindexes table and
 contains one row for each clustered index, one row for each nonclustered index, one row for each table that has no clustered index, and one row for each table that contains MOREINFO="NONE"textID="INA10391"image datatypesysindexes table and
 or image columns. ID="IN3992"Number  of pagesused by table or indexREMAP="BO--Body"The column MOREINFO="NONE"doampgID="IN3693"Clustered indexespages allocated to
 is used only if the row describes a table or clustered index. TOCENTRY="1"LBL="Table B-23:"Columns in the sysindexes tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="9*"COLNAME="C3" COLWIDTH="24*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysname COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Index or table name COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"id COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of table, or ID of table to which index 
belongsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"indid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0 if table, 1 if clustered index, >1 if 
nonclustered, 255 if text chain COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"doampg COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Page number for the object allocation map of a 
table or clustered index COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ioampg COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Page number for the allocation map of a 
nonclustered indexCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"oampgtrips COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Ratio of OAM page to data page residency in 
cacheCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status2 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Internal system status information. See Table B-24.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ipgtrips COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Ratio of index page to data page residency in 
cacheCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"first COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Pointer to first data or leaf page COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"root COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Pointer to root page if entry is an index; 
pointer to last page if entry is a table or text 
chain COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"distribution COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Pointer to distribution page (if entry is an 
index) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"usagecnt COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"segment COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of segment in which this object 
residesCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Internal system status information (See Table B-25.)COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"rowpage COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Maximum number of rows per page COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"minlen COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Minimum size of a row COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"maxlen COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Maximum size of a row COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"maxirow COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Maximum size of a non-leaf index row COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"keycnt COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of keys for a clustered index; number 
of keys+1 for a nonclustered indexCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"keys1 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varbinary(255) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Description of key columns (if entry is an 
index) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"keys2 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varbinary(255) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Description of key columns (if entry is an 
index)COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"soid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Sort order ID that the index was created with. 
`0' if there is no character data in the keys COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"csid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Character set ID that the index was created 
with. `0' if there is no character data in the 
keys REMAP="BO--Body"The bit representations for the status2TOCENTRY="1"LBL="Table B-24:"status2 control bits in the sysindexes tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="6*"COLNAME="C3" COLWIDTH="27*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DecimalCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"HexCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StatusVALIGN="TOP"COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Index part of referential integrity constraintCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x2COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Index part of primary key/unique constraintREMAP="BO--Body"The bit representations for the status column are: TOCENTRY="1"LBL="Table B-25:"status control bits in the sysindexes table COLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="6*"COLNAME="C3" COLWIDTH="27*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DecimalCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"HexCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StatusVALIGN="TOP"COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Abort command or trigger if attempt to insert 
duplicate key COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x2COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Unique index COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"4COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x4COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Abort command or trigger if attempt to insert 
duplicate rowCOLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"16COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x10COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Clustered index COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"64COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x40 COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Index allows duplicate rows COLNAME="C1" ALIGN="RIGHT" ROTATE="0" MOREROWS="0"32768COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x8000COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Suspect index IndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"id, indid Referenced by System ProceduresREMAP="BO--Body"ID="IN7394"sysindexes table
MOREINFO="NONE"sp_checknames, sp_checkreswords, sp_dropsegment, sp_estspace, sp_help, sp_helpconstraint, sp_helpindex, sp_helplog, sp_helpsegment, sp_indsuspect, sp_pkeys, sp_placeobject, sp_rename, sp_spaceused, sp_special_columns, sp_statisticssyskeysID="INA7295"syskeys table(all databases) DescriptionREMAP="BO--Body"ID="IN7396"Keys, tablesyskeys table
syskeysID="IN6097"Primary keyssyskeys table
ID="IN6098"Foreign keyssyskeys table
ID="IN5999"Common keyssyskeys table
 contains one row for each primary, foreign, or common key. TOCENTRY="1"LBL="Table B-26:"Columns in the syskeys tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="6*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="27*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"id COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"type COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Record type COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"depid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Dependent object ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"keycnt COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The number of non-null keys COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"size COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"key1 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"key2 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"key3 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"key4 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"key5 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"key6 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"key7 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"key8 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"depkey1 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"depkey2 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"depkey3 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"depkey4 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"depkey5 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"depkey6 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"depkey7 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"depkey8 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID ID="IN18100"Keys, tablesystem
ID="IN36101"System tableskeys forIndexesREMAP="BO--Body"clustered index on MOREINFO="NONE"idReferenced by System ProceduresREMAP="BO--Body"ID="IN70102"syskeys table
ID="IN71103"Keys, tablesyskeys table
ID="IN34104"System tableskeys for
MOREINFO="NONE"sp_commonkey, sp_dropkey, sp_foreignkey, sp_helpjoins, sp_helpkey, sp_primarykey syslanguagesID="IN77105"syslanguages table(master database only) DescriptionREMAP="BO--Body"ID="IN73106"Languages, alternatesyslanguages table
ID="IN46107"Languages, alternatesystem tables entries for
syslanguagesID="IN42108"English language, U.S.
 contains one row for each language known to SQL Server. us_english is not in syslanguages, but is always available to SQL Server. TOCENTRY="1"LBL="Table B-27:"Columns in the syslanguages tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="8*"COLNAME="C2" COLWIDTH="9*"COLNAME="C3" COLWIDTH="23*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"langid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Unique language ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dateformat COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char(3) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Date order, for example, "dmy" COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datefirst COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"First day of the week-1 for Monday, 2 for 
Tuesday, and so on, up to 7 for Sunday. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"upgrade COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0" version of last upgrade for this 
language COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Official language name, for example, 
"french" COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"alias COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Alternate language name, for example, 
"francais" COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"months COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(251) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Comma-separated list of full-length month 
names, in order from January to 
December-each name is at most 20 
characters long COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"shortmonths COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(119) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Comma-separated list of shortened month 
names, in order from January to 
December-each name is at most 9 
characters long COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"days COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(216) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Comma-separated list of day names, in 
order from Monday to Sunday-each name 
is at most 30 characters long. IndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"langidunique nonclustered index on MOREINFO="NONE"nameunique nonclustered index on MOREINFO="NONE"aliasReferenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_addlanguage, sp_addmessage, sp_checkreswords, sp_configure, sp_droplanguage, sp_dropmessage, sp_getmessage, sp_helplanguage, sp_setlangaliasID="IN75109"syslanguages table
 ID="IN73110"syslocks table
syslocks(master database only) DescriptionREMAP="BO--Body"ID="IN31111"Lockssystem tables entries for
ID="IN54112"Lockssyslocks table
syslocks contains information about active locks, but it is not a normal table. Rather, it is built dynamically when queried by a user. No updates to syslocks are allowed. MOREINFO="NONE"TOCENTRY="1"LBL="Table B-28:"Columns in the syslocks tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="26*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"id COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Table ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dbid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Database ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"page COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Page number COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"type COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Type of lock (bit values for the type column are 
listed in )COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"spid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of process that holds the lock COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"classCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char(30)COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of the cursor this lock is associated with, if 
anyREMAP="BO--Body"The bit representations for the type column are:MOREINFO="NONE"TOCENTRY="1"LBL="Table B-29:"type control bit in the syslocks table COLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="6*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="27*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DecimalCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"HexCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StatusVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Exclusive table lock COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x2COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Shared table lock COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x3COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Exclusive intent lock (will do page locking on 
indicated pages) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x4COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Shared intent lock COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x5COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Exclusive page lock COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"6COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x6COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Shared page lock COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x7COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Update page lock (changes to exclusive if page is 
actually modified) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"256COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x100COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Lock is blocking another process COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"512COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x200COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Demand lock IndexesREMAP="BO--Body"none Referenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_lockID="IN71113"syslocks table
 sysloginrolesID="IN59114"Userssysloginroles table
ID="IN64115"sysloginroles table
ID="IN59116"Rolessysloginroles table(master database only)DescriptionREMAP="BO--Body"sysloginroles contains a row for each instance of a server login possessing a system-defined role. One row is added for each role possessed by each login. For example, if a single server user is granted three roles, three rows are added to sysloginroles associated with that user's suid.TOCENTRY="1"LBL="Table B-30:"Columns in the sysloginroles tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="24*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"suid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"suid COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server user IDCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"srid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server role ID; one of the following: 
0   MOREINFO="NONE"sa_role 
1   MOREINFO="NONE"sso_role 
2   MOREINFO="NONE"oper_role 
4   MOREINFO="NONE"navigator_role 
5   MOREINFO="NONE"replication_role 
6   MOREINFO="NONE"bcpin_labels_roleCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ReservedIndexesREMAP="BO--Body"Clustered index on suidReferenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_displaylogin, sp_droplogin, sp _locklogin, sp_role sysloginsID="IN74117"syslogins table(master database only) DescriptionREMAP="BO--Body"syslogins contains one row for each valid SQL Server user account. On the SQL Server distribution tape, sysloginsID="IN30121"Two Phase Commit Probe Process
contains an entry in which the name is "sa", the suid is 1, and the password is null. It also contains an entry named "probe" with an unpublished password. The login "probe" and the user "probe" exist for the Two Phase Commit Probe Process, which uses a challenge and response mechanism to access SQL Server. ID="IN31122"Probe Process, Two Phase CommitTOCENTRY="1"LBL="Table B-31:"Columns in the syslogins tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="8*"COLNAME="C2" COLWIDTH="11*"COLNAME="C3" COLWIDTH="21*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"suid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server user ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Status of the account. See Table B-32.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"accdate COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datetime COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Date totcpu and totio were last cleared COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"totcpu COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CPU time accumulated by login COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"totio COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"I/O accumulated by loginCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"spacelimit COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"timelimit COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"resultlimit COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dbname COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysname COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of database in which to put user 
when connection established COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysname COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Login name of user COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"password COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varbinary COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Password of user (encrypted)COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"language COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User's default language COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"pwdate COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datetime COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Date the password was last changedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"audflags COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User's audit settingsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"fullname COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Full name of the userREMAP="Body"The bit representations for the status column are: TOCENTRY="1"LBL="Table B-32:"status control bits in the syslogins tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="6*"COLNAME="C2" COLWIDTH="5*"COLNAME="C3" COLWIDTH="28*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DecimalCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"HexCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StatusVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Password less than 6 characters, or NULLCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x2COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Account is lockedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x4COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Password is expiredIndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"suidunique nonclustered index on MOREINFO="NONE"name Referenced by System ProceduresID="IN68123"Loginssyslogins table
ID="IN72124"syslogins table
ID="IN67125"Userssyslogins table
ID="IN43126"Userssystem tables entries forREMAP="BO--Body"MOREINFO="NONE"sp_addalias, sp_addlogin, sp_addremotelogin, sp_adduser, sp_changedbowner, sp_checknames, sp_checkreswords, sp_clearstats, sp_displaylogin, sp_droplogin, sp_helpdb, sp_helpuser, sp_locklogin, sp_modifylogin, sp_reportstats, sp_rolesyslogsID="IN58127"syslogs table(all databases) DescriptionREMAP="BO--Body"syslogs contains the transaction log. It is used by SQL Server for recovery and roll forward, and is not useful to users. ID="INA75128"syslogs tableinfinite loop if changes toREMAP="BO--Body"You cannot delete from, insert into, or update syslogs. Every data modification operation is logged, so before you can change syslogs, the change must be logged. This means that a change operation on syslogs adds a row to syslogs, which then must be logged, adding another row to syslogsID="IN68129"Loopssyslogs changes and infinite
, and so on, producing an infinite loop. The loop continues until the database becomes full. TOCENTRY="1"LBL="Table B-33:"Columns in the syslogs tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="6*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="27*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"xactid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"binary(6) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Transaction ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"op COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Update operation number IndexesREMAP="BO--Body"nonesysmessagesID="IN62130"sysmessages table(master database only) DescriptionREMAP="BO--Body"ID="IN60131"Messagessysmessages table
ID="IN40132"Error messagessystem tables entries for
sysmessages contains one row for each system error or warning that can be returned by SQL Server. SQL Server displays the error description on the user's screen.TOCENTRY="1"LBL="Table B-34:"Columns in the sysmessages tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="8*"COLNAME="C3" COLWIDTH="25*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"error COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Unique error number COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"severity COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Severity level of error COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dlevel COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved for number of descriptive level of this 
message: terse, short, or long COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"description COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(25) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Explanation of error with place holders for 
parameters COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"langid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Language, null for us_englishCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sqlstateCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(5)COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SQLSTATE value for the errorIndexesREMAP="BO--Body"clustered index on MOREINFO="NONE"error, MOREINFO="NONE"dlevel unique nonclustered index onMOREINFO="NONE" error, dlevel, langid Referenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_configure, sp_dboption, sp_depends, sp_droplanguage, sp_getmessage, sp_help, sp_helpdb, sp_helpdevice, sp_helpremotelogin, sp_remoteoptionsysobjectsID="IN75133"sysobjects table(all databases) DescriptionREMAP="BO--Body"sysobjects contains one row for each table, view, stored procedure, log, rule, default, trigger, check constraint, referential constraint, and (in tempdb only) temporary object. ID="IN81134"Database objectssysobjects tableID="IN46135"Tablessystem tables entries forID="IN45136"Viewssystem tables entries forID="IN57137"Stored proceduressystem tables entries forID="IN56138"Transaction logssystem tables entries forID="IN45139"Rulessystem tables entries forID="IN48140"Defaultssystem tables entries forID="IN48141"Triggerssystem tables entries forID="IN57142"Check constraintssystem tables entries forID="IN51143"Constraintssystem tables entries forID="IN98144"Referential integrity constraintssysobjects tableID="IN89145"tempdb databasesystem tables entries andTOCENTRY="1"LBL="Table B-35:"Columns in the sysobjects tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="8*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="25*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysnameCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object name COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"id COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"uid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User ID of object owner COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"type COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char(2) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One of the following object types:
 
S      system table
U      user table
V      view
L      log
P      procedure
R      rule
D      default
TR    trigger
RI    referential constraintCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"userstat COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Application-dependent type information (32768 
decimal [0x8000 hex] indicates to Data 
Workbenchname='trade' font='symbol' code='228'  charset='fontspecific' that a procedure is a report) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysstat COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Internal status information (256 decimal [0x100 
hex] indicates that table is read-only) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"indexdel COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Index delete count (incremented if an index is 
deleted) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"schemacnt COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Count of changes in schema of a given object 
(incremented if a rule or default is added) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysstat2 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Additional internal status information. See Table 
B-36.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"crdate COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datetime COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Date object was created COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"expdate COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datetime COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"deltrig COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Stored procedure ID of a delete trigger COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"instrig COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Stored procedure ID of an insert trigger COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"updtrig COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Stored procedure ID of an update trigger COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"seltrig COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ckfirst COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of first check constraint on the tableCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cache COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"audflags COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object's audit settingsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"objspareCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SpareREMAP="BO--Body"The bit representations for the sysstat2TOCENTRY="1"LBL="Table B-36:"systat2 control bits in the sysobjects table COLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="5*"COLNAME="C2" COLWIDTH="5*"COLNAME="C3" COLWIDTH="27*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DecimalCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"HexCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StatusVALIGN="TOP"COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Table has referential constraintCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x2COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Table has foreign key constraintCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x4COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Table has more than one check constraintCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x8COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Table has primary key constraintCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x10COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Chained transaction mode only stored procedureCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"32COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x20COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Any transaction mode stored procedureCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"64COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x40COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Table has IDENTITY fieldIndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"idunique nonclustered index on MOREINFO="NONE"name, uid ID="IN73146"sysobjects table
Referenced by System ProceduresID="IN79147"Database objectssysobjects table
ID="IN44148"Tablessystem tables entries for
ID="IN43149"Viewssystem tables entries for
ID="IN55150"Stored proceduressystem tables entries for
ID="IN54151"Transaction logssystem tables entries for
ID="IN43152"Rulessystem tables entries for
ID="IN46153"Defaultssystem tables entries for
ID="IN46154"Triggerssystem tables entries for
ID="IN55155"Check constraintssystem tables entries for
ID="IN49156"Constraintssystem tables entries for
ID="IN96157"Referential integrity constraintssysobjects table
ID="IN87158"tempdb databasesystem tables entries andREMAP="BO--Body"MOREINFO="NONE"sp_addmessage, sp_addthreshold, sp_bindefault, sp_bindmsg, sp_bindrule, sp_checknames, sp_checkreswords, sp_column_privileges, sp_columns, sp_commonkey, sp_depends, sp_dropgroup, sp_dropkey, sp_dropsegment, sp_dropthreshold, sp_droptype, sp_dropuser, sp_estspace, sp_fkeys, sp_foreignkey, sp_help, sp_helpconstraint, sp_helpindex, sp_helpjoins, sp_helpkey, sp_helprotect, sp_helpthreshold, sp_indsuspect, sp_modifythreshold, sp_pkeys, sp_placeobject, sp_primarykey, sp_procxmode, sp_recompile, sp_remap, sp_rename, sp_spaceused, sp_sproc_columns, sp_statistics, sp_stored_procedures, sp_table_privileges, sp_tables, sp_unbindefault, sp_unbindmsg, sp_unbindrulesysproceduresID="IN64159"sysprocedures table(all databases) DescriptionREMAP="BO--Body"ID="IN31160"Viewssystem tables entries for
ID="IN34161"Defaultssystem tables entries for
ID="IN31162"Rulessystem tables entries for
ID="IN34163"Triggerssystem tables entries for
ID="IN43164"Stored proceduressystem tables entries for
ID="IN43165"Check constraintssystem tables entries for
ID="IN11166"Planobject
ID="IN21167"Sequence tree, object
sysprocedurescontains entries for each view, default, rule, trigger, procedure, declarative default, and check constraint. The plan or sequence tree for each object is stored in binary form. If the sequence tree doesn't fit in one entry, it is broken into more than one row. The MOREINFO="NONE"sequence column identifies the sub-rows.TOCENTRY="1"LBL="Table B-37:"Columns in the sysprocedures tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="6*"COLNAME="C2" COLWIDTH="6*"COLNAME="C3" COLWIDTH="28*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"type COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object type. See Table B-38.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"id COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object IDCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sequence COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Sequence number if more than one row is used to 
describe this object COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Internal system statusCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"number COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Sub-procedure number when the procedure is 
grouped (0 for non-procedure entries) REMAP="BO--Body"The bit representations for the type column are:TOCENTRY="1"LBL="Table B-38:"type control bits in the sysprocedures table COLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="6*"COLNAME="C2" COLWIDTH="5*"COLNAME="C3" COLWIDTH="28*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DecimalCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"HexCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StatusVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Entry describes a plan (reserved) COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0x2COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Entry describes a tree IndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"id, type, sequence, number Referenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_bindefault, sp_bindrule, sp_remap, sp_sproc_columns, sp_stored_procedures, sp_unbindefault, sp_unbindrule sysprocessesID="IN77168"sysprocesses table(master database only) DescriptionREMAP="BO--Body"ID="IN50169"Processes (Server tasks)system tables entries for
ID="IN77170"Processes (Server tasks)sysprocesses table
sysprocesses contains information about SQL Server processes, but it is not a normal table. Rather, it is built dynamically when queried by a user. No updates to sysprocesses are allowed. REMAP="BO--Body"Use the MOREINFO="NONE"kill statement to kill a process.TOCENTRY="1"LBL="Table B-39:"Columns in the sysprocesses tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="10*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="23*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"spid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Process ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"kpid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Kernel process ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"enginenum COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of engine on which process is being 
executed COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char(12) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Process ID status, one of: 
infected
background
recv sleep
send sleep
alarm sleep
lock sleep
sleeping
runnable
running
stopped
bad status
log suspendCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"suidCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server user ID of user who issued command COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"hostname COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char(10) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of host computer COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"program_name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char(16) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of front-end module COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"hostprocess COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char(8) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Host process ID number COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cmd COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"char(16) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Command currently being executed COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"cpu COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Cumulative cpu time for process in ticks COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"physical_io COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of disk reads and writes for current 
commandCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"memusage COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Amount of memory allocated to process COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"blocked COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Process ID of blocking process, if any COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dbid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Database ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"uid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of user who executed command COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"gid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Group ID of user who executed commandCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tran_nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(64)COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of the active transactionCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"time_blocked COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Time blocked in secondsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"network_pktsz COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Current connection's network packet sizeIndexesREMAP="BO--Body"none Referenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_dboption, sp_droplogin, sp_locklogin, sp_role, sp_whoID="IN75171"sysprocesses table
 sysprotectsID="IN76172"sysprotects table(all databases)DescriptionREMAP="BO--Body"ID="IN37173"Permissionssystem tables entries for
ID="IN63174"Permissionssysprotects table
sysprotectsID="IN100175"grant commandsysprotects table
 contains information on user permissions information-entries for each MOREINFO="NONE"grantID="IN101176"revoke commandsysprotects table
 and MOREINFO="NONE"revoke statement that has been issued. TOCENTRY="1"LBL="Table B-40:"Columns in the sysprotects tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="8*"COLNAME="C2" COLWIDTH="9*"COLNAME="C3" COLWIDTH="23*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"id COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of object to which this permission applies COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"uid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of user or group to which this permission 
applies COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"action COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One of the following permissions: 
MOREINFO="NONE"select = 193
MOREINFO="NONE"insert = 195
MOREINFO="NONE"delete = 196 
MOREINFO="NONE"update = 197 
MOREINFO="NONE"execute = 224 
MOREINFO="NONE"references = 151
MOREINFO="NONE"create database = 203
MOREINFO="NONE"create default = 233 
MOREINFO="NONE"create procedure = 222 
MOREINFO="NONE"create rule = 236 
MOREINFO="NONE"create table = 198 
MOREINFO="NONE"create view = 207 
MOREINFO="NONE"dump database = 228 
MOREINFO="NONE"dump transaction = 235 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"protecttype COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"One of the following values:
MOREINFO="NONE"grant with grant = 0
MOREINFO="NONE"grant (permanent) = 1
MOREINFO="NONE"revoke (permanent) = 2COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"columns COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varbinary(32) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Bit map of columns to which this MOREINFO="NONE"select or 
update permission applies. Bit 0 indicates 
all columns; 1 means permission applies to 
that column; null means no information. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"grantor COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User ID of the grantorIndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"id, action, grantor, uid, protecttypeReferenced by System ProceduresREMAP="BO--Body"ID="IN74177"sysprotects table
MOREINFO="NONE"sp_changegroup, sp_dropgroup, sp_dropuser, sp_helprotect, sp_stored_procedures, sp_tablessysreferencesID="IN78178"sysreferences table(all databases) DescriptionREMAP="BO--Body"ID="IN65179"Constraintssysreferences table
sysreferencesID="IN87180"Referential integrity constraintssysreferences table
contains one row for each referential integrity constraint declared on a table or column.TOCENTRY="1"LBL="Table B-41:"Columns in the sysreferences tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="26*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"indexid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of the unique index on referenced columnsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"constrid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object ID of the constraint from sysobjectsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tableid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object ID of the referencing table COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"reftabid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Object ID of the referenced tableCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"keycnt COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The number of columns in the foreign keyCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ReservedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"frgndbidCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallintCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ReservedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"pmrydbidCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallintCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ReservedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"spare2 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ReservedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"fokey1
.
.
.
fokey16 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint


tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID of the first referencing column



Column ID of the 16th referencing columnCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"refkey1
.
.
.
refkey16 COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint


tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Column ID of the first referenced column



Column ID of the 16th referenced columnCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"frgndbnameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30)COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of the database that includes the 
referencing table (the table with the foreign key). 
Null if the referencing table is in the current 
database.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"pmrydbnameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30)COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of the database that includes the referenced 
table (the table with the primary key). Null if the 
referenced table is in the current database.IndexesREMAP="BO--Body"clustered index on frgndbid, tableidunique nonclustered index on frgndbid, constridnonclustered index on pmrydbid, reftableid, indexidReferenced by System ProceduresREMAP="BO--Body"ID="IN76181"sysreferences table
MOREINFO="NONE"sp_fkeys, sp_helpconstraint sysremoteloginsID="IN66182"sysremotelogins table(master database only) DescriptionID="IN39183"Remote loginssystem tables entries for
ID="IN69184"Remote loginssysremotelogins table
ID="IN62185"Loginssysremotelogins tableREMAP="BO--Body"sysremoteloginsID="IN82186"Remote procedure callssysremotelogins table and
contains one row for each remote user who is allowed to execute remote procedure calls on this SQL Server. TOCENTRY="1"LBL="Table B-42:"Columns in the sysremotelogins tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="11*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="21*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"remoteserverid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallintCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Identifies the remote server COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"remoteusername COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30)COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User's login name on remote server COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"suid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallintCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Local server user ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallintCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Bitmap of optionsIndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"remoteserverid, remoteusername Referenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_addremotelogin, sp_checknames, sp_checkreswords, sp_dropremotelogin, sp_dropserver, sp_helpremotelogin, sp_remoteoption sysrolesID="IN59187"sysroles table(all databases)DescriptionREMAP="BO--Body"ID="IN54188"Rolessysroles table
sysrolesID="IN67189"IDs, server role (sysroles table)
maps server role IDs to local role IDs. TOCENTRY="1"LBL="Table B-43:"Columns in the sysroles tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="8*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="26*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"idCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server role ID (srid)COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"lridCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Local role IDCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"typeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"UnusedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"UnusedIndexesREMAP="BO--Body"Unique clustered index on lridReferenced by System ProceduresREMAP="BO--Body"NonesyssegmentsID="IN62190"syssegments table(all databases) Description REMAP="BO--Body"ID="IN60191"Segmentssyssegments table
syssegmentsID="IN34192"Segmentssystem tables entries for
contains one row for each segment (named collection of disk pieces). The default entries are: segment 0 (system) for system tables; segment 2 (logsegment) for the transaction log; and segment 1 (default) for other objects. Each database has an entry in sysusages contain these segments in its maps. TOCENTRY="1"LBL="Table B-44:"Columns in the syssegments tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="6*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="27*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"segment COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Segment number COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysname COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Segment name COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int null COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Indicates which segment is default segmentIndexesREMAP="BO--Body"none Referenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_addsegment, sp_addthreshold, sp_checknames, sp_checkreswords, sp_dropsegment, sp_dropthreshold, sp_dropuser, sp_extendsegment, sp_helpdb, sp_helpindex, sp_helpsegment, sp_helpthreshold, sp_modifythreshold, sp_placeobject sysserversID="IN61193"sysservers table(master database only) DescriptionREMAP="BO--Body"sysservers
contains one row for each remote SQL Server, Backup Server, or Open Server on which this SQL Server can execute remote procedure calls. ID="IN40194"Remote serverssystem tables entries forID="IN65195"Remote serverssysservers tableID="IN77196"Remote procedure callssysservers table andTOCENTRY="1"LBL="Table B-45:"Columns in the sysservers tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="9*"COLNAME="C2" COLWIDTH="8*"COLNAME="C3" COLWIDTH="24*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"srvid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID number (for local use only) of the remote 
server COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"srvstatus COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Bitmap of options COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"srvname COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(30) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server name COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"srvnetname COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(32) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Interfaces file name for the server IndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"srvidunique nonclustered index on MOREINFO="NONE"srvname Referenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_addremotelogin, sp_addserver, sp_checknames, sp_checkreswords, sp_configure, sp_dropremotelogin, sp_dropserver, sp_helpremotelogin, sp_helpserver, sp_remoteoption, sp_serveroption syssrvrolesID="IN62197"syssrvroles table(master database only)DescriptionREMAP="BO--Body"ID="IN57198"Rolessyssrvroles table
syssrvroles contains a row for each server-wide role.TOCENTRY="1"LBL="Table B-46:"Columns in the syssrvroles tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="26*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"srid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server role ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of the roleIndexesREMAP="BO--Body"Unique clustered index on sridReferenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_adduser, sp_changegroup, sp_displaylogin, sp_dropgroup, sp_helpgroup, sp_role systhresholdsID="IN64199"systhresholds table(all databases) DescriptionREMAP="BO--Body"ID="IN64200"Thresholdssysthresholds table
systhresholds contains one row for each threshold defined for the database. TOCENTRY="1"LBL="Table B-47: "Columns in the systhresholds tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="9*"COLNAME="C3" COLWIDTH="24*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"segment COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallintCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Segment number for which free space is 
being monitoredCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"free_space COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Size of threshold, in 2K pages (4K for 
Stratus)COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"status COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Bit 1 equals 1 for the logsegment's last-
chance threshold, 0 for all other thresholdsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"proc_name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(255) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Name of the procedure that is executed 
when the number of unused pages on 
segment falls below free_space.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"suidCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallintCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The server user ID of the user who added 
the threshold or modified it most recentlyCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"currauthCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varbinary(255)COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"A bit mask that indicates which roles were 
active for suid at the time the threshold was 
added or most recently modified. When the 
threshold is crossed, proc_name executes 
with this set of roles, less any that have been 
deactivated since the threshold was added 
or last modified.IndexesREMAP="BO--Body"Unique clustered index on segment, free_space Referenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_addthreshold, sp_dropsegment, sp_dropthreshold, sp_dropuser, sp_helpthreshold, sp_modifythresholdsystypesID="IN73201"systypes table(all databases) DescriptionREMAP="BO--Body"ID="IN72202"Datatypessystypes table
ID="IN16203"Datatypessystem
systypes contains one row for each system-supplied and user-defined datatype. Domains (defined by rules) and defaults are given, if they exist. REMAP="BO--Body"The rows that describe system-supplied datatypes cannot be altered.TOCENTRY="1"LBL="Table B-48: "Columns in the systypes tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="8*"COLNAME="C3" COLWIDTH="27*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"uid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User ID of datatype creator COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"usertype COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User type ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"variable COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"bit COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1 if datatype is variable length; 0 otherwise COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"allownulls COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"bit COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Indicates whether nulls are allowed for this 
datatype COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"type COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Physical storage datatype COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"length COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Physical length of datatype COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tdefault COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of system procedure that generates default for 
this datatype COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"domain COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ID of system procedure that contains integrity 
checks for this datatypeCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysname COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Datatype name COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"printfmt COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(255) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Reserved COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"prec COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of significant digitsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"scale COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of digits to the right of the decimal pointCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ident COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1 if column has the IDENTITY property, 0 if notCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"hierarchy COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyintCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Precedence of the datatype in mixed mode 
arithmeticID="IN60204"Datatypeslists ofREMAP="BO--Body"The listing that follows includes the system-supplied datatype MOREINFO="NONE"name, MOREINFO="NONE"hierarchy, type (not necessarily unique), and MOREINFO="NONE"usertype (unique). The datatypes are ordered by MOREINFO="NONE"hierarchy. In mixed mode arithmetic, the datatype with the lowest MOREINFO="NONE"hierarchy takes precedence:TOCENTRY="1"LBL="Table B-49: "Datatype names, hierarchy, types, and usertypesCOLS="4" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="3*"COLNAME="C2" COLWIDTH="1*"COLNAME="C3" COLWIDTH="1*"COLNAME="C4" COLWIDTH="1*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"nameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"hierarchyCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"typeCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"usertypeVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"floatnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"109COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"floatCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"62COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datetimnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"111COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"15COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"datetimeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"61COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"realCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"59COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"23COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"numericnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"6COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"108COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"28COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"numericCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"63COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"decimalnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"106COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"27COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"decimalCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"9COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"55COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"26COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"moneynCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"110COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"17COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"moneyCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"11COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"60COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"11COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallmoneyCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"12COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"122COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"21COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smalldatetimeCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"13COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"58COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"22COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"14COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"38COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"13COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"intCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"15COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"56COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallintCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"16COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"52COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"6COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"tinyintCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"17COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"48COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"bitCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"18COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"50COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varcharCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"19COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"39COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysnameCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"19COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"39COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"18COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"nvarcharCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"19COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"39COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"25COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"charCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"47COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ncharCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"47COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"24COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varbinaryCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"21COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"37COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"timestampCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"21COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"37COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"80COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"binaryCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"22COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"45COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"textCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"23COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"35COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"19COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"imageCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"24COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"34COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20IndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"name unique nonclustered index on MOREINFO="NONE"usertype Referenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_addtype, sp_bindefault, sp_bindrule, sp_checknames, sp_checkreswords, sp_columns, sp_datatype_info, sp_droptype, sp_dropuser, sp_help, sp_rename, sp_special_columns, sp_sproc_columns,sp_unbindefault, sp_unbindruleID="IN71205"systypes table
ID="IN70206"Datatypessystypes table
 sysusagesID="IN60207"sysusages table(master database only) DescriptionREMAP="BO--Body"sysusagesID="IN22211"Disk allocation pieces
ID="IN66212"Allocation unitssysusages table
contains one row for each disk allocation piece assigned to a database. Each database contains a specified number of database (logical) page numbers. Each disk piece includes the segments on the SQL Server distribution tape, segments 0 and 1. REMAP="BO--Body"The MOREINFO="NONE"create database command checks sysdevices and sysusages to find available disk allocation pieces. One or more contiguous disk allocation pieces is assigned to the database, and the mapping is recorded in sysusages. ID="IN57208"Mappingsysusages tableID="IN42209"Space allocationsystem tables entries forID="IN66210"Space allocationsysusages tableTOCENTRY="1"LBL="Table B-50: "Columns in the sysusages tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="8*"COLNAME="C2" COLWIDTH="7*"COLNAME="C3" COLWIDTH="25*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"dbid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Database ID COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"segmap COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Bit map of possible segment assignmentsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"lstart COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"First database (logical) page number COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"size COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Number of contiguous database (logical) pages COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"vstart COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Starting virtual page number COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"pad COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"UnusedCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"unreservedpgs COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Free space not part of an allocated extentIndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"dbid, lstartunique nonclustered index on MOREINFO="NONE"vstart Referenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_addsegment, sp_addthreshold, sp_databases, sp_dropdevice, sp_dropsegment, sp_extendsegment, sp_helpdb, sp_helplog, sp_helpsegment, sp_logdevice, sp_modifythreshold, sp_spaceused sysusermessagesID="IN66213"sysusermessages table(all databases) DescriptionREMAP="BO--Body"ID="IN75214"Messagessysusermessages table
sysusermessagesID="IN21215"Messagesuser-defined
contains one row for each user-defined message that can be returned by SQL Server. TOCENTRY="1"LBL="Table B-51: "Columns in the sysusermessages tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="8*"COLNAME="C3" COLWIDTH="25*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"error COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"int COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Unique error number. Must be 20000 or above. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"uid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User ID of the message creatorCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"description COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(255) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User-defined message with optional place 
holders for parameters COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"langid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Language ID for this message; null for 
us_englishIndexesREMAP="BO--Body"clustered index on MOREINFO="NONE"errorunique nonclustered index on MOREINFO="NONE"error, MOREINFO="NONE"langidReferenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_addmessage, sp_bindmsg, sp_dropmessage, sp_getmessage, sp_helpconstraintsysusersID="IN73216"sysusers table(all databases) DescriptionREMAP="BO--Body"sysusersID="IN67219"Groupssysusers table entries for
contains one row for each user allowed in the database, and one row for each group or role. REMAP="BO--Body"On the SQL Server distribution tape, master..sysusers contains some initial users: "dbo," whose MOREINFO="NONE"suid is 1 and MOREINFO="NONE"uid is 1; "guest," whose MOREINFO="NONE"suid is -1 and MOREINFO="NONE"uid is 2; and "public," whose MOREINFO="NONE"suid is -2 and MOREINFO="NONE"uid is 0. In addition, each role (MOREINFO="NONE"sa_role, MOREINFO="NONE"sso_role, and so on) is listed in sysusers, because SQL Server treats roles much like groups.ID="IN26220"Guest accountsREMAP="BO--Body"The user guest provides a mechanism for giving users not explicitly listed in sysusers access to the database with a restricted set of permissions. The "guest" entry in master means that any user with an account on SQL Server (that is, with an entry in syslogins) can access master. ID="IN28221""public" grouppublic groupREMAP="BO--Body"The user "public" refers to all users. The keyword MOREINFO="NONE"public is used with the MOREINFO="NONE"grant and MOREINFO="NONE"revoke commands to signify that permission is being given to or taken away from all users. ID="IN54217"Userssysusers tableID="IN31218"Userssystem tables entries forTOCENTRY="1"LBL="Table B-52: "Columns in the sysusers tableCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="8*"COLNAME="C3" COLWIDTH="25*"VALIGN="BOTTOM"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ColumnCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DatatypeCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DescriptionVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"suid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Server user ID, copied from syslogins. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"uid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User ID, unique in this database, used for 
granting and revoking permissions. User ID 1 is 
"dbo". COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"gid COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"smallint COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Group ID to which this user belongs. If uid = gid, 
this entry defines a group. The group "public" 
has suid = -2; all other groups have suid= - gid. COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"name COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"sysname COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"User or group name, unique in this database COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"environ COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"varchar(255) COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ReservedIndexesREMAP="BO--Body"unique clustered index on MOREINFO="NONE"suidunique nonclustered index on MOREINFO="NONE"nameunique nonclustered index on MOREINFO="NONE"uid Referenced by System ProceduresREMAP="BO--Body"MOREINFO="NONE"sp_addalias, sp_addgroup, sp_adduser, sp_changedbowner, sp_changegroup, sp_checknames, sp_checkreswords, sp_column_privileges, sp_depends, sp_dropgroup, sp_droptype, sp_dropuser, sp_helpgroup, sp_helprotect, sp_helpuser, sp_indsuspect, sp_stored_procedures, sp_table_privileges, sp_tablesREMAP="BO--Body"ID="IN52222"System tablesdescriptions of individualID="IN71223"sysusers tableNUMBER="C" ID="X40724"The pubs2 DatabaseREMAP="BO--Body"This is the sample database pubs2. The names of the 11 tables are MOREINFO="NONE"publishers, authors, titles, titleauthor, sales, salesdetail, stores, discounts, roysched, au_pix, and MOREINFO="NONE"blurbs.REMAP="BO--Body"The header for each column lists its datatype (including the user-defined datatypes) and its null/not null status. Defaults, rules, triggers, and indexes are noted where they apply.RENDERAS="SECT1"Tables in the pubs2 DatabasePGWIDE=1 TOCENTRY="1"LBL="Table C-1: "Table of PublishersCOLS="4" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="8*"COLNAME="C3" COLWIDTH="6*"COLNAME="C4" COLWIDTH="5*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"publishersCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"pub_idchar(4)not nullpub_idruleaclust, uniqCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"pub_namevarchar(40)nullCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"cityvarchar(20)nullCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"statechar(2)nullVALIGN="TOP"COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0736 0877 1389 COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"New Age Books  Binnet & Hardley Algodata InfosystemsCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"Boston Washington BerkeleyCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MA DC CA ID="IPTF0A" VALIGN="TOP"aThe pub_id rule states that the data must be 1389, 0736, 0877, 1622, or 1756, or must match the pattern 99[0-9][0-9].PGWIDE=1 TOCENTRY="1"LBL="Table C-2: "Table of AuthorsCOLS="9" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="4*"COLNAME="C2" COLWIDTH="6*"COLNAME="C3" COLWIDTH="3*"COLNAME="C4" COLWIDTH="6*"COLNAME="C5" COLWIDTH="4*"COLNAME="C6" COLWIDTH="3*"COLNAME="C7" COLWIDTH="2*"COLNAME="C8" COLWIDTH="3*"COLNAME="C9" COLWIDTH="3*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"authorsCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"au_ididnot nullCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"au_lnamevarchar(40)not nullCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"au_fnamevarchar(20)not nullCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"phonechar(12)not nullUNKNOWNaCOLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"addressvarchar(12)nullCOLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"cityvarchar(20)nullCOLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"statechar(2)nullCOLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"countryvarchar(2)nullCOLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"postalcodechar(10)nullCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"clust, uniqCOLNAME="C2" NAMEST="C2" NAMEEND="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"nonclustCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"172-32-1176COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"WhiteCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"JohnsonCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"408 496-7223COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10932 Bigge Rd.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Menlo ParkCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"94025COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"213-46-8915COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"GreenCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MarjorieCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"415 986-7020COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"309 63rd St. 
#411COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"OaklandCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"94618COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"238-95-7766COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CarsonCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CherylCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"415 548-7723COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"589 Darwin 
Ln.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BerkeleyCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"94705COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"267-41-2394COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"O'LearyCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MichaelCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"408 286-2428COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"22 Cleveland 
Av. #14COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"San JoseCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"95128COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"274-80-9391COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StraightCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DickCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"415 834-2919COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5420 College 
Av.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"OaklandCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"94609COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"341-22-1782COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SmithCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MeanderCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"913 843-0462COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10 Mississippi 
Dr.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LawrenceCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"KSCOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"66044COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"409-56-7008COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BennetCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AbrahamCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"415 658-9932COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"6223 Bateman 
St.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BerkeleyCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"94705COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"427-17-2319COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DullCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AnnCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"415 836-7128COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3410 Blonde St.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Palo AltoCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"94301COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"472-27-2349COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"GringlesbyCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BurtCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"707 938-6445COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"PO Box 792COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CoveloCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"95428COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"486-29-1786COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LocksleyCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ChastityCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"415 585-4620COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"18 Broadway 
Av.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"San FranciscoCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"94130COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"527-72-3246COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"GreeneCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Morningst
arCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"615 297-2723COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"22 Graybar 
House Rd.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NashvilleCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"TNCOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"37215COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"648-92-1872COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Blotchet-
HallsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ReginaldCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"503 745-6402COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"55 Hillsdale Bl.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CorvallisCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ORCOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"97330COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"672-71-3249COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"YokomotoCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AkikoCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"415 935-4228COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3 Silver Ct.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Walnut CreekCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"94595COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"712-45-1867COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"del 
CastilloCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"InnesCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"615 996-8275COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2286 Cram Pl. 
#86COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Ann ArborCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MICOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"48105COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"722-51-5454COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DeFranceCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MichelCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"219 547-9982COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3 Balding Pl.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"GaryCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"INCOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"46403COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"724-08-9931COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StringerCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"DirkCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"415 843-2991COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5420 
Telegraph Av.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"OaklandCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"94609COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"724-80-9391COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MacFeathe
rCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"StearnsCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"415 354-7128COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"44 Upland Hts.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"OaklandCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"94612COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"756-30-7391COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"KarsenCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"LiviaCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"415 534-9219COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5720 McAuley 
St.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"OaklandCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"94609COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"807-91-6654COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"PanteleyCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SylviaCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"301 946-8853COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1956 
Arlington Pl.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"RockvilleCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MDCOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20853COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"846-92-7186COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"HunterCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SherylCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"415 836-7128COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3410 Blonde St.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Palo AltoCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"94301COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"893-72-1158COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"McBaddenCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"HeatherCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"707 448-4982COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"301 PutnamCOLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"VacavilleCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"95688COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"899-46-2035COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"RingerCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AnneCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"801 826-0752COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"67 Seventh Av.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Salt Lake 
CityCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"UTCOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"84152COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"998-72-3567COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"RingerCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AlbertCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"801 826-0752COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"67 Seventh Av.COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Salt Lake 
CityCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"UTCOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"84152ID="IPTF1A" VALIGN="TOP"aThe default UNKNOWN is inserted if no data is entered.PGWIDE=1 TOCENTRY="1"LBL="Table C-3: "Table of TitlesCOLS="10" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="5*"COLNAME="C2" COLWIDTH="6*"COLNAME="C3" COLWIDTH="6*"COLNAME="C4" COLWIDTH="4*"COLNAME="C5" COLWIDTH="4*"COLNAME="C6" COLWIDTH="5*"COLNAME="C7" COLWIDTH="4*"COLNAME="C8" COLWIDTH="9*"COLNAME="C9" COLWIDTH="6*"COLNAME="C10" COLWIDTH="4*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C10" ALIGN="CENTER" ROTATE="0" MOREROWS="0"titlesCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"title_idtidnot null deltitle3clust, uniqCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"titlevarchar(80)not null nonclustCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"typechar(12)not nullUNDECIDED1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"pub_idchar(4)nullCOLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"pricemoneynullCOLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"advancemoneynullCOLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"total_salesintnullCOLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"notesvarchar(200)nullCOLNAME="C9" ALIGN="CENTER" ROTATE="0" MOREROWS="0"pubdatedatetimenot nullgetdate()2COLNAME="C10" ALIGN="CENTER" ROTATE="0" MOREROWS="0"contractbitnot nullVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BU1032COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The Busy 
Executive's
 Database 
GuideCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"business COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1389COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"19.99COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5000.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4095COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"An overview of 
available 
database 
systems with 
emphasis on 
common 
business 
applications. 
Illustrated.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 6, 
1986COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BU1111COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Cooking 
with 
Computers
: 
Surreptitio
us Balance 
SheetsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"business COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1389COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"11.95COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5000.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3876COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Helpful hints on 
how to use your 
electronic 
resources to the 
best advantage.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 9, 
1988 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BU2075COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"You Can 
Combat 
Computer 
Stress!COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"business COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0736COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2.99COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10125.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"18722COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The latest 
medical and 
psychological 
techniques for 
living with the 
electronic office. 
Easy-to-
understand 
explanations.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 30, 
1985 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BU7832COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Straight 
Talk 
About 
ComputersCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"business COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1389COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"19.99COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5000.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4095COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Annotated 
analysis of what 
computers can 
do for you: a no-
hype guide for 
the critical user.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 22, 
1987 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MC2222COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Silicon 
Valley 
Gastronom
ic TreatsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"mod_cook COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0877COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"19.99COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2032COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Favorite recipes 
for quick, easy, 
and elegant 
meals, tried and 
tested by people 
who never have 
time to eat, let 
alone cook.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 9, 
1989 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MC3021COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The 
Gourmet 
MicrowaveCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"mod_cook COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0877COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2.99COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"15000.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"22246COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Traditional 
French gourmet 
recipes adapted 
for modern 
microwave 
cooking.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 18, 
1985 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"PC1035COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"But Is It 
User 
Friendly?COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"popular_compCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1389COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"22.95COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7000.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8780COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"A survey of 
software for the 
naive user, 
focusing on the 
`friendliness' of 
each.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 30, 
1986 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MC3026COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"The 
Psycholog
y of 
Computer 
CookingCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"UNDECIDED COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0877COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULLCOLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULLCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULLCOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULLCOLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jul 24, 
1991 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"PC8888COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Secrets of 
Silicon 
ValleyCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"popular_compCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1389COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20.00COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8000.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4095COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Muckraking 
reporting by two 
courageous 
women on the 
world's largest 
computer 
hardware and 
software 
manufacturers.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 12, 
1987 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"PC9999COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Net 
EtiquetteCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"popular_compCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1389COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULLCOLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULLCOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NULLCOLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"A must-read for 
computer 
conferencing 
debutantes!COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jul 24, 
1991 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"PS1372COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Computer 
Phobic 
and Non-
Phobic 
Individual
s: 
Behavior 
VariationsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"psychology COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0877COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"21.59COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7000.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"375COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"A must for the 
specialist, this 
book examines 
the difference 
between those 
who hate and 
fear computers 
and those who 
think they are 
swell.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Oct 
21,1990 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"PS2091COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Is Anger 
the 
Enemy?COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"psychology COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0736COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10.95COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2275.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2045COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Carefully 
researched study 
of the effects of 
strong emotions 
on the body. 
Metabolic charts 
included.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 15, 
1989 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"PS2106COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Life 
Without 
FearCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"psychology COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0736COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7.00COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"6000.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"111COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"New exercise, 
meditation, and 
nutritional 
techniques that 
can reduce the 
shock of daily 
interactions. 
Popular 
audience. Sample 
menus included, 
exercise video 
available 
separately.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Oct 5, 
1990 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"PS3333COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Prolonged 
Data 
Deprivatio
n: Four 
Case 
StudiesCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"psychology COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0736COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"19.99COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"2000.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4072COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"What happens 
when the data 
runs dry? 
Searching 
evaluations of 
information-
shortage effects 
on heavy users.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 12, 
1988 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"PS7777COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Emotional 
Security: 
A New 
AlgorithmCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"psychology COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0736COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7.99COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4000.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"3336COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Protecting 
yourself and 
your loved ones 
from undue 
emotional stress 
in the modern 
world. Use of 
computer and 
nutritional aids 
emphasized.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 12, 
1988 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"TC3218COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Onions, 
Leeks, and 
Garlic: 
Cooking 
Secrets of 
the 
Mediterran
eanCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"trad_cook COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0877COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20.95COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7000.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"375COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Profusely 
illustrated in 
color, this makes 
a wonderful gift 
book for a 
cuisine-oriented 
friend.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Oct 21, 
1990 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"TC4203COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Fifty Years 
in 
Buckingha
m Palace 
KitchensCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"trad_cook COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0877COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"11.95COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4000.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"15096COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"More anecdotes 
from the 
Queen's favorite 
cook describing 
life among 
English royalty. 
Recipes, 
techniques, 
tender vignettes.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 12, 
1985 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"TC7777COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Sushi, 
Anyone?COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"trad_cook COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"0877COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"14.99COLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8000.00COLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"4095COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Detailed 
instructions on 
improving your 
position in life by 
learning how to 
make authentic 
Japanese sushi in 
your spare time. 
5-10% increase 
in number of 
friends per recipe 
reported from 
beta test.COLNAME="C9" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 12, 
1987 COLNAME="C10" ALIGN="LEFT" ROTATE="0" MOREROWS="0"1VALIGN="TOP"1. The default UNDECIDED is inserted if no data is entered in the column.2. The getdate function inserts the current date as the default if no data is entered in the column.3. The deltitle trigger prohibits deleting a title is the title_id is listed in the sales table.PGWIDE=1 TOCENTRY="1"LBL="Table C-4: "Table of titleauthorCOLS="4" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="1*"COLNAME="C3" COLWIDTH="1*"COLNAME="C4" COLWIDTH="1*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"titleauthorCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"au_ididnot nullnonclustCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"title_idtidnot nullnonclustCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"au_ordtinyintnullCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"royaltyperintnullCOLNAME="C1" NAMEST="C1" NAMEEND="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"uniq, clust, compositeCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"VALIGN="TOP"COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"172-32-1176COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS3333COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"100COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"213-46-8915COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1032COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"40COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"213-46-8915COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"100COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"238-95-7766COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"100COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"267-41-2394COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"40COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"267-41-2394COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC7777COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"30COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"274-80-9391COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"100COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"409-56-7008COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1032COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"60COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"427-17-2319COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC8888COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"472-27-2349COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC7777COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"3COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"30COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"486-29-1786COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC9999COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"100COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"486-29-1786COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS7777COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"100COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"648-92-1872COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"100COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"672-71-3249COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC7777COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"40COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"712-45-1867COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC2222COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"100COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"722-51-5454COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"75COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"724-80-9391COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"60COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"724-80-9391COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS1372COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"25COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"756-30-7391COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS1372COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"75COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"807-91-6654COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"100COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"846-92-7186COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC8888COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"899-46-2035COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"25COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"899-46-2035COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2091COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"998-72-3567COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2091COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"998-72-3567COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2106COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"100PGWIDE=1 TOCENTRY="1"LBL="Table C-5: "Table of au_pixCOLS="6" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="1*"COLNAME="C3" COLWIDTH="1*"COLNAME="C4" COLWIDTH="1*"COLNAME="C5" COLWIDTH="1*"COLNAME="C6" COLWIDTH="1*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"au_pixCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"au_ididnot nullCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"picimagenullCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"format_typechar(11)nullCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"bytesizeintnullCOLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"pixwidth_horchar(14)nullCOLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"pixwidth_vertchar(14)nullVALIGN="TOP"COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"409-56-7008COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0x0000...COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PICTCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"30220COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"626COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"635COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"486-29-1786COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0x59a6...COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"SunrasterCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"27931COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"647COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"640COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"648-92-1872COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0x59a6...COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"SunrasterCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"36974COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"647COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"640COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"672-71-3249COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0x000a...COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PICTCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"13487COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"654COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"639COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"899-46-2035COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0x4949...COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TIFCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"52023COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"648COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"641COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"998-72-3567COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0x4949...COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TIFCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"52336COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"653COLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"637REMAP="BO--Body"The MOREINFO="NONE"pic column contains binary data, which is not reproduced in this table in its entirety. The pictures represented by this data are shown on the next page. Since the image data (six pictures, two each in PICT, TIF, and Sun raster file formats) is quite large, you should run the MOREINFO="NONE"installpix2  script only  if you want to use or test the image datatype. The image data is supplied to show how SYBASE stores image data. Sybase does not supply any tools for displaying image data: you must use the appropriate screen graphics tools in order to display the images once you have extracted them from the database. FLOAT="0"FORMAT="UNKNOWN" FILEREF="figb_1.xwd"LBL="Figure C-1: "Authors' Portraits from the au_pix TablePGWIDE=1 TOCENTRY="1"LBL="Table C-6: "Table of SalesdetailCOLS="5" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="1*"COLNAME="C3" COLWIDTH="1*"COLNAME="C4" COLWIDTH="1*"COLNAME="C5" COLWIDTH="1*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"salesdetailCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"stor_idchar(4)not nullCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"ord_numvarchar(20)not nullCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"title_idtidnot nulltitle_idruleCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"qtysmallintnot nullCOLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"discountfloatnot nullCOLNAME="C1" NAMEST="C1" NAMEEND="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"nonclustCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"nonclustCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"VALIGN="TOP"COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7896COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"234518COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"75COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"40.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7896COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"234518COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC7777COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"75COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"40.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Asoap432COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"40.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Asoap432COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC7777COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"80COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"40.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"XS-135-DER-432-8J2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"85COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"40.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"91-A-7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS3333COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"90COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"45.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"91-A-7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"40COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"45.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"91-A-7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2106COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"30COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"45.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"91-V-7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2106COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"45.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"55-V-7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2106COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"31COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"45.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"91-A-7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"69COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"45.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BS-345-DSE-860-1F2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AX-532-FED-452-2Z7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"500COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AX-532-FED-452-2Z7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1032COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"200COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AX-532-FED-452-2Z7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"150COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AX-532-FED-452-2Z7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS7777COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"125COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NF-123-ADS-642-9G3COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC7777COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NF-123-ADS-642-9G3COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1032COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NF-123-ADS-642-9G3COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"750COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Fsoap867COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1032COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"200COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7066COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BA52498COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"100COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7066COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BA71224COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS7777COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"200COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7066COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BA71224COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"300COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7066COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BA71224COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC7777COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"350COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZD-123-DFG-752-9G8COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2091COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-3.142COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2091COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"200COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-3.142COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS7777COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"250COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-3.142COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS3333COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"345COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-3.142COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"360COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"XS-135-DER-432-8J2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2091COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"845COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"XS-135-DER-432-8J2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS7777COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"581COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZZ-999-ZZZ-999-0A0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS1372COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"375COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-3.142COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"175COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"XS-135-DER-432-8J2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"885COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZD-123-DFG-752-9G8COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"900COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AX-532-FED-452-2Z7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"550COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Fsoap867COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"350COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7896COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"234518COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"275COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7066COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BA71224COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"500COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-3.142COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"512COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Fsoap867COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"400COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AX-532-FED-452-2Z7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC8888COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"105COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NF-123-ADS-642-9G3COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC8888COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"300COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7066COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BA71224COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC8888COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"350COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-3.142COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC8888COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"335COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Asoap432COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"500COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7896COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"234518COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"340COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AX-532-FED-452-2Z7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"370COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZD-123-DFG-752-9G8COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS3333COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"750COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"13-J-9COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"300COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"51.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"13-E-7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"150COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"51.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"13-E-7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1032COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"300COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"51.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"13-E-7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"400COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"51.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"91-A-7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS7777COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"180COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"51.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"13-J-9COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"250COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"51.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"13-E-7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"226COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"51.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"13-E-7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"400COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"51.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"91-V-7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"390COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"51.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AB-872-DEF-732-2Z1COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NF-123-ADS-642-9G3COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC8888COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NF-123-ADS-642-9G3COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"GH-542-NAD-713-9F9COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZA-000-ASD-324-4D1COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZA-000-ASD-324-4D1COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS7777COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1500COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZD-123-DFG-752-9G8COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"3000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZD-123-DFG-752-9G8COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC7777COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1500COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZS-645-CAT-415-1B2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"3000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZS-645-CAT-415-1B2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"3000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"XS-135-DER-432-8J2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS3333COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2687COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"XS-135-DER-432-8J2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC7777COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1090COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"XS-135-DER-432-8J2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2138COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZZ-999-ZZZ-999-0A0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC2222COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2032COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZZ-999-ZZZ-999-0A0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1001COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZA-000-ASD-324-4D1COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1100COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NF-123-ADS-642-9G3COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1400COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BS-345-DSE-860-1F2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2700COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"GH-542-NAD-713-9F9COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2500COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NF-123-ADS-642-9G3COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"3500COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BS-345-DSE-860-1F2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4500COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AX-532-FED-452-2Z7COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1600COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NF-123-ADS-642-9G3COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2550COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZA-000-ASD-324-4D1COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"3000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZS-645-CAT-415-1B2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"3200COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BS-345-DSE-860-1F2COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2200COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"GH-542-NAD-713-9F9COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1032COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1500COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZZ-999-ZZZ-999-0A0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC8888COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1005COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.000000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7896COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"124152COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"42COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.500000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7896COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"124152COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"25COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.500000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Asoap132COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"35COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.500000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-1.142COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"34COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.500000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-1.142COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"53COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50.500000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"12-F-9COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"30COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"55.500000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"12-F-9COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1032COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"94COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"55.500000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7066COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BA27618COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"200COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"57.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7896COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"124152COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"350COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"57.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7066COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BA27618COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"230COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"57.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7066COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BA27618COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"200COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"57.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Asoap132COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"137COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"57.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-1.142COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"270COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"57.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-1.142 COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"230COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"57.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Asoap132COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1032COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"345COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"57.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-1.142COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1032COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"136COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"57.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"12-F-9COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"300COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"62.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"12-F-9COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"270COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"62.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"12-F-9COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"133COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"62.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AB-123-DEF-425-1Z3COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2500COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"60.500000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AB-123-DEF-425-1Z3COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4000COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"60.500000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"6380COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"342157COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"200COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"57.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"6380COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"342157COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"250COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"57.200000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"6380COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"356921COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS3333COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"200COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"6380COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"356921COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS7777COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"500COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"6380COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"356921COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"125COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"6380COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"234518COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"135COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"6380COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"234518COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1032COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"320COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"6380COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"234518COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"300COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"6380COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"234518COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"400COLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"46.700000PGWIDE=1 TOCENTRY="1"LBL="Table C-7: "Table of SalesCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="1*"COLNAME="C3" COLWIDTH="1*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"salesCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"stor_idchar(4)not nullCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"ord_numvarchar(20)not nullCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"datedatetimenot nullCOLNAME="C1" NAMEST="C1" NAMEEND="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"clust, uniqCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"VALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AB-123-DEF-425-1Z3COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Oct 31 1985 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AB-872-DEF-732-2Z1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Nov 6 1985 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"AX-532-FED-452-2Z7COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Dec 1 1990 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BS-345-DSE-860-1F2COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Dec 12 1986 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"GH-542-NAD-713-9F9COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mar 15 1987 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NF-123-ADS-642-9G3COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jul 18 1987 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"XS-135-DER-432-8J2COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mar 21 1991 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZA-000-ASD-324-4D1COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jul 27 1988 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZD-123-DFG-752-9G8COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mar 21 1991 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZS-645-CAT-415-1B2COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mar 21 1991 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ZZ-999-ZZZ-999-0A0COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mar 21 1991 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"6380COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"234518COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Sep 30 1987 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"6380COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"342157COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Dec 13 1985 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"6380COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"356921COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Feb 17 1991 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7066COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BA27618COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Oct 12 1985 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7066COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BA52498COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Oct 27 1987 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7066COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BA71224COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Aug 5 1988 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-1.142COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jan 2 1987 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"NB-3.142COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jun 13 1990 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Asoap132COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Nov 16 1986 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Asoap432COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Dec 20 1990 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Fsoap867COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Sep 8 1987 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7896COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"124152COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Aug 14 1986 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7896COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"234518COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Feb 14 1991 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"12-F-9COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jul 13 1986 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"13-E-7COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"May 23 1989 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"13-J-9COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Jan 13 1988 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"55-V-7COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mar 20 1991 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"91-A-7COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mar 20 1991 COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"91-V-7COLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Mar 20 1991 PGWIDE=1 TOCENTRY="1"LBL="Table C-8: "Table of StoresCOLS="8" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="5*"COLNAME="C2" COLWIDTH="9*"COLNAME="C3" COLWIDTH="10*"COLNAME="C4" COLWIDTH="6*"COLNAME="C5" COLWIDTH="4*"COLNAME="C6" COLWIDTH="6*"COLNAME="C7" COLWIDTH="6*"COLNAME="C8" COLWIDTH="6*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"storesCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"stor_idchar(4)not nullCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"stor_namevarchar(40)nullCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"stor_addressvarchar(40)nullCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"cityvarchar(20)nullCOLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"statechar(2)nullCOLNAME="C6" ALIGN="CENTER" ROTATE="0" MOREROWS="0"countryvarchar(12)nullCOLNAME="C7" ALIGN="CENTER" ROTATE="0" MOREROWS="0"postalcodechar(10)nullCOLNAME="C8" ALIGN="CENTER" ROTATE="0" MOREROWS="0"paytermsvarchar(12)nullVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7066COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Barnum'sCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"567 Pasadena 
Ave.COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"TustinCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"92789COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Net 30COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7067COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"News & BrewsCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"577 First St.COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Los 
GatosCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"96745COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Net 30COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7131COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Doc-U-Mat: 
Quality 
Laundry and 
BooksCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"24-A Avrogado 
WayCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Remulad
eCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"WACOLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"98014COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Net 60COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"8042COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"BookbeatCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"679 Carson St.COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"PortlandCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ORCOLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"89076COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Net 30COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"6380COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Eric the Read 
BooksCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"788 Catamaugus 
Ave.COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"SeattleCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"WACOLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"98056COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Net 60COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"7896COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Fricative 
BookshopCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"89 Madison St.COLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"FremontCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"CACOLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"90019COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Net 60COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"5023COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Thoreau 
Reading 
Discount ChainCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"20435 Walden 
ExpresswayCOLNAME="C4" ALIGN="LEFT" ROTATE="0" MOREROWS="0"ConcordCOLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"MACOLNAME="C6" ALIGN="LEFT" ROTATE="0" MOREROWS="0"USACOLNAME="C7" ALIGN="LEFT" ROTATE="0" MOREROWS="0"01776COLNAME="C8" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Net 60PGWIDE=1 TOCENTRY="1"LBL="Table C-9: "Table of DiscountsCOLS="5" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="6*"COLNAME="C2" COLWIDTH="5*"COLNAME="C3" COLWIDTH="5*"COLNAME="C4" COLWIDTH="5*"COLNAME="C5" COLWIDTH="6*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"discountsCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"discounttypevarchar(40)not nullCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"stor_idchar(4)nullCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"lowqtysmallintnullCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"highqtysmallintnullCOLNAME="C5" ALIGN="CENTER" ROTATE="0" MOREROWS="0"discountfloatnot nullVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Initial CustomerVolume DiscountHuge Volume DiscountCustomer DiscountCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"  8042COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"100 1001COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1000COLNAME="C5" ALIGN="LEFT" ROTATE="0" MOREROWS="0"10.56.7105PGWIDE=1 TOCENTRY="1"LBL="Table C-10: "Table of royshedCOLS="4" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="1*"COLNAME="C3" COLWIDTH="1*"COLNAME="C4" COLWIDTH="1*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"royschedCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"title_idtidnot nullnonclustCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"lorangeintnullCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"hirangeintnullCOLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"royaltyintnullVALIGN="TOP"COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1032COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1032COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"3000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"3001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC1035COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"18COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"3000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"3001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"7001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"18COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"22COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU2075COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"24COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2091COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2091COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2091COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2091COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2106COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2106COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2106COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS2106COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"1001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"6000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"6001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"18COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"22COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC3021COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"24COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"6000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"6001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"18COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"22COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC3218COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"24COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC8888COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC8888COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC8888COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"15000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PC8888COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"15001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS7777COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS7777COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS3333COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS3333COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS3333COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"15000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS3333COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"15001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"18COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"24000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"24001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"28000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"22COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU1111COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"28001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"24COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC2222COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC2222COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC2222COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"4001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC2222COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC2222COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC2222COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"18COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"MC2222COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC7777COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC7777COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"15000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC7777COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"15001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"2001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"8001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"24000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"24001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"32000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"18COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"32001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"40000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TC4203COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"40001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"22COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"5001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"15000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"15001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"25000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"18COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"25001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"30000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"30001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"35000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"22COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"BU7832COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"35001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"24COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS1372COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"0COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS1372COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"10001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"12COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS1372COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"20001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"30000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"14COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS1372COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"30001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"40000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"16COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"PS1372COLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"40001COLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"50000COLNAME="C4" ALIGN="CENTER" ROTATE="0" MOREROWS="0"18PGWIDE=1 TOCENTRY="1"LBL="Table C-11: "Table of BlurbsCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="5*"COLNAME="C2" COLWIDTH="47*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"blurbsCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"COLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"au_id
id
not 
nullCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"copy
textnullVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"486-
29-
1786COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"If Chastity Locksley didn't exist, this troubled world would have created her! Not only did 
she master the mystic secrets of inner strength to conquer adversity when she encountered it 
in life, but, after "reinventing herself", as she says, by writing "Emotional Security: A New 
Algorithm" following the devastating loss of her cat Old Algorithm, she also founded Publish 
or Perish, the page-by-page, day-by-day, write-yourself-to-wellness encounter workshops 
franchise empire, the better to share her inspiring discoveries with us all. Her "Net Etiquette," 
a brilliant social treatise in its own right and a fabulous pun, is the only civilized alternative to 
the gross etiquette often practiced on the public networks.COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"648-
92-
1872COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"A chef's chef and a raconteur's raconteur, Reginald Blotchet-Halls calls London his second 
home. "Th' palace kitchen's me first `ome, act'lly!" Blotchet-Halls' astounding ability to 
delight our palates with palace delights is matched only by his equal skill in satisfying our 
perpetual hunger for delicious back-stairs gossip by serving up tidbits and entrees literally fit 
for a king!COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"998-
72-
3567COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Albert Ringer was born in a trunk to circus parents, but another kind of circus trunk played a 
more important role in his life years later. He grew up as an itinerant wrestler and roustabout 
in the reknowned Ringer Brothers and Betty and Bernie's Circus. Once known in the literary 
world only as Anne Ringer's wrestling brother, he became a writer while recuperating from a 
near-fatal injury received during a charity benefit bout with a gorilla. "Slingshotting" himself 
from the ring ropes, Albert flew over the gorilla's head and would have landed head first on 
the concrete. He was saved from certain death by Nana, an elephant he had befriended as a 
child, who caught him in her trunk. Nana held him so tightly that three ribs cracked and he 
turned blue from lack of oxygen. "I was delirious. I had an out-of-body experience! My whole 
life passed before me eyes. I promised myself `If I get through this, I'll use my remaining time 
to share what I learned out there.' I owe it all to Nana!"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"899-
46-
2035COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Anne Ringer ran away from the circus as a child. A university creative writing professor and 
her family took Anne in and raised her as one of their own. In this warm and television-less 
setting she learned to appreciate the great classics of literature. The stream of aspiring and 
accomplished writers that flowed constantly through the house confirmed her repudiation of 
the circus family she'd been born into: "Barbarians!" The steadily growing recognition of her 
literary work was, to her, vindication. When her brother's brush with death brought them 
together after many years, she took advantage of life's crazy chance thing and broke the wall 
of anger that she had constructed to separate them. Together they wrote, "Is Anger the 
Enemy?" an even greater blockbuster than her other collaborative work, with Michel 
DeFrance, "The Gourmet Microwave."COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"672-
71-
3249COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"They asked me to write about myself and my book, so here goes: I started a restaurant called 
"de Gustibus" with two of my friends. We named it that because you really can't discuss taste. 
We're very popular with young business types because we're young business types ourselves. 
Whenever we tried to go out to eat in a group we always got into these long tiresome 
negotiations: "I just ate Italian," or "I ate Greek yesterday," or ``I NEVER eat anything that's 
not organic!" Inefficient. Not what business needs today. So, it came to us that we needed a 
restaurant we could all go to every day and not eat the same thing twice in a row maybe for a 
year! We thought, "Hey, why make people choose one kind of restaurant over another, when 
what they really want is a different kind of food?" At de Gustibus you can eat Italian, Chinese, 
Japanese, Greek, Russian, Tasmanian, Iranian, and on and on all at the same time. You never 
have to choose. You can even mix and match! We just pooled our recipes, opened the doors, 
and never looked back. We're a big hit, what can I say? My recipes in "Sushi, Anyone?" are 
used at de Gustibus. They satisfy crowds for us every day. They will work for you, too. 
Period!COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"409-
56-
7008COLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Bennet was the classic too-busy executive. After discovering computer databases he now has 
the time to run several successful businesses and sit on three major corporate boards. Bennet 
also donates time to community service organizations. Miraculously, he also finds time to 
write and market executive-oriented in-depth computer hardware and software reviews. "I'm 
hyperkinetic, so being dynamic and fast-moving is a piece of cake. But being organized isn't 
easy for me or for anyone I know. There's just one word for that: `databases!' Databases can 
cure you or kill you. If you get the right one, you can be like me. If you get the wrong one, 
watch out. Read my book!" RENDERAS="SECT1"Primary and Foreign Keys in pubs2  TOCENTRY="1"LBL="Table C-12: "Table of Primary KeysCOLS="2" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="1*"COLNAME="C2" COLWIDTH="2*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"Primary KeysCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"TableCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"Primary KeyVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"titlesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"title_idCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"titleauthorCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"au_id + title_idCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"authorsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"au_idCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"publishersCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"pub_idCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"royschedCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"title_idCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"salesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"stor_id + ord_num COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"salesdetailCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"stor_id + ord_numCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"storesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"stor_idCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"discountsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"discounttype + stor_idCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"au_pixCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"au_idCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"blurbsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"au_idTOCENTRY="1"LBL="Table C-13: "Table of Foreign KeysCOLS="3" CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME="C1" COLWIDTH="7*"COLNAME="C2" COLWIDTH="8*"COLNAME="C3" COLWIDTH="10*"VALIGN="BOTTOM"COLNAME="C1" NAMEST="C1" NAMEEND="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"Foreign KeysCOLNAME="C1" ALIGN="CENTER" ROTATE="0" MOREROWS="0"TableCOLNAME="C2" ALIGN="CENTER" ROTATE="0" MOREROWS="0"Foreign KeyCOLNAME="C3" ALIGN="CENTER" ROTATE="0" MOREROWS="0"Primary Key TableVALIGN="TOP"COLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"titleauthorCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"title_idau_idCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"titlesauthorsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"royschedCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"title_idCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"titlesCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"salesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"title_idstor_idCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"titlesstoresCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"salesdetai
lCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"title_idstor_id, 
ord_numCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"titlessalesCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"titlesCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"pub_idCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"publishersCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"discountsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"stor_idCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"storesCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"au_pixCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"au_idCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"authorsCOLNAME="C1" ALIGN="LEFT" ROTATE="0" MOREROWS="0"blurbsCOLNAME="C2" ALIGN="LEFT" ROTATE="0" MOREROWS="0"au_idCOLNAME="C3" ALIGN="LEFT" ROTATE="0" MOREROWS="0"authorsRENDERAS="SECT1"Other Objects in pubs2RENDERAS="SECT2"Rules  REMAP="BO--Body"pub_idruleREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"create rule pub_idruleas @pub_id in ("1389", "0736", "0877", "1622", "1756")or @pub_id like "99[0-9][0-9]"REMAP="BO--Body"title_idruleREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"create rule title_idruleas@title_id like "BU[0-9][0-9][0-9][0-9]" or@title_id like "[MT]C[0-9][0-9][0-9][0-9]" or@title_id like "P[SC][0-9][0-9][0-9][0-9]" or@title_id like "[A-Z][A-Z]xxxx" or@title_id like "[A-Z][A-Z]yyyy"/*valid values: BU, MC, TC, PS, PC + 4 digits or**any two uppercase letters followed by x's or y's*/RENDERAS="SECT2"DefaultsREMAP="BO--Body"typedfltREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"create default typedflt as "UNDECIDED"REMAP="BO--Body"datedfltREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"create default datedflt as getdate()REMAP="BO--Body"phonedfltREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"create default phonedflt as "UNKNOWN"RENDERAS="SECT2"ViewREMAP="CO--ComputerOutput" FORMAT="LINESPECIFIC"create view titleviewasselect title, au_ord, au_lname,price, total_sales, pub_idfrom authors, titles, titleauthorwhere authors.au_id = titleauthor.au_idand titles.title_id = titleauthor.title_idRENDERAS="SECT1"Diagram of the pubs2 DatabaseFLOAT="0"FORMAT="UNKNOWN" FILEREF="figb_2.xwd"LBL="Figure C-2: "Diagram of the pubs2 DatabaseID="X82612"Glossaryallocation unitAn allocation unit is a logical unit of SQL Server storage equal to 256 2Kb data pages, or 1/2 megabyte. The MOREINFO="NONE"disk init command initializes a new database file for SQL Server and divides it into 1/2 megabyte pieces called allocation units. On Stratus, allocation units are 256 4Kb pages, or 1 megabyte.automatic recoveryA process that runs every time SQL Server is stopped and restarted. The process ensures that all transactions which have completed before the server went down are brought forward and all incomplete transactions are rolled back.backupA copy of a database or transaction log, used to recover from a media failure.batchOne or more Transact-SQL statements terminated by an end-of-batch signal, which submits them to the SQL Server for processing. The Report Workbench and other client software supply end-of-batch signals to SQL batches automatically. built-in functionsA wide variety of functions that take one or more parameters and return results. The built-in functions include mathematical functions, system functions, string functions, text functions, date functions, and a type conversion function. bulk copyThe utility for copying data in and out of databases, called MOREINFO="NONE"bcp.character setA set of specific (usually standardized) characters with an encoding scheme that uniquely defines each character. ASCII and ISO 8859-1 (Latin 1) are two common character sets.character set conversionChanging the encoding scheme of a set of characters on the way into or out of SQL Server. Conversion is used when SQL Server and a client communicating with it use different character sets. For example, if SQL Server uses ISO 8859-1 and a client uses Code Page 850, character set conversion must be turned on so that both server and client interpret the data passing back and forth in the same way.checkpointThe point at which all data pages that have been changed are guaranteed to have been written to the database device. clustered indexAn index in which the physical order and the logical (indexed) order is the same. The leaf level of a clustered index represents the data pages themselves. code setSee character set.collating sequenceSee sort order.commandAn instruction that specifies an operation to be performed by the computer. Each command or SQL statement begins with a keyword, such as MOREINFO="NONE"insert, that names the basic operation performed. Many SQL commands have one or more keyword phrases, or clauses, that tailor the command to meet a particular need. command permissionsPermissions that apply to commands. See also object permissions. command terminatorA command terminator is the end-of-batch signal that sends the batch to SQL Server for processing. context-sensitive protectionContext-sensitive protection provides certain permissions or privileges depending on the identity of the user. This type of protection can be provided by SQL Server using a view and the user_id built-in function. conversionSee character set conversion.data definitionThe process of setting up databases and creating database objects such as tables, indexes, rules, defaults, constraints, procedures, triggers, and views. data dictionary1. In SQL Server, the system tables that contain descriptions of the database objects and how they are structured. 2. In SQL Toolset, a tool for inspecting database objects.data modificationAdding, deleting, or changing information in the database with the MOREINFO="NONE"insert, MOREINFO="NONE"delete, and MOREINFO="NONE"update commands. databaseA set of related data tables and other database objects that are organized and presented to serve a specific purpose. database deviceA device dedicated to the storage of the objects that make up databases. It can be any piece of disk or a file in the file system that is used to store databases and database objects.database objectA database object is one of the components of a database: table, view, index, procedure, trigger, column, default, constraint or rule. Database OwnerThe user who creates a database becomes the Database Owner. A Database Owner has control over all the database objects in that database. The login name for the Database Owner is "dbo".datatypeSpecifies what kind of information each column will hold, and how the data will be stored. Datatypes include char, int, money, and so on. Users can construct their own datatypes in SQL Server based on the SQL Server system datatypes. User-defined datatypes are not supported in SQL Toolset.date functionA function that displays information about dates and times, or manipulates date or time values. The five date functions are MOREINFO="NONE"getdate, datename, datepart, datediff andMOREINFO="NONE" dateadd. dboIn a user's own database, SQL Server recognizes the user as dbo. A database owner logs into SQL Server using his or her assigned login name and password.deadlockA situation which arises when two users, each having a lock on one piece of data, attempt to acquire a lock on the other's piece of data. The SQL Server detects deadlocks, and kills one user's process. defaultThe option chosen by the system when no other option is specified. default databaseThe database that a user gets by default when he or she logs in. default language1. The default language of a user is the language that displays that user's prompts and messages. It can be set with MOREINFO="NONE"sp_modifylogin or the MOREINFO="NONE"language option of the MOREINFO="NONE"set command.2. The SQL Server default language is the language that is used to display prompts and messages for all users unless a user chooses a different language.demand lockA demand lock prevents any more shared locks from being set on a data resource (table or data page). Any new shared lock request has to wait for the demand lock request to finish. dirty read"Dirty reads" occur when one transaction modifies a row, and then a second transaction reads that row before the first transaction commits the change. If the first transaction rolls back the change, the information read by the second transaction becomes invalid.disk allocation piecesDisk allocation pieces are the groups of allocation units from which SQL Server constructs a new database file. The minimum size for a disk allocation piece is one allocation unit, or 256 2Kb pages (256 4Kb pages on Stratus).disk initializationThe process of preparing a database partition, foreign device or file for SQL Server use. Once the device is initialized, it can be used for storing databases and database objects. The command used to initialize a database device is MOREINFO="NONE"disk MOREINFO="NONE"init.disk mirrorA duplicate of a SQL Server database device. All writes to the device being mirrored are copied to a separate physical device, making the second device an exact copy of the device being mirrored. If one of the devices fails, the other contains an up-to-date copy of all transactions. The commandMOREINFO="NONE" disk mirror starts the disk mirroring process.display precisionThe number of significant binary digits offered by the default display format for real and float values. Internally, real and float values are stored with a precision less than or equal to that of the platform-specific datatypes on which they are built. For display purposes, Sybase reals have 9 digits of precision; Sybase floats, 17. dump stripingInterleaving of dump data across several MOREINFO="NONE"dump volumes.dump volumeA single tape, partition or file used for a database or transaction dump. A dump can span many volumes, or many dumps can be made to a single tape volume.dynamic dumpA dump made while the database is active. engineA process running a SQL Server that communicates with other server processes using shared memory. An engine can be thought of as one CPU's worth of processing power. It does not represent a particular CPU on a machine. Also referred to as "server engine."A SQL Server running on a uniprocessor machine will always have one engine, engine 0. A SQL Server running on a multiprocessor machine can have one or more engines. The maximum number of engines running on SQL Server can be reconfigured using the MOREINFO="NONE"max online engines configuration variable.error messageA message that SQL Server issues, usually to the user's terminal, when it detects an error condition. error state numberThe number attached to an SQL Server error message that allows unique identification of the line of SQL Server code at which the error was raised. exclusive locksLocks which prevent any other transaction from acquiring a lock until the original lock is released at the end of a transaction, always applied for update (MOREINFO="NONE"insert, MOREINFO="NONE"update, MOREINFO="NONE"delete) operations. expression1. In SQL Server, returns values. An expression can be a computation, column data, a built-in function, or a subquery. 2. A basic unit of the APT-SQL language, composed of operators and other expressions. format fileA file created while using MOREINFO="NONE"bcp to copy data out from a table in a SQL Server database to an operating system file. The format file contains information on how the data being copied out is formatted and can be used to copy the data back into a SQL Server table or to perform additional copy outs.free-space thresholdA user-specified threshold that specifies the amount of space on a segment, and the action to be taken when the amount of space available on that segment is less than the specified space.functionsSee built-in functions. global variable1. In APT-SQL, a variable declared with MOREINFO="NONE"global variable. The value of a global variable is available to any APT-SQL routine that declares it. 2. In SQL Server, global variables are system-defined variables that SQL Server updates on an ongoing basis. For example, @@error contains the last error number generated by the system.guestIf the user name "guest" exists in the sysusers table of a database, any user with a valid SQL Server login can use that database, with limited privileges. hexadecimal stringA hexadecimal-encoded binary string that begins with the prefix 0x and can include the digits 0 through 9 and the upper- and lowercase letters A through F. The interpretation of hexadecimal strings is platform specific. For some systems, the first byte after the prefix is the most significant; for others, the last byte is most significant. For example, the string 0x0100 is interpreted as 1 on some systems and as 256 on others.identifier1. A string of characters used to identify a database object, such as a table name or column name. 2. In APT-SQL, any string of characters which identifies an object in a routine. Includes, but is not limited to: variables, fields, groups, menu actions, forms, sqlrows, channels, and routine names.initializationSee disk initialization.intA signed 32 bit integer value.intent lockAn intent lock indicates the intention to acquire a shared or exclusive lock on a data page. isolation levelAlso called "locking level," "isolation level" specifies the kinds of actions which are not permitted while the current transaction executes. The ANSI standard defines 3 levels of isolation for SQL transactions. Level 1 prevents dirty reads, and level 2 also prevents non-repeatable reads. Level 3 prevents both types of reads and phantoms; it is equivalent to doing all MOREINFO="NONE"selects with MOREINFO="NONE"holdlock. The user controls the isolation level with the MOREINFO="NONE"set option MOREINFO="NONE"transaction isolation level; the default is isolation level 1.kernelA module within SQL Server that acts as the interface between SQL Server and the operating system.keywordA word or phrase that is reserved for exclusive use by Transact-SQL. Also known as reserved word. last-chance thresholdA default threshold in SQL Server that suspends or kills user processes if the transaction log has run out of room. This threshold leaves just enough space for the de-allocation records for the pages cleared by the log dump itself. Threshold events calls a user-defined procedure, the default name is MOREINFO="NONE"sp_thresholdaction. This procedure is not supplied by Sybase, it must be written by the System Administrator.leaf levelThe bottom level of a clustered or non-clustered index. In a clustered index the leaf level contains the actual data pages of the table. livelockA request for an exclusive lock that is repeatedly denied because a series of overlapping shared locks keeps interfering. The SQL Server detects the situation after four denials, and refuses further shared locks. lockingThe process of restricting access to resources in a multi-user environment to maintain security and prevent concurrent access problems. SQL Server automatically applies locks to tables or pages. locking levelSee isolation level.loginThe name a user uses to log in to SQL Server. A login is valid if SQL Server has an entry for that user in the system table syslogins. Master DatabaseControls the user databases and the operation of SQL Server as a whole. Known as master, it keeps track of such things as user accounts, ongoing processes, and system error messages. message numberThe number that uniquely identifies an error message. mirrorSee disk mirror.model databaseA template for new user databases. The MOREINFO="NONE"buildmaster program and the MOREINFO="NONE"installmodel script create model when SQL Server is installed. Each time the MOREINFO="NONE"create database command is issued, SQL Server makes a copy of MOREINFO="NONE"model and extends it to the size requested, if necessary.multibyte character setA character set that includes characters encoded using more than one byte. EUC JIS and Shift-JIS are examples of character sets that include several types of characters represented by multiple bytes in a Japanese language environment.non-clustered indexAn index that stores key values and pointers to data. The leaf level points to data pages rather than containing the data itself. Compare to clustered index.non-repeatable read"Non-repeatable reads" occur when one transaction reads a row and then a second transaction modifies that row. If the second transaction commits its change, subsequent reads by the first transaction yield different results than the original read.normalization rulesThe standard rules of database design in a relational database management system. nullHaving no explicitly assigned value. NULL is not equivalent to zero, or to blank. A value of NULL is not considered to be greater than, less than, or equivalent to any other value, including another value of NULL. object permissionsPermissions that regulate the use of certain commands (data modification commands, plus MOREINFO="NONE"select, MOREINFO="NONE"truncate MOREINFO="NONE"table and MOREINFO="NONE"execute) to specific tables, views, columns or procedures. See also command permissions. objectsSee database objects. operating systemA group of programs that translates your commands to the computer, helping you perform such tasks as creating files, running programs, and printing documents. parameter1. An argument to a stored procedure. 2. A value passed between routines and/or forms.permissionThe authority to perform certain actions on certain database objects or to run certain commands. phantoms"Phantoms" occur when one transaction reads a set of rows that satisfy a search condition, and then a second transaction modifies the data (through an MOREINFO="NONE"insert, MOREINFO="NONE"delete, MOREINFO="NONE"update, and so on). If the first transaction repeats the read with the same search conditions, it obtains a different set of rows.precisionA positive integer that determines the maximum number of digits that can be represented in a decimal, numeric, or float column.privilegeSee permission. query1. A request for the retrieval of data with a MOREINFO="NONE"select statement. 2. Any SQL statement that manipulates data. recoveryThe process of rebuilding one or more databases from database dumps and log dumps. See also automatic recovery.remote procedure calls1. A stored procedure executed on a different SQL Server from the server the user is logged into. 2. In APT-SQL, remote procedure calls are stored procedures executed with the MOREINFO="NONE"remote statement. Stored procedures executed with MOREINFO="NONE"remote can be on a remote server, or on the local server.saSee System Administrator.scaleA nonnegative integer that determines the maximum number of digits that can be represented to the right of the decimal point. The scale of a datatype cannot be greater than its precision.schemaA "schema" is a persistent object in the database. It consists of the collection of objects associated with a particular schema name and user authorization identifier. The objects are tables, views, domains, constraints, assertions, privileges and so on. A schema is created by a MOREINFO="NONE"create schema statement.segmentA named subset of database devices available to a particular database. It is a label that points to one or more database devices. Segments can be used to control the placement of tables and indexes on specific database devices.server engineSee engine.server user IDThe ID number by which a user is known to SQL Server. severity level numberThe severity of an error condition: errors with severity levels of 19 and above are fatal errors. shared lockA lock created by non-update ("read") operations. Other users may read the data concurrently, but no transaction can acquire an exclusive lock on the data until all the shared locks have been released. sort orderUsed by SQL Server to determine the order in which character data is sorted. Also called collating sequence.SQL ServerThe server in Sybase's "Client-Server" architecture. SQL Server manages multiple databases and multiple users, keeps track of the actual location of data on disks, maintains mapping of logical data description to physical data storage, and maintains data and procedure caches in memory.statementA statement begins with a keyword that names the basic operation or command to be performed. stored procedureA collection of SQL statements and optional control-of-flow statements stored under a name. SQL Server-supplied stored procedures are called system procedures. System AdministratorA user in charge of SQL Server system administration, including creating user accounts, assigning permissions, and creating new databases. At installation time, the System Administrator's login name is sa. The sa user can assign the System Administrator role to other logins, providing greater accountability.system databasesThe four databases on a newly installed SQL Server: the Master Database (master), which controls user databases and the operation of the SQL Server; the Temporary Database (tempdb), used for temporary tables; the System Procedures Database (sybsystemprocs) and the Model Database (model) which is used as a template to create new user databases. system functionA function that returns special information from the database, particularly from the system tables. system proceduresStored procedures that SQL Server supplies for use in system administration. These procedures are provided as shortcuts for retrieving information from the system tables, or mechanisms for accomplishing database administration and other tasks that involve updating system tables. system tableOne of the data dictionary tables. The system tables keep track of information about the SQL Server as a whole and about each user database. The Master Database contains some system tables that are not in user databases. temporary databaseThe temporary database in SQL Server, tempdb, that provides a storage area for temporary tables and other temporary working storage needs (for example, intermediate results ofMOREINFO="NONE" group by and MOREINFO="NONE"order by).transactionA mechanism for ensuring that a set of actions is treated as a single unit of work. transaction logA system table (syslogs) in which all changes to the database are recorded. triggerA special form of stored procedure that goes into effect when a user gives a change command such as MOREINFO="NONE"insert, MOREINFO="NONE"delete, or MOREINFO="NONE"update to a specified table or column. Triggers are often used to enforce referential integrity. user authorization identifier"User authorization identifiers" are associated with each schema. All the objects are said to be owned by or to have been created by the associated user authorization identifier for the schema. user idThe ID number by which a user is known in a specific database. Distinct from server user ID.viewAn alternative way of looking at the data in one or more tables. Usually created as a subset of columns from one or more tables. 