June 2005 - Posts

CLR in SQL 2005, ''to CLR or not to CLR '' that is the question

Here is the link to the presentation on CRL in SQL, with guidance on when and when not to use it.

http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032275334&EventCategory=5&culture=en-US&CountryCode=US

There is some interesting statements that corroborate my findings about CLR functions and TSQL functions. i.e. CLR functions are likely to be better than TSQL functions (http://www.sqljunkies.com/WebLog/simons/archive/2005/01/17/6468.aspx)

Calculate prime numbers in SQL Server 2005

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Calculate prime numbers in SQL Server 2005
The new RSS feed is here

Thought I would start a challenge.

Who can come up with the best way of calculating prime numbers in SQL server. with all the progamability changes in 2005 there must be a really good way of doing it, or is there.

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Calculate prime numbers in SQL Server 2005

Cool things in SQL2005 1 - 5 The editor

1. Colour
So we all know that colour coding code really helps readability, however we all at some point want to print some code out to review, stick on the wall etc, only to get black and white from QA.
Now you get full colour print outs. So get that mamouth SP print it out and produce some modern art

2. Cut and paste
This now maintains both the font of the text being cut as well as the colour
So your word documents can contain the same colour coded, formated SQL that you get in Management Studio

3. Brace highlighting
Ever had the mamouth query with conditional outer joins, sub queries, derived tables and got lost on whether you should but the 4th or 5th brace at a certain point. Well now the brackets will turn bold to show you the matched pair. (This does only seem to happen when you are on the right of the brace and you press delete)
if the cursor is located on the left of a brace pressing CTRL+] will move the cursor to the matching brace. CTLR + SHIFT + ] or CTRL + } will highlight everything enclosed in the braces.

4. Tabs
As previously talked about all your queries can be displayed in different tabs in SMS. This enables easy navigation between the queries. There is also a button on the left end of the tabs that when clicked lisst all the queries as another way of selecting one

5. Full Screen
Ever wanted more space to right your queries. Whey not try full screen mode SHIFT + ALT + ENTER
This hides, all but the essentials for righting a query.

Most of these are due to the fact that SSMS is based on Visual Studio so most of the nice editor features of VS are present in SSMS.

There are some many little great things that productivity is going to eventually increase but initially probably descrease while you find them all and see if you like them. :)

Live webcast SQLCLR in SQL 2005

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Live webcast SQLCLR in SQL 2005
The new RSS feed is here

Watching Live webcast on the use of CLR in SQL 2005.

http://msevents.microsoft.com/cui/r.aspx?r=6645637&c=en-US&t=4

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Live webcast SQLCLR in SQL 2005

Restore technicolor in SQL 2000 after installing SQL 2005 CTP

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Restore technicolor in SQL 2000 after installing SQL 2005 CTP
The new RSS feed is here

Have you encountered the problem of losing your colour coding in Query Analyser and other SQL 2000 tools, after you install a SQL 2005 CTP/Beta.

You need to re-register the SQL2000 color coder.

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Restore technicolor in SQL 2000 after installing SQL 2005 CTP

Tabbed mode in SQL Management Studio

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Tabbed mode in SQL Management Studio
The new RSS feed is here

I love the tabbed format of this however I have one gripe

The information available on the tabs in Management Studio is unreadable. Currently both the filename and the server and database name are truncated one on the right and one on the left. These means you can't see the full name of the file and also you can't see the server.

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Tabbed mode in SQL Management Studio

Monad preview available

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Monad preview available
The new RSS feed is here

I have mentioned Monad before at sqlserverfaq.com and how powerful it looks, You can see a demo video of it at Channel 9

 http://Channel9.msdn.com and the video is mms://wm.microsoft.com/ms/msnse/0410/23360/JeffreySnover/jeffrey_snover_2004_demonstration_of_monad.wmv

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Monad preview available

PDC Keynotes

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/PDC Keynotes
The new RSS feed is here

Looks like Don Box is on for another interesting keynote!!

http://pluralsight.com/blogs/dbox/archive/2005/06/18/11440.aspx

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/PDC Keynotes

PDC2005 Just registered

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/PDC2005 Just registered
The new RSS feed is here

Just registered for the PDC 2005.

Probably will be travelling over on the Saturday to enjoy the pre-conference seminars. I am sure my head will start overloading by the middle of the week, SQL 2005, SSIS, SQLCLR, XQuery, WinFS, Report builder, Longhorn, Avalon and more.

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/PDC2005 Just registered

SQL Server Challenges

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/SQL Server Challenges
The new RSS feed is here

So catching up on the world after a little break (honeymoon).

Found Adam fancies his had as a poker ace but using SQL to run the game http://sqljunkies.com/WebLog/amachanic/archive/2005/05/11/14276.aspx.

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/SQL Server Challenges

UK SQL Server Usergroup Redesign

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/UK SQL Server Usergroup Redesign
The new RSS feed is here

Tony is in the process of redsigning the UK User group site.

Looking good so far

http://www.sqlserverfaq.com/

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/UK SQL Server Usergroup Redesign

Spid blocking itself post SP4

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Spid blocking itself post SP4
The new RSS feed is here

If you have noticed a SPID blocking itself i.e. the blocked column of sp_who2 is the same as the spid for the same row, this is due to an enhancement put into SQL in SP4 that allows for the monitoring of blocked latch requests.

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Spid blocking itself post SP4

SQL Server 2005 Grid results

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/SQL Server 2005 Grid results
The new RSS feed is here

It is nice to raise a bug and see it fixed.

In Feb raised the issue that results in work bench were fixed to a certain height irrespective of the number of rows being displayed. this meant if you could only have 3 grids (on my laptop) of results. Where as in QA the space between the grids is reduced if the grid has less than 6 rows.

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/SQL Server 2005 Grid results

Random number on a per row basis

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Random number on a per row basis
The new RSS feed is here

So you've tried to get a random number on a per row basis however RAND isn't evaluated on a per row basis but on a row by row basis.

However you can try the following,

 select abs(cast(newid() as binary(6)) %1000) + 1

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Random number on a per row basis

Fantastic place names

My blog has moved to sqlblogcasts.com/blogs/simons
The full version of this post can be found here., http://sqlblogcasts.com/blogs/simons/Fantastic place names
The new RSS feed is here

It always manages to amuse me when I come across another typically english place name.

http://www.streetmap.co.uk/newmap.srf?x=501751&y=201550&z=0&sv=HP3+0PQ&st=2&pc=HP3+0PQ&mapp=newmap.srf&searchp=newsearch.srf

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Fantastic place names