Thursday, April 27, 2006

Service pack 1 is talking to me! Or is it...?

Have you ever seen Lassie (the original or one of the movies)? Remember how she's always trying to speak? Trying to warn the kids of imminent danger? With an almost intelligent look on her face, barking excitedly and pointing with her front leg at the culprit wherever he or she might be? I must say I feel like one of the kids in the movie these days. Each time I start may brand new SQL Server Management Studio, after I've successfully applied the first Service Pack, I'm greeted with an interesting message:
SSMS_StartupMessage
After I click OK, everything seems normal. Peaceful and quiet. But I can't help feeling something might be wrong below the surface. I wish for a more verbose message. Eloquent, even. In fact, I wouldn't mind it screaming at me if there was something I needed to be aware of, but this is just silly. I mean, I see it's a warning, but what could it be? Perhaps at the moment I can just be greatful it's not an error message...? Well, will keep you posted. ML p.s. Don't forget to send me a message if you experience the "silent treatment" from SSMS yourself.

Thursday, April 20, 2006

Microsoft SQL Server 2005 Service Pack 1

It's been a whole day now, since SQL Server 2005 SP-1 has been made available for download.

The build number is 2047 (v. 9.00.2047).

Read the list of changes and fixes before attempting an upgrade.

I've installed the CTP when it was first made available, so I guess I'm looking at a uninstall/reinstall weekend. :)

Oh, yes - SQL Server 2005 Express and Express with Advanced Services have also been made available.

I'll have to start the weekend MTV-style - 8:00 AM Friday morning.


Warning:
You may run into some difficulties when upgrading SQL Server Express to the Advanced Services Edition.

Thanks to Andrej Tozon (links) here are two links to help you out:


ML


p.s. The registry key that needs to be empty prior to installing SQL Server:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations

Friday, April 14, 2006

Does the DDL Trigger exist?

Here's a simple little function that checks whether a DDL Trigger with the specified name already exists. If the trigger exists 1 is returned, else the function returns 0. For most SQL objects I normally use the object_id() system function, but the latter only returns a valid value for objects in the sys.objects system catalog view, while triggers (both DML and DDL triggers), XML Schema collections and a few other objects are not listed there.
create function dbo.fnExists_DDLTrigger
 (
 @name sysname
 )
returns bit
as
begin
 declare @exists bit

 if (exists (
   select *
    from sys.triggers
    where (sys.triggers.parent_class = 0)
     and (sys.triggers.[name] = @name)
   ))
  begin
   set @exists = 1
  end
 else
  begin
   set @exists = 0
  end

 return @exists
end
go
ML p.s.: You might also find this function usefull.