Saturday, August 20, 2005
Well, I thought the first Q&A log was a monster at 4 pages... this one is 11. LOTS of questions in the Aug 12th webcast on Creating an Effective Recovery Strategy. We talked about Recovery Models, Backup Types and Best Practices and you guys had a TON of great questions! I would also suggest reading the chapter for download on the homepage of SQLskills for some additional details about the Environment Basics that Effect Recovery. All of the session links and resources are listed in this blog entry. Enjoy! With all the resource links from this one - you'll be busy till next week (and/or when I get Part 3's questions completed).
Friday, August 19, 2005 11:33:58 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 
Thursday, August 11, 2005
OK, I said that I'd post the Q&A from the session...over the weekend and well, it's well past the weekend cause it's Thursday. The next session (Part 2 of 10) is tomorrow and I'll be better posting these Q&As from here. Wow - you guys do ask a lot of questions though... ;)
Thursday, August 11, 2005 10:40:23 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 
Thursday, August 04, 2005

Wow, I've been horribly bad at blogging these days and I owe you a few entries as well... But, good news, I have a new MSDN Webcast series that will help to answer a lot of best practices in database design strategies that can help you achieve better scalability, availability and reliability. All of my demos are on SQL Server 2005 but many of the concepts apply to both SQL Server 2000 as well as 2005.

The sessions are all targeted at best practices and as such we went with a base of 200 level. Knowing me I can't go through an entire session without some internals and/or technical depth so you should expect 200-300 overall. I'm very excited about this series because everything counts! What I mean is that each and every best practice you implement helps to bring about a more scalable, available and reliable solution - there are no magic bullets only great overall design can achieve these targets!

So, what are we going to talk about in 10 - 90 minute presentations..... a lot!

Here's a link to the first one and as we get rolling, I'll blog a lot more about additional resources, best practices and of course, I'll blog the webcast Q&A as I've done in the past.

Enjoy!

Thursday, August 04, 2005 7:09:46 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 
Monday, August 01, 2005

Today, SQLskills proudly annouces an exciting addition to our company... Bob Beauchemin - a database developer and SQL Server 2005 expert in the developer space - joins SQLskills as the Director of Developer Skills. Bob brings a tremendous amount of expertise with him in having worked with computers since 1977 and a variety of databases during this time. In the time that I have known Bob, I have been impressed with both his technical expertise as well as his ability to convey complex topics with clarity. We've got quite a few things in the works and we'll keep you posted of the changes on our blogs and our SQLskills website.

In the interim, make sure to update all of your references for Bob! If you've subscribed to his blog in the past, update your links to his new blog site:

If you want to read a bit about his past, present and future, check out our AboutBob page here: http://www.sqlskills.com/aboutbob.asp

And, if you're interested in hearing the PodCast he recorded with SQL Down Under host Greg Low, check out: http://www.sqldownunder.com/. The specific downloads for Bob's recordings are here: SDU4FullShow.mp3 or here: SDU4FullShow.wma.

Exciting times indeed. Stay tuned!

 

Monday, August 01, 2005 10:01:55 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 
Wednesday, July 20, 2005

Be sure to visit all the options under "Configuration" in the Admin Menu Bar above. There are 16 themes to choose from, and you can also create your own.

 

Tuesday, July 19, 2005 11:00:00 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 
Friday, July 01, 2005

If you're not aware, there are two SQL Server 2005 contests running:

Connected Systems Developer Competition, Prize $50,000 USD
Click on the graphic for the link to the competition site:

 

Best Migration from Oracle to SQL Server, Prize - Custom Chopper (approx. $50,000 USD)
Click on the graphic for the link to the competition site:

GOOD LUCK!

Friday, July 01, 2005 12:42:25 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 
Monday, June 27, 2005

Scott Stanfield, a Microsoft Regional Director, had a great idea for Tech*Ed US (well, it was a great idea before he knew exactly how much work was involved :)...

He decided that he would get other Microsoft Regional Directors together to discuss (and record) interesting topics for just 10 minutes (of course, some of us went over... SORRY!). We could pick anything we wanted and then he would - with the help of a few other RDs such as Scott Golightly, Patrick "Beach Master" Hynds, Kate Gregory, and J. Michael Palermo - record our sessions to later edit and post on the GrokTalk site.

So, after A LOT OF HARD WORK - they're done! All 35 of the GrokTalks are posted and you can find them on the GrokTalk site: http://www.groktalk.net/

Finally, since I delivered a GrokTalk on Stored Procedures, I'm going to make sure that you have a comprehensive set of resources related to stored procedure optimizations here:

Well, now that should keep you busy...

Enjoy!!

Monday, June 27, 2005 10:02:02 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 
Saturday, June 25, 2005

On a few of my last trips, I've had the pleasure of doing a lot of customer visits - visiting some of the larger implementations of SQL Server. Many of these implementations are at banks where both performance and recovery are critical. After my trip to Turkey (where I did customer visits prior to presenting at the Microsoft Professional Developers Summit), I received this email:

As you might remember we talked at xxxbank, Turkey about performance problems in transaction log backups and splitting tempdb data file into equal size chunks equal to number of CPUs. I have implemented both optimizations in my troubled server, and the results are great! Transaction log backups do not impact the server at all and with lowered congestion in tempdb, overall system performance has gone up as well.

So - this is my first of two blog entries targeting these two VERY typical problems:
* Transaction log fragmentation (both internal and external - this customer was having problems with internal fragmentation)
* Optimizing TempDB

We'll start with 8 Steps to Optimizing your Transaction Log - not necessarily in any order. It's best to review all of these to make sure you have a comprehensive view of how to improve both performance and recovery of your transaction logs!

1) Try to dedicate the transaction log portion of your database to its own phyiscal disk. In high volume OLTP system, isolating the transaction log can allow the disk head to be ready for the next write by not having other files contend for the physical disk resource. If your database already exists, the best way to "move" your transaction log is to detach your database (sp_detach_db) and then reattach it (sp_attach_db). Here's a great KB article titled: Moving SQL Server databases to a new location with Detach/Attach.

2) Defrag the disk(s) on which your transaction logs reside. This will get rid of external fragmentation of the transaction log - better known as disk file fragmentation. This will require that your server be taken offline but if your files have had a lot of autogrowth and/or they reside on a disk with a lot of other files that have been modified, then all of your files (incl. the transaction log file) are likely to be interleaved and fragmented. The good news is that this is a one time operation (unless the files continue to grow and shrink excessively - but we'll fix that as well). The bad news is that you'll need to shutdown SQL Server and then use some form of system tool - Microsoft or third party - to defrag. On Windows XP and Windows Server 2003 machines, the disk defragmenter tool can be launched by running: dfrg.msc.

3) Create only ONE transaction log file. Even though you can create multiple transaction log files, you only need one... SQL Server DOES not "stripe" across multiple transaction log files. Instead, SQL Server uses the transaction log files sequentially. While this might sound bad - it's not. If you want to get better performance out of the transaction log, place it on faster disks and/or a more performant disk (RAID) configuration. You could place the transaction log on a RAID 0 array but you'll likely want fault tolerance as well as performance. Isolation, as per number 1 is a good start but if you also need increased capacity then using hardware based RAID to combine disks for both better performance and redundancy is your next choice. See 4.

4) Not only should you try to isolate the transaction log to its own physical disk but you should make sure that the logical/physical disk configuration is as efficient as possible. Try to use an isolated RAID 1 mirroring set if you don't need significant capacity. If you need a greater capacity OR you want better performance, consider a combination of RAID 0 and RAID 1 (either RAID 0 + 1 or RAID 1 + 0). While RAID 0 + 1 can often offer better performance, RAID 1 + 0 offers better reliability. If you're new to RAID and are interested in learning more - check out the RAID Tutorial here: http://www.raidarray.com/04_01_00.html.

5) Don't be caught up in nothing but transaction log speed, you'll also want to make sure that your transaction log is always available as this can help you in times of disaster. Even if the data is damaged, if the transaction log is available and you have a series of backups up to and including the last transaction log then you can make a final backup of the transaction log that will represent all of the changes since your last transaction log backup. If this backup is possible (it's called backing up the "tail" of the log), then you can achieve up-to-the-minute recovery. This is only possible when the log is available. By placing the log on mirrored disks you can increase your chances of recovering data and minimize data loss!

6) Create transaction log files with a reasonable initial size. When you create a database it's ideal to PRE-ALLOCATE both your data files and your transaction log file. A little bit of capacity planning goes a long way... Now, if you think that you've got absolutely no idea how to size your transaction log you're going to need, well - here are the things that have the greatest impact:

  • Type of activity - transaction processing or decision support
  • Frequency of that activity - the more frequent the changes, the faster the transaction log will grow
  • Recovery Model - the recovery model of the database
  • Frequency of transaction log backups
  • Whether or not replication is used (since the log reader relies on the transaction log)

I wish I could give you a rough idea on sizing but if you look only at database size and none of these other factors, you could end up with a transaction log that's seriously oversized or seriously undersized. I've seen recommendations of 10-25% of the size of the data and you can use that but I would also add a bit of common sense. A larger database with very frequent transaction log backups may not need a transaction log that's even 1% of the size of the data... The best way is to setup your development environment similar to that of your production environment (including backup jobs) and then see how the transaction log grows. If you have a lot of autogrowth (because your guess was wrong), you can later clean up the fragmentation that has occurred and get back to a reasonable, intact, and optimal transaction log. If you want to know more about Recovery Models and their impact on the transaction log, review a sample book chapter from an MSPress book (Microsoft® SQL Server™ 2000 High Availability) that I helped to co-author. I only helped out on a couple of chapters but this specific chapter explains a lot about the general database environment settings that impact recovery. You can download Chapter 9: Database Environment Basics for Recovery here: http://www.sqlskills.com/resources/SQLServerHAChapter9.pdf

7) Don't let autogrowth get out of control. As important as capacity planning, you're not likely to be spot-on in your estimates. I don't recommend completely turning off autogrowth but in general I also don't like SQL Server 2000's default growth rate (or max size). In general, I would recommend setting ALL of the transaction log files attributes: initial size, growth rate AND maximum size. For the growth rate, I recommend something that can be allocated somewhat quickly and something of a fixed size. In general, I recommend a value which is less than or equal to 1GB (based on total size) but something that doesn't mean that you're going to autogrow again soon. So, for databases whose transaction logs are under 1GB then you might set autogrow to somewhere between 20 and 100 MB. For those of you who have transaction logs measured in GB, then I'd set the autogrowth to 500MB or 1GB. In general, I don't like the percentage because it needs to be calculated (which I realize isn't really all that big of a deal) but the larger the file the larger the autogrowth and the longer it takes. In SQL Server 2000, autogrowth can create blocking...so, it's best to minimize this in general.

8) Check/fix your internal fragmentation. OK, so this is the one that really helped the customer in Turkey. Often, when transaction logs are not pre-allocated and/or when there's been a lot of autogrowths, the transaction log can become internally fragmented. Internally your transaction logs are broken down into smaller more granular chunks called VLFs (Virtual Log Files). The size and number of VLFs you'll have depends largely on the size that the chunk is when it's added to you transaction log. If you add a new chunk to the transaction log which is 20MB (through autogrowth or through manual growth) then the number of VLFs that are added is 4. If you add a chunk which is greater than 64MB but less than or equal to 1GB, you'll add 8 VLFs. If you add more than 1GB then you'll add 16VLFs. In general, most transaction logs will only have 20 or 30 VLFs - even 50 could be reasonable depending on the total size of the transaction log. However, in many cases what happens is that excessive autogrowths can cause an excessive number of VLFs to be added - sometimes resulting in hundreds of VLFs. Having an excessive number of VLFs can negatively impact all transaction log related activities and you may even see degradation in performance when transaction log backups occur. To see how many VLFs you have solely look at the number of rows returned by DBCC LOGINFO. The number of rows returned equals the number of VLFs your transaction log file has. If you have more than 50, I would recommend fixing it and adjusting your autogrowth so that it doesn't occur as fequently. To get rid of all of the execessive VLFs, follow these easy steps to shrink off the fragmented chunk and add a new, clean chunk to your transaction log:

1. Wait for an inactive time of day (ideally, it would be best to put the database into single user mode first) and then clear all transaction log activity through a regular transaction log backup. If you're using the simple recovery model then you don't need to do a log backup... Instead, just clear the transaction log by running a checkpoint.

 BACKUP LOG databasename TO devicename

2. Shrink the log to as small a size as possible (truncateonly)

DBCC SHRINKFILE(transactionloglogicalfilename, TRUNCATEONLY)

NOTE: if you don't know the logical filename of your transaction log use sp_helpfile to list all of your database files.

3. Alter the database to modify the transaction log file to the appropriate size - in one step

ALTER DATABASE databasename
MODIFY FILE 

      NAME = transactionloglogicalfilename 
    , SIZE = newtotalsize
)

And, that should do it!

Saturday, June 25, 2005 3:33:36 PM (Pacific Standard Time, UTC-08:00)  #    Comments [2]  | 
Friday, June 24, 2005

Many of you in the .NET Community are already familar with theServerSide.NET but many of you in the SQL Server community are not...well, here's your chance to bridge the gap over to .NET and hear a bunch of great .NET interviews! My interview is more SQL-centric but there are lots of great ones on Development in general and even one on SQL Server 2005 Reporting Services by Jason Carlson.

My interview was recorded with them back in February when I was speaking at VSLive in San Francisco and they've been saving them up, editing them and then posting an interview roughly each week (mine is the 29th posted!). The interview was great fun and Paul Ballard asked some really interesting questions about tuning, indexes, stored procedures and SQL Server 2005. Mostly it's an interview about optimization tips in both SQL Server 2000 and 2005 and just in general - things to look forward to in SQL Server 2005.

Here's a link to all of theServerSide.NET interviews: http://www.theserverside.net/talks/index.tss 
Here's a link specifically to mine: http://www.theserverside.net/talks/videos/KimberlyTripp/interview.tss?bandwidth=dsl
Here's the link to Jason Carlson's Reporting Services interview: http://www.theserverside.net/talks/videos/JasonCarlson/interview.tss?bandwidth=dsl and finally, here's a TechNet Webcast that Jason did titled: Authoring Reports in SQL Server 2000 Reporting Services (Level 200)

Enjoy!

Friday, June 24, 2005 10:09:59 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 
Thursday, June 23, 2005

On Tuesday, June 21, I had the pleasure of assisting on a TechNet webcast delivered by Michiel Wories - a Program Manager from the SQL Server Development Team at Microsoft. My assistance was limited as I really just listened and helped answer some of the questions that came up during the session. In fact, there were a few of us fielding questions and in general, there seems to be a lot of excitement around this new tool. The focus of the webcast was a new utitlity called SQLCMD. SQLCMD is a command-line tool that replaces OSQL and allows a lot of new functionality, such as: parameterization, access to environment variables, complex scripts that connect and execute against multiple servers, MUCH better code page support, input scripts, output scripts and error handling within scripts. Well, you'll probably learn more if you just watch the webcast! Below are a bunch of resources related to SQLCMD, I hope you enjoy.

Michiel Wories webcast titled: Scripting in Microsoft SQL Server 2005 (Level 300)
Michiel Wories blog entry with all of his webcast demo scripts: http://blogs.msdn.com/mwories/archive/2005/06/21/scripting_webcast.aspx

As for additional resources:
I've written a couple of blog entries that related to new SQL Server 2005 tools and specifically SQLCMD here:
     SQL Server 2005 - Management Studio Scripting Options and SQLCMD (loving it!)
Click here for the full group of my SQL Server 2005 blog entries.

Click here for the full list of all TechNet on-demand webcasts.

Click here for the list of “Get Ready for SQL Server 2005” resources!

Last but not least, here are the blogs of the other MVP's who helped answer questions during the SQLCMD session - lots of great stuff to keep reading!
Louis Davidson, Steve Kass and Kent Tegels

Thursday, June 23, 2005 11:17:25 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 
Wednesday, June 22, 2005
In general I love a lot of these big events and the crazy parties they bring (especially Tech*Ed Europe)... However, with session preptime and just general exhaustion (and age ;), it gets harder to make all of these things - but this definitely sounds like a good one. I *hope* to see you there!
Wednesday, June 22, 2005 10:43:26 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 
Monday, June 06, 2005

As I'm preparing for my Tech*Ed session on Indexing Best Practices in SQL Server 2005, I'm reminded that there are a ton of best practices that really apply to both SQL Server 2000 as well as SQL Server 2005. When it comes to indexing, there are many dependencies on the storage structures. These dependencies are the basis for why I recommend a very specific type of clustering key - for all versions of SQL Server, 7.0 and higher!

I'm going to start with my recommendation for the Clustering Key - for a couple of reasons. First, it's an easy decision to make and second, making this decision early helps to proactively prevent some types of fragmentation. If you can prevent certain types of base-table fragmentation then you can minimize some maintenance activities (some of which, in SQL Server 2000 AND less of which, in SQL Server 2005) require that your table be offline. OK, I'll get to the rebuild stuff later.....

Let's start with the key things that I look for in a clustering key:

  • Unique
  • Narrow
  • Static

Why Unique?
A clustering key should be unique because a clustering key (when one exists) is used as the lookup key from all non-clustered indexes. Take for example an index in the back of a book - if you need to find the data that an index entry points to - that entry (the index entry) must be unique otherwise, which index entry would be the one you're looking for? So, when you create the clustered index - it must be unique. But, SQL Server doesn't require that your clustering key is created on a unique column. You can create it on any column(s) you'd like. Internally, if the clustering key is not unique then SQL Server will “uniquify” it by adding a 4-byte integer to the data. So if the clustered index is created on something which is not unique then not only is there additional overhead at index creation, there's wasted disk space, additional costs on INSERTs and UPDATEs, and in SQL Server 2000, there's an added cost on a clustereD index rebuild (which because of the poor choice for the clustering key is now more likely).

Why Narrow?
A clustering key should be narrow for some of the same reasons it should be unique. If the clustering key is used as the lookup key from all non-clustered indexes, then the clustering key is duplicated in all non-clustered indexes. If the clustering key is really wide, then all of the non-clustered indexes will be [unnecessarily] wide. This will waste disk space, create additional costs on INSERTs and UPDATEs, and require more time (because of size) when rebuilding these index structures. So, what does narrow mean - as few bytes as possible to help uniquely define your rows. A narrow numeric when possible.

Why Static?
A clustering key should be static for some of the same reasons it should be unique and narrow. If the clustering key is used as the lookup key from all non-clustered indexes, then the clustering key is duplicated in all non-clustered indexes. In fact, for a given table the clustering key will be the most duplicated data. If this data changes then they'll need to update the value in the base table as well as in EVERY non-clustered index. And, if the key changes, it will cause the record to move. When a record moves, it creates fragmentation. This will waste disk space, create additional costs on INSERTs and UPDATEs, and require more time (because of record relocation and [the likely] subsequent splits) and require more maintenance. 

OK, so it sounds like I want a narrow, unique and static value... What about a guid?
Typically, I recommend a numeric IDENTITY column as the clustering key but I always get this question. In fact, I often wait to see how long it's going to take before I get this question ;). Anyway, a guid does meet the criteria fairly well - it's certainly unique, it's usually static and it's relatively narrow. So, what's wrong with it? In SQL Server 2000, the guid function (newid()) is built using a value that does not create an ever increasing pattern (an IDENTITY column would). But wait, I didn't say that you needed to have an ever-increasing pattern.....

OK, so the final criteria I look for in a clustering key is: an ever-increasing pattern!
If the clustering key is ever-increasing then new rows have a specific location where they can be placed. If that location is at the end of the table then the new row needs space allocated to it but it doesn't have to make space in the middle of the table. If a row is inserted to a location that doesn't have any room then room needs to be made (e.g. you insert based on last name then as rows come in space will need to be made where that name should be placed). If room needs to be made, it's made by SQL Server doing something called a split. Splits in SQL Server are 50/50 splits - simply put - 50% of the data stays and 50% of the data is moved. This keeps the index logically intact (the lowest level of an index - called the leaf level - is a douly-linked list) but not physically intact. When an index has a lot of splits then the index is said to be fragmented. Good examples of an index that is ever-increasing are IDENTITY columns (and they're also naturally unique, natural static and naturally narrow) or something that follows as many of these things as possible - like a datetime column (or since that's NOT very likely to be unique by itself datetime, identity). But wait, what about that a guid.

Well, in SQL Server 2000 the only SQL Server function for guids is newid - that does not create an ever increasing pattern. In SQL Server 2005, you can use a new guid function called newsequentialid() to populate your uniqueidentifier column. Here's an example of how you can use it:

CREATE TABLE Test
(
TestID uniqueidentifier CONSTRAINT Test_TestID_Default DEFAULT newsequentialid(),
Inserted datetime CONSTRAINT Test_Inserted_Default DEFAULT getdate()
)
go

INSERT Test DEFAULT VALUES
go

SELECT * FROM Test
go

Is there a way to create a sequential guid in SQL Server 2000?
YES, use Gert Drapers wrote an xp to generate sequential guids! Check it out here. He just published this recently (May 2005) and it's a good change for you in SQL Server 2000 databases/applications.
Full title with link: XPGUID.DLL - Sequential GUID generation and GUID helper functions XP

OK, so I've tackled a few things here today and I've answered a few questions related to indexes before. Check out my Indexes Category of blog entries here and if you're at Tech*Ed today, I hope to see you at 5PM.

Thanks for reading,
kt

Monday, June 06, 2005 9:48:35 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]  | 

This week is not like most others - it's Tech*Ed week. Tech*Ed is Microsoft's largest IT conference of the year...and it feels like it. It's likely that more than 12,000 people will be here this week and to hold that many people, the conference center is HUGE. Even being in a hotel right next to the convention center, it took me 20 minutes to walk over there yesterday... and we're in Florida... and it's HOT! They should have a shower facility at that place.

Yesterday, I delivered a pre-conference workshop titled: Taming the Tools. It was a 5 hour hands-on instructor-led lab session. My goal - as few slides as possible. Basically, I had 60 slides (many we exercise lead-in slides with tips/tricks) and a 72 page lab manual. I went for a 25/75 split (25% to lecture and 75% to lab time). I think we did it! We spent quite a bit of time playing with new features and everyone had fun (there were some definite ooooohhhs and aaaahhhhs through the day - especially around sqlcmd and SQL Server Management Studio). 

And that's only the pre-conference event. The conference started this morning and as always - there's a lot to do! In fact, there are a couple of new/non-standard things going on this week and I thought I'd let you know where you'd find my sessions as well as a few non-standard side events: like GrokTalks.

Monday, June 6
17:00 - 18:15: Understanding Index Usage and Indexing Best Practices in SQL Server 2005, Room: N 210 E
18:00 - 21:00: Vendor Reception. Lots to see there; I think I'll grab a beer (after my session)!

Tuesday, June 7
10:00 - 12:00: I'll be doing RD Community Booth Duty - stop by and say hi! Say you read my blog and I'll give you a SQLskills trinket (ok, don't get too excited)
15:55 - 16:05: I'll be giving a GrokTalk with the RDs - now these sound interesting! I think I'll go with some top tips/tricks and tuning steps in SQL Server, maybe some stored procedure optimizations for both 2000 and 2005...

Wednesday, June 8
10:15 - 11:30: VLDB Availability and Recovery Strategies for SQL Server 2005, Room: N 230
11:30 - 13:30: Women in Technology Luncheon - not just for women!
17:30 - 18:45: Understanding Transaction Isolation in SQL Server 2000 and 2005, Room: N 320 D/H

Thursday, June 9
10:15 - 11:30: SQL Server 2005: Bridging the Gap between Development and Administration, Room: S220D

.NET Charity Auction
Just this morning, we kicked off another .NET Charity Auction here. It's full of Microsoft Tech*Ed speakers and there are some new folks joining in. So, an hour of your needed consulting can be done by one of us where all of the proceeds go to charity. Bid early, bid often!
If you want to read more about it from Stephen (one of the original Charity organizers of the event - with Julia Lerman), go here.

SQL Server 2005/Visual Studio 2005/BizTalk 2006 Connected Systems Developer Competition
Do You Dare? Show the world what a great developer you are and have the chance to win $50,000 USD and a trip to the joint SQL Server 2005/Visual Studio 2005/Biztalk 2006 Launch event.

The Connected Systems Developer Competition has now launched. If you are a developer who uses or needs an excuse to use SQL Server 2005, Visual Studio 2005 or BizTalk then you should take a look at this competition as a reason to write some code. Not only do you have the chance to win $50,000 USD but if you are among the 15 finalists, you will be invited to the joint SQL Server 2005/Visual Studio 2005/Biztalk 2006 Launch event as well as get huge recognition for your skills.

Monday, June 06, 2005 7:35:30 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 

I think there are numerous reasons for why I love technology but at the top of the list: learning. It's amazing to me that not a day goes by where I don't dig deeper into something or clarify it further. Even learning something trivial, like a new keystroke, can make our work easier to do and make us more productive at it. Things are constantly changing; the one thing I do know about technology is that there's a lot to learn!

So, to start, thanks for everyone's feedback (esp. Steffen Krause here) on some of my recent posts regarding LEFT and RIGHT based partitioning functions here. There was a lot feedback regarding the simplicity in syntax and declaration of a RIGHT-based partition function and by making the first partition of a RIGHT-based partition function empty, YOU'RE RIGHT! We can eliminate the need for data movement. There's no performance difference and it doesn't matter internally which type you choose but - I've heard you all loud and clear! You don't like dealing with the imprecision of a datetime data type when specifying upper boundaries. So, having said that - I need to make a few changes. In my next revision of my presentation materials, whitepaper, scripts, etc. I'll work to give both perspectives. For some reason, I still like LEFT-based partition function but RIGHT is definitely easier to define.

So, keep it coming everyone. You've hit the nail on the head. The fun part about technology is... no one knows everything and we're all always learning!

Enjoy Tech*Ed!

Blog edits brought to you by Richard Campbell (long story)

Monday, June 06, 2005 6:26:21 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 
Sunday, May 15, 2005
In my pre-conference session at PASS Munich, I had a question related to the complexities of my recommending LEFT-based partitions... To keep us on track I somewhat avoided the discussion simplifying it to - "it's a best practice because of issues related to MERGE and SPLIT" AND (in typical fashion, as you guys often do :), I was later "called" on it in a discussion. This blog entry details the reasons why I feel that LEFT-based partitions make more sense in a "rolling range" scenario.
Sunday, May 15, 2005 7:20:37 AM (Pacific Standard Time, UTC-08:00)  #    Comments [3]  | 
Wednesday, April 20, 2005

OK, so I'm going to do it again... I'm going back on .NET Rocks with Carl and Richard. We're going to try to stay focused and focus on SQL Server - 2000 and 2005. I'm looking forward to chatting about events, conferences and ways to improve performance/availability! I'm also excited to chat more with Toy Boy (Richard) regarding my latest geeky demo configuration involving SQL Server 2005 partitioned tables and a USB hub........

Here's where you'll be able to get all of the information needed to hear the show LIVE as well as chat with other listeners during the show: http://www.franklins.net/calldotnetrocks/

If you're interested in hearing the first show:
Here's the link on Franklins.net: http://www.dotnetrocks.com/default.aspx?showID=75
Here's the direct link for download from msdn: http://www.microsoft.com/downloads/details.aspx?FamilyId=18D23441-A24E-4BA3-8594-D29CD4D32979&displaylang=en
Here's the full list of DNR shows on msdn: http://msdn.microsoft.com/dotnetrocks/Default.aspx.

Thanks for listening!
kt

Wednesday, April 20, 2005 11:59:35 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]  | 
Monday, April 11, 2005

For the past couple of years, the early betas of SQL Server 2005 were very limited and even the events were somewhat limited - limited primarily to large customers under NDA, MVPs, RDs, and very dedicated SQL Server specialists. So far, only the SQL Express 2005 Edition made it on microsoft.com for download (click here if you're interested in SQL Express and the SQL Express Manager downloads)...

SQL Server Beta 2 and soon SQL Server Beta 3 have had slightly wider distribution, even being handed out to SQL Server conference attendees (such as at now PAST SQL Connections conference in Orlando), etc. but in most cases you need to have your own clean machine to install on and play with and you really need to have a completely spare machine as you don't want to impact any of your production and/or otherwise critical applications. For some, this meant not installing it at all.

If you're still waiting to get your hands on it, you have a new option! The SQL team has created a virtual lab environment.

Below is the promotional blurb I received. And, I decided to check it out for a second. When you click you'll need to install an ActiveX control, register and then login. Once logged in, you'll select your lab environment and then they will “build it”. Once selected, you'll have 90 minutes to complete the lab (and you can only enter one lab at a time) and you can download/print your lab manual (pdf format) to help you along. The feel is very similar to using Virtual PC and the build that was used in the labs I entered - was the December CTP of SQL Server (IDW 11). The current beta on Beta Place (for SQL Server 2005 Beta Subscribers is the February CTP which is IDW 13). Performance in my quick look around (of menu items, SSMS, etc.) seemed pretty good but I also have a decent internet connection. I started this process but didn't actually complete a lab yet... it's certainly worth checking out! Now you don't even need to install it yourself, you can use a Virtual Lab environment. If you do check it out - good or bad - let me know!

*************************************************

Are you ready to experience SQL Server 2005?

Announcing the launch of the SQL Server 2005 Virtual Hands on labs. In these labs, you will get to experience many of the new features in SQL Server 2005 including CLR integration, XML support and deep business intelligence integration.

Just follow the link and experience SQL Server 2005 for yourself!

Registration link:
http://msdn.demoservers.com/login.aspx?group=sql2005

*************************************************

Monday, April 11, 2005 2:03:23 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]  | 
Thursday, March 31, 2005

When I first heard about "stored procedures being written in C#, VB.Net, ... etc." I remember thinking; Is Transact-SQL dead? Am I out of a job? What does this mean for me and for DBAs in general? Luckily, I learned quickly that not only is Transact-SQL not dead but it's got some significant improvements that might make code written in client applications A LOT easier - for example:
    1.      New syntax to traverse hierarchical/recursive relationships,
    2.      Extended XML integration,
    3.      Much improved error handling,
    4.      Easier in-database pivoting of data

I was worried that the CLR would cause problems for the stability of the database, acting like badly written extended stored procedures which can leak memory, crashing the server or even worse, potentially become a vector for worms and viruses. However as I learned more about the technology, I think that Microsoft has put in the work to give the DBA control over this technology. SQL Server controls the memory used by the CLR, there is a fully integrated security model and the DBA has control over what the CLR code can do and can even turn off the CLR completely on systems that will not use it. In fact, I also learned that the SQLCLR was going to be "off by default" as well. And, for me, as well as many DBAs, I think these points have squashed many of our fears. But then I almost felt like I was missing something? If things didn't need to change then why are they changing?

So, then I just wanted to know more about why the extension was being made to begin with and when and why it might be useful. From considering that point alone came the most important thing I've learned about SQL Server 2005; there are many new ways of doing things: Transact-SQL; SQLCLR; XML; Full-Text; Integration Services; Analysis Services; and all of them have different benefits and implementation effects. DBAs need to learn when to choose each of the technologies and even more importantly when their use is not appropriate, even when they're not an expert in all of them (and I truly think it will be a challenge to be an expert in every area of SQL Server 2005).

SQL Server 2005's feature set has been expanded such that C# or VB.NET can natively run in the server. This gives you immediate access to the power of the .NET Framework and helps to allow better integration with existing utility components and web services already in place. Some of the greatest benefits are that it allows you to place complex computations on the server - close to the data - without having to send large amounts of data to a separate application server. And all of this is done while SQL Server manages memory and resources ensuring a more balanced server system. So, my main recommendation for DBAs who are skeptical is to not worry about knowing everything about SQLCLR but instead focus on why it might be proposed and determine if SQLCLR is really the best way to handle it!

I’m still convinced that Transact-SQL wins when interacting with SQL Server using set-based SQL commands, but if you have a stored procedure with a cursor it may be a candidate for the CLR, if you have code that loads all the data in a table to perform special aggregations it may be a candidate for the CLR, as might your table valued functions (as the CLR does a really optimized job here). To sum up: the DBA has to get a grip of these new technologies and not let the development community overturn years of best practices in database system design – the same principles apply, there is just a richer toolset that, when used wisely, should improve performance and developer productivity.

Thursday, March 31, 2005 9:31:34 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]  | 
Wednesday, March 30, 2005

OK, so I've been bad (at best) at blogging this year... but I'll blame some of that on the fact that I've done more travel in these first three months of the year then I've ever done. Yes, I've been to Charlotte, NC (for a SQL Server 2005 Ascend Workshop) then Dallas, TX (for yet another Ascend Workshop) then Cairo, Egypt (for the MiddleEast Developers Conference) then Brussels, Belgium (for Dev and ITPro Days) then San Francisco, CA (for SQLLive) then London, UK (for another Ascend Workshop) then Zurich/Interlaken, Switzerland (for TechDays) then Orlando, FL (for SQLConnections) and now I'm home for a couple of weeks (well, kind of that's another story for another day :)). But, yes, I did come back to Redmond (home) a few times in there but - it's been busy to say the least! It's really been an amazing year! From a technical perspective, I can't tell you how many exciting projects I've seen and how many interesting customer scenarios I've been presented with. Some of the planned implementations of SQL Server 2005 and even some of the changes still occuring to SQL Server 2000 implementations are incredibly interesting, challenging and innovative! And on the learning side, I've been completely burried in Yukon, x64 and Developer stuff too (like SQLCLR and C#). I've been working on new courses, new presentations, two already posted whitepapers (see “Online Resources” for links) and two more are coming... And - even more exciting, I'm also working on a couple of pre-conference seminars that will be a blast!! And, that's part of why I'm writing. There are three events coming up where the seating is limited. I thought I'd give you some of the details/highlights so if you're on the fence you can sign up before they sell out. So, let me tell you about the three coming up:

PASS 2005 European Summit
Munich
, Germany - May 10, 2005 - 9:00 am to 5:00 pm
The Next Generation DBA
Critical New SQL Server 2005 Features YOU Need to Learn!
This is a full-day lecture/demo packed session where I'll also provide demo scripts (posted on my website) and I'll spend the entire day drilling into the new features of SQL Server 2005 that offer you better data availability. But what does that translate to: Database Mirroring, new Piecemeal Restore/Recovery, fast file initialization, database snapshots, table/index partitioning, snapshot isolation and even some details regarding index-related changes. However, I have two sessions at the event that will cover Best Practices and Changes to Indexing so I'll save those details for the breakout sessions and pack more details into the availability topics. In fact, THE ABSOLUTELY MOST GEEKY demo you will ever see - will be done during this session! (Wow, I've certainly set the bar high for that demo, I hope I can live up to that expectation :).
Check out this link for more details: http://www.sqlpass.org/events/Europe/2005/Pre_Con.cfm.

Microsoft Tech*Ed US
Orlando, FL - June 5, 2005  - 1:00 pm to 6:00 pm
Taming the Tools
Effectively Using and Understanding SQL Server 2005 Tools
This is a first! We’ve decided to have a room packed full of PCs – loaded with Yukon – and we’re going to hammer out a TON of exercises for a full 5 hours. I’ll be lecturing, demo’ing and doing “instructor-led walkthrough” exercises while you get real hands-on experience with Yukon. We'll be focusing on using the tools to make sure that you'll effectively use the right tool for the job! There are all sorts of little hidden treasures in SSMS (SQL Server Management Studio), Profiler, Computer Management, etc. and I've been working with the Tools team to make sure I know about them and I will certainly let you know about them! There will even be a few additional folks present (SQL folks) to make sure that everyone stays on track, focused and that all your exercises go smoothly. And - to make things even better, I’ll be providing all of the exercises and demo scripts (and of course, printed slides) so that you can take everything home and continue to play! This is an exciting one (and definitely limited in the number of seats, hint, hint J) and the early bird discounts end on April 15 (fyi).
Check out this link for more details: http://www.msteched.com/content/precons.aspx#DBA001.

Microsoft Tech*Ed Europe
Amsterdam, the Netherlands - July 4, 2005 
- 10:00 am to 5:30 pm
Taming the Tools
Effectively Using and Understanding SQL Server 2005 Tools
OK, so this might be a tad misleading… it appears to be an exact copy of the US Tech*Ed session (at least in title) but in fact, it's not! First, the format is very different. The US session will be 5 hours – and hands-on. The European session will be lecture and demo and over 6+ hours so I’ll be adding more content, more demos and more stuff to work with. And, just like the US session, I’ll be providing all of the exercises and demo scripts (and of course, printed slides) so that you can take everything home and continue to play!  
Check out this link for more details: http://www.mseventseurope.com/TechEd/05/Pre/Content/PCTools.aspx.

And, if you're at any of these events, I look forward to seeing you there! I'm certain we're going to have some fun. Make sure to say hi and tell me you read my blog. It's always fun to meet people who read this! Oh speaking of reading this, here's a strange challenge (and probably very unlikely given the locations). If any of you attend all three... We can continue the discussions of the pre-conference seminars over dinner - in Amsterdam - on July 4th. My treat!! And - in the unlikely event that dozens of you attend all three (yeah, right) well, then beers and a not-quite-so-decadent-dinner-in-Amsterdam is on me! OK, I'm in a weird mood today... What can I say!

Finally, if you're wondering why I no longer allow comments.... ugh, blog spammers from h*ll. I'll bring back comments again after I do a bit of tweaking so I can get the blog spammers to go away!

Thanks for reading!

Wednesday, March 30, 2005 11:02:12 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  | 
Monday, February 14, 2005

About one month ago, I purchased two new laptops (don't even go there on why I purchased two; however, it's sufficient to say that I travel a lot and I believe in redundancy...my machines are usually setup so that either machine can do demos, etc. Yes, road warrior HA :) but heavy as heck and the airlines HATE me. Again, don't go there). Anyway, the machines are Compaq Presario R3000Z latops with AMD Athlon 3700 64bit chips, 2GB of memory (yeah!), widescreen and a few other gadgets (like DVDRW, 64B NVIDIA GeForce). Overall, I found the prices MUCH better than the equivalently equiped 32bit machines. But - before I get to why I chose 64bit let me say a few things about a couple of the features:

What about the widescreen... I'm kind of on the fence about this one. I certainly like the fullsize keyboard but when it comes to presentations (considering presentations are rarely widescreen), this means the far left and right edges are black bars and I can't really get the same large square 1600x1200 that I used to get on my old high res laptops. This runs 1680x1050 - which is very nice but again, a bit weird when I present. In fact, it took me a couple of presentations to really figure out how to configure the screen to not just display on a little tiny 1024x768 window centered on this big screen (wow did that stink). If you get one of these make sure you figure out how to project the primary image with “aspect ratio scaling” turned on. This makes a big difference if you're displaying 1024x768 on a high res monitor... Having said all of that however, MOVIES are great and certain applications can VERY nicely use this extra space like Outlook with preview pane, SQL Server Management Studio (SSMS), Visual Studio (VS), etc... So, not really completely on the fence but what I get used to doing with tools (like VS and SSMS) look very different when I switch to 1078x768 so that throws me off a bit when I'm presenting.

What about the touchpad... well, I was used to the track point (I think that's what it is called) which is the little tiny mouse that's the size of an eraser and sits in the middle of the keyboard (I think between HJ) and I have to admit... I'm still not used to the touchpad. On my old machine I used to always turn off the touchpad and now I'm finding that I'm almost useless without an external mouse. OK, this will just take me time. I'm told that I will eventually LOVE the touchpad but.... well, I'm just not there yet :)

And finally, what about the chip... am I running an x64 OS... Well, not yet. I have to admit that so far, I've stuck with the shipping OS which is Windows XP SP2 and so far things have been running well.

However, THIS week I'm going to install the RC2 x64 release of Windows and so far, I haven't decided if I should go with x64 XP or x64 2003. I'll certainly let you know. BUT - part of why I'm writing this blog is... Will your application run on x64? Well, that I don't know either. I'll be maily running SQL Server 2005 and in this press release SQL announced support of the AMD64 chip. What I plan to do is blog a bit about what I will gain in doing this on the desktop as well as why you might consider 64bit - either now or in the future for your machines - personal or enterprise server (and there are clearly quite a few reasons to do this). In the interim, you might want to check out the SQL Server site for 64bit computing here.

In the interim - you should DEFINITELY check out the new Windows Server Division Weblog and if you're an ISV, I want your application to work (and you should too :). For all ISVs, you should get involved and even let the Windows Server team help promote your app. They're looking for information about your application in this blog entry titled: Will your ISV App support Windows Server 2003 x64?

Feel free to post comments. What will I gain? What will I lose? Is there anything I should be aware of? Do any of you have this machine? Stay tuned!

Monday, February 14, 2005 1:37:06 PM (Pacific Standard Time, UTC-08:00)  #    Comments [5]  | 

Theme design by Jelle Druyts

Pick a theme: