June 2007 Archives

Performance #1 and #2: Clean Client / Server Interaction

June 29, 2007

This article is part of the series An Exercise in Performance Tuning in C#.Net.

The application I was working on makes a number of calls to a remote server to perform operations. These calls are made through a proprietary API implemented in .Net. Speaking with the vendor, I discovered two really dumb mistakes that were killing our performance.

Replacing Ad Hoc Query Text When Fields Change

June 27, 2007

Situation: We have a stored procedure running a query whose WHERE clause is given as a parameter. No, that's not the problem in and of itself, at least not today =). [Treat this as a non-negotiable requirement for now]. Within that WHERE clause there might be a query against a field, call it myField. This field is a varchar and wildcards are not used. Platform: SQL Server 2005.

Problem: myField has been changed to a varbinary field and holds an encrypted value — thus can no longer query directly against it. How do we make this work?

An Exercise in Performance Tuning in C#.Net

June 25, 2007

Problem: Your application is slow. Horribly slow. And that just isn't acceptable.

Granting Execute Permission to All Stored Procedures

June 22, 2007

Problem: You've transferred or run a bunch of stored procedure scripts, but you can't execute them. Reason - execute permission denied. You forgot to put a grant statement in your script.

Solution: The trivial solution is, of course, GRANT EXECUTE ON {your proc name} TO PUBLIC. Slightly less trivial is to grant to a specific role, but most people needing this tip will only be using PUBLIC.

Wouldn't it be great to automate this for all stored procedures in the database? Well, here you go:

Server 'myserver' is not configured for RPC

June 22, 2007

Problem: On a Microsoft SQL Server 2005 installation with a linked server configured to "myserver" (which happens to be 2000), execution of a remote stored procedure (EXEC myserver.mydatabase.dbo.mysproc) fails with error:

Msg 7411, Level 16, State 1, Line 1
Server 'myserver' is not configured for RPC.

Running Both .Net 1.1 and 2.0 in Windows 2003 Server 64 Bit Edition

June 21, 2007

Problem: Microsoft .Net Framework 1.1 and .Net Framework 2.0 don't play well together (as ASP.Net apps) on Windows 2003 Server 64 Bit Edition.

Solution: either upgrade any ASP.Net 1.1 to 2.0 or switch to 32 bit compatibility mode. Of course switching to 32 bit mode will cause you to lose out on some performance benefits, but maybe you're okay with that (unless you're running under a very high load). Two easy steps:

Image Conversion Made Easy in .Net

June 20, 2007

Problem: Need to convert an image from one format to another using .Net.

Solution: Microsoft has really made this easy. The key is the System.Drawing.Image class, combined with the System.Drawing.Imaging.ImageFormat class.


About this Archive

This page is an archive of entries from June 2007 listed from newest to oldest.

May 2007 is the previous archive.

July 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.



OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.12