Register
Tuesday, March 09, 2010
 
 DBAs And ProgrammersBlog
  
News! Minimize
   
 
 Print   
 
Misc Blog Stuff Minimize
   
 
 Print   
 
The Reluctant DBA Minimize
 
 
 
 Print   
 
Reluctant DBA Minimize
   
 
  
 
Reluctant DBA Minimize
   
 
  
 
The Reluctant DBA Minimize
 
Author:CarpDeusCreated:4/18/2008 6:56 AM
As a programmer and database administrator, I've seen a lot and here I'll record bits of information about what I'm doing and how I'm overcoming various challenges

It appears that I will be doing a presentation on SQL Data Services in June at VSLive Las Vegas. When I first put the proposal together, I had a general idea and outline. That was a couple of months ago and, since then, the SDS team has been very quiet. They recently announced big new things coming in a new version, probably for this MIX, so I need to go through my outline and figure out what I can work on now that is generic, cloud information and will have to change my specifics after the release. I actually am giving two talks, one on SDS and another on Microsoft's caching service but al of my demo code for both rely on SDS. So it is going to bean interesting few months, since Velocity is due to release a new version at MIX and I should be able to benchmark it against a memcached instance. My belief is that memcached will win in performance and Velocity will win on al of the features that make it not a memory-based cache. I say that because items like fail-over and redundancy, while nice, do sort of defeat...

Read More »

There are people who probably look at complex joins and see them diagrammed in their head (BrentO comes to mind), but I'm not one of them. I fully understand the differences between INNER, LEFT OUTER and RIGHT OUTER JOINS, but what happens when you go beyond a couple of tables? Especially if you need a few different OUTER JOINS. Start by creating a couple of tables and populating them using this script. Within that script, you'll find a simple multi-table JOIN:

SELECT     a.ID AS aID, a.Value AS aValue, c.ID AS cID, c.Value AS cValue,     e.ID AS eID, e.Value AS eValue, g.ID AS gID, g.Value AS gValueFROM         dbo.table1 AS a INNER JOIN dbo.table2 AS c INNER JOIN    dbo.table3 AS b ON c.ID = b.ID2 ON b.ID1 = a.ID INNER JOIN    dbo.table7 AS f INNER JOIN dbo.table6 AS g ON f.ID2 = g.ID     ON a.ID = f.ID1 LEFT OUTER JOIN dbo.table4 AS e INNER JOIN    dbo.table5 AS d ON e.ID =...

Read More »

 A couple of weeks ago I talked, briefly, about writing Windows Services. Since this is something we do a lot of for various processing, I decided to create templates I could use rather than having to keep copying and pasting code. So, if you want to follow along, download the templates from svn://finsel.com/public/VS2008/Templates. That's my public SVN site and you can download either the individual templates or the BasicServiceTemplate.zip which contains the other three templates. It's also...

Read More »

Computer programmers are, generally speaking, a breed of problem solvers. The really good ones not only try to solve the problem but try to find elegant solutions. That's part of what we enjoy about our jobs, the ability to see a problem and find a solution, which is what 90% of programming boils down to.

Sometimes, however, we can be blinded by the COOL factor, as in, "This is such a cool way to do something, we have to use it."

A good programmer recognizes that good ideas have proper applications. If you've seen Raiders of the Lost Ark, you probably remember the scene where the Nazi enters with a diabolical looking device that turns out to be a collapsible hanger for his coat (and if you haven't seen Raiders, go watch it now, this blog entry will still be here when you get back). Spielberg actually came up with that idea for 1941 but it didn't work...

Read More »

I know that connection state matters, I just sometimes forget. Of course, I could also say that proper error handling matters as well, since that's the crux of this particular issue so I'll cover that as well.

Here's the crux of the matter. I am writing a class to process a queue of information and I can have several programs processing the data. Because I may have to process many different items in the queue, I've set up global SqlCommand objects and simply populate the parameters when I need to call them. Many of the methods within the class look something like this:

private void DoSomething(string VariableID){cmdExecuteThis.Parameters["@VariableID"].Value = VariableID;cmdExecuteThis.Connection.Open();cmdExecuteThis.ExecuteNonQuery();cmdExecuteThis.Connection.Close();}

There are many problems with this code, but I was putting together the test project to validate before adding all of the fun and necessary code like error handling, which I didn't need when I was running a single program but...

Read More »

Over the course of my programming lifetime, I've written a fair number of Windows Services applications. And I have found that the easiest way for me to do this is a solution that contains several elements:

A class that handles all of the processing A WinForms app to do all of the debugging and testing of the class A Service that replicates the basic implementation of the WinForms app but is a service So, when tasked with implementing a service that gathers data from a Websphere Message Queue, I thought it would be fairly straightforward. I downloaded the client, went through lots of agony trying to get it installed but finally got that worked out and then turned my hand to writing code. After a couple of hours of flailing around, I got a copy of a code sample that was a console app, which I was able to modify in about 5 minutes to get it doing what I needed it to, which is to take the message in the queue and dump...

Read More »

 Why my site has been down

Read More »

As I was saying last week month year in this post, JOINs in SQL Data Services are not the same as they are in SQL Server. I'd recommend going back to review that post but the upshot of it is that SDS processes JOINs differently.

Using a JOIN in SQL Server can have two possible uses. The first is to bring data together, so that columns from one table appear seamlessly with another table in the result set; the second is to filter data, the only JOIN that SDS supports if you use their JOIN command. But that doesn't mean that you can't JOIN data seamlessly between data sets, you just need to use Extensible Stylesheet Language Transformations (XSLT).

XSLT is a way to manipulate XML data, using an XSLT Engine to transform XML into something else, in this case, an XHTML...

Read More »

 
 
 Print   
 
Privacy Statement | Terms Of Use Copyright 2001-2008 by ReluctantDBA.com