Tribal Sql 9781906434809, 1906434808

What makes you passionate about working with SQL Server? What lessons have you learned, perhaps the hard way, on how to

247 77 8MB

English Pages 466 [324] Year 2013

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Cover Page......Page 2
Title Page......Page 3
Copyright Page......Page 4
Table of Contents......Page 5
The Tribal Authors......Page 11
Computers 4 Africa......Page 13
The Tribal Reviewers and Editors......Page 14
The Tribal Sponsors......Page 15
Introduction......Page 17
The Power of Deductive Reasoning......Page 19
Records......Page 20
Pages......Page 22
DBCC Page......Page 24
DBCC Ind......Page 26
Heaps......Page 27
Indexes......Page 28
Overview of SQL Server compression......Page 35
Version and edition requirements......Page 37
Row Compression......Page 38
Stage 1: Column prefix compression......Page 40
Stage 2: Page dictionary compression......Page 42
Where and when to Deploy Compression......Page 43
Data compression ratio vs. CPU overhead......Page 44
Performance monitoring......Page 45
Data usage patterns......Page 46
A Brief Review of Data Compression Syntax......Page 47
Combining Data Compression with Backup Compression and Transparent Data Encryption......Page 50
Summary......Page 51
Why Backup Validation?......Page 52
Why Automate Backup Validation?......Page 53
Automating Restores with Statistical Sampling: the Parts......Page 54
Retrieving a list of databases and backup files from each server......Page 55
Performing test restores......Page 58
The magic happens here......Page 60
Summary......Page 64
Is SQL Trace Still Relevant?......Page 65
Profiler: pros, cons, and best practices......Page 66
Server-side trace......Page 69
Resolution......Page 80
Preparing for Migration to Extended Events......Page 81
Conclusion......Page 88
Sliding Windows......Page 89
Defining the window frame extent......Page 91
Behavioral differences between Range and Rows......Page 93
Performance differences between Range and Rows......Page 94
Lag and Lead......Page 96
FIRST_VALUE and LAST_VALUE......Page 97
Statistical analysis functions......Page 99
Performance of analytic functions......Page 101
Summary......Page 103
Securing SQL Server, the Bigger Picture......Page 104
SQL Server Security Architecture, a Brief Overview......Page 105
The hierarchy of principals......Page 107
The hierarchy of securables......Page 108
The three permission keywords......Page 109
Creating SQL Server logins......Page 110
Fixed server-level roles......Page 115
Server-level permissions......Page 119
Database users......Page 120
Database roles......Page 124
Granting Least Privileges in the database: schema: object hierarchy......Page 125
Example 1......Page 129
Answer 2......Page 130
Further reading......Page 131
Auditing Options Not Covered......Page 133
The Basis of Auditing: Events and Event Classes......Page 134
Server-side trace for DDL auditing......Page 136
Using the default trace......Page 139
SQL Audit......Page 140
SQL Audit: creating the audit......Page 141
SQL Audit: creating the audit specification......Page 144
SQL Audit: viewing audit output......Page 146
SQL Audit: pros and cons......Page 147
Event notifications: creating an event notification......Page 148
DDL and Logon triggers: how they work......Page 153
DDL and Logon triggers: creating triggers......Page 154
Event notifications and triggers: pros and cons......Page 155
Conclusion......Page 156
My First SQL Injection Attack......Page 157
Attacking Websites......Page 160
Defending Websites......Page 162
Why blacklists don't work......Page 163
Parameterized queries......Page 165
Protecting Stored Procedures......Page 167
QUOTENAME and REPLACE instead of sp_executesql......Page 171
Automated tools......Page 172
Additional Resources......Page 173
Getting Started with Database Mail......Page 174
Enabling Database Mail......Page 175
Configuring Database Mail......Page 176
Security requirements......Page 180
Sending an email with a file attachment......Page 181
Sending an email with the results of a T-SQL statement......Page 182
Sending an email to multiple recipients......Page 183
Producing customized email alerts......Page 184
Taming Transactional Replication......Page 193
Transactional Replication Architecture......Page 194
Transactional Replication Use Cases......Page 196
Merge replication......Page 198
Deeper into Transactional Replication......Page 199
The Distributor......Page 200
The Subscribers......Page 201
The Replication Agents......Page 202
Transactional Replication Requirements......Page 203
Configuring the Distributor......Page 204
Configuring the Publisher and publication......Page 207
Configuring the Subscriber......Page 214
Monitoring Replication with ReplMon......Page 218
Subscription Watch List......Page 219
Replication latency and tracer tokens......Page 220
Getting details of errors......Page 221
Configuring Alerts......Page 223
Server and database file configuration and tuning......Page 226
Tuning replication......Page 227
Finding more details on an error......Page 231
Finding large batches......Page 232
Reinitializing Subscribers......Page 233
Summary......Page 234
Key Report Development Skills......Page 235
Communication......Page 236
Technical skills and versatility......Page 238
The Fundamentals of Good Report Design......Page 240
Requirements gathering......Page 241
Designing tables and graphs......Page 242
Choosing the Right Reporting Tools......Page 251
Reporting in the Microsoft stack......Page 252
Outside the Microsoft stack......Page 253
A personal story......Page 254
Summary......Page 256
Read more to write better......Page 258
Write right now......Page 259
A different kind of audience......Page 261
Lunch-and-learn......Page 262
Practice Pays Off......Page 263
A DBA's Crazy Workload......Page 266
The Dark Side of Being a DBA......Page 267
The Shield of Project Management......Page 268
Common project management terms cheat sheet......Page 269
Specific defensive moves......Page 271
Offensive project management......Page 276
Onwards......Page 278
Agile 101: A History......Page 280
Automation......Page 281
Communicate, constantly......Page 283
Design......Page 284
Deployments......Page 287
Tests......Page 291
Conclusion......Page 293
Habit 1: Work your Tail Off......Page 294
Habit 2: Establish the Parameters for your Success......Page 295
Habit 3: Work with Vision......Page 296
Habit 4: Train to Gain an Edge......Page 297
Habit 5: Stand on the Shoulders of Giants......Page 298
Habit 6: Control the Headlines......Page 302
Habit 7: Write a Self-Appraisal that Sparks Memory of Success......Page 303
Habit 8: Use your Review to Negotiate Rewards......Page 305
Habit 9: Don't Rest on Past Success......Page 306
Index......Page 308
Index design......Page 32
Summary......Page 33
Reporting On Success or Failure of SQL Server Agent Jobs......Page 185
Configure an operator......Page 186
Provide a Real-time Notification System for SQL Server Alerts......Page 187
Common problems......Page 189
Interrogating the Database Mail system views......Page 190
Maintaining the Database Mail log table......Page 191
Summary......Page 192
Practice Makes Perfect......Page 264

Tribal Sql
 9781906434809, 1906434808

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up