I want some Moore

Blog about stuff and things and stuff. Mostly about SQL server and .Net
posts - 219, comments - 2287, trackbacks - 33

My Links

Advertisement

News

Hi! My name is 
Mladen Prajdić  I'm from Slovenia and I'm currently working as a .Net (C#) and SQL Server developer.

I also speak at local user group meetings and conferences like SQLBits and NT Conference
Welcome to my blog.
SQL Server MVP

My Books

SQL Server MVP Deep Dives 2
The Red Gate Guide to SQL Server Team based Development Free e-book

My Blog Feed via Email
Follow MladenPrajdic on Twitter


Users Online: who's online

Article Categories

Archives

Post Categories

Cool software

Other Blogs

Other stuff

SQL stuff

August 2007 Blog Posts

SQL Server 2005: An error or intended behavior with Database Compatibility?

An interesting topic came up a few days ago in the forums about database compatibility. It turns out you can still run CLR functions, sprocs etc when changing the compatibility level from 90 to 80.   Of course i had to test this behaviour because i had a hard time believing it. i used my high precision timer for performace measurements which is written in C# as a test bed. You can find the whole script in that post. When i created the database and all CLR functions I changed the compatiblity level to 80 with: EXEC sp_dbcmptlevel testCLR, 80;   Then I tried using the CLR functions and they worked just...

posted @ Thursday, August 30, 2007 2:01 PM | Feedback (0) | Filed Under [ SQL Server ]

.Net Windows Forms ListView ColumnHeader width tip. Set it to -1 or -2.

A negative Width value?? I can hear it now: Are you insane Mladen?? Do you want our apps going around looking ugly?? Well... of course I do! It means i can go around fixing them for big bucks :))   But joking aside, -1 and -2 width values are very usefull.   Setting the width to be -1 means that the column will have the width of the longest item in it. Setting the width to be -2 means that the column will have the width of the column heading.   Pretty cool, no?  

posted @ Wednesday, August 29, 2007 7:25 PM | Feedback (6) | Filed Under [ .Net ]

Exchange: Accept and Cancel Meeting Request with WebDav

In a lengthy article about WebDAV  i've written a long while ago I've explained how and what WebDAV is and what are the problems you might encounter. Suggesting by the comments (over 200) it's a pretty popular topic but there's no help on the net for anything more complex than simple operations because MSDN suggest that WebDAV is totally unsupported. So anything you do with it you're on your own. Having said that let's see how to do those 2 things from the title:   Cancel a Meeting Request  1. get the Meeting Request URI from the inbox  2. get the...

posted @ Wednesday, August 22, 2007 6:27 PM | Feedback (9) | Filed Under [ Exchange ]

Service Broker goodies: Cross Server Many to One (One to Many) scenario and How to troubleshoot it

I've written two more articles on SQLTeam about Service Broker.   The first one shows how to deploy a One to Many scenario over multiple servers. I've shown how to implement auditing from many child servers to one central storage server that holds all data. This is also applicable in a reverse situation of One to Many The second one explains how and where to start looking when you have to troubleshoot and debug it.   Go and have a read. Service broker is fun stuff!  

posted @ Tuesday, August 21, 2007 3:37 PM | Feedback (0) | Filed Under [ SQL Server ]

Tired and Strained eyes? You're looking at the wrong part of your computer monitor!

And no, you shouldn't look at the back of it. :) Whenever I talk to anyone about looking at the computer monitor for a longer period of time everyone thinks i'm nuts when i say i can look at it for 12 hours straight with no problem at all. After that statement I get the usual dose of: "You're such a geek!", "Sure way to ruin your eyesight!" and "Don't you have a life?" replies. Just to set things straight: "Yes I'm a geek with a touch of Nerd and proud of it!", "Not really.", "Yes I do have a life....

posted @ Sunday, August 19, 2007 11:20 PM | Feedback (14) | Filed Under [ Work Conditions ]

SQL Server: How to modify data in any table in a resultset made up of joins

Recently i'm seeing a lot of questions about how to modify data in the tables which are part of the multi-join select statement. And i keep wondering how can this be so hard to remember. The methodology is quite simple.

More here.

posted @ Sunday, August 19, 2007 1:26 AM | Feedback (0) | Filed Under [ SQL Server ]

SQL Server: How to run a stored procedure at SQL Server start-up

This is acctually quite simple. There is 'startup' option that you can set to the procedure. There are a few limitations though:  - your stored pricedure must reside in the [master] database  - it's owner must be dbo  - it musn't have any input or output parameters   Here is some sample code:  USE master; GO -- first set the server to show advanced options EXEC sp_configure 'show advanced option', '1'; RECONFIGURE -- then set the scan for startup procs to 1 EXEC sp_configure 'scan for startup procs', '1'; RECONFIGURE IF OBJECT_ID('spTest') IS NOT NULL DROP PROC spTest GO -- crate a test stored procedure CREATE PROC spTest AS -- just create a sample database EXEC('CREATE database db1') GO -- set it...

posted @ Tuesday, August 14, 2007 4:34 PM | Feedback (6) | Filed Under [ SQL Server ]

SQL Server 2005: TableDiff.exe GUI

Some time ago i've written about the TableDiff.exe utility. It's a great tool for quick table comparisons and i've grown tired of typing it in the command line. That's why I created this simple TableDiff GUI to help me along and i've decided to share it with the world. :)   You can download it here.   Hope you find it usefull.  

posted @ Friday, August 10, 2007 11:58 AM | Feedback (70) | Filed Under [ SQL Server ]

SQL Server 2008: Locking with MERGE statement compared to Update/Insert in SQL Server 2005

In a previous post I've shown what locks are held when doing "update if exists, insert if not" problem in 2 different ways. Of course i had to see how MERGE statement (new in SQL Server 2008) behaves in this matter.

More here.

posted @ Friday, August 03, 2007 9:30 PM | Feedback (1) | Filed Under [ SQL Server ]

SQL Server: Automated database object recompiling after cleaning plan cache with FMTONLY

DBCC FREEPROCCACHE; and DBCC DROPCLEANBUFFERS; are commands that clean the cached execution plans from memory. The consequence of running those statements is that all your objects (sprocs, functions, views) must be recompiled which can be quite costly. There is no way around that. And if you want to recompile 100 sprocs you have to execute each one and each one returns data. I didn't want this so i created this script that uses a not well know SET option called SET FMTONLY ON which returns only schema and no data to the client. Since returning data can take a long time this thing is pretty...

posted @ Thursday, August 02, 2007 5:21 PM | Feedback (2) | Filed Under [ SQL Server ]

Powered by:
Powered By Subtext Powered By ASP.NET