April 2006 - Posts

Easiest way to display file properties

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

The previous post requires you to display the properties of a file to be able to "Unblock" the file.

There are 2 (at least) waysI know of. The first is to right click on the file and select properties.

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Easiest way to display file properties

Download files marked as unsafe (blocked)

You may have noticed that with Windows XP SP2 files downloaded from the internet are now marked as such. This marks the files as unsafe.

This results in a number of problems.

  1. Compiled help files do not work correctly (the content doesn't display)
  2. .Net projects are treated as unsafe and so imposes restrictions on what can be done.

What I have found today is that zip files whilst treated the same also cause this setting to be propogated to the files extracted from the zip file when the built in "Extract All..." function is used. Once the files are extracted I am not aware of a way of globally marking the files as safe (unblocking them).

To stop this happening make sure you unblock the zip file before extracting the files. In doing this the files will be extracted as unblocked.

To unblock a file display the file properties and click the "Unblock" button.

Slipstream install of SQL Server 2005 SP1

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

I truly think MS have missed a step with the install of SP1. The install for RTM introduced side by side installations with the promise of simplified patching and reduce down time during upgrades/patches. However SP1 has not delivered on these promises.

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

Don't apply SQL 2005 Service Pack 1 if you use SSIS

If you already use SSIS and you use date variables do not install service pack 1 without amending your packages

There has been change to the way that dates are stored in packages, it appears it is to do with locales.

Simply put a variable that is defined as 1 march 2006 in a pre SP1 package will be treated as 3 january 2006 in SP1.

The solution is to open your package correct the date and redploy. I suspect this will apply to configuration files and dates being passed in on the command line as well. In this case I believe you need to specifiy your dates in american format (mm/dd/yyyy).

Why dates aren't stored in ANSI format is beyond me anyway :(

I will bring you an update when I get one :)

http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?FeedbackId=474c85d2-57f9-4219-9037-f2ee34948612

Useful command prompt tip

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

Thanks to Andrew for providing this tip to provide a command prompt from any where in explorer.

1.      In explorer, open Tools, Folder Options.

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Useful command prompt tip

Indexed view update performance (beware)

If you have large table on which you regularly only need to process a subset or perform an aggregation you may have come across indexed views. An indexed view allows you to defined a view just like any other view (almost) and have SQL Server persist the results so that when a query is made using the view, the persisted results can be used rather than combining all the data from the source tables that make up the views query. The intention being that it increases the performance of your code by reducing IO/CPU etc.

The thing that makes indexed views easy to use is that SQL Server maintains the persisted data when the data in the underlying tables is changed, so you don't have to do anything.

To create an indexed view you need to create a schema bound view, this stops the underlying tables from being changed without changing the view. You then create a unique clustered index on the set of columns that define a unique row in the table. if you know anything about an clustered index you know that it defines the how the data for the table is stored in pages in the database. This is the same for the indexed view.

Once the unique clustered index is created you can create what ever other indexes you like on the table.

Now here is the gotcha, with a normal table, if you update a column that is not included in an index the data on the data page is changed and thats it (assuming no page split). However with SQL 2000, if you update ANY column in that is part of an indexed view, even if it is not in the wher clause or the columns of one of the indexes, the engine does a deferred update i.e. a DELETE and then an INSERT.

So whats the impact. Well because of the delete any clustered index on the base table has to be modified, then because the clustered index is updated, ALL non clustered indexes have to be updated. Thats just the base table, the same applies to the indexed view. So imagine this, you have table BaseTableA that has 4 indexes, with column NotUsed. You then have an Indexed View View1 that is based on BaseTableA and includes the NotUsed column and the view that has 3 indexes, none of which include the NotUsed column.

If you update the NotUsed column, it will cause 2 clustered indexes and 5 non-clustered indexes to be modified.  Be warned

The good news is that it has been fixed in SQL 2005 so that updates to a column involved in a non-aggregate indexed view that is not in the clustered index or the where clause does not cause and insert and delete.

You can see the impact by running the script from http://sqlblogcasts.com/files/4/sql_server_engine/entry415.aspx.

Thats a lot of new stuff

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

If you haven't already downloaded SQL Server April BOL then do so. There is a ton of new/updated stuff. The list for SSIS is ~190 new/changed pages/topics

Topic Categories
New Conceptual and Task Topics

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Thats a lot of new stuff

SQL Server 2005 April Books Online

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 April Books Online
The new RSS feed is here

SQL Server 2005 April Books Online is now available. As of posting this the link from the main downloads page takes you to December BOL so you need the following link.

http://www.microsoft.com/downloads/details.aspx?FamilyID=be6a2c5d-00df-4220-b133-29c1e0b6585f&DisplayLang=en

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

Microsoft Operations Manager 2007

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

Well not exactly as its been renamed to System Center Operations Manager 2007. There is now a public beta available to sign up for at

https://connect.microsoft.com/availableprograms.aspx?

... To read the complete version of this post go here, http://sqlblogcasts.com/blogs/simons/Microsoft Operations Manager 2007

Management Studio Express

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

If you are looking for Management Studio Express you can download the RTM either on its own http://go.microsoft.com/fwlink/?LinkId=65110, as part of SQL Express Advanced Edition http://msdn.microsoft.com/vstudio/express/sql/download/advanced/default.aspx