C2 security tracing
auditing DBA, 221
resource costs, 221
CA (Certificate Authority), 244
installing SSL certificate, 244
cached query plans
performance gain of stored procedures, 11
cascading triggers
AFTER trigger, 210
execution sequence, 210
CASE statements
decisions, 23
flow control of stored procedures, 23
syntax, 23
Certificate Authority
see CA.
CHECK constraints, 124
compared to stored procedures, 17, 124
compared to triggers, 127, 212
data validation, 124
domain integrity, 212
Client Network Utility
changing client settings, 222
CLOSE statement
accessing cursors from code, 73
using as soon as possible, 80
code, downloading samples, 247
COLUMNS_UPDATED test
firing triggers on INSERT or UPDATE action, 205
POWER() function, 206
SUBSTRING() function, 206
Command object
see SqlCommand class.
command terminator
Go keyword as, 48
CommandText property
SqlCommand class, 117
commenting stored procedures, 18
COMMIT TRANSACTION command
simple transactions, 82
triggers, 211
complex AFTER trigger, 208
complex result set
building with RAND() function, 76
formatting result set using cursors, 76
computed column
creating index using deterministic function, 183
conceptual tables
triggers, 204
concurrency, 65
coding for integrity and concurrency, 99
optimistic locking, 101
pessimistic locking, 100
definition, 65
description, 91
guidelines for concurrency, 108
hardware issues, 92
OS (Operating System) issues, 92
SQL Server concurrency controls, 93
Connection object
see SqlConnection class.
Connection property
SqlCommand class, 117
consistency
ACID properties, 82
constraints
CHECK constraints, 212
data validation, 124
FOREIGN KEY constraints, 124
cost
execution plan, 44
importance of cost analysis, 47
operator cost, 45
query cost, 44
thick arrows as cost measure, 45
example, 46
COUNT() function, 180
CREATE FUNCTION statement
creating user defined functions, 181
CREATE PROCEDURE statement
creating stored procedures, 9
syntax, 9
WITH RECOMPILE clause, 20
CREATE TRIGGER statement
creating triggers, 202
AFTER trigger, 203
INSTEAD OF trigger, 203
NOT FOR REPLICATION option, 203
CRYPTO API
encrypted stored procedures, 239
cursor source, 69
CURSOR_DEFAULT setting
ALTER DATABASE command, 67
cursors, 65
accessing cursors from code, 70
@@FETCH_STATUS variable, 72
CLOSE statement, 73
DEALLOCATE statement, 73
FETCH statement, 70
OPEN statement, 70
compared to set-based operations, 66
compared to user defined functions, 66
definition, 65
description, 66
guidelines for using, 80
minimizing cursor data set, 80
minimizing use, 108
syntax, 67
alternate cursor syntax, 70
special cursor syntax, 67
temporary tables and, 74, 77, 78, 80
using cursors, 73
batch operations, 78
formatting result set, 73
customer support, 248