Index 965 A Abort method, 34 AbstractCollectionBase property, 800 Access client, 22–24 in-process. See In-process data access security for, 269–270 tracing. See Tracing data access Access control lists (ACLs), 567–568 Access modifiers, 908–909 Accessors in XQuery, 462–463 Account Lockout Duration setting, 236–237 Account Lockout policies, 236–237 Account Lockout Threshold setting, 236–237 Accumulate method, 213–214, 217 ACID properties in transactions, 128, 278, 500 ACLs (access control lists), 567–568 Activation in service programs, 504–509 Active Directory Users and Computers tool, 236 Activity Monitor, 782 Add Database Reference dialog box, 952–953 Add Reference dialog box for SMO projects, 774 for Visual Studio, 955–956 Add Table dialog box, 935 Add Web Reference wizard for Visual Studio, 597–598, 619–620, 624 for Webmethods, 573–575 for WSDL, 579, 600–601, 603 Addition in LDim, 182–183 in SqlTypes, 87–88 ADDR_TAB data type, 10 ADDRESS data type, 10 ADDRESS option for routes, 548 AddSubscriber method, 863 AddSubscriberDevice method, 864 AddSubscription method, 865–867 AddUser function, 93–94 ADFs (application definition files), 839–842 Adjacent Broker Protocol, 545, 550 ADO, 22–24 vs. SMO, 767–769 UDTs in, 654–656 for XDR schemas, 409–410 XML data type in, 664–667 ADO.NET API, 641–644 best practices, 890 multiple active resultsets in, 691–695 SqlClient in. See SqlClient UDTs in, 647–648 XML data type in, 657–659 AdoNetDiag, 742 Advanced Data Tablegrams (ADTG), 22 after keyword, 472 Aggregate functions with PIVOT, 361 user-defined, 207–209 best practices, 885 creating, 214–215 implementing, 209–214 in XQuery, 464 Aggregate method, 210 Aggregate partitions, 374–376 dotNET_Index 4/6/06 12:14 PM Page 965
33
Embed
Index [ptgmedia.pearsoncmg.com]ptgmedia.pearsoncmg.com/images/0321382188/index/beauchemin_index.pdf · Index 965 A Abort method, 34 AbstractCollectionBase property, 800 Access client,
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
critical, 28hosting. See Hostingmessaging, 481–493service-oriented. See Service-oriented
database applicationsAPPLY operators, 340–343<Arguments> node, 856Array data type, 11
ArrayList class, 755as first keywords, 470as last keywords, 470AS HTTP clause, 565, 570, 573, 608AS TCP clause, 552ASIN function, 154ASP.NET
for notifications, 672–673, 682SqlCacheDependency class in, 685–687for streams, 631for Webmethods, 573
Assemblies, 903–905altering, 56–58AppDomains for, 41code access security for, 270–274dependencies in, 49–51dropping, 55–56loading, 38ownership of, 51–55permissions for, 48–50, 262–268runtime hosting for, 29SGen for, 189–191SMO, 772, 774–775storing, 46–49
Assembly language, 900AssemblyInfo.cs module, 954AssemblyName property, 189Asymmetric keys, 239–243, 245, 247Asynchronous messages, 24–25Asynchronous support in ADO.NET,
743–748ATLTRACE macro, 731Atomic values in XQuery, 432Atomicity in ACID properties, 128, 278Attach to Process dialog box, 961–962Attribute-centric mapping in XML, 15Attributes
statement, 486–489, 510for broker instances, 545–547contracts in, 530for conversation groups, 518for endpoints, 497formats in, 492for lifetime, 514
BEGIN TRANSACTION statement, 129, 517BEGIN TRY phrase, 314BeginCriticalRegion method, 34BeginExecuteReader method, 744BeginTransaction method, 128–131Behaviors for types, 9Benchmarks, 28Best practices
service-oriented database applications,882–891
transactions, 133–135XML DML, 474–475
BINARY data type with XML, 387, 389,415–416
Binary representationbyte order in, 168of dates, 154–155IBinarySerialize, 167–170in LDim data type, 165–170
Binding problems, 740–742Bit data type, 416BizTalk program, 410BLOB data type, 11Blocking points in thread scheduling, 34Bodies in XQuery, 437–446BOOLEAN data type
BULK Provider, 301Business Intelligence Development Studio,
949–950Business transactions, 499–503
compensation in, 541–544contracts in, 528–531conversation groups in, 516–524conversations in, 509–515distribution in, 544–559message types in, 524–528, 530–534poison messages in, 540–541processing loops in, 534–539send types in, 530–534service programs, 503–509
Clients, 641best practices, 888–890data types for, 645–646database access by, 22–24encryption support in, 702–703failover support in, 701–702large value data types on, 667–670multiple active resultsets in, 689–695native, 641–645password change support in, 699–701Query Notification support in. See Query
Notification supportstored procedures in, 703transactions in, 695–699UDTs for, 646
from DataReaders, 648–654.NET Framework, 647–648in ODBC, OLE DB, and ADO,
654–656XML data type on, 657
in ADO, 664–667in ADO.NET, 657–659documents, fragments, and FOR XML
support, 661–664as string, 659–661
CLOB data type, 11Close method, 120, 664CLR (Common Language Runtime)
languages, 61, 897–900for extensions, 61–63
basics, 63–74details, 74–77
hosting feature in, 27parameters and return values in, 93SqlTypes in, 77–92stored procedures in, 106–109string operations in, 70–74table-valued functions in, 99–106triggers in, 109type system in, 905–907
in FLWOR expressions, 447in PIVOT, 361–364in UNPIVOT, 365in XQuery, 442
FOR PATH clause, 401FOR PROPERTY clause, 401FOR SOAP clause
for batches, 622, 626for endpoints, 565, 573for rowsets, 621WSDL option in, 579, 605, 607, 614
FOR VALUE clause, 401FOR XML clause, 403–406
for inline XSD format schema, 409–411for nested XML queries, 413–414for NULL values, 411–412for root elements, 412–413support for, 20, 23, 661–664with UDTs, 187for whitespace entitization, 413for XML data types, 407–409XMLSCHEMA version, 410
FOR XML AUTO clause, 404–406, 632FOR XML EXPLICIT clause, 404–406, 632FOR XML PATH clause, 406–407FOR XML RAW clause, 403–406force flag in Update, 849FOREIGN KEY clause, 385, 864Format.Native implementation vs.
Format.UserDefined, 215–217FORMAT option for WEBMETHOD
clause, 621Format property in SqlUserDefinedType, 165Formatters for Notification Services,
code loading in, 37–39exception handling in, 34–37.NET Framework, 29–31purpose of, 27–29resource management for, 31–34safe code in, 43–45security in, 39–40specification compliance in, 58–59
Implicit data type conversions, 83, 85<import> statement, 399Importing types into schemas, 399Imports directive, 914IN clause
with PIVOT, 361–364with UNPIVOT, 365
In-process data access, 111commands for, 121–124connections for, 118–121exception handling for, 143–149pipes for, 135–137return values for, 124–127rowsets for, 137–139SqlClient for, 111–115, 150–151SqlContext for, 115–118transactions for, 128–135triggers for, 149–150Web Services from SQLCLR for, 140–143WindowsIdentity for, 139–140
IncludeIfNotExists property, 807Index buffers, 33Indexed views, 674Indexers for SMO objects, 801Indexes
for XML data type, 401–402for XQuery, 477–480
IndexSqlSchema node, 847Infinite loops, 540Info property, 687Information identification for provider
Infosets, 18Inheritance in CLR, 908Init method, 210, 217INITIATOR direction for contracts, 529Injection, guarding against, 256Inline XSD format schema, 409–411Input/output parameters for stored
INSERT statementwith BULK Provider, 301CTEs with, 343encryption in, 238, 246OUTPUT clause in, 336–338TOP clause in, 329–330in XML, 469–473
InsertCommand command, 753–754INSERTED table, 149, 337–339Inserting rows, 112–114Instance configuration files, 834–839Instance members for user-defined types,
174–175InstanceName entry, 836InstanceName property, 796Instances in CLR type system, 910–912INSTEAD OF triggers, 290, 338Integral data types in XML, 416–417Integrity checking, 395–396IntelliSense for SMO, 766, 768Intermediate language (IL), 3Intermediate Language Disassembler
(ILDasm.EXE) tool, 726, 902–903Internal activation in service programs, 504Interoperability
in service-oriented database applications,891–894
with SqlContext, 117–118INTERSECT operator, 326–329<Interval> element, 855–856INTO clause
with INTERSECT and EXCEPT, 329with OUTPUT, 339–340with RECEIVE, 522–523with XML, 470
.NET Framework, 1–3, 897assemblies in, 903–905CLR. See CLR (Common Language
Runtime) languagesmembers in, 914–918memory management in, 918–921modules in, 901–903runtime hosting, 29–31security for, 219–220SQL Server affected by, 3–8UDTs
in ADO.NET, 647–648in ODBC, OLE DB, and ADO, 654–656
NONE validation for message types, 525<NonHostedProvider> node, 848NonPooledConnection property, 785–786Nonvalidated XML schema, 18Not a number (NaN) value, 86–87
Not invented here (NIH) syndrome, 22Notification Services, 24–25, 761, 819–821
application definition files for, 839–842applications, 821–824
Parameters element, 623Parameters property, 123, 653ParametersCollection, 653Parent axes in XQuery, 439Parent-child relationships, 334Parent navigation in SMO, 800–802Parent property, 800, 803Parents in DependencyTree, 813Parse method, 160–163, 184, 201Partitions
aggregate, 374–376PARTITION BY clause, 373–374
Password property, 783Passwords, 222
change support for, 699–701for connections, 114in HTTP authentication, 627policies for, 220, 235–238in ServerConnection, 783for SMO connections, 778, 780for SQL Server login, 784–785
PATH indexes, 477–478PATH mode, 406–407Path value, 736–737Pathnames in XML, 407Paths
in data tracing, 736–737in HTTP schemes, 570in XML, 406–407in XQuery, 438, 477–478
Pattern-based data types, 417–418PERCENT phrase, 380Performance benchmarks, 28Performance counters in SNAPSHOT
isolation, 289Performance Logs and Alerts snap-in, 739PERMISSION_SET clause, 957Permissions
434–435Precision property, 960Predicates in XQuery, 441–442Preemptive thread scheduling, 34PrepareCommand value, 728Primary indexes, 401, 477–479PRIMARY KEY option, 385Principals in security, 224–231Principle of least privilege, 140, 219Private keys, 243private keyword, 59Procedural code, execution contexts for,
253–259PROCEDURE_NAME clause, 505Processes in runtime loading, 40ProcessID property, 781–782processing-instruction function, 407Processing loops in business transactions,
534–539Processing messages in SSB, 494–499Processing serialization, 502ProcessObject function, 91Processors in marshaling data, 20Product aggregate, 208–209Projects
in SMO, 772–777in SSMS, 924–937in Visual Studio, 951–954
Prologs in XQuery, 436–437Promotable transactions, 697–699PromptPassword method, 700Properties, 916–917
from databases, 679–680dispatching in, 677–679eager notifications, 687–688OLE DB and ODBC, 676–677SQL Server 2005, 673–676SqlCacheDependency for, 685–687SqlDependency for, 680–682SqlNotificationRequest for, 682–685usage, 688–689
CTEs with, 343encryption in, 238, 246FOR XML clause in. See FOR XML clausefor queues, 491return data from, 125in SNAPSHOT isolation, 288TABLESAMPLE clause in, 376–381TOP clause in, 329vs. XQuery, 446–449
SelectCommand command, 753–754Self axes in XQuery, 440Self-signed certificates, 702Semicolons (;)
for CTEs, 344for SSB, 497
“Send a message and go on about yourbusiness” technique, 481–482
Send method, 136SEND statement, 522, 531–532SEND ON CONVERSATION statement, 489Send type in business transactions, 530–534SendResultsEnd method, 137
SendResultsRow method, 137SendResultsStart method, 137SENT BY clause, 529SENT BY ANY clause, 529SEP (SQL Server event provider), 825, 855Separation of users and schemas, 220,
best practices, 885–886BULK Provider, 301DDL triggers, 289–294Event Notifications, 294–297large value data types, 298–301plan guides and plan forcing, 306–308query hints, 303–308SNAPSHOT isolation, 278–289statement-level recompilation, 301–303
SQL-PSM queries, 19SQL Server 1205 errors, 321SQL Server event provider (SEP), 825, 855SQL Server Integration Services (SSIS),
186, 749SQL Server login
encryption support in, 702–703failover support in, 701–702password change support in, 699–701query notifications in, 673–676for SMO connections, 783–785
SQL Server Management Studio (SSMS)configuration, 925–927for Event Notifications, 297introduction, 923–924null instances in, 179Object Explorer in, 944–948solutions and projects in, 924–937templates in, 937–944for UDTs, 171for XML-based showplans, 305, 308
SQL Server Network Interface (SNI),643, 736
SQL Server Operating System (SQLOS), 28,32–34
SQL Server Service Broker. See Server ServiceBroker (SSB) service
SQL Server Surface Area ConfigurationUtility, 221–224, 571–572
SQL_VARBINARY data type, 654sql:variable function, 465, 467SQL_VARIANT data type, 90–91, 418SQL_WLONGVARCHAR data type, 654SQL_WVARCHAR data type, 654sqlBatch element, 623sqlBatchResponse element, 623–624, 626SQLBinary type, 83SqlBoolean data type, 80, 88, 90, 92SqlBulkCopy class, 150, 749–752SqlBulkCopyColumnMapping class, 750SqlBulkCopyColumnMappingCollection
class, 750SqlBytes data type, 83, 668SqlCacheDependency class, 673, 685–687SqlChars data type, 83, 668SqlClient, 8, 23
Bulk Load component in, 630–631, 636–638data type support in, 632–634features, 628–629.NET Framework for, 634–636operation of, 629–631support for, 638–640XML streams in, 631–632
SqlXml class, 633, 636, 662SqlXML element, 616SqlXmlAdapter class, 635SqlXmlCommand class, 635SqlXmlCommandType class, 635SqlXmlException class, 635SQLXMLOLEDB providers, 629–632SqlXmlParameter class, 635SSB. See Server Service Broker (SSB) serviceSSIS (SQL Server Integration Services), 186, 749SSL (Secure Sockets Layer)
encryption in, 239for Web Services, 608–609
SSMS. See SQL Server Management Studio(SSMS)
SSNRegex function, 74SSPROP_INIT_MARSCONNECTION
property, 695Stack overflow conditions, 36Stack walks, 270Standard Generalized Markup Language
(SGML), 14Standards in hosting, 58–59StartDocument method, 191STARTED state for endpoints, 552, 571<StartTime> element, 855
State propertyin Server, 769–770in SqlSmoObject, 802
Statement-level recompilation, 301–303Statement-level SNAPSHOT isolation, 279States, endpoint, 571–572Static type checking, 449, 476Statistics for SqlClient, 752–753StatisticsEnabled property, 752STATUS option for WITH ACTIVATION,
507–508Status values for stored procedures, 107STDEV function, 207STOPPED state for endpoints, 552, 571Stored procedures
in ADO.NET, 718–719attributes for, 75–77in clients, 703in CLR, 106–109extended, 5–6, 62, 115for Notification Services, 825, 850–852Object Explorer for, 944–945parameters for, 106–108in T-SQL, 5in Visual Studio, 959for Web Services, 614–622
Stream property, 668Streams in SQLXML, 631–632Strict validation, 423StringCollection class, 807Strings
text function, 407TextA event, 735TextW event, 735
Index992
dotNET_Index 4/6/06 12:14 PM Page 992
Threadsin AppDomains, 43, 748scheduling, 33–34
Tiles, 371–373TIMEOUT clause, 515Timeouts for conversations, 514–515Timers for conversations, 514–515Timestamps in message processing, 496TNS (transparent network substrate), 718TO SERVICE clause
from DataReaders, 649in ODBC, OLE DB, and ADO, 654
TPC-C (Transaction Processing PerformanceCouncil benchmark C) benchmark, 28
Tracepoints, 731tracerpt command, 734Tracing data access, 225, 731–732
application choices for, 736–740basis of, 742CSV files for, 734–735ETW in, 742–743for parameter binding problems, 740–742reading output in, 735–736running, 733–734setting up, 732–733user data in, 736
Transact-SQL. See T-SQL (Transact-SQL)transaction.h file, 696Transaction-level SNAPSHOT isolation, 279Transaction library, 697Transaction Processing Performance Council
benchmark C (TPC-C) benchmark, 28TransactionRequired attribute, 133Transactions
autonomous, 132–133best practices, 133–135business. See Business transactionsdeclarative and promotable, 697–699
distributed, 130–132, 135, 697for in-process data access, 128–135isolation levels in, 695–699
CTEs with, 343OUTPUT clause in, 336–338TOP clause in, 329–330
UpdateBatchSize method, 757UpdateCommand command, 753–754UPDATETEXT method, 670Updating XML columns, 468–475URLs
ACL for, 567–568endpoint, 570–571reservations for, 569for Web Services, 610–611
URNs (Uniform Resource Names)retrieval restrictions, 794–795for SMO object identity, 790–793
USE PLAN query hint, 306UseEventHandler method, 745–746UseExecXmlReader method, 663User assemblies, maintaining, 55–58User-defined aggregates, 207–209
best practices, 885creating, 214–215implementing, 209–214
User-Defined Function template, 954User-defined functions, 93–99User-defined types (UDTs), 11–14, 153
aggregate, 14best practices, 885binary implementation in, 165–170for clients, 646
from DataReaders, 648–654
.NET Framework, 647–648in ODBC, OLE DB, and ADO, 654–656
comparing, 12creating, 157–160, 170–173Format.Native vs. Format.UserDefined
implementations, 215–217helper functions in, 181–183IBinarySerialize, 167–170maintaining, 185–187null value implementation in, 160objects for, 193–197overview, 154–156permissions for, 267public members in, 173–181purpose of, 153–154source code for, 196–206string implementation in, 160–164validation in, 183–185in Visual Studio, 959in XML, 23, 187–193
User ID keyword, 114USER keyword in AddUser, 94User libraries, 39user_name function, 228UserDefinedFunctions class, 954UserDefinedMessage class, 803Users
adding to databases, 62in authentication, 226schema separation from, 248–252
attributes in, 957–961automatic deployment in, 956–958for connection information, 717data types and SqlFacet in, 958–959executing and debugging code in, 959–962for Notification Services, 820
void data type, 915
WWAIT FOR clause, 297, 677WaitAll method, 747WaitAny method, 747WaitHandles method, 746WatchDirectory argument, 853Watching rowsets, 674Web Service Definition Language
Web Services, 561–564best practices, 888–889HTTP endpoints
creating, 569–570declarations, 564–569metadata, 572–573in SQLXML, 639SSL for, 608–609states, 571–572URL, 570–571
and marshaling data, 20–22proxy classes, 141SQL batches, 622–626from SQLCLR, 140–143SQLXML for. See SQLXMLSSL for, 608–609stored procedures for, 614–622Webmethods, 573–578WSDL for
generation process, 605–614working with, 578–604
XML namespaces for, 604–605WEBMETHOD clause, 604–605, 621, 626Webmethods, 573–578WebRequest class, 48WELL_FORMED_XML validation, 525, 528,
533–534Well-formedness rules, 18WHERE clause
in DELETE, 338in XQuery, 442–443
WHERE EXISTS clause, 327WHERE NOT EXISTS clause, 327–328Whitespace entitization, 413 Wildcards
in OUTPUT, 339in XML, 418, 479
Windows groups, 229
Index 995
dotNET_Index 4/6/06 12:14 PM Page 995
Windows identity impersonation,782–783
Windows Management Instrumentation(WMI), 816–817
Windows XP Support Tools, 568WindowsIdentity property
for in-process data access, 139–140in SqlContext, 117
XX.509 certificates, 239, 243XACT_ABORT function, 317–319XACT_STATE function, 314–317XDR format schema, 409xdt:anyAtomicType data type, 433xdt:untyped data type, 433xdt:untypedAtomic data type, 395, 433, 448XLINQ language, 893XML and XML data type, 18, 383–384
ANSI SQL standard compliance for,422–426
best practices, 886–887on clients, 23–24, 657
in ADO, 664–667in ADO.NET, 657–659documents, fragments, and FOR XML
support, 661–664as string, 659–661
for columns, 384–387conversions with, 387, 389–390functions, 402–403indexes for, 401–402for inserting data, 387–388loading from files, 420–422mapping, 414–418as marshaling format, 20–22namespaces in, 16–17, 604–605OpenXML enhancements, 418–420overview, 14–20producing, 407–409query languages for. See XPath query
expressions in, 439for SMO objects, 791–793in SQLXML, 634
XPathNavigator class, 192XQuery 1.0 and XPath 2.0 Data Model
specification, 461XQuery 1.0 and XPath 2.0 Functions and
Operators Version 1.0 specification, 461XQuery query language, 19–20
best practices, 887bodies in, 437–446functions in, 465–467indexes in, 477–480introduction, 431–436multiple-document queries in, 468operators in, 464–467optimizing, 402overview, 429–431prologs in, 436–437schemas in, 475–477
in service-oriented database applications,892
vs. SQL, 446–449inside SQL Server, 475–480updating XML columns, 468–475with XML data type, 449–450
vs. XSLT, 445xs:date data type, 417xs:double data type, 448xs:maxOccurs facet, 417xs:minOccurs facet, 417xs:pattern facet, 417xs prefix, 393xs:string data type, 448xs:time data type, 417xs:timestamp data type, 417XSD (XML Schema Definition language)
standard, 14, 16, 21data types in, 392–393inline format schema, 409–411restrictions in, 394
xsd:annotations data type, 426xsd:any data type, 418xsd:base64Binary data type, 416, 426xsd:dateTime data type, 418xsd:decimal data type, 416xsd:hexBinary data type, 426xsd:integer data type, 417xsd:length facet, 416xsd:maxLength facet, 416xsd:string data type, 415–417xsi:nil attribute, 192, 405xsi:prefix, 393xsi:schemaLocation attribute, 394, 410xsi:type attribute, 397XSL transform for Notification Services,