Just over a month since SQL Server 2008 went to RTM and the first Cumulative Update (CU1) has been released. Bob Ward, a very good friend of mine, and a Principal Escalation Engineer in the SQL Server Product Support team published a detailed blog post on Friday explaining how to get it and install it.

If you're not subscribed to the PSS blog, you should be. They post a ton of great info on how things work and how to work around bugs. Bob just blogged again today about how SQL Server 2008 Setup itself can be patched - not a trivial problem to engineer around.

Checkout the PSS blog at http://blogs.msdn.com/psssql/default.aspx.

Categories:
Install / Setup

For the first time in ages, Kimberly sneaked in an interview without me! I was teaching a class on Database Maintenance for some Microsoft DBAs and Kimberly recorded a RunAs Radio interview on her favorite subject - indexes. I love listening to her talk about indexes - or maybe I just like the sound of her voice :-)

Check it out at http://www.runasradio.com/default.aspx?showNum=76.

Enjoy!

PS She also drops some hints about an upcoming project of ours...

It's been almost two weeks since my last post as we've been offline in Scotland (another photo post to follow - I owe you two now...) but now we're back for the crazy Fall conference and teaching season.

The latest installment of my regular Q&A column in TechNet Magazine is available at http://technet.microsoft.com/en-us/magazine/cc895648.aspx. This month I cover the following topics:

  • How backups and restores work and why the times for each may differ
  • The difference between log shipping and database mirroring around BULK_LOGGED operations
  • How other factors apart from log backups can contribute to excessively large transaction logs
  • Why database repair exists and why it shouldn't be used
  • Tracking index usage with sys.dm_db_index_usage_stats

Enjoy!

 

 

 

 

Over the last six months on the blog, you'll have seen me mention internal training that Kimberly and I wrote for Microsoft on SQL Server 2008. This deep training covers all the features around database infrastructure and scalability and we've just finished revamping it for RTM. We did a one-day version of this content at TechEd in June, and last week for the Microsoft Ireland "SQL Academy" training program, but we've never presented the course to the public - until now!

We're teaching the entire demo-laden 2.5 day course at the Connections event in San Fransisco next month, including the hands-on labs. Click the image for full details and registration.

Here's the abstract:

SQL Server 2008 offers an impressive array of capabilities for professional developers that build upon key innovations introduced in SQL Server 2005. The use of many of these will have manageability and infrastructure implications for a database - and hence the DBA! There are also enhancements to existing high-availability technologies, plus a variety of significant new tools to aid in managing performance, scalability, administration, and troubleshooting. This workshop helps you understand how to exploit the new toolset and how to manage a database that makes use of the new features in SQL Server 2008. The multi-day format of this event allows us to explore each feature in more detail, with more in-depth demonstrations and labs.

Topics covered include:

  • Availability Enhancements
    • Database Mirroring
    • Backup Compression
    • Peer-to-Peer Replication
  • Security Enhancements
    • Transparent Data Encryption
    • Extensible Key Management
    • All Actions Audited
  • Policy-Based Management and Multi-Server Administration
  • Troubleshooting and Resource Management
    • Resource Governor
    • Extended Events
  • New Development Technologies
    • Spatial Indexes
    • Sparse Columns
    • Filtered Indexes and Statistics
    • Change Tracking and Change Data Capture
    • FILESTREAM
  • Performance Data Collection
  • Scalability Enhancements
    • Data Compression
    • Partition-Level Lock Escalation

Who should attend this workshop?

  • Database administrators
  • IT Pros who also manage databases
  • Application developers who would like to know how feature choice affects database scalability and infrastructure requirements

What are the benefits of attending this workshop?

  • Learn all the essential elements of SQL Server 2008 administration in an interactive, instructor-led format
  • Learn about the new features of SQL Server 2008 that developers will use that have management implications
  • Deep and intensive 200-300-level technical training custom-designed for professional DBAs and IT-Pros
  • Courseware developed by Paul S. Randal and Kimberly L. Tripp of http://www.sqlskills.com/, pre-eminent experts in SQL Server administration
  • Get hands-on experience with SQL Server 2008 administration

This workshop runs Oct 6 (9am - 4pm), Oct 7 (9am - 4pm), Oct 8 (9am - 12pm).

Categories:

At the last Connections conference in April, the conference organizers tapped a bunch of speakers for interviews, articles, and other content to put into a free "newsletter" called MyDevConnections, and now it's finally available. It covers all the Connections conferences, so isn't just limited to SQL Server. As far as SQL is concerned, Kimberly and I wrote an article about our favorite SQL Server 2008 features (data compression and filtered indexes, respectively), and Ross Mistry wrote an article on hardening a SQL Server 2005 installation. There's also an extract from a Women in Technology interview that Kimberly took part in. Overall there's 84 pages of content in the PDF, with some adverts for the Connections shows (obviously).

Check it out at http://www.devconnections.com/mydevconnections/S08_DevOnlineMag_Web.pdf

This is the second of the two sessions I recently recorded with Richard and Greg on RunAs Radio (the first one on being an "involuntary DBA" is here). I've just finished the final edited version of a whitepaper for Microsoft on the FILESTREAM feature of SQL Server 2008 and this session goes into details of why you'd want to use it and how to setup a system for optimal FILESTREAM performance. The whitepaper should be available before PASS in November, in the meantime, checkout the show!

The show is 35 minutes long and you can download it at http://www.runasradio.com/default.aspx?showNum=74.

Enjoy!

In the last few classes I've taught, we've discussed the on-disk structures where everything is stored in a database, and I've also been asked privately where all the info is on my blog. I know that a lot of people reading my blog now are new in the last six months or so and will have missed some of the earlier foundation info I posted. Now, admittedly, there's a ton of stuff in my blog archive and most people have limited time to go trawling through it, so I'll do a few posts that just list suggested reading based on my posts.

First up are on-disk structures - here are the posts to read:

Have fun!

Categories:

Well, it's been a year since I left Microsoft (8/31/07) to join Kimberly running SQLskills.com - and what a blast it's been!

From 8/31/07 to 8/31/08 I've:

  • Had one front-page article in TechNet Magazine
  • Written two whitepapers
  • Presented at 4 conferences
  • Taught in 5 countries outside the US
  • Taken 39 flights (still 18 more to go in 2008...)
  • Posted 182 blog posts
  • Had more than a million hits on my blog!! (actually way more... 1,305,717)

The last one's awesome - I love blogging stuff and it's really cool that so many people read what I write. Thank you all for all your comments and support over the year. I wonder how many of those numbers I can better over the next year?

Cheers!

Categories:
Personal

I just heard today that the first whitepaper I've written for Microsoft has been published!

The abstract is:

SQL Server Replication: Providing High-Availability using Database Mirroring

This white paper describes how to use database mirroring to increase the availability of the replication stream in a transactional environment. It covers setting up replication in a mirrored environment, the effect of mirroring partnership state changes, and the effect of mirroring failovers on replication. In addition, it describes how to use LSN-based initialization to recover from the failover of a mirrored subscriber database.

Although brief overviews are given of both replication and database mirroring, it is easier to understand this white paper if the reader has some experience with one or both of these technologies, and has at least a rudimentary knowledge of database concepts such as transactions.

You can download it from http://download.microsoft.com/download/d/9/4/d948f981-926e-40fa-a026-5bfcf076d9b9/ReplicationAndDBM.docx and I'll put a link in our whitepapers page.

Enjoy!

(Quickie post #3 while it's Kimberly's turn to lecture this morning - better pay attention now before I get into trouble)

Gail asked a (paraphrased) question about the trick to hacking a detached suspect database into the server again - will it work for a detached database with multiple data files in the primary filegroup where one of the secondary data files has a corrupt file header page?

Well, based on my experiences and investigations of file header corruption (see my previous post here) my initial reaction was to say "it will attach but you won't be able to access the database". However, I'd like to try it first - so I'm trying it while writing this post. I've taken the DemoSuspect and added a file, then detached the database and corrupted the first page in the ndf file using my trusty hex editor. Trying to attach the database again gives:

EXEC sp_attach_db @dbname = N'DemoSuspect', 
   
@filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\DemoSuspect.mdf', 
   
@filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\DemoSuspect_log.ldf',
   
@filename3 = N'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\DemoSuspect.ndf';
GO

Msg 5172, Level 16, State 15, Line 1
The header for file 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\DemoSuspect.ndf' is not a valid database file header. The PageAudit property is incorrect.

Ok - just what I expected. Now I'll copy off the files, create the dummy database, shutdown the server, swap in the corrupt files, and restart the server. So what happens?

USE DemoSuspect;
GO

Msg 945, Level 14, State 2, Line 1
Database 'DemoSuspect' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.

SELECT DATABASEPROPERTYEX ('DemoSuspect', 'STATUS') AS Status;
GO

Status
--------
SUSPECT

ALTER DATABASE DemoSuspect SET EMERGENCY;
GO

Msg 5172, Level 16, State 15, Line 1
The header for file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\DemoSuspect.ndf' is not a valid database file header. The PageAudit property is incorrect.
Msg 5120, Level 16, State 9, Line 1
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\DemoSuspect.ndf". Operating system error 0: "(null)".

Well, the database gets hacked back into the server, but the corrupt secondary file header trumps everything else - the whole database is unusable because that data file in the primary filegroup is essentially offline. This is because an offline (or inaccessible) file means the filegroup it is part of is offline (or inaccessible) - and an offline primary filegroup means the whole database is offline.

If the secondary file is in a non-primary filegroup, then that filegroup can be manually set offline and the rest of the database is available, in Enterprise Edition - partial database availability.

So, the hack method will work, but whether the database is accessible or not depends on how the database is corrupt in the first place.

Theme design by Nukeation based on Jelle Druyts