... objects
MicrosoftMicrosoftExample
MicrosoftMicrosoftOutlineIntroduction to SQL ServerRelational Data ModelExploring SQL Server Architecture Data Access Architectures SQL Server Services & Tools SQL Server EditionsEvolution of SQL Server Summary
MicrosoftMicrosoftData ... IDE
MicrosoftMicrosoftSQL Server EditionsEnterprise (Developer) EditionStandard EditionWorkgro...
... created by users
MicrosoftMicrosoft
Surface Area Configuration
New Installation SQL Server 2008
SQL Server 2005 SQL Server 2008
Services disabled and
features not installed
by default
State of ... Environment
Registered
Servers
MicrosoftMicrosoft
Outline
√
Integrated Management Environment
√
Navigation
√
Administering Databases
Maintaining SQL Server Database
Writing T...
... image
Others
sql_ variant, timestamp, xml…
MicrosoftMicrosoft
User-defined Data Type
Extending the SQL type system as
alias data types that consist of a single SQL Server system data ... data management
•
Enterprise-scales only
Example
•
Windows File Servers
•
NetApp NetFiler
•
EMC Centera
•
Fujitsu Nearline
•
SQL Server
VARBINARY(MAX)
Use File Servers
DB
Application
Ap...
...
MicrosoftMicrosoftVariablesSQL Server supports two types of variables in T -SQL @@global_variable@local_variable
MicrosoftMicrosoftList of Global variables @@CONNECTIONS Number of connections made to the server ... access to the data in a result set for T -SQL statements in scripts, stored procedures, and triggers
MicrosoftMicrosoftCursor ImplementationsTransact -SQL Server Cur...
... UpdatedBackOrdersBackOrdersProductIDUnitsOnOrder … 1123 1510652 15 Trigger Deletes Row
MicrosoftMicrosoftProductsProductsProductIDUnitsInStock… 123 415106520Enforcing Business Rules Products with ... AS P INNER JOIN Inserted AS ION P.ProductID = I.ProductIDProductsProductsProductIDUnitsInStock… 123 4151065202 15
MicrosoftMicrosoftActivating Insert TriggerStep 1INSERT statement to a table...
... ProviderSystem.data.dll+{System.data}….IDbConnectionIDbCommandIDataReaderIDbTransactionIDbDataAdapter….System.data.dll+{System.data.SqlClient}….SqlConnectionSqlCommandSqlDataReaderSqlTransactionSqlDataAdapterSqlCommandBuilderWarning: There is no IDbCommandBuilder
MicrosoftMicrosoftDataReaderFast Forward-Only/Read-Only ... create SqlMetaData to describe the resultSqlMetaData[] columns = new...
... Integrity(between tables)User-definedintegrity
MicrosoftMicrosoftEnforcing Data IntegrityDeclarative data integrityDefined in object definitionsEnforced automatically SQL Server by using constraints, ... USE NorthwindALTER TABLE dbo.EmployeesADD CONSTRAINT CK_birthdateCHECK (BirthDate > '0 1-0 1-1 900' AND BirthDate <getdate())
MicrosoftMicrosoftDEFAULT Constrain...
... EnumLocks• SQL Server Profiler • System Monitor
MicrosoftMicrosoftConsiderations for Using TransactionsTransaction guidelinesKeep transactions as short as possibleUse caution with certain Transact -SQL ... TRANSACTION INSERT INTO Extensions (PrimaryExt) VALUES ('555 121 2') INSERT INTO Extensions (VoiceMailExt) VALUES ('55 5121 2') ROLLBACK TRANSACTION
Microsoft...