September 2008 - Posts

The first cumulative update for SQL 2008 has some fixes for the setup of SQL 2008. However there isn't a slipstreamed version of SQL 2008 with the Cumulative update. So you've got a bit of a chicken and egg situation.

You need to install SQL 2008, but you want the setup to be patched as per the CU. How can you apply the CU with out having SQL installed.

Well you can and thats exactly what you have to to. Essentially if you need the fixes that have been made to the setup you need to run the CU BEFORE you run the main SQL2008 setup, oh and then run it afterwards to patch the engine , tools etc.

Bob Ward has a complete blog post on this

http://blogs.msdn.com/psssql/archive/2008/09/30/how-to-fix-your-sql-server-2008-setup-before-you-run-setup.aspx



-
Posted by simonsabin | with no comments

Are you the developing a multi user system or a large scale system? Do you know what concurrency is and how to improve it? If not then you should.

Of the large scale systems I've worked on the biggest area of work is making the system scale. Its all too easy to develop a system that "works on my machine" but when you deploy with full data volumes and multiple users you find it doesn't scale.

We have got Kalen Delaney over in Novmber doing a series of seminars on just this area of SQL Server

SQL Server Data Storage Formats: Internals, Performance and Best Practices
SQL Server Concurrency Control: Locking, Blocking and Row Versioning
SQL Server Data Internals and Tuning

These are a must for any serious SQL Server developer. If you book using the links above then you will get a 5% discount and an additional discount if you book on all the seminars

 



-
Posted by simonsabin | with no comments

If running SQL 2005 or later you can use the following to get the pages and rows in an index

select OBJECT_NAME(p.object_id ), i.name,p.*

from sys.dm_db_partition_stats p

join sys.indexes i on i.object_id = p.object_id and i.index_id = p.index_id

Whats good about this is that it gives in row, out of row and overflow pages with the number used and reserved pages

 



-
Posted by simonsabin | with no comments

I get really frustrated most times I use connect. (connect.microsoft.com). The latest reason is one I've hit many times.

When I do a connect visit I generally look at new feedback. Almost always I come across one like this

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=368538

This person has an immediate problem, and I can't do anything to get in touch with him.

In this situation the person should have contacted Microsoft Support and not raised a connect bug.

If you have an operational issue that is causing your application to fault then you MUST raise a Support case.

The feedback loop for connect has no SLAs, guarantees and no easy ship vehicle for fixes.

You might think that you don't want to riase a support case as it will cost you money. Well if your problem is due to a bug then you WILL NOT be charged.

If the bug is non critical then fine raise a connect issue because it is likely that you will need to get a number of votes to convince the product team that the bug needs fixing.



-
Posted by simonsabin | with no comments

One of the feedback items from SQLbits was the website.

If you are an ASP.Net developer that wants to get involved in SQLBits and think you fancy getting our site sorted then drop me a line http://sqlblogcasts.com/blogs/simons/contact.aspx 

We've got lots of ideas of what we want to do to the site but we're short of time.



-
Posted by simonsabin | with no comments

We are holding two seminars at the end of the month on Advanced SQL and Business Intelligence. You can find details here Advanced SQL and here Making the most of data through Business Intelligence.

We are thinking about holding these as online seminars if there is enough interest. If you are interested then contactus@sqlknowhow.com

 



-
Posted by simonsabin | 1 comment(s)

The create table statement doesn't allow you to create a table with more than 1024 columns.  So how do you do it.

You have to create the table and then add them after the fact.

[21/9/2008 Thanks to Kalen for pointing out that you can if you create the table with a columnset at the same time].

Even if using column sets you have to define all the columns that you want to store. The XML columnset doesn't act like an XML overflow column, it is a computed representation of the sparse columns on the table.

The following highlights that. The first three inserts fail as they are trying to populate columns that con't exist

create table test2 (

id int not null primary key

,sp1 int sparse

,cs  xml column_set for all_sparse_columns)

go

insert into test2 (id,cs)values (1,'<col1>12123</col1>')

insert into test2 (id,cs)values (2,'<col2>aaa</col2>')

insert into test2 (id,cs)values (3,'<col3>1/1/2008</col3>')

go

select * from test2

go

declare @i int = 0

while @i<2000

begin

      declare @sql varchar(100)= 'alter table test2 add col' + cast(@i as varchar(10)) + ' int sparse'

      execute (@sql)

      set @i = @i+1

end

go

 

sp_help test2

 



-
Posted by simonsabin | 4 comment(s)

If you've got something to ask about SQL 2008, then now is your chance.

"

SQL Server 2008 RTM Live Chat

 

One month from RTM of SQL Server 2008, let us know the experience you have with the product. Raise the questions you may have with the SQL Server Development Group. This is a great opportunity to chat with the people behind SQL Server 2008. 

 

Thursday, September 23rd, 2008

 

10:00 A.M. 11: 00 A.M. Pacific Time

 

1:00 P.M. - 2:00 P.M. Eastern Time

 

17:00 - 18:00 GMT

 

Join the chat room on the day of the chat:

 

TechNet: www.microsoft.com/technet/community/chats/chatroom.aspx

"



-
Posted by simonsabin | with no comments

I can never remember trace flags so have decided to start making a note when I find one.

Ttrace flag 3502 will record in errorlog when a checkpoint starts and stops.

Thanks to Jasper and Linchi for this one.



-
Posted by simonsabin | with no comments

I am currently preparing a ritual sacrifice of a USB mouse, keyboard and a few other components to the Demo Gods.

Why might you ask. Well this week I'm going demo crazy and I've been blighted recently by a few Demo Gremlins.

I will be doing SQL 2008 Developer features on Wednesday at the Launch event in TVP. http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032385183&Culture=en-GB

Followed on Friday by my training day seminar "Turbo charge your TSQL with .Net"

and then a longer session on SQL 2008 for developers at SQLBits. http://www.sqlbits.com/Agenda/event3/SQL_Server_2008_for_Developers/default.aspx

In both the SQL 2008 sessions I hope to show some great new features including the new Virtual Earth control for ASP.Net which make programming against VE a breeze rather than a javscript nightmare.

If you're coming to SQLBits don't forget to choose your sessions before you come so we can make sure that we have the right sessions in the right rooms http://www.sqlbits.com/information/MainAgenda.aspx



-
Posted by simonsabin | with no comments