BorderLayoutBoxedLayoutOpenLayoutMaximum textMedium textSmall text


Register
Friday, July 03, 2009
SQL Blog Post AggregatorMinimize
Subscribe to this aggregation
Happy Contribupendence Day

SQLServerPedia | 7/3/2009 4:28:35 PM

Last year, Jeff Blankeburg came up with the idea of Contribupendence Day. To save you from visiting Jeff’s site and reading another blog post, Contribupendence day is a day when we acknowledge the people who help out our community. Mladen Prajdić - Mladen is slowly becoming better known in the SQL Server community, in large part [...]

EDMPASS – July Meeting

SQLServerPedia | 7/3/2009 11:40:08 AM

In July the Edmonton Chapter of PASS is going to have it’s 2nd meeting. Details below: http://www.eventbrite.com/event/378687665 Please be sure to not only click the “Add to my calendar” but also the “Register” button so that we can plan accordingly for food and drinks.  Date:  July 29th 2009 Time: 5:00 pm - 7:00 pm Location: Stanley A. Milner library Map: 7 Sir Winston Churchill Square Meeting [...]

Quote of the Day: On Keeping Ease in its Place

Carpe Datum | 7/3/2009 10:07:13 AM

I admire people who have overcome difficulties to achieve. I find so few people today that can stand any adversity - people whine and complain at the slightest inconvenience. In the past character seemed to matter more, and Helen Keller was one such person of character. She said: 

"Character cannot be developed in ease and quiet. Only through experiences of trial and suffering can the soul be strengthened, vision cleared, ambition inspired and success achieved."  - Helen Keller

Fourth of July

SQLServerCentral.com | 7/3/2009 8:54:00 AM

Read the Declaration of Independence and then it’s time for fireworks and grilling, maybe some apple pie too!

Star Search It Ain’t

SQLServerPedia | 7/3/2009 8:18:52 AM

So, you have something to say about the technology you dabble in? You have a depth of knowledge? Why keep it to yourself or only discuss it with the 8 people that read your blog? Put together a Powerpoint presentation, get out to your local user group and SPEAK!

Leeds Area SQL Server User Group Meeting, Leeds - Monday 20th July

SQL Server Community Blogs | 7/3/2009 5:39:00 AM

Managing a large SQL Server estate If size matters Martin Cairney would have the bragging rights!! Martin Cairney Martin Cairney has over 10 years experience as a SQL Server DBA. In his time he has worked for one of the largest IT services companies in the world deploying and supporting SQL Server installations from versions 6.5 through to 2005. Martin has supported some the SQL Server estate of some major Government Departments and Financial Institutions as well as a variety of occasional consultancy...(read more)

No SQL

Andrew Fryer's Blog | 7/3/2009 5:23:40 AM

One of the fundamental dichotomies in development is the relational world of the database and the object orientated world of services, which sadly spills over into developers and DBA’s not always being the best of friends.  Developers don't always see the need for a relational database, and the expense of coding to use one is a frustration even if the database engine itself is free.

I picked up this article on the NoSQL movement (I track SQL on tweets Twiiter) and it got me thinking would the the world in general and the IT industry be better off without it?

So what does a true relational database give you that you can’t get anywhere else:

  • Referential integrity, gives you the guarantee that the customer and product on that sales order detail do exist. 
  • Transactions mean that if I pay James fifty quid it will only leave my account if it left his.
  • Relational structures mean that you only have to change a customer’s details in one place in the system.

Of course not every system wants or needs these capabilities, but the image of a database as a safe haven for data has seen their use extended into all sorts of areas where another data storage engine might better meet this purpose.  A good example is Microsoft Exchange which doesn’t use SQL server.

Transactions can also make web sites appear slow as the database has to commit, and in the world of business intelligence I want all of the referential integrity but not much else as my whole refresh of the data warehouse is one transaction as far as I am concerned. 

So I am pleased to see some push back against SQL – it definitely isn’t the answer to life the universe and everything, equally the relational database has survived the PC revolution, the millennium, and the internet, virtualisation.

The next big thing for architecture is of course the cloud, and for Microsoft this means SQL Services, part of the Azure platform. What is interesting here is that Microsoft shied away from a REST-ful database and has essentially implemented this service in such a way that it behaves exactly like SQL Server on your PC/Server (BTW I have a short interview on this on TechNet Edge).  Why did this happen, essentially pressure form customers. I am also sure one of the many reasons Oracle bought Sun was because of not despite MySQL  

So I don’t think it’s time to consign SQL to the recycle bin just yet, but I would be interested on what you think and perhaps I could setup a Live Meeting on this if I get enough interest.

Technorati Tags: ,,,

SQL Nuggets

SQL Server Community Blogs | 7/3/2009 5:15:00 AM

What are SQL Nuggets?...(read more)

Book Review: Rolling Thunder

SQLServerCentral.com | 7/3/2009 12:23:00 AM

Rolling Thunder ($7.99 @ Amazon) by John Varley is the third book in the series. I previously reviewed Red Thunder and Red Lightening, having really enjoyed them both. In this third book the prime character is now the 3rd generation (or 4th depending on how you count I guess!) and is told from the perspective of Podkayne (Elizabeth), a singer and musician in the Martian Navy. She ends up on Europa (Jupiter moon) when an interesting and major event occurs with severe repercussions on Earth, and which makes her the most famous person in the universe.

I didn’t enjoy the book as much as the first two. Maybe part of that was that at times the story/character is pretty shallow – she’s 19/20 at the time the story starts and that’s not meant as sexist (though maybe it is), just that few 20 year olds think really deep thoughts. Parts of it just come together in a way that feels forced in an effort to arrive at the ending.

Though I didn’t enjoy it as much, I still like the series being told from different generational perspectives. Think that is a nice device and a nice change of pace.

Book: Refactoring SQL Applications - Stephane Faroult

SQLblog.com - The SQL Server blog spot on the web | 7/2/2009 11:58:00 PM

I've had a number of people tell me over the years that they aren't surprised when I say "Recommended" at the end of any book review I write, as I never seem to say "Not Recommended". I suppose that comes under the heading of "if you can't say anything good about something, don't say anything". So, I'm going to temporarily change tack with this book. For a long time, I've wished there were more books tackling the thorny topic of refactoring databases. Most people would consider Scott Ambler's book...(read more)

Book: SharePoint 2007 How-To - Ishai Sagi

SQLblog.com - The SQL Server blog spot on the web | 7/2/2009 11:53:00 PM

If you're working with SQL Server, chances are pretty high that you already realise that your future involves SharePoint as well. Fellow Australian MVP Ishai Sagai recently sent me a copy of his new book SharePoint 2007 How-To . I have to say I really enjoyed it. It does exactly what the title suggests. I haven't read any other books in the "How-To" series before but I liked the format. Ishai spends a little time with SharePoint basics and then presents a series of chapters on the main aspects of...(read more)

Database Programming: The Time Zone Conversion Beast, Once Comatose, Returns to Taunt Us a Second Time (or, An Answer for Iain)

Ward Pond's SQL Server blog | 7/2/2009 10:15:00 PM

Now go away, or we shall taunt you a second time. - John Cleese as a French knight (picture at left); Monty Python and the Holy Grail One of the reasons I started blogging over four years ago was my conviction that the coding challenges with which my...(read more)

SQLAuthority News – Book Review – The Rational Guide to Building Technical User Communities (Rational Guides)

Journey to SQL Authority with Pinal Dave | 7/2/2009 8:30:14 PM

The Rational Guide to Building Technical User Communities (Rational Guides) (Paperback) by Greg Low Short Review : A Great, one-of-its-kind book for everybody who is interested in building technical user community. There is no other book written on this subject but after this comprehensive book no further reading will be required.Link to Amazon Detailed Review : This is [...]

Another Reason SQL 2000 should just go away! :)

SQLServerPedia | 7/2/2009 4:01:13 PM

Quick without looking it up… what does this script do: SELECT * FROM   dbo.sysfiles  WHERE  (status & 0×40) <> 0 So if you’re like me and don’t have all the bit compares memorized for all the tables you probably didn’t know that this is how (in SQL 2000) you would query the current database to find all the transaction log files.  Every now and again I take for [...]

HP Mini Netbook – Day 2

SQLServerCentral.com | 7/2/2009 11:52:41 AM

I arrived in Richmond, VA this morning earlier than expected. I was meeting a few people and things were pushed back, so I had the chance to go by Best Buy and find a USB->VGA adapter. Apparently they don’t have the HP VGA cable, so I got this adapter instead.

I opened the box to find the device, and a CD. That’s interesting because the netbook doesn’t have a CD drive. I’d debated about grabbing an external DVD drive when I was in the store, but my bag is heavy enough. With my laptop, power adapter, extra USB disk drive, and now the netbook it feels like I’m carrying quite a load.

So how to get this working? Luckily I had an idea. I hit the local Starbucks and then connected to the web, downloading drivers from Tritton Technologies. One annoying thing was once I’d gotten to the site, they list a number of models, all of which look alike. I had the device with me, but not the box, and there as no model number printed on the device. A serial number, but that didn’t help. Grrrrr.

I had to go back to the car, look at the box, and then download the driver. I suspected that there was one driver for all models, but I hate trying to uninstall drivers. I’m still a little gunshy after all these years working with Windows.

Once that was done, I wrote a couple blogs, including this blog on the device. Some impressions:

  • It’s small. Carrying it one handed is nice and easy. It’s much, much smaller than the laptop, and weighs only slightly more than the Kindle. That is nice.
  • It doesn’t work great in the car. I had the box with me and tried to prop it on my lap to download drivers, but it was too small. Had to come back inside to a slightly bigger space to easily use it.
  • One the flip side, you can pretty easily hold it up with one hand and use the other to work the mouse.
  • I use page up/down, home, and end keys extensively. These require the Function key to work (they are on the arrow keys), so that takes a little getting used to.
  • The keyboard works well for me. I type pretty quickly, and it works well for me.
  • The CPU is slow. There are times you click something and it seems to take a minute to switch over. Something to be aware of as you install things.
  • I have Firefox, Twirl, LiveWriter running, seems to work OK, other than some slowness to switch apps.

I’ll have more impressions over the next few weeks as I use this and compare it with my laptop.

PowerShell and SQL Server: Script all Tables

Carpe Datum | 7/2/2009 9:27:52 AM

This is a script that I found/put together/re-arranged that will script out all of the tables from a database - in this case, Adventureworks2008. You need to change the BWOODY1 part to the name of your server, and the SQL2K8 part to your Instance name. You can change the database name as well, of course, and a better method would be to make a function out of this and feed those variables in.

There are other ways to do this, but this script illustrates setting some of the scripting options. You can look up the SMO model for all of them.

As always, test this script out thoroughly, and understand what you're doing before you put this on a production system. Also, don't run with scissors, and don't open attachments from people you do not know:

# Script all tables in the AdventureWorks2008 database
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | out-null
 
$s = new-object ('Microsoft.SqlServer.Management.Smo.Server') 'BWOODY1\SQL2K8'
$db = $s.Databases['AdventureWorks2008']
 
$scrp = new-object ('Microsoft.SqlServer.Management.Smo.Scripter') ($s)
 
$scrp.Options.AppendToFile = $True
$scrp.Options.ClusteredIndexes = $True
$scrp.Options.DriAll = $True
$scrp.Options.ScriptDrops = $False
$scrp.Options.IncludeHeaders = $True
$scrp.Options.ToFileOnly = $True
$scrp.Options.Indexes = $True
$scrp.Options.WithDependencies = $True
 
$scrp.Options.FileName = 'C:\TEMP\AdventureWorks2008Tables.SQL'
 
$scrp.Script($db.Tables)

Kevin Kline Tutorial on SQL Server Query Tuning

SQLServerPedia | 7/2/2009 9:00:13 AM

Kevin Kline gave an hour-long presentation to the Nashville PASS Chapter on Query Performance Tuning.  He covered tips like NOCOUNT, SHOWPLAN, STATISTICS, and low-hanging fruit to make queries faster. Subscribing or Downloading the Podcast If you have an MP3 player or a portable video player and you want to download our videos automatically, you can subscribe to [...]

Bob Duffy awarded MVP for SQL Server for 2009/2010

Bob Duffy's Blobby Blog | 7/2/2009 8:25:43 AM

Just got the email announcing that I've been awarded an MVP for SQL Server for 2009/2010.

The MVP award is for contribution to the technical community. I'm really chuffed to get this sort of recognition - the list of SQL Server MVP's includes some big names that I really respect like Paul Randal, Kimberly Tripp, Adam Machanic, Brad McGehee, Kalen Delaney, Brian Knight, Bob Beauchemin, Linchi Shea, Tony Rogerson, Greg Low, Kevin Kline and Darren Green to name but a few. Over the years I have used their blogs, White papers, and mountain of IP available to help with projects and learning about SQL Server.

A big thank you to our local MVP in SQL Server and a good friend, Niall Flanagan who runs the local SQL users Group (http://sql.mtug.ie/). Also thanks to Enda Flynn in TechNet Ireland for his support and endorsement ;-)

Regards,
Bob

Columbus Give Camp is Just Two Weeks Away

SQLServerPedia | 7/2/2009 7:11:47 AM

The Columbus Give Camp is only two weeks away but it’s still not too late for both charities and volunteers to sign up. GiveCamp is a weekend-long event where software developers, designers, and database administrators donate their time to create custom software for non-profit organizations. This custom software could be a new website for the [...]

Stack Overflow, Server Fault, and SSC

SQLServerCentral.com | 7/2/2009 12:26:00 AM

Steve Jones sent me a link to a presentation Joel Spolsky did at Google about Stack Overflow (SO) and it’s worth watching. It’s not a community – well, not a traditional one anyway – the goal is to provide answers to questions and beyond that, to make sure answers get updated as the world changes. If you’ve looked at things like Yahoo Answers they aren’t very good, what I’ve seen on SO so far looks very good. Like any eco system they’ve spent some time figuring out what drives good behavior and how to thwart bad behavior, and doing pretty good at it as far as I can tell. It’s a lot like a wiki to me, less formal and more active.

I mention SSC at the same time for a couple reasons. One is he references the site in his presentation – one as an example of ‘community’, then again as a site that requires a login to see the answers. So while SSC isn’t ‘mine’ exactly any more, I know enough about it to find it interesting to think about the options that might lead to a good result. Way back in the beginning we required registration for a few reasons:

  • We wanted to do some minor tracking of behavior – which users came back to the site ever
  • We wanted to build a sense of commitment and continuity, and in turn use that to foster good behavior – most open forums are noisy as hell
  • We wanted to drive behavior by sending out the first weekly and then daily newsletter, remind people to spend a little time on career
  • We wanted to make money to at least cover costs and preferably a bit more, newsletter ads (requiring an email address) work better than banner ads

I give you all that as background to come back to the point – is SO a better model than SSC? Or perhaps stated better, is a better forum model? People visit the SSC forums in droves to ask and answer questions, would they be better served by the SO model? I can see the beauty in searching for something and bam, there’s a single highly rated answer (followed by lesser rated ones), where on SSC you have to follow the thread to see it evolve. I think there’s value in following the thread. Some of it incidental learning, maybe a little bit is earning the answer! But I’m not sure it’s the best way.

I look at it from a couple perspectives. One, does it threaten SSC, SQLTeam, and other technical web sites? What happens if all the pros move there to answer questions? Does a new set of pros take over, or does everyone move to the new platform for questions/answers? If they do, is SSC still a community? If they don’t move…why not?

Take a look. I’d enjoy hearing your thoughts on community, forums, and all the rest.

Transaction Rollbacks with Identity Values

SQLServerCentral.com | 7/1/2009 11:09:00 PM

Have you ever noticed unexpected gaps in sequences in IDENTITY columns?  Even though you’ve got transactions set up for your inserts and a no-deletion policy, you find that there are missing values in what should be an unbroken sequence of numbers.  The problem could be partially related to transaction rollbacks.

Conventional wisdom would lead one to believe that a rolled back transaction would undo the logged data changes to a table. While a rollback will remove the data rows included in a transaction, it does not reset the identity value to its previous setting.  We can see this demonstrated in a brief example.

First, let’s create a table with an identity column and insert some data:

CREATE TABLE #idtest
(
      theID INT IDENTITY(1,1)
      , theValue VARCHAR(20) NULL
)

INSERT #idtest
VALUES ('Plane')
      , ('Train')
      , ('Automobile')


Now we’ll check the identity value by running:


DBCC
CHECKIDENT(#idtest)


Which should return 3, the current identity value of the table.  Next, we’ll start a transaction, insert a few rows, and the roll back our changes.


BEGIN TRAN 

INSERT #idtest
VALUES ('Hop')
      , ('Skip')
      , ('Jump')

ROLLBACK TRAN


We just inserted three rows but rolled back the transaction, so the new rows were never committed.  However, if you check the identity value again, you’ll see it’s been incremented to 6 even though no new rows have been committed to the table.

This is actually intended behavior and not a bug in the product.  If you think through some concurrency scenarios, you can understand why identity columns would be handled in this manner.  Just an FYI, you can reset the identity value using the same DBCC command listed above, but you should make sure you understand the potential effects of doing so before you roll it out to your production systems.

HP Netbook 1030NR Setup

SQLServerCentral.com | 7/1/2009 9:03:12 PM

Unpacking the netbook was pretty simple. Open it, grab the large one page poster, and then the netbook. There were basically 3 steps. I'd completed one by removing the netbook. Step two was to snap in the battery, and then step 3 was to connect power. I guess step 4 was to turn it on, which I did.

It has a power brick, which is annoying for a small device, but there's not much you can do since they are trying to keep the device itself so small. Power and wireless on/off are on the front, connections on both sides.  They even include a USB snap in cover for that port.

Turning it on starts the Windows XP setup, which I haven't seen in years. Even with a 16GB SSD, it was surprisingly slow. I think that's just XP setup, which was slow. I turned to my laptop, trying to ensure I had things working there while that device booted. I knew it had booted since I had a nice Yanni/New-agey music track playing in the background. I looked over there, and sure enough it was waiting for me to choose the XP setup options (English, etc.).  I walked through the setup, including giving it a name. I chose "Tiny" since that's what it is. I'm tired of having names like "desktop", "Steve_Laptop", so I'm following Jerry Pournelle and giving my machines nice names.

After that happened, the machine rebooted, which was noticeably faster, and I was ready to go. I connected to the hotel's wireless network and I was online.

Now time to experiment with some work.

Fun With Batches - Make Your Query Fail

SQLblog.com - The SQL Server blog spot on the web | 7/1/2009 8:46:00 PM

It's a common practice for people who write T-SQL scripts to test each statement one at a time before finally running the entire script. This can lead to unexpected surprises. When each statement in a script is executed one at a time, each is separate batch. If there are no GO statements, the entire script executed as whole is a single batch. Let's look at some code. /* Execute the following three queries as a batch. The third query will fail. The error message says #test exists even though the previous...(read more)

SQLAuthority News – MVP Award Renewed

Journey to SQL Authority with Pinal Dave | 7/1/2009 8:30:03 PM

Year ago, it was a great, perhaps the proudest moment of my professional life. I was awarded Most Valuable Professional (MVP) for SQL Server by Microsoft. Today, I received an email informing me that I have been re-awarded SQL Server MVP status by Microsoft in recognition of my community contributions. It’s yet another proud moment for [...]

The next SQLbits

SQL Server Community Blogs | 7/1/2009 7:43:08 PM


We'll be announcing the date and venue for the next SQLBits on Monday

So keep posted, we've got some really exciting news.

I am really excited about the whole event. Its going to be bigger and better than the others.


Page:  of 25 
Print  
sys.bookssys.booksMinimize
Print  

Copyright 2006 by Statistics IO, My SQL Server Blog