Archives for: March 2008

What version of SQL Server am I running?

by Brian Email

Often software will request a certain service pack level or version of SQL Server. (IE: MOSS 2007 requires SQL 2005 SP2). There is no simple Help > About to see the version of SQL you are running.

For SQL Server 2000 and up, run the below query (2000 - open Query Analyzer, 2005 - right-click a DB and select New Query):

SELECT 'SQL Server '
+ CAST(SERVERPROPERTY('productversion') AS VARCHAR) + ' - '
+ CAST(SERVERPROPERTY('productlevel') AS VARCHAR) + ' ('
+ CAST(SERVERPROPERTY('edition') AS VARCHAR) + ')'

This will return your version. You can see the build charts for more detailed information:

SQL Server 2000 Build Chart
SQL Server 2005 Build Chart

how to shrink sql 2000 ldf files

by Brian Email

When dealing with some large ldf log files I started investigating the best methods to backup/compact/just generally deal with them.

Since the "shrink database" command within SQL 2000 Enterprise Manager doesn't always seem to do what you'd expect, here is the command to run in Query Analyzer.

backup log db_name_here with truncate_only
dbcc shrinkfile(db_log_filename_here,truncateonly)

You could script this to run on a regular basis or just as a one-off while doing manual maintenance on your dbs.

ASP .NET and .NET framework

by Brian Email

When going through a test installation of MOSS 2007 I ran into a little bit of confusion when it came to the .NET requirements.

1) Need .NET framework 3.0
2) Need ASP .NET 2.0 enabled in IIS > Web Service Extensions

So I downloaded .NET Framework 3.0 from Microsoft's website and installed it. I started digging around for the ASP .NET and found the below:

If you installed IIS before .NET 3.0 (or any other version for that matter), you will need to register ASP.NET with IIS using the following command

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

At this point you can now go into IIS and enable ASP .NET web service extensions.

More coming soon

by Brian Email

I've been getting more and more emails and comments lately regarding posts on my blog solving their problems. And I really only have a few posts up!

It's great to hear my posts are helping and I promise I am going to be adding more content soon (I've been saving up some odds and ends for posting, but haven't gotten around to it).

One thing I hate is getting a specific error and not being able to find a solution on it, but finally you'll find something where a person paraphased the error message, etc. I always try my best to describe the situation and include specific errors. So hopefully this blog will help more in the future.

Stand by.