Index A Guide to the Index

advertisement
Index
A Guide to the Index
The index is arranged in word-by-word order (so that New York would appear before Newark).
Acronyms are listed unexpanded and the ellipsis (… ) and asterisk (*) have their usual meanings,
indicating omissions and variant endings respectively.
A
ABS function, 818
accent-insensitive sorting, 133
accent-sensitive sorting
ALTER TABLE command and, 701
Collation Designator, 12
CREATE TABLE command and, 699
sort order choice, 107, 108
Access databases
Error 7399 and, 545
Jet 4.0 OLE DB provider and, 529
migrating data to SQL Server 2000, 60
ACID transaction properties, 242
ACOS function, 818
active/active failover clustering, 551
active/passive failover clustering, 551
ActiveScripting and proxy accounts, 204
ActiveX components and sp_oa* stored procedures,
865
ActiveX replication controls, 426
generating dynamic snapshots, 473
ActiveX scripts
ActiveX Script Transformation Properties dialog, 580, 592
configuring the ActiveX Script Task in DTS Designer, 570
programming DTS workflow, 607
SQL Server Agent job type, 212
Actve Directory, linked server connectivity, 531
ADD CONSTRAINT clause, ALTER TABLE command, 702
adding CHECK and DEFAULT constraints, 703
adding UNIQUE constraints, 704
Additive Conflict Resolver, 453
advanced options, sp_configure, 69
reasons to disable, 70
Advanced tab, SQL Server Agent dialog, 199
Affinity Mask Option, 70
AFTER triggers, 736
firing order, specifying, 741
for DELETE, creating, 739
for INSERT, creating, 738
for UPDATE, creating, 738
agents
agent types and their parameters tabulated, 508-512
configuring agent profiles, 507
merge replication, 424
queues updating, 425
snapshot replication, 421
transactional replication, 423
viewing in Replication Monitor, 439
aggregate functions, 793-800
AVG function, 794
BINARY_CHECKSUM function, 794
CHECKSUM function, 795
CHECKSUM_AGG function, 797
COUNT function, 797
COUNT_BIG function, 798
GROUPING function, 798
MAX function, 798
MIN function, 799
STDEV function, 799
STDEVP function, 799
SUM function, 799
using the COMPUTE keyword, 782
using the DISTINCT keyword, 752
using the GROUP BY clause, 772
VAR function, 800
VARP function, 800
views and, 710
alerts
adding using Enterprise Manager, 206
alert schedules for log shipping, 631, 635
alert system stored procedures, 231
Alert System tab, SQL Server Agent dialog, 200
checklist of recommended alert situations, 208
scripting, 226
SQL Server Agent primary function, 197
aliases
client-side aliases, 662
column aliases
using for derived columns, 753
using in correlated subqueries, 779
using table aliases with joins, 763
ALL operator, 769
using with GROUP BY, 772
using with subqueries, 779
allocation
allocation
checking for allocation errors, 349
checking a filegroup, 352
checking for database objects, 347
Allow Updates Option, 72
ALTER COLUMN clause, ALTER TABLE command, 700
dropping the ROWGUIDCOL property, 701
ALTER DATABASE command
ADD FILEGROUP extension, 172
adding files using, 135
ANSI_NULL_DEFAULT database option, 148
ANSI_NULLS database option, 149
ANSI_PADDING database option, 149
ANSI_WARNINGS database option, 150
ARITHABORT database option, 150
AUTO_CLOSE database option, 143
AUTO_CREATE_STATISTICS database option, 143
AUTO_SHRINK database option, 145
AUTO_UPDATE_STATISTICS database option, 144
changing database collation, 111
checkpoints issued following, 293
CONCAT_NULL_YIELDS_NULL database option, 151
CURSOR_CLOSE_ON_COMMIT database option, 145
CURSOR_DEFAULT LOCAL | GLOBAL database option, 146
generating using a Transact-SQL script, 861
MODIFY FILEGROUP extension, 173, 174
NUMERIC_ROUNDABORT database option, 151
OFFLINE | ONLINE database option, 139
QUOTED_IDENTIFIER database option, 152
READ_ONLY | WRITE_ONLY database option, 140
RECOVERY FULL | BULK_LOGGED | SIMPLE database
option, 147
RECURSIVE_TRIGGERS database option, 153
REMOVE FILEGROUP extension, 179
removing files using, 137
SINGLE_USER | RESTRICTED_USER | MULTI_USER
database option, 140
TORN_PAGE_DETECTION database option, 148
WITH clauses, 140
ALTER FUNCTION command, 731
ALTER PROCEDURE command, 721
use by the Object Browser, 655
ALTER TABLE command
adding columns to existing tables, 699
adding computed columns, 795
adding constraints to an existing table
CHECK and DEFAULT constraints, 703
UNIQUE constraints, 704
adding primary and foreign keys to an existing table, 702
changing column collations, 112, 701
changing column definitions, 700
constraints, dropping, 700
constraints, enabling and disabling, 704
dropping columns, 700
DBCC CLEANTABLE and, 361
dropping the ROWGUIDCOL property, 701
triggers, enabling and disabling, 742
ALTER TRIGGER command, 740
ALTER VIEW command, 717
Analysis Services installation, 13
service pack installation and, 26, 29
annotated schemas, XSD, 934
anonymous subscriptions
Create Publication Wizard, 437
independent distribution agents, 487
ANSI SQL-92 DECLARE syntax, 852
946
ANSI_DEFAULTS option and implicit transactions, 243
ANSI_NULL_DEFAULT database option, 148
ANSI_NULL_DFLT_OFF | ON user options, 101
ANSI_NULLS option, 100, 102, 149
distributed queries and, 522
indexed views and, 714
ANSI_PADDING option, 100, 102, 149
ANSI_WARNINGS option, 100-102, 150
distributed queries and, 522
ANY operator, 769
using with subqueries, 778
APP_NAME function, 830
application roles, 368, 384
activating with encryption, 385
applications, sharing database servers, 85
ARITHABORT option, 101, 102, 150, 348
ARITHIGNORE user option, 101
artificial keys and the IDENTITY property, 694
AS clause, column naming and renaming, 753
ASCII function, 800
ASIN function, 819
asterisks
see also wildcard characters.
selecting all columns, 750
asynchronous cursor population, 76
ATAN function, 819
ATN2 function, 819
atomicity
cells, first normal form requirement, 842
transactions, 243
attachable subscription databases, 495
Attempt to repair... option, database maintenance
plans, 335
attribute-centric mapping, OPENXML, 941
attributes, XML, 932
auditing information
audit tables and triggers, 412
C2 Audit Mode Option, 73
security auditing with SQL Profiler, 406
authentication modes
pre-installation checklist and, 10
selecting with the Pull Subscription Wizard, 461
SQL Server 2000 installation, 12
AUTO mode, FOR XML clause, 935
AUTO_CLOSE database option, 142
virus scanning software and, 36
AUTO_CREATE_STATISTICS database option, 143
AUTO_SHRINK database option, 144
AUTO_UPDATE_STATISTICS database option, 144
autocommit function, JDBC driver settings, 282
autoexec stored procedures, Scan for Startup
Procs Option, 97
autogrow option
creating databases, 128
service pack installation and, 27
automation object loading in-process and out-ofprocess, 865
autostart option, configuring SQL Server Agent, 198
Averaging Conflict Resolver, 453
AVG function, 794
AWE (Address Windowing Extensions) and named
instances, 20
AWE Enabled Option, 72
B-tree index structures
B
background services, configuring Windows 2000
for, 36
BACKUP commands, 293
BACKUP DATABASE command
differential backups, 303
examples, 300
parameters, 298
syntax, 298
BACKUP LOG command
Database Maintenance Plan Wizard, 332
examples, 302
parameters and syntax, 301
SQL Server 2000 log truncation and, 170
backups
see also recovery plans.
backup and recovery plans, 35
backup sequences illustrated, 287
creating a named backup device, 296
differential backups, 288
using Transact-SQL, 303
Enterprise Manager and, 293
erasing content or appending, 300
estimating requirements, pre-installation, 5
storage requirements, 7
files for, prior to security patch installation, 32
files or filegroups, using Transact-SQL, 303
full backups, 287
performing with Transact-SQL, 298
Media Retention Option, 88
methods available in SQL Server 2000, 287
offline backups, 289
partial restores to new databases, 320
reminder checklist, 304
restoring a database, 305
using Transact-SQL, 313, 316, 317
restoring a file or filegroup, 320
restoring from multiple backups, 316
restoring other versions to SQL Server 2000, 42
restoring the master database from, 30, 31
restoring the model and msdb databases, 31
restoring, mark points and, 248
snapshot backups, 289
specifying, for log shipping, 629, 630
striped backups, 294
system databases should follow user databases, 304
transaction log backups, 287
using Transact-SQL, 301
troubleshooting DTS packages, 622
utilities, post-installation checks, 37
VLDBs, using filegroups, 170
Windows 2000 backup tool, 289
batch files, unattended installation, 16
batch separator alternative to the GO keyword, 227
batches, 863
embedding strings in parentheses after EXEC, 863
BCP (Bulk Copy Program), 50-54
format file creation, 51
moving SQL Server 6.5 logins and passwords, 40
snapshot replication and, 421
suspect databases and, 325
sysxlogins table, log shipping, 633
BEGIN DISTRIBUTED TRANSACTION command, 253
introduced, 245
BEGIN keyword, 845
BEGIN TRANSACTION command
example, 245, 246
introduced, 245
syntax, 246
WITH MARK extension, 248
BETWEEN operator, 769
BIGINT data type
COUNT_BIG function and, 798
value range and physical storage requirements, 119
BINARY BASE 64 keyword, FOR XML AUTO, 937
binary checksums, 497
BINARY data type, 121
binary files, recovering corrupted files, 323
binary filestreams, IMAGE, TEXT and NTEXT
functions, 836-840
binary sorting
Collation Designator, 12
sort order choice, 107, 108
BINARY_CHECKSUM function, 794
BIT data type, 120
black box traces, 895
blocking, 267
causes of long-term blocking, 268
Enterprise Manager display, 263
identifying and resolving, 268
using Enterprise Manager, 271
JDBC driver settings and, 282
reason for long- duration queries, 894
SET LOCK_TIMEOUT option, 266
transactions requiring user feedback, 268
troubleshooting, 281
book inventory system, illustrating transactions,
241
BookRepository database, 131
BookRepositoryUK database, 132
Books Online
counter logs, 886
database size estimation, 123
deadlocks, 273
DTS custom tasks, registering, 620
DTSTransformStatus constants, 592
Enterprise Edition memory utilization, 34
installation recommended, 11
makepipe utility, 23
replication system tables, 513
security audit data, 409
setup files, creating manually, 16
sp_addmergesubscription stored procedure, 496
sp_dbcmptlevel stored procedure, 26
bottlenecks
detecting with counter logs, 883
I/O bottlenecks, 884, 885
identifying using System Monitor, 873
memory bottlenecks, 884
network bottlenecks, 884
bound connections, 283
BREAK keyword, 848
broadcasts and hidden instances, 662
browse compliant tables, 783
B-tree index structures, 731
947
buffer cache
buffer cache
buffer cache hit ratio, 885
alerts and, 208
paging and, 883
memory allocation
Min and Max Server Memory Options, 84
placing tables in, using DBCC PINTABLE, 708
removing clean buffers, 870
bugs
data type mismatch, sp_OA stored procedures, 865
DBCC DBREINDEX on indexed views, 357
deferred name resolution and sp_depends, 746
DTS connections to FTP, 570
DTS Designer mail profiles, 595
Rebuild Master utility, 114, 322
slow response times with linked server operations, 546
sp_processmail stored procedure, 221
SQL Mail with Windows Messaging and Outlook, 218
UDFs used with CASE statements, 727
xp_sendmail stored procedure, 217, 220
bulk copy processing, Transform Data Properties
dialog, 586
bulk inserts, 54
alternative to DTS transform data task, 587
configuring the bulk insert task, 596
performance impacts of constraints and, 709
removing an index to boost performance, 733
bulk loading, SQLXML Bulk Load Utility, 934
bulk update locks, 255
compatibilities, 256
bulk-logged recovery model, 290
@@BUSY function, 816
C
C2 Audit Mode Option, 73, 895
CAL (Client Access Licenses), 10
calculated columns see computed columns.
cardinality, columns for indexing, 919, 925
Cartesian products, 762
CASCADE parameter, 399, 402
cascading changes, 691
cascading triggers, 737
Using Nested Triggers Option, 89
CASE … ELSE expressions, 844
CASE command and UDF bug, 727
case conversion
LOWER and UPPER functions, 804
trim string transformation, 584
case-sensitive sorting
Collation Designator, 12
creating an example database using, 133
sort order choice, 107
case-sensitivity
osql utility, 648
scripting out logins and passwords, 40
CAST function, 809
CDOSYS (Collaborative Data Objects) e-mail, 218
CD-ROMs, bug affecting Rebuild Master, 114, 322
CEILING function, 819
central publisher, local distributor and central
publisher, remote distributor models, 420, 421
948
central publisher, remote distributors model, 421
change tracking and full-text indexing, 666, 672
change detection
using the BINARY_CHECKSUM function, 794
using the CHECKSUM_AGG function, 797
CHAR data type, 121
CHAR and CHARINDEX function, 801
CHECK constraints, 692
adding to an existing table, 703
checkpoint event, 94
checkpoints, 292
CHECKSUM function, 795
checksum validation of replicated data, 497
CHECKSUM_AGG function, 797
Client Configuration Utility, 661
Client Connectivity
see also MDAC; ODBC drivers; OLE DB providers.
DB-Library clients, 385
ensuring, 23
installing only, 18
Client Network Utility, 662
client statistics function, Query Analyzer, 915
Client Utilities, installing only, 17
client-side aliases, 662
client-side processing, SQLXML, 934
client-side traces, 406
CLOSE keyword, closing cursors, 856
clothing catalog example, data driven query task,
590-593
Cluster Administrator, 553
installing virtual servers, 555
cluster groups, 550
quorum drive use, 553
cluster-aware applications see failover clustering.
clustered indexes, 731, 917
see also indexed views.
CREATE INDEX statement, 735
creating indexes in Enterprise Manager, 187
defragmenting heaps, 360
effect of rebuilding, 922
indexed views and, 714
selecting columns for, 733
update frequency and, 919
CmdExec and proxy accounts, 204
COALESCE function, 830
code injections and security patches, 32
code page IDs and names tabulated, 107
COL_LENGTH function, 827
COLLATE command, 113
creating an example database using, 133
Collation Designator
settings, 12
SQL Collations and, 115
Collation property, Enterprise Manager, 182
COLLATIONPROPERTY function, 113
collations, 106-116
column, changing, 112, 701
column, designating when creating tables, 699
column, differing from defaults, 111
compatability issues, 108
servers used for replication, 429
setting linked server options, 525, 533
database, changing, 111
consistency
collations (Cont'd)
database, differing from server defaults, 110
incompatibilities between databases, 127
server default collation, changing, 114
server default collation, viewing
using SELECT SERVERPROPERTY, 109
using sp_helpsort, 109
setting on SQL Server installation, 12
setting servers to default, 3
SQL Collation compared to Windows Collation, 108
column aliases
derived columns and, 753
use within correlated subqueries, 779
column constraints, 685
Column Order dialog, Transform Data Task
properties, 581
column permissions, user-defined database
roles, 381
columns
adding to existing tables, 699
cardinality and choice for indexing, 919
changing collations, 112, 701
changing definitions, 700
column_id parameter, sp_trace_setevent, 899, 900
defining collations, 699
displaying column data for linked server tables, 540
modifying properties when creating tables, 181
reclaiming space after dropping columns, 361
removing from existing tables, 700
renaming, 743
resizing example using ALTER TABLE, 701
setting non-default collations for, 111
COLUMNS information schema view, 841
columns list, INSERT commands, 784
COLUMNS_UPDATED() function, 739
COM (Component Object Model) exposed by
DTS, 563
COM automation, 865
command line utilities
see also dtsrun; osql.
makepipe and readpipe utilities, 23
odbcping utility, 23-24
relog.exe, 878
SQLDIAG, 659
COMMIT TRANSACTION command, 245
comparison operators
sp_trace_setfilter stored procedure, 901
use of the < and <= operators, 768
compatibility issues and collations, 108
Component Checker and MDAC setup, 23
composite keys, 685
COMPUTE keyword, 782
aggregate functions for each change in column
grouping, 782
not allowed in cursors, 853, 854
computed columns
see also indexed computed columns.
creating using DDL, 686
creating with ALTER TABLE, 795
creating with CREATE TABLE, 687
Formula property and, 182
SELECT computations as alternatives, 686
CONCAT_NULL_YIELDS_NULL database option, 151
CONCAT_NULL_YIELDS_NULL user option, 101, 102
concatenation
NULL values, 862
PRINT statement example, 862
use in Transact-SQL scripts, 861
concurrency problems, 254
transaction isolation levels preventing each, 256
conditional processing see control-of-flow
commands.
@configurename and @configurevalue arguments,
sp_configure stored procedure, 68
configuring SQL Server, 67
Affinity Mask Option, 70
Allow Updates Option, 72
AWE Enabled Option, 72
C2 Audit Mode Option, 73
Cost Threshold for Parallelism Option, 74
Cursor Threshold Option, 75
Default Full-text Language Option, 76
Default Language Option, 77
Fill Factor Option, 78
Index Create Memory Option, 81
Lightweight Pooling Option, 81
Locks Option, 82
Max Degree of Parallelism Option, 83
Max Text Repl Size Option, 86
Max Worker Threads Option, 86
Media Retention Option, 88
Min and Max Server Memory Options, 84
Min Memory Per Query Option, 88
Network Packet Size Option, 89
Open Objects Option, 90
options available, 70-102
Proirity Boost Option, 91
Query Governor Cost Limit Option, 92
Query Wait Option, 93
Recovery Interval Option, 94
Remote Access Option, 95
Remote Login Timeout Option, 95
Remote Proc Trans Option, 96
Remote Query Timeout Option, 96
Scan for Startup Procs Option, 97
Set Working Set Size Option, 97
Two Digit Year Cutoff Option, 98
User Connections Option, 99
User Options Option, 100
using Enterprise Manager, 67
Using Nested Triggers Option, 89
using sp_configure, 68
conflict histories, 494
conflict resolvers, 453, 491
connection objects, DTS, adding and
configuring, 565
Connection tab, SQL Server Agent dialog, 201
connection types, DTS, icons tabulated, 568
connections, binding to other open
transactions, 864
@@CONNECTIONS function, 815
connectivity issues and named instances, 21
connectivity utilities
Client Network Utility, 662
Server Network Utility, 661
consistency
checking for consistency errors, 349
transaction property, 243
949
CONSTRAINT keyword
CONSTRAINT keyword, CREATE TABLE command
applying a CHECK constraint, 692
defining a foreign key reference, 689
defining a ROWGUIDCOL column with NEWID(), 698
designating a primary key, 685
designating a UNIQUE constraint, 686
constraint violations and DBCC
CHECKCONSTRAINTS, 344
constraints
CHECK constraints, 692
adding to an existing table, 703
choice between triggers and, 709, 737
column and table constraints, 685
DEFAULT constraints
adding to an existing table, 703
disabling and enabling, 704
dropping, using ALTER TABLE, 700
foreign key references, 689
foreign keys
adding to an existing table, 702
listing, for a table, 707
performance impact, 709
primary keys, 684
adding to an existing table, 702
UNIQUE constraints, 686
adding to an existing table, 704
contacts, recovery plan, 286
CONTAINS predicate, full-text indexes, 672
CONTAINSTABLE function, full-text indexes, 674
context switching
Affinity Mask Option and, 71
Lightweight Pooling Option and, 81
CONTINUE keyword, control-of-flow commands, 848
control panel method, uninstalling SQL Server, 18
control-of-flow commands, 846-850
BREAK keyword, 848
CONTINUE keyword, 848
IF ... ELSE keywords, 846
RETURN keyword, 849
WHILE keyword, 847
CONVERT function, 809
copy column transformation, Transform Data Task
properties dialog, 580
Copy Database Wizard, 49
DTS transfer tasks, 602
copy SQL Server objects task, DTS, 594
correlated subqueries, 779
JOIN clause alternative, 779, 780
corruption, recovery from database, 321
COS function, 820
Cost Threshold for Parallelism Option, 74
COT function, 820
COUNT function, 797
COUNT(*) function using the GROUP BY
clause, 772
COUNT_BIG function, 798
counter logs, 874
detecting bottlenecks, 883
displaying the results, 882
interval settings, 877
scheduling, 879
setting up for local or remote machines, 875
covering indexes, 917
950
CPU (Central Processor Unit)
estimating hardware needs, 5
utilization, counters, 885
@@CPU_BUSY function, 815
CREATE DATABASE command
example using parameters and options, 131
examples, 130-133
setting database collations, 110
syntax, parameters and options, 129
Create Database Diagram Wizard, 194
Create Dynamic Snapshot Job Wizard, 473
Publication Properties dialog, 474
Set Job Schedule dialog, 474
Specify Job Name dialog, 475
CREATE FUNCTION command
creating inline UDFs, 728
creating multistatement UDFs, 729
creating scalar UDFs, 727
CREATE INDEX command, 733
editing in Enterprise Manager, 187
logging, 291
placing an index in a different filegroup, 735
Create New Transformation dialog box, DTS
Designer, 576
CREATE PROCEDURE command, 719
Create Publication Wizard, 429
configuring merge replication, 448
conflict resolvers, 453
multiple updates option, 451
configuring transactional replication, 440
Customize the Properties of the Publication dialog,
435, 447
defining dynamic filters, 469
Default View Article Properties dialog, 433, 443
Enable Dynamic filters dialog, 470
Filter Table Rows dialog, 471
Optimize Synchronization dialog, 472
Select Publication Type dialog, 430, 440, 448
Specify Articles dialog, 432, 441, 449
Specify Subscriber Types dialog, 431, 441, 449
Table Article Properties dialog, 433, 444, 449
interactive conflict resolvers, 491
Transform Published Data dialog, 431, 440, 464
Updateable Subscriptions dialog, 430, 440
Validate Subscriber Information dialog, 471
CREATE STATISTICS command, 925
changing column definitions and, 700
CREATE TABLE command, 682
CHECK constraints and, 692
computed columns, 687
DEFAULT property, 693
defining column collations, 699
designating a primary key, 685
foreign key constraints, 689
IDENTITY property, 694
ON DELETE CASCADE, 691
ON UPDATE CASCADE, 691
placing a table in a filegroup, 688
placing text or images in a separate filegroup, 688
recursive relationships and, 690
ROWGUIDCOL property and, 698
setting non-default collations for a column, 111
temporary tables, 705
database options
CREATE TRIGGER command, 737
audit table example, 413, 416
INSTEAD OF triggers, 739
CREATE VIEW command, 712
creating partitioned views, 715
distributed partitioned views, 716
SCHEMABINDING clause, 713
CROSS JOINs, 762
CUBE
GROUPING function and, 798
using with GROUP BY clauses, 773
CURRENT_TIMESTAMP function, 831
CURRENT_USER function, 831
cursor data type variables, 857
cursor event category, SQL Profiler, 888
cursor processing and set processing 283, 852
Cursor Threshold Option, 75
CURSOR_CLOSE_ON_COMMIT option, 100, 145, 252
CURSOR_DEFAULT LOCAL | GLOBAL option, 145
@@cursor_rows function, 856
cursors, 852
alternatives to, 887
closing, 856
creating with the DECLARE statement, 852
cursor data type variables, 857
CURSOR_CLOSE_ON_COMMIT example, 252
deallocating, 856
fetching, 855
naming conflicts, 145
opening, 854
performance impact within queries, 886
performance impact within triggers, 737
system stored procedures and, 857
custom see user-defined.
custom tasks, DTS, 620
D
data cleansing, 63
data driven query task, 589
example, 590-593
data integrity, merge replication, 450
Data Pump Interface, 572
data pump phases, Transform Data Task
Properties dialog, 575
data source selection, DTS Import/Export Wizard, 43
data transfer options, migrating databases, 56
Data Transformation Query Designer, 573
data type definitions, XMLDATA keyword, FOR
XML, 937
data types, SQL Server, 119
changing column definitions and, 701
column size and performance, 684
CONVERT and CAST functions, 809
fixed-length and variable-length, 684
full-text indexing supported types, 663
guidelines on selecting, 684
Hungarian notation reflects, 682
mismatch, bug affecting sp_OA stored procedures, 865
replication considerations, 426
tabulated, 683
user-defined data types
conversion in Create Publication Wizard, 433
creating, using Enterprise Manager, 193
Database Access tab, SQL Server Login Properties
dialog, 371
database compatibility, 25
database diagrams, Create Database Diagram
Wizard, 194
database event category, SQL Profiler, 888
Database Hammer tool, 85, 87
Database Maintenance Plan Wizard, 327, 628
see also log shipping.
Add Destination Database dialog, 630
Backup Disk Directory dialog, 331
Database Backup dialog, 330
Database Integrity dialog, 329
Log Shipping Schedules dialog, 631
Log Shipping Thresholds dialog, 631
Maintenance Plan History dialog, 334
naming, 334
pre-configuation requirements, 627
Reports to Generate dialog, 333
Select Databases dialog, 628
Specify the Log Shipping Monitor ... dialog, 632
Specify Transaction Log Backup ... dialog, 629
Transaction Log Backup dialog, 332
Update Data Optimization Information dialog, 328
database maintenance plans
Change free space per page percentage to
fill factors and, 80
configuring log shipping properties, 636
investigating failures, 336
recommendations, 335
setting up, 326
database migration, 37
best practices, 55
restoring other versions to SQL Server 2000, 42
upgrading to SQL Server 2000, 55
scripting out objects and transferring data, 56
using the Upgrade Wizard, 55
database objects, 743
accessing meta data
information schema views, 840
allocation and integrity checking for, 347
changing the name of a user created object, 743
changing the object owner, 746
creating, using Enterprise Manager, 180-193
displaying information about object dependencies, 745
displaying information about objects, 744
extended properties, 857
meta data functions, 827
naming and the Object Browser, 654
Open Objects Option, 90
querying meta data, 746
scripting with the Object Browser, 656
database options
ANSI SQL options, 148-153
auto options, 142-145
configuring with ALTER DATABASE, 138
cursor options, 145-146
properties of the DATABASEPROPERTYEX function, 153
recovery options, 146-148
state options, 139-142
viewing using DATABASEPROPERTYEX, 153
viewing using DBCC USEROPTIONS, 155
951
database recovery plans
database recovery plans see recovery plans.
database roles
displaying, 382
displaying members, 383
fixed database roles tabulated, 367
user-defined database roles, 366, 368
database server sharing with other applications, 85
DATABASEPROPERTYEX function, 133
viewing database options using, 153
databases
adding data or log files to
using Enterprise Manager, 134
using Transact-SQL, 135
creating using Enterprise Manager, 126
creating using Transact_SQL, 129
simple example based on model, 130
using a filegroup, 132
with a different collation, 133
with files on separate partitions, 131
with multiple data and log files, 132
with specific size settings, 131
estimating size and growth, 123-126
investigating with sp_helpdb, 160
removing files from
using Transact-SQL, 136
using Enterprise Manager, 135
renaming, 160
system databases, 126
DATALENGTH function, 831
date functions, 811-814
DATEADD function, 811
DATEDIF function, 812
DATENAME function, 812
DATEPART function, 813
DAY function, 813
GETDATE function, 813
GETUTCDATE function, 814
MONTH function, 814
YEAR function, 814
Date Time String Transformation Properties,
Transform Data Task properties dialog, 581
DATEADD function, 811
DATEDIF function, 812
@@DATEFIRST function, 815
DATEFIRST option, 157
DATENAME function, 812
DATEPART function, 813
DATETIME (Earlier Wins) and DATETIME (Later
Wins) Conflict Resolvers, 453
DATETIME data type
migrating to character formats, 581
value range and physical storage requirements, 120
datetime values
advisability of four-digit years, 98
formats of, and CONVERT function, 810
formats of, and SET LANGUAGE option, 158
SET DATEFIRST option, 157
Two Digit Year Cutoff Option, 98
UTC values, 814
DAY function, 813
DB_ID function, 828
DB_NAME function, 828
db_owner role
distinguished from dbo user, 137
fixed database roles tabulated, 368
952
DB2, OLE DB provider parameters for, 528
DBA role
backup, recovery and maintenance, 285
SQL Server Agent and, 197
DBCC * commands, outputting results in tabular
form, 355
DBCC CHECKALLOC command, 340
repair options, 342
DBCC CHECKCATALOG command, 344
DBCC CHECKCONSTRAINTS command, 344
DBCC CHECKDB command
alternatives, 350
checking space with ESTIMATEONLY, 349
Database Maintenance Plan Wizard, 329
database objects, 347
DBCC CHECKALLOC and, 340
disabling parallelism, 354
repair options, 349
DBCC CHECKFILEGROUP command, 352
disabling parallelism, 354
DBCC CHECKIDENT command, 697
DBCC CHECKTABLE command, 350
disabling parallelism, 354
repair options, 352
DBCC CLEANTABLE command, 361
DBCC DBREINDEX command, 356
Database Maintenance Plan Wizard, 328
DBCC INDEXDEFRAG and, 358, 360
DBCC SHOWCONTIG example using, 922
upgrading to SQL Server 2000, 348
DBCC dllname (FREE) command, 725
DBCC DROPCLEANBUFFERS command, 870
DBCC FREEPROCCACHE command, 723, 870
DBCC INDEXDEFRAG command, 358
script to run on all tables, 360
DBCC INPUTBUFFER command, 265
cursor fetching example, 855, 856
identifying and resolving blocking, 269
SQL Server error log output, 273
DBCC LOGINFO command, 292
DBCC OPENTRAN command
displaying the oldest running transaction, 249
WITH TABLERESULTS extension, 250
DBCC OUTPUTBUFFER command, 265
DBCC PINTABLE command, 708
DBCC SHOW_STATISTICS command, 927
DBCC SHOWCONTIG command
effect of rebuilding a clustered index, 922
fragmentation and, 916, 920
sample output, 921
script relevant to DBCC INDEXDEFRAG, 360
DBCC SHRINKDATABASE command, 164
Database Maintenance Plan Wizard and, 328
results of options, 164
SQL Server 2000 log truncation and, 170
DBCC SHRINKFILE command, 166, 167
SQL Server 2000 log truncation and, 170
DBCC SQLPERF command, 161
DBCC TRACEON and DBCC TRACESTATUS
commands, 272
DBCC UNPINTABLE command, 708
DBCC UPDATEUSAGE command, 162
DBCC USEROPTIONS command, 155, 243
DROP PROCEDURE command
DB-Library clients and application role
encryption, 385
dbo (database owner), changing, 137, 378
@@DBTS function, 815
DDL (Data Definition Language), 681
statement permissions, 393
DEADLOCK_PRIORITY option, 157
enabling trace flags, 274
deadlocks, 267
alerts and, 208
capturing deadlock activity using SQL Profiler, 275
causes, 268
identifying and resolving, 271
tips for avoiding and minimizing, 282
trace file output showing a deadlock, 278
troubleshooting, 281
DEALLOCATE keyword, removing cursor
references, 856
DECIMAL data type, 120
DECLARE command
creating cursors, dual syntax, 852
table variables, 706
DEFAULT and DEFAULT VALUES keywords, INSERT
commands, 785
DEFAULT constraints, adding to an existing
table, 703
default database, changing for a login, 373
Default Full-text Language Option, 76
default instances, SQL Server 2000 installation,
11, 20
Default Language Option, 77
DEFAULT property, CREATE TABLE command, 693
Default Value property, Enterprise Manager, 181
defaults, creating with Enterprise Manager, 193
deferred name resolution, 745
defragmentation utilities, 356
defragmenting heaps, 360
DEGREES function, 820
DELETE commands, 788
deleted virtual table, 737
deletes
based on search criteria from another table, 788
cascading changes, 691
data driven query task optimized for, 589
delimiters and the QUOTENAME function, 806
denormalization, 844
denormalized data and views, 709
DENY keyword
object permissions, 398
statement permissions, 397
dependencies
bug affecting dropped tables, 746
displaying, for database objects, 745
failover clustering server groups, 556, 559
normalization and, 842, 843
derived columns, 753
see also aggregate functions; computed columns.
derived tables, 764
detaching databases
restoring other versions to SQL Server 2000, 42
uninstalling service packs, 29
deterministic functions, 714
deterministic UDFs, 726
diagnostic information, SQLDIAG utility, 659
diagram creation with the Diagram Wizard, 194
DIFFERENCE string function, 802
differential backups, 288, 289
restoring a database from, 316
using Transact-SQL, 303
Diffgrams, 934
Directive values, FOR XML EXPLICIT, 938
dirty read concurrency problem, 254
Disable Publishing and Distribution Wizard, 512
uninstalling service packs, 29
DISABLE_DEF_CNST_CHECK user option, 100
disaster recovery see recovery plans.
disconnected edits, 595
disk queue length, 884
disks
activity, using @@TOTAL_READ and @@TOTAL_WRITE, 817
activity, using STATISTICS IO option, 912
adding to a virtual server group, 559
backups to, 300
should precede tape backups, 304
disk dependencies, 556, 559
disk space allocation consistency checking, 340
requirements and file placement, 6
utilization by Microsoft Clustering Services, 549
DISTINCT keyword
SELECT statement, 751
use with aggregate functions, 752
COUNT function, 797
distributed partitioned views, 711
creating, 716
federated database servers, 9
requirements, 716
distributed queries
see also linked servers.
executing ad hoc queries, 536
executing with linked servers, 534
OPENROWSET and OPENDATASOURCE functions, 521
require ANSI_NULLS and ANSI_WARNINGS, 522
troubleshooting, 543
viewing a query plan, 536
distributed transactions
see also DTC.
REMOTE_PROC_TRANSACTIONS option, 253
distribution, disabling on a server, 512
distribution agent, shared or independent, 487
distributors, elements of replication topology, 420
division by zero, ARITHABORT option, 150
DLL files
extended stored procedures reference, 724
listing, 724
unloading from memory, 725
DML (Data Manipualtion Language), 749
see also DELETE; INSERT; SELECT; UPDATE.
commands that can use locking hints, 257
domain controllers and failover clustering, 555
domain integrity
CHECK constraints and, 692
foreign key constraints, 689
DROP COLUMN and DROP CONSTRAINT clauses,
ALTER TABLE command, 700
DROP FUNCTION command, 731
DROP INDEX command, 735
DROP PROCEDURE command, 722
953
DROP STATISTICS command
DROP STATISTICS command, 926
DROP TABLE command, 704
DROP TRIGGER command, 740
DROP VIEW command, 718
DSN-less connections, 530
DTC (Distributed Transaction Coordinator)
distributed partitioned views require, 716
immediate updating option and, 430, 459
installing virtual servers, 555
Lightweight Pooling Option and, 81
Remote Proc Trans Option and, 96
REMOTE_PROC_TRANSACTIONS option, 253
DTS (Data Transformation Services), 563
compared with BCP and BULK INSERT, 56
core functionality, 563
Create Publication Wizard and, 431
database recovery and, 287
log shipping transfer tasks, 632
registering a custom task, 620
transferring jobs using, 227
transforming data within publications, 464-468
DTS Designer, 564-612
ActiveX Script Task Properties dialog, 571
adding and configuring a connection object, 565
BCP format file creation, 52
configuring the bulk insert task, 596
configuring the copy SQL Server objects task, 594
configuring the data driven query task, 589
configuring the dynamic properties task, 604
configuring the execute package task, 597
configuring the execute process task, 587
configuring the execute SQL task, 588
configuring the message queue task, 598
configuring the send mail task, 595
configuring transfer tasks, 602
configuring workflow, 606
Connection Properties dialog, 565
documenting using DTS Designer, 622
executing multiple tasks in parallel, 611
execution contexts, 609
execution options, 564
external, execute package task and, 597
options for saving, 563
package owner passwords, 613
package user passwords, 613
reassigning owners, 622
scheduling as jobs, 614
setting properties at runtime, 604
transferring between servers, 621
troubleshooting, 622
sqldts.com site, 622
DTS tree view, scheduling packages
automatically, 614
dtsrun utility, 616
examples, 617
generating a dtsrun string with dtsrunui, 619
scheduling DTS packages using, 615
scheduling DTS packages with DTS tree view, 615
security contexts for DTS pacakages, 610
dtsrunui utility, 619
duplicate indexes, 919
duplicate values
duplicate rows and the UNION operator, 780, 781
removing using the DISTINCT keyword, 751
durability transaction property, 243
dynamic filters, 468
adding during the creation of a publication, 469
adding manually, 471
dynamic snapshots and, 473
dynamic properties task, DTS Designer, 604
ensuring it runs first, 605
Package Properties dialog, 604
troubleshooting DTS packages, 622
dynamic snapshots, 473
advanced connection properties, 567
Create New Transformation dialog box, 576
disconnected edits, 595
documenting DTS pacakages, 622
DTS Package Properties dialog, 611, 612
File Transfer Protocol Task Properties dialog, 568
launching in Enterprise Manager, 564
registering and unregistering a custom task, 620
Transform Data Task Properties dialog, 574-587
Destination tab, 574
Lookups tab, 585
Options tab, 586
Transformations options, 577
Transformations tab, 575-584
.dts files
archiving, 622
DTS packages can be saved to, 564
DTS Import/Export Wizard, 43-48
migrating data from Access databases, 60
migrating data from Excel spreadsheets, 64
migrating SQL Server 6.5 databases, 57
options tabulated, 46, 47
uses copy SQL Server objects task, 594
DTS Package Transfer Logins Task, 38-40
DTS packages
adding a new task, 568
configuring for log shipping, 632
configuring package properties, 611
954
E
Edit Destination Databases dialog, 636
Edit SQL field, creating indexes in Enterprise
Manager, 187
editors, osql utility, 648
element-centric mapping, OPENXML, 941
elements, XML, 932
root and child elements, 933
e-mail integration, 216-222
processing incoming e-mails with SQL Mail, 221
send mail task, DTS Designer, 595
use of alternative solutions, 218
using Exchange Server, 216
emergency mode and suspect databases, 325
empty folders, bug with DTS connections to FTP, 570
EMPTYFILE option, DBCC SHRINKFILE
command, 168
encryption
activating application roles with, 385
use of SSL, 364
END keyword, 845
English Query
how to install, 14
service packs and, 26
Error message 1205
Enterprise Manager
Add Column to Replicated Table dialog, 484
alerts, adding, 206
application roles and, 384
Attach Subscription Database dialog, 495
backups with, 293
blocking, 271
database collations, setting, 111
database compatibility, setting, 25
database maintenance plans
Database Maintenance Plan Wizard, starting, 628
plan failures, 336
setting plans, 327
database objects, creating, 180-193
database users
creating, 376
removing, 377
databases, creating, 126
defecting a target server, 225
detaching databases, 29
Distribution Database Properties dialog, 504
DTS Designer, launching, 564
dynamic snapshots, generating 473
filegroups
changing for an existing index, 178
changing for an existing table, 177
placing a table in, 174
placing an index in, 176
files
adding data or log files using, 134
removing data or log files, 135
setting data and log file locations, 34
shrinking data files using, 165
jobs
adding and configuring, 211
transferring with DTS, 227
full-text indexing, 664
populating a catalog, 667
linked server, adding, 522
Linked Server Properties dialog
security settings, 522, 524
server option settings, 525
locking activity, viewing, 262
log shipping properties, configuring, 636
logins
creating, 369
removing, 373
merge replication
configuring, 448-456
viewing conflict histories, 494
modifying tables using, 182
MSX servers, configuring, 223
named backup devices, creating, 296
named instances, registering, 21
passwords, changing or adding, 375
publication properties, configuring, 481
Publication Properties dialog
configuring attachable subscription databases, 495
Publication Properties -Test dialog, 483, 485
publications, creating and managing, 502
Publisher and Distributor Properties dialog, 504, 505
setting agent profiles, 507
pulling a subscription, 460
pushing a subscription, 456
reattaching databases, 31
Replication Monitor, viewing, 439
replication topology roles, configuring, 504
replication wizards, launching, 501
restoring a database, 305
scripting jobs, operators and alerts, 226
server options, configuring
Affinity Mask Option, 71
Allow Updates Option, 72
Default Language Option, 77
Fill Factor Option, 80
Max Degree of Parallelism Option, 84
Max Worker Threads Option, 87
Media Retention Option, 88
Min and Max Server Memory Options, 85
Min Memory Per Query Option, 89
Network Packet Size Option, 90
Proirity Boost Option and, 91
Query Governor Cost Limit Option, 92
Recovery Interval Option, 94
Remote Access Option, 95
Remote Query Timeout Option, 97
Set Working Set Size Option, 98
Two Digit Year Cutoff Option, 99
User Connections Option, 99
User Options Option, 102
Using Nested Triggers Option, 89
show multi-phase pump, configuring, 575
snapshot replication, configuring, 429-438
SQL Mail and SQLAgentMail, setting up, 217
SQL scripting functionality, 48
SQL Server, configuring, 67
SQL Server Agent, configuring, 197
SQL Server Agent operators, adding, 210
SQL Server error log, reading, 234
transactional replication, configuring, 440-448
user-defined database roles, creating, 379, 381
user-defined error messages, creating, 677
user-defined filegroups, adding, 171, 172
entity integrity
primary keys and, 684
UNIQUE constraints and, 686
equality operator, 767
@@ERROR function, 815
rolling back transactions, 247
error handling
ActiveX error tasks and precedence constraints, 607
sp_OA stored procedures, 869
syntax and runtime error effects in batches, 863
transactions, using XACT_ABORT, 249
Transform Data Properties dialog, 586
error logs
SQL Server Agent, 230-231
changing names or locations, 231
introduced, 199
viewing and interpreting, 230
SQL Server error log, 234
output from deadlocks with trace flags enabled, 273
reinitializing using Query Analyzer, 235
setting the number of logs to keep, 235
Error message 115, 543
Error message 137, 864
Error message 201, 720
Error message 208, 236, 319, 746
Error message 229, 204
Error message 245, 809
Error message 446, 127
Error message 1204, 82
Error message 1205, 271
955
Error message 3154
Error message 3154, 640
Error message 3266, 304
Error message 4208, 302
Error message 7133, 839
Error message 7201, 95
Error message 7277, 522
Error message 7303, 544
Error message 7306, 544
Error message 7314, 544
Error message 7321, 544
Error message 7356, 544
Error message 7357, 545
Error message 7391, 545
Error message 7392, 545
Error message 7399, 545
Error message 7403, 546
Error message 7413, 546
Error message 8114, 546
Error message 8134, 815
Error message 8501, 546
Error message 8645, 93, 209
Error message 8649, 159
Error message 8653, 321
Error message 9002, 209
Error message 14157, 210
Error message 15028, 546
Error message 15183, 378
Error message 16917, 253
Error message 17824, 91
Error message 20512, 518
Error message 20515, 518
Error message 20536, 210
Error message 20574, 210
Error message 20578, 210
Error message 21054, 518
Error message 50001, 204
error messages
changing logging status, 236
creating user-defined error messages, 677
@@ERROR function, 815
linked servers, tabulated, 543
logging user-defined error messages, 238
online resources on, 518, 622
recommended for raising alerts, 209
errors and warnings event category, SQL Profiler,
888
ESCAPE operator, 770
ESTIMATEONLY option
DBCC CHECKALLOC command, 342
DBCC CHECKDB command, 349
events
event_id parameter, sp_trace_setevent, 896
SQL Profiler event categories, 887
Excel spreadsheets
Jet 4.0 OLE DB provider and, 529
migrating data to SQL Server 2000, 64
Exchange Server, SQL Mail and SQLAgentMail
requirements, 216
exclusive locks, 255
compatibilities, 256
example, 261
EXEC command, 863
956
execute package task, DTS Designer, 597
execute process task, DTS, 587
execute SQL task, DTS, 588
execution contexts, DTS packages, 609
security contexts and, 609, 610
troubleshooting DTS packages, 622
execution plans
example before use of Index Tuning Wizard, 923
example following use of Index Tuning Wizard, 924
graphical query plan tool
distributed query example, 536
making reusable with sp_executesql, 861
parallel execution plans, 74
Max Degree of Parallelism Option and, 83
precompiled for stored procedures, 718
viewing for distributed queries, 536
viewing with SET SHOWPLAN_ALL option, 904
viewing with SET SHOWPLAN_TEXT ON, 796
EXISTS keyword, 780
EXP function, 820
expiry quotas, push subscriptions, 481
explicit global variables, 612
EXPLICIT mode, FOR XML clause, 937
explicit transactions, 245
expressions, using subqueries in place of, 779
extended properties
adding to a table column, 859
defining with the Object Browser, 656
managing with the Object Browser, 860
user defined meta data, 857
extended stored procedures
see also xp_.
adding, 724
calls viewed as non-deterministic, 726
COM automation with sp_oa*, 865
listing, 725
listing DLL references, 724
naming, 106
removing, 725
unloading DLL references, 725
extents
extent switches and external fragmentation, 920, 921
page allocation units, 122
external fragmentation, 356, 920
F
failover clustering, 549
active/passive and active/active setups, 551
adding disk resources, 559
alternative to replication, 419
Cluster Administrator, 553
cluster meta data, 553
full-text indexing and, 672
installing a virtual server, 555
installing service packs for virtual servers, 557
limitations, 553
log shipping compared to, 626
monitoring configurations post-installation, 559
pre-installation checklist, 554
SQL Mail and SQLAgentMail not fully supported, 560
SQLDIAG utility and, 661
troubleshooting, 560
foreign keys
failover clusters
memory availability and, 73
service pack installation and, 29
SQL Mail not fully supported, 216
support by SQL Server 2000 editions, 8
fastload option, Transform Data Properties
dialog, 586
fault tolerance, data and log file placement, 2
federated database server support by SQL Server
2000 editions, 9
fetch operations, cursors, 853
FETCH command, 855
@@fetch_status function, 855
fiber mode, SQL Mail not supported in, 220
fiber mode scheduling and the Lightweight
Pooling Option, 81
file extensions, 122
file placement
common installation problems, 2
disk and disk array requirements, 6
post-installation checks, 34
Tier 1 and Tier 2 strategies, 6
file shares see folder shares.
file sizes
AUTO_SHRINK database option, 144
setting maximum, 128
file system fragmentation, 356
File Transfer Protocol task, DTS Designer, 568
FILE_ID function, 828
FILEGROUP_ID and FILEGROUP_NAME
functions, 829
filegroups, 122, 170
allocation and structural checking for, 352
backing up using VLDBs, 170
backups using Transact-SQL, 303
changing, for an existing index, 178
changing, for an existing table, 177
creating a database using, 132
making read-only, 174
partial restores to new databases, 320
placing a table in a filegroup, 174, 175, 688
placing an index in a different filegroup, 735
placing an index in a filegroup, 176
placing text or images in a separate filegroup, 688
primary filegroups, 170
removing, 179
restoring using Enterprise Manager, 306
restoring using Transact-SQL, 320
user-defined filegroups, 171, 172
checking for errors, 353
making the default filegroup, 172
FILEPROPERTY function, 829
files
backups using Transact-SQL, 303
read file transformation, DTS, 583
recovering from file loss, 321
restoring using Enterprise Manager, 306
restoring using transaction logs, 324
restoring using Transact-SQL, 320
shrinking, with DBCC SHRINKDATABASE, 164
write file transformation, DTS, 584
fill factor field, creating indexes in Enterprise
Manager, 187
Fill Factor Option, 78
changing free space in Database Maintenance Plans, 80
performance considerations, 79
fill factors
creating indexes in DDL, 735
Database Maintenance Plan Wizard, 328
page splitting and, 886
read-only tables, 917
rebuilding indexes, 916
filters
configuring replication properties, 485
defining in the Create Publication Wizard, 435
dynamic filters and merge publication, 468
merge replication
extending by joining to a related table, 485
sp_trace_setfilter stored procedure, 901
firewalls
client connectivity problems and, 23
installing virtual servers, 556
MS DTC and firewalls, 545
Server Network Utility and, 661
firing order, triggers, 741
first normal form, 842
fixed database roles, 367
displaying for a database, 382
displaying members, 383
displaying permissions, 392
full listing, 391
fixed server roles, 366
displaying permissions for, 389
listing, 388
listing members, 390
fixed-length columns, 684
FLOAT data type, 120
FLOOR function, 821
flow control see control-of-flow commands.
FMTONLY option, 157
::fn_helpcollations() function, 108
fn_listextendedproperty function, 859, 860
fn_trace_getinfo function, 902
fn_trace_gettable function, 903
folder shares
log shipping and, 627, 641
post-installation checks, 33
replication snapshot files, 428, 429
FOR clause
FOR BROWSE not allowed in cursors, 853, 854
FOR XML, 935
BINARY BASE 64 keyword, 937
example using FOR XML EXPLICIT, 938
introduced, 934
modes, 935
XMLDATA keyword, 937
XSD alternative, 934
SELECT statements, 783
FORCEPLAN option, 157
foreign key constraints
CREATE TABLE command and, 689
DBCC CHECKCONSTRAINTS command and, 345
recursive constraints, 690
foreign keys
adding to an existing table, 702
creating a reference, using Enterprise Manager, 189
creating, using Enterprise Manager, 189
957
format files
format files, BCP, 51
Formula property, Enterprise Manager, 182
four-part names
defining distributed partitioned views, 716
error 7321 and, 544
referencing linked servers, 534
FoxPro, OLE DB provider parameters, 531
fragmentation and DBCC SHOWCONTIG, 916, 920
free pages and alerts, 209
free threading support and DTS ActiveX tasks, 572
FREETEXT predicate, WHERE clause, 675
FREETEXTTABLE function, 676
FROM clauses
SELECT statements
aliasing tables, 763
creating an empty table, 757
derived tables and, 764
use of OPENXML, 941
use with UPDATE statements, 787
FTP (File Transfer Protocol) task in DTS Designer, 568
full backups, 287
performing with Transact-SQL, 298
FULL OUTER JOINs, 761
full recovery model, 290
setting databases to, using a script, 861
full scans and alerts, 208
full-text indexing, 663
adding columns, 671
configuring using stored procedures, 668
creating in Enterprise Manager, 664
Default Full-text Language Option, 76
enabling a base table, 670
migrating, 672
performance impacts, 668
querying, 672
inflectional forms, 673
proximity searches, 673
scheduling updates, 666
Full-Text Indexing Wizard, 664-667
Select a Catalog dialog, 665
Select an Index dialog, 665
Select or Create Population Schedules dialog, 666
Select Table Columns dialog, 665
full-text search support, SQL Server 2000 editions, 9
functionality checklist, linked servers, 521
@@functions, 814-818
@@BUSY function, 816
@@CPU_BUSY function, 815
@@DATEFIRST function, 815
@@DBTS function, 815
@@ERROR function, 815
functions usable with cursors, 855
@@IDENTITY function, 815
@@IDLE function, 816
@@LANGID function, 816
@@LANGUAGE function, 816
@@LOCK_TIMEOUT function, 816
@@MAX_CONNECTION function, 816
@@MAX_PRECISION function, 816
@@NESTLEVEL function, 816
@@OPTIONS function, 816
@@PACK_RECEIVED function, 816
@@PACK_SENT function, 816
@@PACKET_ERRORS function, 817
@@PROCID function, 817
958
@@REMSERVER function, 817
@@ROWCOUNT function, 817
@@SERVERNAME function, 817
@@SERVICENAME function, 817
@@SPID function, 817
@@TEXTSIZE function, 817
@@TIMETICKS function, 817
@@TOTAL_ERRORS function, 817
@@TOTAL_READ function, 817
@@TOTAL_WRITE function, 817
@@TRANSCOUNT function, 818
@@VERSION function, 818
fuzzy searches, full-text indexes, 675
G
GAM (Global Allocation Map) pages, 122
GETANSINULL function, 831
GETDATE function, 813
CURRENT_TIMESTAMP function and, 831
updating example, 787
GETUTCDATE function, 814
global temporary tables, 705
global variables
see also @@functions at functions.
DTS Package Properties dialog, 612
Execute Package Task, DTS, 598
execute SQL task, DTS, 588
Execute SQL Task, DTS, 589
GO keyword
alternative batch separators, 227
ending batches with, 863
job scheduling problems, 226
table variables and, 706
GOTO keyword, 248
GRANT EXEC permissions, xp_sqlmaint, 339
GRANT keyword
object permissions, 395
statement permissions, 394
granularity hints, 258
graphical display, counter logs, 882
graphical showplan, 906
managing indexes and statistics, 912
operators and icons tabulated, 907
tool tips tabulated, 907
graphical tools
see also Books Online; Client Network Utility; DTS
Designer; Enterprise Manager; Query Analyzer; Server
Manager ; Server Network Utility; SQL Profiler.
support by SQL Server 2000 editions, 9
grid format, displaying results in, 70, 749
GROUP BY clause, 772-776
indexed views and, 714
query hints and, 791
using the HAVING clause, 775
using with ALL operator, 772
using WITH CUBE, 773
using with IN operator, 772
using WITH ROLLUP, 774
Group Policy snap-in enabling page locking in
memory, 73
GROUPING function, 798
indexed views
H
hardware bottlenecks see bottlenecks.
hardware requirements
post-installation checks, 35
recommended configuration, 5
recovery plans and replacement hardware, 286
tabulated for SQL Server 2000 installation, 3
HAS_DBACCESS function, 825
hash indexes on CHECKSUM columns, 795
hashing operations
Min Memory Per Query Option, 88
Query Wait Option, 93
HAVING clauses
using correlated subqueries in, 779
using with the GROUP BY clause, 775
HCL (Hardware Compatibility List) and failover
clustering, 554
heaps
defragmenting, 360, 922
distinguished from indexed tables, 731
heartbeat connections, 550
hierarchical data formatting, XML, 931
hints, 789
join hints, 790
query hints, 791
distributed queries and, 522
table hints, 789
horizontal filtering, 436
dynamic filters, 468
partitioned views, 711
HOST_ID function, 832
HOST_NAME function, 832
dynamic filters and, 468
dynamic snapshots and, 473
How to... see topic illustrated.
HTML tags, compared with XML, 931
Hungarian notation, 682
hybrid replication model, 421
I
I/O bottlenecks, 884, 885
Icelandic collation example, 111
icons
connection types, DTS, 568
graphical showplan operators, tabulated, 907
IDENT_CURRENT and IDENT_INCR functions, 832
IDENT_SEED function, 833
identifiers, delimiting, QUOTED_IDENTIFIER
option and, 152
identity columns
inserting an explicit value, 696
queued updating option, 426
setting identity ranges, 445
SET IDENTITY_INSERT option, 158
setting identity range
merge replication, 454
without updateable subscription, 446
@@IDENTITY function, 815
IDENT_CURRENT function and, 832
SCOPE_IDENTITY function and, 835
IDENTITY property
CREATE TABLE command, 694
designing a new table in Enterprise Manager, 181
replication considerations, 427
reseeding, using DBCC CHECKIDENT, 697
IDENTITY_INSERT option, 158, 696
@@IDLE function, 816
IE (Internet Explorer)
IE5 includes Windows Synchronization Manager, 476
version required for Analysis Services, 13
version required for SQL Server 2000, 4
XML document rendered in, 940
IF ... ELSE keywords, 846
IF UPDATE() function, 738
IIS (Internet Information Services) 5.0 XML
integration with SQL Server 2000, 934
IMAGE data type, 121
IMAGE, TEXT and NTEXT functions, 836-840
READTEXT function, 837
TEXTPTR function, 836
TEXTVALID function, 837
UPDATETEXT function, 839
WRITETEXT function, 838
immediate updating option, 425
configuring publication properties, 488
error messages, 518
requires DTC, 430
with queues updating as a failover, 425
implicit transactions, 243
IMPLICIT_TRANSACTIONS option, 100, 158, 243
IN operator, 772
using with GROUP BY, 772
using with subqueries, 778
increment, IDENTITY property, 694
Index Create Memory Option, 81
index creation and the Fill Factor Option, 78
index scans, 886
index seeks
operators hindering, 917, 919
performance compared with scans, 905
Index Tuning Wizard, 922
indexed computed columns
ANSI_NULLS database option and, 149
ANSI_PADDING database option and, 149
ANSI_WARNINGS database option and, 150
ARITHABORT database option, 150, 348
CONCAT_NULL_YIELDS_NULL database option, 151
DBCC CHECKDB command and, 348
DBCC CHECKTABLE command and, 348
NUMERIC_ROUNDABORT database option, 151
QUOTED_IDENTIFIER database option and, 152, 348
user options required for, 102
indexed views, 710
ANSI_NULLS database option and, 149
ANSI_PADDING database option and, 149
ANSI_WARNINGS database option and, 150
ARITHABORT database option, 150
bug affecting DBCC DBREINDEX, 357
checking using DBCC CHECKTABLE, 350
CONCAT_NULL_YIELDS_NULL database option, 151
creating, 713
functions and keywords prohibited in the view
definitions, 714
NUMERIC_ROUNDABORT database option, 151
959
indexed views (Cont'd)
indexed views (Cont'd)
QUOTED_IDENTIFIER database option and, 152
support by SQL Server 2000 editions, 9
user options required for, 102
indexes, 731-736, 916
see also full-text indexing.
changing column definitions and, 701
clustered indexes, 917
covering indexes, 917
creating, using DDL, 733
creating, using Enterprise Manager, 186
deciding whether to index a table, 733
defaulting to CLUSTERED, 685
displaying, 736
dropping, 735
fragmentation, 916
rebuilding and, 921
full-text and table indexes distinguished, 663
hash indexes, 795
horizontal filtering and, 437, 468
importance of key column order, 918
index fragmentation, 356
defragmenting clustered indexes, 360
defragmenting with DBCC INDEXDEFRAG, 358
indexing best practices, 916
things to avoid, 919
modifying with graphical showplan, 912
need for continual monitoring, 916
performance effects, 917
placing in a filegroup, 176
rebuilding, 356
secondary to good query design, 886
inequality operator, 768
infinite loops and the Query Governor Cost Limit
Option, 92
inflectional forms and the CONTAINS function, 673
information schema views, 840
COLUMNS view example, 841
information_schema.tables view, 358
.ini files, changing DTS package properties, 605
inline UDFs, 726, 727, 728
INNER JOINs, 758
alternative to correlated subqueries, 779, 780
CROSS JOINs compared to, 762
INNER MERGE JOIN, 790
multiple inner joins, 759
inner package global variables, 598
INSERT commands, 784-786
DEFAULT and DEFAULT VALUES keywords, 785
insert operations
against a view, 710
example stored procedure, 720
inserting data from a SELECT statement, 785
inserting data from a stored procedure call, 786
inserted virtual table, 737
installation
client connectivity only, 18
client utilities only, 17
common problems, 2
how to install SQL Server 2000, 11
named instances, 21
post-installation best practices, 33
pre-installation best practices, 5
pre-installation checklist, 10
960
troubleshooting failed installations, 19
uninstalling SQL Server, 18
installation CD, uninstalling SQL Server, 18
instances
collation detemined during installation, 109
hidden instances, 662
overview and best practices, 20
INSTEAD OF triggers, 736
creating, 739
updates against views, 711
INT data type, 120
integrity checking
alternatives to DBCC CHECKDB, 350
database objects, 347
tables in a filegroup, 352
intent exclusive locks, 255
compatibilities, 256
intent locks, 254
intent shared locks, 254
compatibilities, 256
interactive conflict resolution, 491
dialog box for, 493
interleaving, 721
internal fragmentation, 356, 920, 921
INTO clause
not allowed in cursors, 853, 854
SELECT statements, 755
creating an empty table, 756
logging, 291
resetting suspect databases, 325
Inventory_IT database, 171
Inventory_UK database, 135
IP addresses
changing for virtual servers, 559
friendly names for, 662
two-node clusters, 550
verifying port numbers, 661
IS NULL operator, 771
Is RowGuid property, Enterprise Manager, 182
IS_MEMBER function, 825
IS_SVROLEMEMBER function, 825
ISDATE function, 833
ISNULL function, 834
ISNUMERIC function, 833
isolation transaction property, 243
isolation levels see transaction isolation levels.
isolation-level hints, 258
ISQL and named instances, 21
isql utility and osql, 645
J
Japanese characters, 12
JDBC
connecting to a named instances, 21
driver settings as cause of deadlocks, 282
Server Network Utility and, 661
Jet 4.0 OLE DB provider parameters, 529
job categories, 211
creating, 215
job schedules, 214
LIKE operator
jobs
adding using Enterprise Manager, 211
created by the Database Maintenance Plan Wizard, 334
creating a multi-server job, 223
deleting or reassigning for a login, 228
designating a category for, 211
failure, database maintenance plans, 336
job system stored procedures, 232
Job System tab, SQL Server Agent dialog, 200
purging job histories, 228
scheduling DTS packages, 614
scripting, 226
SQL Server Agent primary function, 197
stopping and starting with stored procedures, 229
transfer jobs task, 603
transferring using DTS, 227
viewing a multi-server job history, 225
JOIN clause
alternative to correlated subqueries, 779, 780
SELECT statement, 757
WHERE clause alternative to, 763
join hints tabulated, 790
joins, 757-764
CONTAINSTABLE function and, 674
CROSS JOINs, 762
defining views in Enterprise Manager, 185
FULL OUTER JOINs, 761
INNER JOINs, 758
as default join types, 759
LEFT and RIGHT OUTER JOINs, 760
restrictions on indexed views, 714
SELF JOINs, 763
Excel spreadsheets, migrating data from, 65
full-text indexing, migrating, 672
immediate updating option errors, 518
index corruption on upgrading, 348
Lightweight Pooling Option, 81
linked servers and error 15028, 546
logins and passwords, moving, 37, 40
log shipping and error 3154, 640
log shipping and folder shares, 641
Log Shipping Monitor, 634, 641
Oracle 8.x distributed queries, 545
orphaned logins, 41
Rebuild Master utility, bug affecting, 114, 322
security patches, 32
sp_OA memory leaks, 865
sp_processmail bug, 221
SQL Mail, 217
failover clusters and, 216
fibre mode and, 220
SQLDIAG utility and virtual servers, 661
System Monitor missing objects, 876
tape backups, 304
upgrading to SQL Server 2000, 25, 55
virtual servers
changing domains for, 559
changing IP addresses for, 559
changing names for, 560
manual uninstalls, 560
troubleshooting failed, 560
Windows NT performance optimization, 886
Windows XP System Monitor problems, 878
XML OLE DB Simple Provider, 934
xp_sendmail bugs, 220
K
L
kana-sensitive sorting, 12, 107
key column order, 918
key width, clustered indexes, 917
keyboard shortcuts, Query Analyzer, 657
pre-defined shortcuts tabulated, 658
KILL command
identifying and resolving blocking, 270
restricted to certain fixed server roles, 369
Knowledge Base articles
see also microsoft.com.
alternative e-mail solutions, 218
bugs affecting
@@LANGID and @@LANGUAGE functions, 816
LANGUAGE option, 158
language settings
changing the default language for a login, 374
code pages, 107
DATENAME function, 812
Default Full-text Language Option, 76
Default Language Option, 77
Full-Text Indexing Wizard, 665
Icelandic collation example, 111
Japanese characters, 12
@@LANGID and @@LANGUAGE functions, 816
SET LANGUAGE option, 158
latches, 885
lazy schema validation option, 711
LCID (Locale ID), 113
Leaders table, 750
IE rendering, 940
XML document version, 932
leaf level pages and Fill Factor Option, 78
LEFT function, 803
LEFT OUTER JOINs, 760
legacy databases and linked servers, 521
LEN function, 804
licensing options, 1, 10
selecting at installation, 13
Lightweight Pooling Option, 81
LIKE operator, 770
DBCC DBREINDEX, 357
DTS connections to FTP, 570
DTS Designer mail profiles, 596
linked server operations, 546
sp_depends and deferred name resolution, 746
sp_OA stored procedures, 865
UDFs used with CASE statements, 727
COLUMNS_UPDATED() function, 739
Component Checker and MDAC setup, 23
configuring memory above 2GB, 73
connecting to a named instances, 21
Copy Database Wizard and, 49
DBCC INDEXDEFRAG errors with VARCHAR, 359
DTC and firewalls, 545
DTS Execute Package Task, 598
DTS package run as a scheduled job, 572
Error 7321 and Error 7356, 544
961
linked servers
linked servers, 521
access to UDFs, 727
adding login mappings, 532
adding using Enterprise Manager, 522
adding using Transact-SQL, 527
choosing logins, 524
common error messages tabulated, 543
displaying column data, 540
displaying column permissions, 541
displaying table permissions, 539
distributed partitioned views and, 711
executing distributed queries, 534
functionality and performance considerations, 521
listing defined linked servers, 542
listing tables from, 538
provider configuration options, 523
providers for heterogeneous connections, 528
setting server options, 532
transfering DTS packages between servers, 621
troubleshooting, 543
literals, delimiting, and QUOTED_IDENTIFIER
option, 152
load simulation tools, 85, 87
LoadRunner, Mercury Interactive, 85, 87
local temporary tables, 705
Lock:Escalation event, SQL Profiler, 282
@@LOCK_TIMEOUT function, 816
LOCK_TIMEOUT option, 158, 266
locking, 254
allocation and escalation, 256
blocking and deadlocking defined, 267
escalation as a cause of deadlocks, 268, 282
Extended Transact-SQL cursors, 854
FOR BROWSE option and, 783
latches, 885
lock types tabulated, 254
compatibilities tabulated, 256
locking modes, DTS packages, 612
memory requirements and, 6
resources to which locks can be applied, 255
SET LOCK_TIMEOUT option, 158
setting timeouts, 266
snapshot generation and table locking, 488
table lock on bulk load option, 707
viewing locking activity in Enterprise Manager, 262
locking behavior, SET TRANSACTION ISOLATION
LEVEL option, 159
locking hints, 257
example using NOLOCK, 790
possible cause of blocking, 268
UPDLOCK locking hint, 283
use of HOLDLOCK with the WRITETEXT function, 838
locks event category, SQL Profiler, 889
Locks Option, 82
log files
see also counter logs; error logs; file placement; log
shipping.
active portions and file truncation, 169, 291
changing logging status of Error messages, 236
counter logs and, 878
logging DTS package steps, 612
setting characteristics in Enterprise Manager, 128
size and log space used, 161
size estimates, 125
962
specifying backups for log shipping, 629, 630
transaction log architecture, 291
transaction log backups
BACKUP LOG command, 302
RECOVERY database options and, 146
transaction logs as cumulative, 287
troubleshooting failed installations, 19
Virtual Log Files, 169
LOG function, 821
log shipping, 625
alternative to replication, 419
configuring log shipping properties, 636
creating a primary role change for secondary servers,
637
Database Maintenance Plan Wizard, 628
database maintenance plans and, 327
login transfer, 632
monitoring the status of, 634
pre-configuration checklist, 627
process explained, 625
recovery plans and, 285, 286
role reversal, 630
support by SQL Server 2000 editions, 8
troubleshooting, 640
Log Shipping Monitor, 634
feature, SQL Server 2000 editions, 627
Log Shipping Pair Properties dialog, 634
update failures, 641
log_shipping_monitor_probe login, 632
troubleshooting and, 641
log_shipping_primaries and
log_shipping_secondaries tables, 634
troubleshooting and, 641
LOG10 function, 821
logging, WRITETEXT function, 838
Logical Disk object counters, 36
logical names
changing, 137
creating a named backup device, 296
shrinking data or log files, 167
logical transaction logs
active portions and file truncation, 169, 291
Login Properties dialog, adding role
membership, 381
logins
auditing at the operating system level, 411
changing the default database, 373
changing the default language, 374
creating using Enterprise Manager and Transact-SQL, 369
deleting or reassigning jobs for, 228
language settings for, 77
log_shipping_monitor_probe login, 632
login transfer, log shipping, 632
mapping to linked servers, 532
dropping mappings, 534
moving logins and passwords, 37
DTS Package Transfer Logins Task, 38-40
scripting out logins and passwords, 40
Transact-SQL script, 37
orphaned logins, 41
security accounts, 364
selecting for linked servers, 524
transfer logins task, 603
users and, 365
long-duration queries, 892
meta data functions
lookup queries, 585
looping structures
DBCC DBREINDEX and, 358
WHILE keyword and, 847
lost updates concurrency problem, 254
LOWER function, 804
lowercase string transformation, Transform Data
Task properties dialog, 580
LTRIM function, 805
concatenation example using, 863
M
mail profiles, DTS Designer send mail task, 595
maintenance
investigating plan failures, 336
setting up a database maintenance plan, 326
makepipe utility, 23
Managed Classes, SQLXML, 935
manual uninstall, 19
MAPI (Mail Application Programming Interface)
DTS Designer send mail task requires, 595
Lightweight Pooling Option and, 81
master database
rebuilding, 114
restoring from a backup, 30, 31
syslanguages table, 77
system databases tabulated, 126
master servers see MSX servers.
mathematical functions, 818-825
ABS function, 818
ACOS function, 818
ASIN function, 819
ATAN function, 819
ATN2 function, 819
CEILING function, 819
COS function, 820
COT function, 820
DEGREES function, 820
EXP function, 820
FLOOR function, 821
LOG function, 821
LOG10 function, 821
PI function, 822
POWER function, 822
RADIANS function, 822
RAND function, 822
ROUND function, 823
SIGN function, 823
SIN function, 824
SQRT function, 824
SQUARE function, 824
TAN function, 825
Max Degree of Parallelism Option, 83
MAX function, 798
Max Text Repl Size Option, 86
Max Worker Threads Option, 86
@@MAX_CONNECTION and @@MAX_PRECISION
functions, 816
Maximum characters per column option, 750
Maximum Conflict Resolver, 453
MDAC (Microsoft Data Access Components), 22
Client Connectivity and, 23
installing Analysis Services, 14
named instances and, 21, 662
OLE DB providers insalled with, 521
service packs and, 26
troubleshooting MDAC installation, 22
Media Retention Option, 88
memory
estimating requirements pre-installation, 6
Index Create Memory Option, 81
Min and Max Server Memory Options, 84
Min Memory Per Query Option, 88
requirement, OPENXML, 943
utilization, SQL Server Enterprise Edition, 34
AWE Enabled Option, 72
memory bottlenecks, 884
memory management
counter logs, 885
in-process and out-of-process loading, 865
placing tables into the buffer cache, 708
Query Wait Option, 93
reporting with xp_msver, 105
Set Working Set Size Option, 97
sharing servers with other applications, 85
unloading DLL references, 725
Mercury Interactive LoadRunner tool, 85, 87
merge replication, 423
advantages and disadvantages, 425
configuring in Enterprise Manager, 448-456
dynamic filters and merge publication, 468
interactive conflict resolvers, 491
limiting the number of concurrent processes, 486
merge conflict resolution, 449
setting identity range, 454
synchronization partners other than the publisher, 490
validating replicated data, 497
viewing conflict histories, 494
Merge Text Conflict Resolver, 453
message queue task, DTS Designer, 598
message properties, 599
properties for receiving a message, 600
meta data
accessing, for database objects
information schema views, 840
adding, using extended properties, 857
cluster meta data, 553
defining extended properties with the Object
Browser, 656
DTS packages, 612
extents and, 122
querying, for database objects, 746
refreshing for views, 718
SET FMTONLY option and, 157
SQL Server Meta Data Services, 618
meta data functions, 827-830
COL_LENGTH function, 827
DB_ID function, 828
DB_NAME function, 828
FILE_ID function, 828
FILEGROUP_ID function, 829
FILEGROUP_NAME function, 829
FILEPROPERTY function, 829
OBJECT_ID function, 830
OBJECT_NAME function, 830
963
Microsoft BackOffice 4.5 database sizer
Microsoft BackOffice 4.5 database sizer, 123
Microsoft Corporation
see also Access databases; Excel spreadsheets; Exchange
Server; HCL; IE; MDAC; Outlook; SQL Server;
Windows.
Microsoft Product Support and SQLDIAG, 659
Microsoft Search service and full-text indexing, 663
microsoft.com site
see also Knowledge Base articles.
error messages, 230, 234, 518
glossary of services, 37
Group Policy snap-in, 73
licensing options, 1
manual uninstall, 19
paging file sizing, 36
performance monitoring, 71
service packs and security patches, 27
SQL Server Edition for Analysis Services, 10
troubleshooting failed installations, 19
upgrading to SQL Server 2000, 25
XML Web Services, 935
middle of string transformation, Transform Data
Task Properties dialog, 582
Min and Max Server Memory Options, 84
MIN function, 799
Min Memory Per Query Option, 88
Minimum Conflict Resolver, 453
mixed-mode authentication compared with
Windows, 364
model database
creating a simple example based on, 130
restoring from a backup, 31
system databases tabulated, 126
modifying data on remote data sources, 535
MONEY data type, 120
monitoring servers, log shipping, 627
specifying, 632
MONTH function, 814
MS DTC see DTC.
MSCS (Microsoft Clustering Services), 549
msdb database
executing a DTS package from, 617
restoring from a backup, 31
system databases tabulated, 126
MSDE (Microsoft Desktop Engine) and service pack
installation, 29
MSDN (Microsoft Developer Network) see
microsoft.com.
MSMQ (Microsoft Message Queue), 598
MSX servers
configuring in Enterprise Manager, 223
designating, 201
MSXML, 934
MULTI_USER database option, 140
multi-instance failover clustering, 551
multiple instance functionality, 20
multi-server administration, 222-226
configuring master servers, 223
creating a multi-server job, 223
defecting a target server, 225
designating an MSX server, 201
setting up target servers, 223
viewing a multi-server job history, 225
multistatement UDFs, 726, 727, 729
964
N
N prefix, Unicode constants, 108
name conflicts, transactional replication, 442, 443
named backup devices, 296
named instances
client-side aliases and, 662
connectivity issues, 21
isql and, 645
MDAC requirements, 22
performance considerations, 20
querying linked servers that are named instances, 535
registering, 21
restarting, 322
Server Network Utility and, 661
SQL Server 2000 installation, 11, 20
Named Pipes protocol, 13
named pipes transfer option, Upgrade Wizard, 55
named transactions, 246
naming columns using AS clauses, 753
naming conventions
failover clustering and, 554
Hungarian notation, 682
stored procedures, 721
NAS (Network Attached Storage), 8
NCHAR data type, 121
NCHAR function, 805
NEAR keyword, 673
nesting
nested queries, 544
subqueries, 778
nested stored procedures, NESTLEVEL function, 816
nested transactions, 246, 545
nesting triggers, 89, 737
RECURSIVE_TRIGGERS database option, 153
TRIGGER_NESTLEVEL() function, 740
nesting views, 712
@@NESTLEVEL function, 816
NetBIOS, disabling for heatbeat connections, 554
Net-Libraries see network libraries.
network bottlenecks, 884
network cards
auto detect and failover clustering, 554
estimating requirements, pre-installation, 8
post-installation checks, 37
network libraries
installation with SQL Server, 13
Net-Libraries and Client Connectivity, 23
Network Packet Size Option, 89
network traffic reduction with NOCOUNT, 156
NEWID() function and the ROWGUIDCOL
property, 698
NLB (Network Load Balancing), failover clustering
distinguished from, 553
NOCOUNT option, 101, 156
stored procedures, 721
NOEXEC option, 158
NOLOCK locking hint, 260, 282
non-clustered indexes
CREATE INDEX statement, 735
DBCC CHECKDB error after upgrading to SQL Server
2000, 348
DBCC CHECKFILEGROUP command and, 353
selecting columns for, 733
operators
nonrepeatable reads concurrency problem, 254
norecovery mode, log shipping secondary
databases, 625, 630, 641
normalization, 841-844
first normal form, 842
second normal form, 842
third normal form, 843
NOT FOR REPLICATION option, 455
CHECK constraints and, 693
IDENTITY property and, 695
NOT operators and table scans, 918
NOTRUNCATE option
DBCC SHRINKDATABASE command, 164
DBCC SHRINKFILE command, 168
NOTRUNCATE option, DBCC SHRINKFILE
command, 169
NT see Windows NT.
NTEXT data type, 121
NTEXT functions see IMAGE, TEXT and NTEXT
functions.
NULL values
aggregate functions and, 797
ANSI_NULL_DEFAULT database option, 148
ANSI_NULLS database option, 149
CONCAT_NULL_YIELDS_NULL database option, 151
concatenation with, 862
defining nullability when creating tables, 681
GETANSINULL function, 831
ISNULL function, 834
joins not permitted with, 759
NULLIF function, 834
specifying in queries, 771
valid pointers and the WRITETEXT function, 838
NULLIF function, 834
NUMERIC data type, 120
NUMERIC_ROUNDABORT option, 101, 102, 151
NVARCHAR data type, 121
O
Object Browser, Query Analyzer, 654
defining extended properties, 656
managing extended properties, 860
restoring the master database from a backup, 31
scripting database objects, 656
templates and, 656
object permissions
DENY keyword, 398
GRANT keyword, 395
introduced, 369
listed, 392
REVOKE keyword, 400
tips on managing, 393
OBJECT_ID function, 747, 830
OBJECT_NAME function, 830
OBJECTPROPERTY function, 746
objects event category, SQL Profiler, 889
objects see database objects.
objid (object ID) returned by sp_lock, 260, 269
ODBC drivers, pre-installation checklist, 10
odbcping utility, 23, 24
OFFLINE | ONLINE database option, 139
OLAP (OnLine Analytical Processing)
Analysis Services and, 13
English Query and, 14
OLE automation, 865
OLE DB connections and Remote Login Timeout, 95
OLE DB providers
included with SQL Server, 522
linked servers and, 521
listing, 527
parameters, 528
provider for ODBC, linked server connections, 530
providers for SQL Server 7.0 and 2000, 530
troubleshooting DTS packages, 622
XML OLE DB Simple Provider, 934
OLTP (OnLine Transaction Processing), 5
on completion/failure/success arrow, DTS
workflow, 606
ON DELETE CASCADE and ON UPDATE CASCADE,
CREATE TABLE command, 691
ONLINE database option, 139
OPEN keyword, opening cursors, 854
Open Objects Option, 90
OPENDATASOURCE command
alternative to linked servers, 521
examples, 538
executing ad hoc distributed queries, 537
using Windows authentication, 538
OPENQUERY command
Actve Directory Service and, 531
querying linked servers, 536
access to UDFs, 727
referencing linked servers, 534
OPENROWSET command
alternative to linked servers, 521
executing ad hoc distributed queries, 536
server-side query example, 537
using Windows authentication, 537
OPENXML command, 940
introduced, 933
SQLXML Bulk Load Utility and, 934
Operating System Command, SQL Server Agent job
type, 212
operating systems
see also Windows.
auditing logins at the operating system level, 411
commands, osql utility, 649
executing commands using xp_cmdshell, 202
operating system security, 364
post-installation checks, 35
requirements tabulated for SQL Server 2000 installation, 4
support for SQL Server editions tabulated, 4
operators
see also comparison operators.
AND and OR, used with CONTAINS, 674
graphical showplan, 907
hindering index seeks, 917, 919
NOT operators and table scans, 918
use of the != operator, 768
use of the < and <= operators, 768
use of the = operator, 767
use of the ALL, ANY and SOME operators, 769
use of the BETWEEN operator, 769
use of the ESCAPE operator, 770
use of the IN operator, 772
965
operators (Cont'd)
operators (Cont'd)
use of the IS NULL operator, 771
use of the LIKE operator, 770
use of the UNION ALL operator, 781
use of the UNION operator, 780
WHERE clauses and, 765-772
use of parentheses, 765
valid operators tabulated, 766
operators, SQL Server Agent
adding using Enterprise Manager, 210
operator system stored procedures, 231
scripting, 226
SQL Server Agent primary function, 197
OPTION clause and query hints, 791
@@OPTIONS function, 816
Options tab, Restore Databases dialog, 308
Oracle
Error 7356 and, 544
Error 7399 and distributed queries against Oracle 8.x, 545
OLE DB provider parameters for, 531
ORDER BY clauses, 776
use with COLLATE statement, 113
use with combined result sets, 781
use with COMPUTE, 782
use with joins, 760
use with the TOP keyword, 754
order of updates and deadlocks, 281
orphaned logins, 41
osql utility, 645
syntax, 646
tips for using, 648
working in an interactive session, 650
osql.exe utility and named instances, 21
outer package global variables, 598
Outlook
SQL Mail bug, 218
use with SQL Mail and SQLAgentMail, 217
OUTPUT parameters, stored procedure, 720
P
@@PACK_RECEIVED and @@PACK_SENT
functions, 816
packages see DTS packages.
@@PACKET_ERRORS function, 817
packets
Network Packet Size Option, 89
User Connections Option and packet size, 99
page headers, 122
page splits
alerts and, 209
cause of index fragmentation, 356
counter logs and, 886
Fill Factor Option and, 78
Pagefile.sys file, 36
pages
counter logs for paging, 883
internal storage units, 122
parallel CREATE INDEX and parallel DBCC support
by SQL Server 2000 editions, 8
parallel DBCC object checking, disabling, 354
966
parallel execution plans, 74
Max Degree of Parallelism Option and, 83
parallelism, 572
parentheses within WHERE clauses, 765
PARSEONLY option, 159
partial dependency and second normal form, 842
partial updates and transactions, 242
partitioned views, 711
partitioning server alternative to RAID, 2
partitions, database with files on separate, 131
passwords
changing or adding, 375
moving logins and passwords, 37
scripting out logins and passwords, 40
PATINDEX function, 802
pattern matching
CHAINDEX and PATINDEX functions, 801
using the LIKE operator, 770
per processor and per seat licensing options, 10
Perform these tests... option, database
maintenance plans, 335
performance benefits
adding hash indexes for character columns, 796
DBCC DROPCLEANBUFFERS command, 870
index seeks, compared with scans, 905
join hints, 790
network perfomance and stored procedures, 718
placing VLDB files in different filegroups, 170
READ_ONLY database option, 139
performance conditions where alerts are
recommended, 208
performance considerations
C2 certified security, 74
derived tables compared to temporary tables, 764
effects of fill factors, 79
linked servers, 521
named instances, 20
performance event category, SQL Profiler, 889
performance impacts
AUTO_SHRINK database option, 144
change tracking, 666
constraints, 709
CURSOR_CLOSE_ON_COMMIT database option, 145
data type choice and column size, 684
DBCC UPDATEUSAGE and, 162
full-text indexing, 668
indexes, on queries and updates, 917
trace files, 406
use of hints, 789
use of temporary tables, 705
using cursors, 852, 886
Performance Monitor
checkpoint frequency and I/O activity, 293
checkpoints and, 94
identifying context switching, 71, 82
investigating available memory, 93
page splits, 79
Performance Monitor see System Monitor.
performance objects, counter appropriate to
various types of bottleneck, 883, 884
performance tuning, 873
query tuning, 886
push subscriptions
permissions
displaying account permissions and permission
paths, 387
displaying column permissions for linked servers, 541
displaying table permissions for linked servers, 539
displaying, for fixed database roles, 392
displaying, for fixed server roles, 389
reporting user and statement permissions, 402
required for replication, 428
types of permission, 368, 392
personal databases, AUTO_CLOSE database
option, 142
phantom read concurrency problem, 254
phases, show multi-phase pump, 575
PI function, 822
pintable table option, 707
placeholders
creating user-defined error messages, 677
outputting XML with sp_makewebtask, 939
planning an implementation, 1
platform-independence, XML, 932
point-in-time recovery
bulk-logged recovery model and, 290
RECOVERY database options and, 146
transaction log backups, 287
POP3 (Post Office Protocol)
configuring SQL Mail for a valid server, 218
third-party mail servers and, 216
port settings
determining named instance port numbers, 22
installing named instances, 21
Server Network Utility and, 661
TCP/IP default, 13
post-installation best practices, 33
database migration, 37
post-installation checks
operating system and hardware, 35
SQL Server Settings, 34
pound (#) signs and temporary tables, 705
POWER function, 822
precedence constraints
configuring DTS workflow, 606
multiple constraints, 607
tips on workflow and, 607
precision, NUMERIC_ROUNDABORT option, 151
Precision property, Enterprise Manager, 181
predicates and WHERE clauses, 765
pre-fetching rows and Cursor Threshold
Option, 75
pre-installation best practices, 5
pre-installation checklist, 10
primary filegroups, 170
primary keys
adding to an existing table, 702
creating a table with, using DDL, 684
creating, using Enterprise Manager, 182
first normal form and, 842
second normal form and, 842
transactional replication requires, 441
primary role change, 633, 637
distinguished from role reversal, 640
scripting out recommended, 642
PRINT command
calling UDFs in, 728
concatenation example, 862
Priority Boost Option, 91
privileges see permissions.
procedure cache forced flushing, 723
process IDs see SPIDs.
processes and threads and, 86
processors
Affinity Mask Option and, 71
Max Degree of Parallelism Option and, 83
number reporting with xp_msver, 105
supported by SQL Server 2000 editions, 5
@@PROCID function, 817
Profiler see SQL Profiler.
programming languages
cursor functionality, 852
image and binary data types and, 836
propertyname options, SERVERPROPERTY
function, 103
proximity searches, full-text indexes, 673
proxy accounts
configuring in Enterprise Manager, 201
configuring with xp_sqlagent_proxy_account, 203
drawbacks to configuring, 205
permissions granted, 204
reasons to configure, 205
scheduling DTS packages and, 610
publication property configuration, 481
publications
adding new columns and articles, 484
creating and managing in Enterprise Manager, 502
generating scripts of, 502
transforming data within, 464-468
publishers, in replication topology, 420
publishing, disabling on a server, 512
publishing subscriber model, 421
Pull Subscription Wizard, 460
Choose Publication dialog, 460
Initialize Subscription dialog, 461
Look for Publications dialog, 460
Set Distribution Agent Schedule dialog, 461, 463
Set Merge Agent Schedule dialog, 462
Set Subscription Priority dialog, 463
Snapshot Delivery dialog, 462
pull subscriptions, 420
attachable subscription databases, 495
creating using Enterprise Manager, 460-464
dynamic snapshots and, 475
selecting for interactive conflict resolution, 492
Push Subscription Wizard, 456
Choose Destination Database dialog, 457
Choose Subscribers dialog, 456
Initialize Subscription dialog, 458
Set Distribution Agent Schedule dialog, 457
Set Subscription Priority dialog, 458
Start Required Services dialog, 459
push subscriptions, 420
creating using Enterprise Manager, 456-459
expiry quotas, 481
967
queries
Q
R
queries
see also result sets; SELECT commands.
Data Transformation Query Designer, 573
NOT operators requiring table scans, 918
performance and table indexing, 733
querying a full-text index, 672
RADIANS function, 822
RAID (Redundant Arrays of Independent Disks)
disk requirements and, 6
fault tolerance using, 2
levels tabulated, 2
Microsoft Clustering Services and, 549
recovery plans and, 285
Tier 1 and Tier 2 file placement strategies, 6
RAISEERROR command, 850
creating user-defined error messages, 677
RAISERROR..WITH LOG and xp_logevent, 238
RAM see memory.
RAND function, 822
range lock types, 255
compatibilities, 256
range queries and clustered indexes, 733, 917
RAW mode, FOR XML clause, 936
RDBMS driver post-installation checks, 36
READ COMMITTED isolation level
concurrency problems prevented, 257
description, 251
read file transformation, Transform Data Task
Properties dialog, 583
READ UNCOMMITTED isolation level
concurrency problems prevented, 257
description, 251
READ_ONLY | WRITE_ONLY database option, 139
read-ahead and scan, enhanced, SQL Server 2000
editions, 8
read-only filegroups, 174
read-only partitioned views, 715
read-only table fill factors, 917
readpipe utility, 23, 24
READTEXT function, 837
inserting data from stored procedure output, 786
REAL data type, 120
reattaching databases, 31
restoring other versions to SQL Server 2000, 42
Rebuild Master utility, 114
rebuilding indexes, 356
example, 922
fragmentation and, 921
scheduling, 921
rebuilding servers in recovery situations, 286
rebuildm.exe file, 114, 322
reclaiming space, 361
RECONFIGURE WITH OVERRIDE, 70
displaying advanced system options, 69
recovery
binary files, 323
modes, log shipping secondary databases, 625, 630, 641
recovery from file loss or database corruption, 321
SQLDIAG utility and, 659
RECOVERY FULL | BULK_LOGGED | SIMPLE database
option, 146
backing up VLDBs using filegroups, 170
Recovery Interval Option, 94
recovery models
log shipping and, 628
SQL Server 2000 feature, 290
CONTAINSTABLE function, 674
fuzzy and weighted searches, 675
reasons for excessive duration, 894
SET NOEXEC option, 158
SET PARSEONLY option, 159
simplifying query definitions using views, 709
Query Analyzer
alternative batch separators, 227
client statistics function, 915
copying SQL Profiler output to, 894
graphical showplan and, 906
keyboard shortcuts, 657
pre-defined shortcuts tabulated, 658
log size and log space used, 161
Object Browser, 31, 654
managing extended properties, 860
reinitializing SQL Server error logs, 235
restoring databases from backups, 31
restoring other versions to SQL Server 2000, 42
result set formats, 749
running BCP, 50
running DBCC USEROPTIONS in, 155
server trace, 915
setting user options in, 156
templates, 651
QUERY_GOVERNOR_COST_LIMIT option, 92, 159
query hints
distributed queries and, 522
tabulated, 791
query optimizer
indexed views and, 710
operators hindering index seeks, 917, 919
Query Governor Cost Limit Option and, 92
SET FORCEPLAN option and, 157
use of the WHERE clauses, 886
query plans see execution plans.
query processor, AUTO_UPDATE_STATISTICS
option, 144
query tuning, 886
capturing long-duration queries, 892
query utilities
osql utility, 645
Query Analyzer Object Browser, 654
Query Analyzer templates, 651
Query Wait Option, 93
queue reader agent, 425
queued updating option, 425
configuring publication properties, 488
setting identity range values, 445
quorum drives, 553
quotation marks
full-text index queries and, 673
osql queries, 647
QUOTED_IDENTIFIER option, 101, 102, 152, 348
CREATE VIEW statement and, 714
QUOTENAME function, 806
968
RESTRICTED_USER database option
recovery plans
creating a plan, 285
disaster recovery, 286
failover clustering no substitute, 553
key contacts, 286
service pack installation and, 27
recovery times and checkpoint frequency, 293
recursive foreign key constraints, 690
recursive relationships
defining with CREATE TABLE, 690
representing with SELF JOINs, 763
recursive triggers, 737
RECURSIVE_TRIGGERS database option, 153
referential integrity
see also constraints.
cascading referential integrity and triggers, 737
Create Publication Wizard, 433
foreign key constraints, 689
refresh rate, Replication Monitor, 439
registry rebuilding, 326
relog.exe utility, 878
Remote Access Option, 95
remote installation, 17
Remote Login Timeout Option, 95
Remote Proc Trans Option, 96
Remote Query Timeout Option, 96
REMOTE_PROC_TRANSACTIONS option, 253
Remove unused space… option, database
maintenance plans, 335
@@REMSERVER function, 817
REPAIR_ALLOW_DATA_LOSS option
DBCC CHECKALLOC command, 343
DBCC CHECKDB command, 350
REPAIR_FAST option
DBCC CHECKALLOC command, 342
DBCC CHECKDB command, 349
REPAIR_REBUILD option
DBCC CHECKALLOC command, 342
DBCC CHECKDB command, 349
REPEATABLE READ isolation level
concurrency problems prevented, 257
description, 251
repeated strings, REPLICATE function, 807
repeating groups and first normal form, 842
REPLACE function, 806
REPLICATE function, 807
replicated services
Max Text Repl Size Option, 86
service pack installation and, 29
uninstalling service packs, 29
replicated transactions and DBCC OPENTRAN, 249
replication, 419
applying the NOT FOR REPLCATION clause, 693
configuration methods, 426
snapshot replication, 429-438
configuring publication properties, 481
data types and, 426
disabling publishing and distribution on your server, 512
failover clustering alternative, 419
launching replication wizards, 501
linked servers and, 522
log shipping alternative, 419
log shipping compared to, 626
merge replication, 423
NOT FOR REPLICATION clauses, 695
pre-configuration checklist
possible replication topologies, 428
recovery plans and, 286
replication types, 421
row size limits, 428
table comparing, 425
snapshot data formats, 488
snapshot replication, 421
SQL Server version compatibility, 427
system tables associated with, 513
topology, 420
alternatives tabulated, 421
backups as scripts, 502
configuring topology roles, 504
defining before configuration, 428
transactional replication, 422
transforming data, 464-468
troubleshooting replication problems, 517
validating replicated data, 497
Replication Conflict Viewer, 494
replication errors, setting alerts, 210
Replication job steps, SQL Server Agent job
type, 212
Replication Monitor
Create Publication Wizard and, 438
Distribution Agent History dialog, 517
publication agents and, 459
Subscription Validating Options dialog, 498
troubleshooting replication problems, 517
Validating All Subscriptions dialog, 497
viewing in Enterprise Manager, 439
reporting
conflict with updates, as possible deadlocks, 282
counter log results, 882
resources see Books Online; Knowledge base;
microsoft.com.
RESTORE commands
see also backups.
backup sequences illustrated, 287
restoring other versions to SQL Server 2000, 42
RESTORE DATABASE command, 313
examples, 315, 317
options, 314
partial restores to new databases, 320
restoring files or filegroups, 320
restoring files using transaction logs, 324
system databases, 323
RESTORE FILEONLY command, 309
RESTORE HEADONLY command, 310
RESTORE LABELONLY command, 312
RESTORE LOG command
examples, 317
restoring files or filegroups, 320
restoring files using transaction logs, 324
RESTORE VERIFYONLY command, Database
Maintenance Plan Wizard, 332
restoring a database
using Enterprise Manager, 305
using Transact-SQL
differential backups, 316
transaction log backups, 317
RESTRICTED_USER database option, 140
969
result sets
result sets
combining with the UNION operator, 780
creating tables based on, 755
grid and text formats, 749
limiting numbers of rows returned, 754
looping through, using WHILE, 847
returning as XML, 783
use of the WHERE clause, 765
return codes, DATABASEPROPERTYEX function, 153
RETURN keyword, 738, 849
REVERSE function, 807
REVOKE keyword
object permissions, 400
statement permissions, 399
RIGHT function, 803
RIGHT OUTER JOINs, 761
role changes, log shipping, 633
role permissions
commands listed, 393
introduced, 369
role reversal, log shipping, 630
distinguished from primary role change, 640
roles
advantage of Windows NT/2000 groups, 366
configuring replication topology roles, 504
showing users with access to a database, 386
SQL Server 2000 role types, 366
user-defined database roles, 366, 379
ROLLBACK TRANSACTION command
AFTER triggers for DELETE and, 739
introduced, 245
rolling back
batch errors and, 863
security patches, 33
ROLLUP
GROUPING function and, 798
using with GROUP BY clauses, 774
ROUND function, 823
row count verification, replicated data, 497
row offsets, 122
row size limit replication types, 428
@@ROWCOUNT function, 817
ROWCOUNT_BIG function, 834
ROWGUIDCOL property, 698
removing, 701
rows
finding unmatched rows with FULL OUTER JOINs, 761
using EXISTS or NOT EXISTS, 780
RPC (Remote Procedure Calls)
enabling, linked server options, 525, 533
Remote Access Option and, 95
REMOTE_PROC_TRANSACTIONS option, 253
RTRIM function, 805
run_value column, sp_configure, 69
S
SAN (Storage Area Networks), 8
failover clustering and, 549
recovery plans and, 285
support by SQL Server 2000 editions, 9
970
SAVE TRANSACTION command
example, 247
introduced, 245
savepoints, 247
scalar UDFs, 726, 727
Scale property, Enterprise Manager, 181
Scan for Startup Procs Option, 97
scans event category, SQL Profiler, 890
Scheduled Synchronization Wizard, 478
scheduling
see also jobs.
counter logs, 879
index rebuilds, 921
schema modification and schema stability
locks, 255
compatibilities, 256
SCHEMABINDING clause
CREATE VIEW command, 713, 714
UDFs can use schemabinding, 726
schemas, scripting out, 49
scope of cursors, 853
SCOPE_IDENTITY function, 835
IDENT_CURRENT function and, 832
scripting functionality
see also Transact-SQL scripts.
Enterprise Manager, 48
Object Browser, 656
scripting out logins and passwords, 40
scripting out objects
upgrading SQL Server 6.5 to SQL Server 2000, 56
scripting out schemas, 49
scripting out stored procedures, 868
using SELECT to create scripts, 861
second normal form, 842
security
see also authentication modes.
auditing with SQL Profiler, 406
C2 Audit Mode Option, 73
logins, users, permissions, and roles introduced, 363
operating system security, 364
post-installation checks, 33
risks with OPENDATASOURCE command, 537
risks with proxy accounts, 206
server security and proxy accounts, 204
views and, 709
security audit event category, SQL Profiler, 890
security contexts
defined for replication, 428
DTS package execution, 609
security functions, 825-827
HAS_DBACCESS function, 825
IS_MEMBER function, 825
IS_SVROLEMEMBER function, 825
SUSER_SID function, 826
SUSER_SNAME function, 826
USER_ID function, 827
USER_NAME function, 827
security modes, DTS package execution
contexts, 609
security patches, 26
see also service packs.
installing, 32
instructions specific to clustering, 559
rolling back, 33
sp_addextendedproperty stored procedure
seed, IDENTITY property, 694
SELECT commands, 749-784
creating scripts using, 861
creating views, 709, 714
inserting data from, 785
inserting data from stored procedure output, 786
SELECT INTO command
logging, 291
resetting suspect databases, 325
setting locking behaviors, 251
subqueries, 778
using UDFs in, 728
self joins, 763
send mail task, DTS Designer, 595
separation of data and presentation, 932
SERIALIZABLE isolation level
concurrency problems prevented, 257
description, 251
stored procedure execution options, 443
SERIALIZABLE locking hint, 259
server documentation utilities, SQLDIAG, 659
server event category, SQL Profiler, 891
Server Network Utility, 661
determining named instance port numbers, 22
Hide Server option, 662
server options, linked servers, 532
server roles, fixed, 366
Server Roles tab, SQL Server Login Properties
dialog, 370
server settings, common installation problems, 3
server trace, 915
@@SERVERNAME function, 817
SERVERPROPERTY function, 103
viewing server default collation with, 109
servers
changing server default collations, 114
components involved in log shipping, 625
monitoring servers, 627
names, using @@SERVERNAME and @@REMSERVER, 817
rebuilding in a recovery situation, 286
transfering DTS packages between, 621
version information
using xp_msver, 105
viewing server default collations, 109
server-side traces, 406, 894-903
service accounts, 363
service packs, 26
AWE Enabled Option needs SP2, 73
installing for virtual servers, 557
instructions specific to clustering, 557
uninstalling, 29
@@SERVICENAME function, 817
SESSION_USER function, 835
sessions event category, SQL Profiler, 891
SET * see option name.
SET keyword see UPDATE commands.
set processing and cursor processing, 283, 852
set user options, 156-159
setup type, SQL Server 2000 installation, 11
setup.iss files, unattended installation, 15, 17
setupsql.exe files, unattended installation, 15
Severity levels for raising alerts, 209
SGAM (Secondary Global Allocation Map) pages, 122
shared lock compatibilities, 256
shared with intent exclusive locks, 255
compatibilities, 256
shortcuts see keyboard shortcuts.
show multi-phase pump, 575
Create New Transformation dialog box, 577
SHOWPLAN_ALL option, 904
STATISTICS PROFILE option compared to, 914
SHOWPLAN_TEXT option, 904, 905
viewing execution plans, 796
shrinking
disabling while running DBCC DBREINDEX, 357
files, using DBCC SHRINKFILE, 167
files, using Enterprise Manager, 165
files, with DBCC SHRINKDATABASE, 164
SID (Security Identifier)
moving logins and passwords, 40
resolving in log shipping server role change, 633
SIGN function, 823
simple recovery model, 290
checkpoint issue situations, 293
SIN function, 824
single instance failover clustering, 551
SINGLE USER mode
Copy Database Wizard and, 49
detaching and reattaching databases, 43
starting SQL Server in, 326
SINGLE_USER | RESTRICTED_USER | MULTI_USER
database option, 140
slow response time linked server bug, 546
SMALLDATETIME data type, 120
migrating to character formats, 581
SMALLINT and SMALLMONEY data types, 120
snapshot backups, 289
snapshot data formats, 488
snapshot replication, 421
advantages and disadvantages, 425
configuration, 429-438
SOAP (Simple Object Access Protocol), 933
SOME operator, 769
sort order
collations and, 107
defining views in Enterprise Manager, 185
sort order field
creating indexes in Enterprise Manager, 187
sorting operations
Min Memory Per Query Option, 88
ORDER BY clauses, 776
query performance and, 887
Query Wait Option, 93
SORT_IN_TEMPDB, 735
sorting styles, Collation Designator, 12
SOUNDEX function, 802
SP:Completed and SP:StmtCompleted events, 892
sp_* stored procedures
SQL Server Agent, groupings, 231
sp_addapprole stored procedure, 385
sp_addextendedproc stored procedure, 724
sp_addextendedproperty stored procedure, 857
971
sp_addlinkedserver stored procedure
sp_addlinkedserver stored procedure, 527-528
sp_addlinkedsvrlogin stored procedure, 532
sp_addlogin stored procedure, 77, 371
sp_addmergesubscription stored procedure, 496
sp_addmessage stored procedure, 602, 678, 851
sp_addrole stored procedure, 382
sp_addrolemember stored procedure, 382
sp_addumpdevice stored procedure, 297
sp_altermessage stored procedure, 236, 679
sp_article_validation stored procedure, 499
sp_attach_db stored procedure, 43, 322
sp_bindsession stored procedure, 864
sp_change_monitor_role stored procedure, 639
sp_change_primary_role stored procedure, 637
sp_change_secondary_role stored procedure, 638
sp_change_users_login stored procedure, 41,
633, 639
sp_changedbowner stored procedure, 137, 373
sp_changeobjectowner stored procedure, 378, 746
sp_column_privileges_ex stored procedure, 541
sp_columns_ex stored procedure, 540
sp_configure stored procedure
see also individual server options.
advanced options, 69
increasing text replication size, 517
output, 68
resetting suspect databases, 325
SET REMOTE_PROC_TRANSACTIONS and, 253
syntax and arguments, 68
sp_cursor_list stored procedure, 857
sp_dbcmptlevel stored procedure, 26
sp_dbfixedrolepermission stored procedure, 392
sp_dboption stored procedure, 138
sp_defaultdb stored procedure, 373
sp_defaultlanguage stored procedure, 77, 374
sp_denylogin stored procedure, 388
sp_depends stored procedure, 745
sp_describe_cursor* stored procedures, 857
sp_detach_db stored procedure, 43
sp_dropapprole stored procedure, 385
sp_dropextendedproc stored procedure, 725
sp_dropextendedproperty stored procedure,
859, 860
sp_droplinkedsrvlogin stored procedure, 534
sp_droplogin stored procedure, 373
sp_dropmessage stored procedure, 678
sp_droprole stored procedure, 382
sp_droprolemember stored procedure, 382
sp_dropserver stored procedure, 534
sp_dropuser stored procedure, 379
sp_executesql stored procedure, 861, 887
sp_fulltext_catalog stored procedure, 669, 672
sp_fulltext_column stored procedure, 76, 671
sp_fulltext_database stored procedure, 669
sp_fulltext_table stored procedure, 667, 670, 671
sp_getbindtoken stored procedure, 864
sp_grantdbaccess stored procedure, 377
sp_help stored procedure, 173, 744
sp_help_fulltext_* stored procedures, 672
sp_help_revlogin stored procedure, 40
972
sp_helpconstraint stored procedure, 707
sp_helpdb stored procedure, 160
sp_helpdbfixedrole stored procedure, 391
sp_helpextendedproc stored procedure, 724
sp_helpfile stored procedure, 131, 136, 167
sp_helpindex stored procedure, 736
sp_helprole stored procedure, 382
sp_helprolemember stored procedure, 383, 786
sp_helprotect stored procedure, 402
sp_helpsort stored procedure, 109
sp_helpsrvrole stored procedure, 388
sp_helpsrvrolemember stored procedure, 390
sp_helpstats stored procedure, 926
sp_helptext stored procedure, 723
sp_helptrigger stored procedure, 741
sp_helpuser stored procedure, 386
sp_hexadecimal stored procedure, 40
sp_linkedservers stored procedure, 542
sp_lock stored procedure, 259, 261
sp_makewebtask stored procedure, 939
sp_manage_jobs_by_login stored procedure, 228
sp_OA* stored procedures, 218, 865, 869
sp_OACreate stored procedure, 865, 866
sp_OADestroy stored procedure, 867
sp_OAGetErrorInfo stored procedure, 868, 869
sp_OAGetProperty stored procedure, 866
sp_OAMethod stored procedure, 865, 867
sp_OASetProperty stored procedure, 866
sp_OAStop stored procedure, 868
sp_password stored procedure, 375
sp_processmail stored procedure, 221
sp_procoption stored procedure, 97, 722
sp_publication_validation stored procedure, 499
sp_purge_jobhistory stored procedure, 228
sp_reassign_dtspackageowner stored procedure, 622
sp_recompile stored procedure, 722
sp_refreshview stored procedure, 718
sp_rename stored procedure, 743
sp_renamedb stored procedure, 160
sp_repladdcolumn stored procedure, 429
sp_repldropcolumn stored procedure, 429
sp_replshowcmnds stored procedure, 518
sp_resetstatus stored procedure, 324, 325
sp_resolve_logins stored procedure, 639
sp_revokedbaccess stored procedure, 378
sp_revokelogin stored procedure, 373
sp_serveroption stored procedure, 532
sp_setapprole stored procedure, 385
sp_settriggerorder stored procedure, 737, 741
sp_spaceused stored procedure, 125, 162, 163
sp_srvrolepermission stored procedure, 389
sp_start_job stored procedure, 229
sp_stop_job stored procedure, 229
sp_subscription_cleanup stored procedure, 517
sp_table_privileges_ex stored procedure, 539
sp_tableoption stored procedure, 706
sp_tables_ex stored procedure, 538
sp_trace_* stored procedures, 407
sp_trace_create stored procedure, 895
SQL Server versions
sp_trace_setevent stored procedure, 896, 899, 900
sp_trace_setfilter stored procedure, 901
sp_trace_setstatus stored procedure, 902, 903
sp_updateextendedproperty stored procedure,
859, 860
sp_updatestatistics stored procedure, 928
sp_validatelogins stored procedure, 374
sp_validatemergepublication stored procedure, 501
sp_validatemergesubscription stored procedure, 501
sp_who stored procedure, 212, 214, 263
detaching and reattaching databases, 43
identifying and resolving blocking, 268
sp_xml_preparedocument stored procedure, 940, 942
sp_xml_removedocument stored procedure, 940
space allocation, checking consistency, 340
SPACE function, 808
space usage, 163
reclaiming space after dropping columns, 361
SPID (process ID)
DBCC INPUTBUFFER use, 250, 265
DBCC OUTPUTBUFFER use, 265
DECLARE CURSOR and, 854
returned by DBCC OPENTRAN, 250
returned by sp_who, 264
identifying and resolving blocking, 268
viewing locking activity in Enterprise Manager, 262
@@SPID function, 817
split mirroring, 289
spreadsheets
copying results into, 70
migrating data from Excel, 64
SQL Collations
Collation designator and, 115
compared to Windows Collation, 108
SQL Mail
bug with, 218
configuring, 216
for a valid POP3 server, 218
Lightweight Pooling Option and, 81
no support for failover clustering, 560, 596
setting up on Exchange Server, 216, 217
troubleshooting, 217
SQL Profiler, 887
capturing deadlock activity, 275
capturing long-duration queries, 892
event categories tabulated, 887
load simulation using, 85, 87
Lock:Escalation event, 282
scripting a server-side trace, 894
security auditing with, 406
trace properties dialog, 276
Trace Properties dialog, 892
trace, compared with server trace, 915
SQL Server 2000 see SQL Server versions.
SQL Server 2000 Editions
Compact Edition, 8
Edition for Analysis Services, 10
Enterprise Edition
AWE Enabled Option, 72
failover clustering requires, 554
log shipping and, 626
requires Windows 2000, 4
versatility of indexed views, 710
features tabulated, 8-10
indexed views and, 710
log shipping requirement, 626, 632
multi-server administration and, 222
operating system support tabulated, 4
processors supported, 5
SQL Server Enterprise Edition
memory utilization, 34
SQL Server Agent
alert system, 231
configuring properties, 198
error logs, 230-231
changing names or locations, 231
introduced, 199
viewing and interpreting, 230
functions tabulated, 197
multi-server administration, 222
replication role, 428
scripting jobs, operators and alerts, 226
stored procedures, 231
job system, 232
operator system, 231
SQL Server authentication
see also authentication modes.
subscriber agents, 506
SQL Server Components see Analysis Services;
Books Online; English Query.
SQL Server error log
events logged to, 234
reading using Enterprise Manager, 234
reinitializing using Query Analyzer, 235
setting the number of logs to keep, 235
SQL Server Meta Data Services, 618
SQL Server Properties dialog see Enterprise
Manager.
SQL Server Resource Kit, Database Hammer,
85, 87
SQL Server standard logins see standard SQL Server
logins.
SQL Server versions
Copy Database Wizard and, 49
log shipping and, 627
QUOTED_IDENTIFIER database option and, 152
replication compatibility tabulated, 427
SQL Server 2000
cascading changes, 691
change tracking introduced, 666
data types tabulated, 683
database maintenance plans introduced, 326
DBCC INDEXDEFRAG introduced, 358
Enterprise Manager scripting functionality, 49
failover clustering enhancement, 553
full-text indexing automatic updates, 664
Log Shipping Monitor and, 627
methods of manipulating XML, 933
migrating databases from SQL Server 6.5, 55
migrating databases from SQL Server 7.0 and 2000, 602
OLE DB provider for, 530
possible replication topologies, 427
propagating publication changes to subscribers, 484
recovery models introduced, 290
restoring other versions to, 42
server-side trace setup improved, 895
table variables introduced, 706
UDFs introduced, 725
upgrading to, from SQL Server 6.5 & 7.0, 25
upgrading to, from SQL Server 7.0, 348
XML support introduced, 931
973
SQL Server versions (Cont'd)
SQL Server versions (Cont'd)
SQL Server 6.5
Enterprise Manager scripting functionality, 49
migrating databases to SQL Server 2000, 55
moving logins and passwords, 40
SQL Server 6.5 & 7.0
possible replication topologies, 427
upgrading to SQL Server 2000 from, 25
SQL Server 7.0
Enterprise Manager scripting functionality, 48
OLE DB provider for, 530
upgrading to SQL Server 2000, 348
transaction logging, 291
troubleshooting DTS packages, 622
@@VERSION function, 818
SQL:StmtCompleted event, 915
sp_trace_setevent example, 901
SQL_VARIANT data type
extended property values as, 857
SELECT SERVERPROPERTY returns, 103
value range and physical storage requirements, 121
SQL2KSP3.exe and related files, 27
SQLAgentMail
configuring, 216
no support for failover clustering, 560
setting up on Exchange Server, 216, 217
troubleshooting, 217
SQLDIAG utility, 659
SQL-DMO classes
generating dynamic snapshots, 473
replication configuration and, 426
SQLDMO objects, instantiating with sp_OA, 868
sqldts.com site, 622
sqlins.iss files, unattended installation, 16
SQLMaint utility, 337
sqlstp.log file, 560
SQLXML
Bulk Load Utility, 934
client-side processing, 934
Diffgrams, 934
Managed Classes, 935
Updategrams, 934
SQRT function, 824
SQUARE function, 824
SSL (Secure Sockets Layer), 364
standard deviation functions, 799
standard SQL Server logins, 364
adding a login account, 372, 377
removing a login account, 373
user-defined database roles and, 366
standby databases and log shipping, 625
standby mode, log shipping secondary databases,
625, 630, 641
startup parameters, enabling trace flags, 273
statement permissions
DENY keyword, 397
example commands listed, 393
GRANT keyword, 394
introduced, 368
reporting user permissions and, 402
REVOKE keyword, 399
tips on managing, 393
974
statistics
AUTO_CREATE_STATISTICS database option, 143
AUTO_UPDATE_STATISTICS database option, 144
CREATE STATISTICS command, 925
sampling, 926
displaying columns with, 926
displaying distribution statistics for a table, 927
graphical showplan and, 912
Query Analyzer client statistics, 915
system-generated statistics, 926
updating against all user-defined tables, 928
STATISTICS IO option, 912
STATISTICS PROFILE option, 913
STATISTICS TIME option, 912
STATS_DATE function, 835
STDEV and STDEVP functions, 799
STOPAT, STOPATMARK and STOPBEFOREMARK
keywords, RESTORE commands, 317
examples, 318, 319
storage internals, SQL Server, 119
allocation units and their limitations, 123
storage requirements, estimating, 5
Stored Procedure Conflict Resolver, 453
stored procedure event category, SQL Profiler,
891
stored procedures, 718-725
see also extended stored procedures; sp_; xp_.
adding and configuring linked servers, 527
autoexec stored procedures, 97
changing, 721
compared to views, 712
configuring full-text indexing, 668
creating, using DDL, 719
creating, using Enterprise Manager, 191
distributed queries and, 522
dropping, 722
example INSERTING rows, 720
example with OUTPUT parameters, 720
executing, 720
executing on remote data sources, 535
executing with the Object Browser, 655
executing, using keyboard shortcuts, 657
executing, using osql utility, 649
execution options, transactional replication, 443
extended and system stored procedures, naming, 106
forcing procedure cache flushing, 723
forcing recompilation, 721, 722
inserting data from the output, 786
printing the text definition, 723
query performance and, 887
restricting access to tables using, 393
running at setup, 722
scripting out, using sp_OA, 868
SQL Server Agent, 231
system generated, merge replication and, 424
system generated, transactional replication and, 422
system stored procedures and cursors, 857
system stored procedures, configuring replication, 426
tips for using, 721
transactional replication use, 441
transfer master stored procedures task, 603
UDFs compared to, 726
use of temporary tables with, 705
using the RETURN keyword with, 849
sysxlogins table
STR function, 808
concatenation example using, 863
string concatenation see concatenation.
string functions, 800-811
ASCII function, 800
CAST function, 809
CHAR function, 801
CHARINDEX function, 801
CONVERT function, 809
DIFFERENCE function, 802
LEFT function, 803
LEN function, 804
LOWER function, 804
LTRIM function, 805
NCHAR function, 805
PATINDEX function, 802
QUOTENAME function, 806
REPLACE function, 806
REPLICATE function, 807
REVERSE function, 807
RIGHT function, 803
RTRIM function, 805
SOUNDEX function, 802
SPACE function, 808
STR function, 808
STUFF function, 806
SUBSTRING function, 809
UNICODE function, 805
UPPER function, 804
strings, batches from, using EXEC, 863
striped backups, 294, 304
structured storage files, saving DTS packages, 564
STUFF function, 806
styles, CONVERT function, 810
subqueries, 778
correlated subqueries, 779
derived tables as, 764
using in place of an expression, 779
using with the IN or NOT IN operator, 778
Subscriber Always Wins Conflict Resolver, 453
subscriber updates, 425
subscribers
see also pull subscriptions; push subscriptions.
elements of replication topology, 420
generating scripts of, 502
push and pull subscriptions, 420
subscriptions, reinitializing deactivated, 482
substitution parameters, user-defined error
messages, 851
SUBSTRING function, 809
SUM function, 799
support staff, identifying at the planning stage, 1
surrogate keys and the IDENTITY property, 694
SUSER_SID function, 826
SUSER_SNAME system function, 826
dynamic filters and, 468, 470
dynamic snapshots and, 473
suspect status
alternatives to sp_resetstatus, 325
resetting with sp_resetstatus, 324
torn pages and, 147
Sybase linked server connectivity, 531
synchronization
see also log shipping.
creating a scheduled synchronization task, 478
manually synchronizing a subscription, 480
Windows Synchronization Manager, 476
synchronization optimization, dynamic filters, 472
synchronization partners, merge replication, 490
sysdatabases table
resetting suspect databases, 325
use in Transact-SQL script example, 861
sysdepends table, bug affecting dropped tables,
746
sysdtspackages table, transfering DTS packages,
621
sysindexes table and DBCC UPDATEUSAGE, 162
syslanguages table, master database, 77
syslogins table, master database, 639
log shipping and, 633
logins and, 365
sysmergearticles table, 494
sysmessages table, 236
RAISERROR command and, 850, 851
system account and replication, 428, 429
system databases, 126
see also master; model; msdb; tempdb.
backups should follow user databases, 304
restoring lost data, 322
system date, GETDATE function, 813
system functions
APP_NAME function, 830
COALESCE function, 830
CURRENT_TIMESTAMP function, 831
CURRENT_USER function, 831
DATALENGTH function, 831
GETANSINULL function, 831
HOST_ID function, 832
HOST_NAME function, 832
IDENT_CURRENT function, 832
IDENT_INCR function, 832
IDENT_SEED function, 833
ISDATE function, 833
ISNULL function, 834
ISNUMERIC function, 833
NULLIF function, 834
ROWCOUNT_BIG function, 834
SCOPE_IDENTITY function, 835
SESSION_USER function, 835
STATS_DATE function, 835
SYSTEM_USER function, 836
USER function, 836
System Monitor
counter logs, 874
identifying hardware bottlenecks, 873
Logical Disk object counters, 36
running with SQL Profiler inadvisable, 887
Windows XP problems, 878
system tables
accessing with information schema views, 840
consistency checking, 344
replication, 513-516
SYSTEM_USER function, 836
sysxlogins table see syslogins table.
975
t_TranExample table
T
t_TranExample table, 244
table aliases and joins, 763
table constraints, 685
TABLE data type, 121
table hints
locking table hint example, 790
tabulated, 789
table joins see joins.
table option setting, 706
table scans
indexing heap tables avoids, 731
performance monitoring, 886
table variables, 706
TABLERESULTS option, DBCC commands, 355
tables
see also CREATE TABLE command.
adding columns to existing tables, 699
browse compliant tables, 783
browsing with the Object Browser, 654
checking all tables in a filegroup, 352
checking using DBCC CHECKTABLE, 350
creating an empty table, 756
creating from result sets, 755
creating, using DDL, 681
creating, using Enterprise Manager, 180
deciding whether to index, 733
derived tables, 764
dropping, using DDL, 704
estimating sizes in bytes, 123
integrity checks, 344
listing constraints for, 707
listing indexes for, 736
listing triggers for, 741
modifying, using Enterprise Manager, 182
non-serialized access as cause of deadlocks, 268
outputting DBCC command results in, 355
restricting access to views and stored procedures, 393
temporary tables, 705
derived tables compared to, 764
TABLOCK locking hint, 262
TAN function, 825
tape backups, 294
disk backups should precede, 304
filemark errors, 304
tape transfer option, Upgrade Wizard, 55
target servers
defecting a target server, 225
setting up, 223
TCP/IP addresses see IP addresses.
tempdb database
SORT_IN_TEMPDB, 735
system databases tabulated, 126
temporary tables and, 705
templates
Object Browser, 656
Query Analyzer, 651
creating and parameterizing user templates, 652
trace templates, 407
XML templates, 934
976
temporary tables, 705
alternatives to, 887
derived tables compared to, 764
minimizing stored procedure recompilation, 721
table variable alternative, 706
test environments
service pack and security patch installation, 26
value in performance tuning, 873, 887
indexing, 916
TEXT data type, 121
replication considerations, 426
TEXT functions see IMAGE, TEXT and NTEXT
functions.
text in row table option, 707
TEXTIMAGE_ON clause, CREATE TABLE command, 688
TEXTPTR function, 836
@@TEXTSIZE function, 817
TEXTVALID function, 837
third normal form, 843
threads
binding to processors, 71
Max Worker Threads Option, 86
Tier 1 and Tier 2 file placement strategies, 6
timeouts
linked server options, 526
Remote Query Timeout Option, 96
replication troubleshooting and, 518
TIMESTAMP data type, 121
merge replication warning, 424
timestamps, @@DBTS function, 815
@@TIMETICKS function, 817
TINYINT data type, 120
tool tips, graphical showplan, 906, 907
TOP keyword, SELECT commands, 754
creating an empty table, 757
using WITH TIES, 754
TORN_PAGE_DETECTION database option, 147
@@TOTAL_ERRORS, @@TOTAL_READ and
@@TOTAL_WRITE functions, 817
trace files
C2 Audit Mode Option, 73
client-side and server-side, 894
output showing a deadlock situation, 278
security auditing and, 406
setting a trace using SQL Profiler, 276
setting a trace using system stored procedures, 895
trace templates, 280
warning about security audit traces, 408
trace flag -1, 272
trace flag 1204, identifying deadlocks, 271
trace flag 2528, disabling parallel processing, 354
trace flag 3605, 272
trace flags, enabling at startup, 273
trace messages, 199
trailing blanks, ANSI_PADDING option, 149
@@TRANCOUNT command, 245
TRANSACTION ISOLATION LEVEL option, 159, 251
transaction isolation levels tabulated, 251
transaction log backups, 287
must be restored sequentially, 306, 317
restoring a database from, 317
using Transact-SQL, 301
transaction logs see log files.
troubleshooting
transaction management, 241
best practice for using transactions, 249
explicit transactions, 245
implicit transactions, 243
named transactions, 246
nested transactions, 246
SET IMPLICIT_TRANSACTIONS option, 158
User Options Option, 100
transaction marks, 248
transaction log backups and, 287
transaction processing
contrasted with reporting use, 5
transactional replication, 422
advantages and disadvantages, 425
configuring in Enterprise Manager, 440-448
snapshot, migration of constraints and objects, 442
support by SQL Server 2000 editions, 9
validating replicated data, 498
example, 499, 500
transactions
batches distinguished from, 863
binding connections to other open transactions, 864
displaying the oldest transaction, 249
enabling within DTS packages, 612
rolling back with @@ERRORS, 247
transactions event category, SQL Profiler, 891
Transact-SQL
see also DDL; DML.
adding data or log files using, 135
adding linked servers, 527
adding user-defined filegroups, 172
aggregate functions, 793-800
backups of files and filegroups, 303
batches, 863
CASE … ELSE expressions, 844
changing or adding passwords, 375
creating a named backup device, 297
creating database users, 377
creating databases using, 129
creating logins using, 371
creating user-defined database roles, 382
cursors, 852
date functions, 811-814
detaching and reattaching databases, 42
differential backups, 303
Enterprise Manager scripting functionality, 48
Extended syntax for DECLARE, 853
@@functions, 814-818
IMAGE, TEXT and NTEXT functions, 836-840
information schema views, 840
mathematical functions, 818-825
meta data functions, 827-830
placing a table in a filegroup, 175
removing data or log files using, 136
restoring a database from a differential backup, 316
restoring a database from a full backup, 313
restoring a database from a transaction log backup, 317
script for moving logins, 37
security functions, 825-827
setting database collations, 110
statements affected by implicit transaction mode, 243
string functions, 800-811
system functions, 830
techniques, 793
transaction log backups, 301
wildcard characters, 770
Transact-SQL scripts
generating scripts of publications and subscribers, 502
scripts that create scripts, 861
SQL Server Agent job type, 211
@@TRANSCOUNT function, 818
Transfer Logins Properties dialog, 632
transfer tasks, DTS Designer, 602
log shipping and, 632
transfer database task, 602
transfer error messages task, 602
transfer jobs task, 603
transfer logins task, 603
transfer master stored procedures task, 603
transform data task DTS Designer, 572
Transform Published Data Wizard
Advanced Transformation Properties dialog, 466
Column Mappings and Transformations, 465
Define Transformations dialog, 465
DTS Package Identification dialog, 467
DTS Package Location dialog, 467
Transformations options, DTS Designer
Destination Columns tab, 579
General tab, 577
Phases tab, 579
Source Columns tab, 578
transitive dependencies and third normal form, 843
TRIGGER_NESTLEVEL() function, 740
triggers, 736-743
capturing data modified using
audit table example, 415
capturing modification activity with, 413
changing, 740
choice between constraints and, 709, 737
creating, using DDL, 737
creating, using Enterprise Manager, 190
determining trigger type
audit table example, 414
dropping, 740
enabling and disabling, 742
firing order, specifying, 741
@@IDENTITY function problem, 816
SCOPE_IDENTITY function and, 835
listing for a table, 741
merge replication use of, 424
modifying nesting level, 740
monitoring updates with, 412
nesting triggers, 89, 737
TRIGGER_NESTLEVEL() function, 740
RECURSIVE_TRIGGERS database option, 153
renaming, 743
Using Nested Triggers Option, 89
trigonometric functions, 818-820, 825
troubleshooting
see also performance tuning.
blocking, 281
database maintenance plans, 337
deadlocks, 273, 281
distributed queries, 543
DTS packages, 622
failed installations, 19
failed virtual servers, 560
linked servers, 543
log shipping, 640
MDAC installation, 22
replication problems, 517
SQL Mail and SQLAgentMail, 217
977
trunc log on checkpoint
trunc log on checkpoint and simple recovery, 290
TRUNCATE TABLE command, 788
TRUNCATE_ONLY backups, 290
TRUNCATEONLY option
DBCC SHRINKDATABASE command, 164
DBCC SHRINKFILE command, 168, 169
T-SQL event category, SQL Profiler, 892
Two Digit Year Cutoff Option, 98
two-part name syntax, 714
SELECT statements, 750
two-phase commit, 96
type conversion, CONVERT and CAST functions, 809
U
UDFs (User-Defined Functions), 725-731
advantages of inline over multistatement, 727
changing, 731
compared to stored procedures, 726
creating inline, using DDL, 728
creating multistatement, using DDL, 729
creating scalar, using DDL, 727
creating, using Enterprise Manager, 192
deterministic and non-deterministic, 726
dropping, 731
unattended installation, 15
using setup.iss, 17
service pack installation, 29
UNC (Universal Naming Convention), 297
Unicode
data exchange and, 108
sort order definition and, 107
Visual Source Safe and, 48
UNICODE function, 805
uninstalling service packs, 29
uninstalling SQL Server, 18
manual uninstall, 19
UNION ALL clause, 780, 781
CREATE VIEW command
creating partitioned views, 715
use with FOR XML clauses, 938
UNION operator, combining result sets, 780
UNIQUE constraints, 686
adding to an existing table, 704
ROWGUIDCOL property and, 698
unique values field, Enterprise Manager, 187
uniqueidentifier columns and merge replication,
424, 449, 455
UNIQUEIDENTIFIER data type
replication considerations, 427
value range and physical storage requirements, 121
uniqueness of columns, 919, 925
unmatched rows and FULL OUTER JOINs, 761
UPDATE commands, 786-787
updating based on other tables, 787
update locks, 255
compatibilities, 256
UPDATE STATISTICS command
Database Maintenance Plan Wizard equivalent, 328
sp_updatestatistics stored procedure and, 928
updateable partitioned view restrictions, 715
978
updateable status of cursors, 853
Extended Transact-SQL cursors, 854
Updategrams, 934
updates
against a view, 710
cascading changes and their alternative, 691
conflict with reports, as cause of deadlocks, 282
data driven query task optimized for, 589
monitoring with triggers, 412
non-logged updates and triggers, 737
order of, as cause of deadlocks, 281
transactions and partial updates, 242
UPDATETEXT function, 839
full-text indexing and, 672
warning about replication and, 423, 424
UPDLOCK locking hint, 283
Upgrade Wizard, migrating databases, 55
UPPER function, 804
uppercase string transformation, Transform Data
Task properties dialog, 581
URL queries to SQL Server, 934
user configurable event category, SQL Profiler,
892
user connections and memory requirements, 6
User Connections Option, 99
user created database objects, 743
user defined extended properties, 857
user feedback
DTS packages should not require, 587
transactions should not require, 249, 268
USER function, 836
User Options Option, 100
user population, estimating hardware needs, 5
USER_ID function, 827
USER_NAME function, 827
user-defined data types
conversion in Create Publication Wizard, 433
creating, using Enterprise Manager, 193
user-defined database roles
assigning permissions to, 393
creating, using Enterprise Manager, 379
displaying, 382
displaying members, 383
user-defined error messages, 238
creating using Enterprise Manager, 677
RAISERROR command and, 850
transfer error messages task, 602
user-defined filegroups
adding, 171, 172
checking for errors, 353
making the default filegroup, 172
placing a table in a filegroup, 174, 175
user-defined functions, creating with Enterprise
Manager, 192
users
creating database users, 376
displaying all permissions for, 404
logins and, 365
removing database users, 377
reporting user and statement permissions, 402
showing users with access to a database, 386
Using Nested Triggers Option, 89
UTC values, 814
Windows NT/2000 user accounts and groups
utilities
connectivity utilities, 661
custom messages, 677
full-text indexing, 663
query utilities, 645-659
server documentation utilities
SQLDIAG utility, 659
V
validating pointers
NULL values and the WRITETEXT function, 838
TEXTVALID function, 837
validating replicated data, 497
example, 499, 500
validation see triggers.
VALUES keyword, INSERT commands, 784
VAR function, 800
VARBINARY data type, 121
VARCHAR data type, 121
DBCC INDEXDEFRAG errors, 359
variable-length columns, 684
variables, pinning tables, 708
variances, VAR and VARP functions, 800
VBScript example lookup query, 586, 592
verification methods for replicated data, 497
@@VERSION function, 818
vertical filtering, 436
views, 709-718
see also indexed views.
alternative to setting column permissions, 381
changing, 717
creating, using DDL, 712
creating, using Enterprise Manager, 183
dropping, 718
encrypting view definitions, 713
information schema views, 840
partitioned views, 711
creating, 715
refreshing meta data for, 718
updates against, with INSTEAD OF triggers, 711
virtual servers
changing IP addresses, 559
failover clustering in SQL Server 2000
installing, 555
installing service packs for, 557
post-installation steps, 558
manual uninstalls, 560
monitoring configurations post-installation, 559
SQLDIAG utility and, 661
uninstalling, 560
virtual tables, 737
virus scanning software
possible source of database corruption, 321
possible source of suspect status, 324
post-installation checks, 36
Visual Basic problems with the DTS Execute
Package Task, 598
Visual Source Safe
archiving .dts files, 622
Unicode and, 48
VLDB (Very Large Databases)
backing up using filegroups, 170
estimating size and growth, 123
VLF (Virtual Log Files), 169, 291
W
_WA statistics, 926
WAITFOR function, 870
warm standbys and log shipping, 625
warning messages, ANSI_WARNINGS option, 150
well-formedness
root and child elements, 933
XML declaration, 932
WHERE clauses
CONTAINS predicate, 672
creating an empty table, 756
FREETEXT predicate, 675
ORDER BY clause and, 776
query performance effects, 886
SELECT statements, 765
selecting columns for non-clustered indexes, 733
updating values in a table using, 787
use with DELETE statements, 788
use with UPDATE statements, 787
using to specify a join, 763
WHILE clauses, 847
DBCC DBREINDEX and, 358
white spaces
removal with LTRIM and RTRIM functions, 805
SPACE function, 808
width-sensitive sorting, 12, 107
wildcard characters, 673
PATINDEX function, 802
Transact-SQL, tabulated, 770
Windows
client operating systems supported, 5
operating systems requirements for Analysis Services, 13
operating systems requirements for SQL Server 2000, 4
version reporting with xp_msver, 105
Windows 2000
see also System Monitor.
availability of Microsoft Clustering Services, 549
Cluster Administrator, 553
configuring for performance, 35
disk I/O and torn pages, 147
includes Windows Synchronization Manager, 476
Windows 2000 backup tool, 289
Windows authentication
see also authentication modes.
compared to mixed-mode, 364
Database Maintenance Plan Wizard job owners and, 335
defunct users and, 374
log shipping and, 627, 632
OPENDATASOURCE command using, 538
OPENROWSET command using, 537
post-installation checks, 33
Windows Collation compared to SQL Collations, 108
Windows Messaging, SQL Mail bug, 218
Windows NT/2000 user accounts and groups, 364
adding, 372, 377
denying access, 388
listing defunct users and groups, 374
979
Windows Performance Monitor
Windows Performance Monitor see Performance
Monitor.
Windows Services
DTC as, 253
SQL Server Agent as, 197
Windows Synchronization Manager, 476
Idle Settings dialog, 478
Items to Synchronize dialog, 476
interactive conflict resolvers, 492
Synchronization Settings dialog, 477, 478, 480
Windows XP, System Monitor problems, 878
WITH CHECK OPTION parameter, CREATE VIEW
command, 712
WITH clauses
see also main command.
designating table hints, 789
WITH ENCRYPTION parameter
CREATE VIEW command, 713
WITH GRANT OPTION parameter
denying permissions using CASCADE, 399
granting permissions, 396
sp_helprotect listing, 404
WITH NO_WAIT clause, ALTER DATABASE
command, 141, 142
WITH RECOMPILE option, 721
WITH ROLLBACK clauses, ALTER DATABASE
command, 140, 141, 142
WITH TIES clauses, SELECT commands, 754
wizards
see also Copy Database Wizard; Create Database
Diagram Wizard; Create Dynamic Snapshot Job
Wizard; Create Publication Wizard; Database
Maintenance Plan Wizard; Disable Publishing and
Distribution Wizard; DTS Import/Export Wizard; FullText Indexing Wizard; Index Tuning Wizard; Pull
Subscription Wizard; Push Subscription Wizard;
Scheduled Synchronization Wixard; Transform
Published Data Wizard; Upgrade Wizard.
replication configuration, 426, 501
workflow definitions, DTS
configuring workflow, 606
designating runtime order, 605
tips on, 607
Working Set Size Option, 97
workload selection, Index Tuning Wizard, 923
write caching, post-installation checks, 36
write file transformation, Transform Data Task
Properties dialog, 584
WRITE_ONLY database option, 139
WRITETEXT function, 838
full-text indexing and, 672
warning about replication and, 423, 424
980
X
XACT_ABORT user option, 101
@@ERRORS alternative, 247
distributed partitioned views require, 716
error handling in transactions, 249
nested transactions and, 545
XML (Extensible Markup Language), 931
document content, 932
FOR XML option and, 783
hierarchical data formatting, 931
methods of manipulating in SQL Server 2000, 933
outputting with sp_makewebtask, 939
querying with OPENXML, 940
related technologies, 933
Web references, 935
XML templates, 934
XML Views, 934
XMLDATA keyword, FOR XML clause, 937
xp_cmdshell stored procedure, 202
alternative to command prompt, 50
dtsrun utility and, 610
running the SQLDIAG utility, 660
xp_enum_oledb_providers stored procedure, 527
xp_logevent stored procedure, 238
xp_logininfo stored procedure, 387
xp_msver stored procedure, 105
xp_sendmail stored procedure, 216, 219
bugs with, 217, 220
xp_sqlagent_proxy_account storedf procedure,
203
xp_sqlmaint stored procedure, 335, 337-340
xp_startmail stored procedure, 220
xp_stopmail stored procedure, 221
XPath
use by OPENXML, 941
XML-related technology, 933
XSD (XML Schema Definition) annotated schemas,
934
Y
YEAR function, 814
Z
zero, division by, ARITHABORT option, 150
Download