Sunday, February 27, 2005

DB2 - what a peice of work

Don't read this if you don't like to read rambling griping...

-------------------------

 

For the longest time, Oracle was my least favorite database platform billed as "enterprise level". Now, I ceremoniously pass that gold belt to DB2. And here is why:

  1. If you let connections pool, you get nasty "Cursor C1 already open" errors. Well, guess what the default behavior of their OleDb driver is? Yep, pooled connections. Of course,... pooled connections in an "enterprise" setting wouldnt be a very important feature to make work. Nah.
  2. You want to only select rows from a table using OleDb where a certain field value is null? Tough luck, NULL support is unpredictable at best. Most times if you attempt to filter or join on a field that has null values, you wont get a resultset back. Period. No error, no warnings. Just no resultset (not even an empty one with field metadata but no rows).
  3. Multiple statements in one batch? nope. Create a NEW connection every time and issue your query (no pooling, remember).
  4. So you just want the database driver installed? Too bad, you must install the WHOLE ClientAccess/400 product to talk to an AS/400. (not small)
  5. Oh yeah, this is talking about DB2/400, not the other flavors. I have no idea how bad they are, but I can imagine.
  6. Speaking of DB2/400, if you want to pull data from a table (really maps down to os/400 "file members") then most likely you will need to specify system name and library in order for the object to resolve. If you haven't seen AS/400 system names, they are remarkably easy to remember and type. "S3059863" is an example. And of course AS/400's are still living in the 1980's and all objects are limited to 8 characters uppercase. This includes files and file members (a.k.a. tables and fields in SQL). Yeah. So to issue a SQL query it looks something like this "select GSDOCO, GSORG, GSCHGN1, GSHHYT from S3059863.SOMELIB.F59603 where GSJDMT > 105058". Why, of course that means "select the ID, sales rep, charge amount, and sales tax from the sales table that were updated after 2/27/2005". Or does it.
  7. Oh, and half the time when you install a os/400 "service release" update, it breaks untold other things... with the DB2 interface being one of the common victims. Then, to fix your application you get a ClientAccess/400 service release. Which, invariably breaks yet something else. Fun stuff. This is why most as/400 systems operate a year or two (at least) behind current patching levels. It's just too scary to update your machine!

And whats the saddest thing about dealing with DB2 in this kind of environment? The cost of that hunk of iron is two orders of magnitude above even a significantly overarchitected system built using nearly any other architecture which would give comparable reliability and performance.

Sometimes, it feels like interoperability with an AS/400 via DB2 isn't worth the headaches.

Sunday, February 27, 2005 5:20:01 PM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [0] | 

 Friday, February 25, 2005

Help me choose a topic for Code Camp

I have two potential topics I wish to cover. Can't do both though. Both can get pretty deep, and I will have a tough time fitting it into a single session as it is. So even after concluding a topic, I will need to whittle down the details. But first on to the topics.

Leave a comment, send me a message, whatever. Just let me know which of these two topics interests you most for a Code Camp session. I will probably save the other one for a possible Fall code camp, or another user group presentation. The subjects are both just too interesting to me for me to totally ignore either one.

    • Topic #1: Asynchronous Programming

"Fully Baked" CLR support: Async Delegates, Thread Pools, System.Timer, and Queued Work Items. "Partially Baked" CLR support: Thread/ThreadStart, interthread communication, monitoring, signaling, and syncronization. Also would touch on important topics such as debugging, concurrency, Control.Invoke, lock(this), and deadlocking/performance implications. The end of the presentation would also talk about some exciting new async support in Whidbey for event-based async processing. In other words: "This ain't your daddy's multithreading presentation"

    • Topic #2: Performance Planning, Design, and Tuning

In my opinion, a really important topic, but also really big. I would cover results-based performance programming, memory management (yes, its still important!), algorithm selection, profiling, and evaluating trade-offs. Would also touch on other aspects of performance, such as choosing your battles and managing the user experience/expectations. Lastly would talk a little about impact of Whidbey (generics/boxing, etc).

Let me know what you want to hear about!

 

Friday, February 25, 2005 10:09:01 AM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [7] | 

Back in action

Thanks everyone that posted comments or sent messages and stuff over the past week.

I seem to have passed the thing yesterday, and just as fast as it started, it's now over. It is difficult explaining just how incredibly painful this was, but others who have gone through it before will understand. You guys who have been through it before have my complete and total respect. And to others who have not had this before: I hope you never get it. I was lucky my wife happened to be home when it hit me.

Friday, February 25, 2005 9:45:22 AM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [3] | 

 Saturday, February 19, 2005

So how did YOU spend your Friday night?

This is how I spent mine:

IMAGE_029_small.jpg

Doped up on Morphine and a few other things I do not have memory of.

Started out with incredible abdominal pain, getting progressibly worse. We finally called an ambulance when my hands and feet started going numb, and I couldn't control the shuddering.

Turns out I have four kidney stones, the largest (4mm) of which was trying to pass down to my bladder. The other three are still partying in my kidneys. Guess I am in for a really fun week ahead.

Saturday, February 19, 2005 4:44:17 PM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [10] | 

 Wednesday, February 16, 2005

Cool stuff in SQL 2005

In addition to learning how to screw up database schema manipulation in SQL 2005, I also picked up a few nifty tidbits in today's ISV event (all subject to change before RTM, and always the chance I misunderstood the material presented):

  1. SQL 2005 supports synonyms. Well, it always supported them within a query, but now it supports them as permanent object aliases too.
  2. DDL triggers. You can setup triggers for most DDL operations, such as CREATE TABLE, DROP PROCEDURE, ALTER LOGIN, etc.
  3. "text" and related BLOB types are being depricated. "varchar" now supports unlimited size, which is defined using the MAX keyword. In other words, use "varchar(MAX)" instead of "text".
  4. DML statements now support an OUTPUT clause where you can dump the contents of the "inserted" and/or "deleted" special virtual tables out to a table-valued variable.
  5. Native encryption and signing support. Built-in functions that accept a text value and a passphrase (symmetric encrypt) or x509 certificates (asymm encrypt). SQL Server can also store certs internally for these purposes.
  6. XML support is pretty cool, but jeez using .insert() or .update() can get really nasty in a hurry if the XPath strings get complex.
  7. Kinda neet that you can create a CONSTRAINT based on an XPath expression. You can also create an index based on an XPath expression.
  8. SQL Notification Services shows some promise. But aside from old-school client/server scenarios, the SqlDependency class seems to be of limited usefulness. Not very viable for smart-client or n-tier deployments without a lot of extra plumbing code (CAO's or sponsored SAO's and such). However, if you ARE doing client/server, SqlDependency is a nice way to watch for changed query results.
  9. Service Broker is rather pimp. It's a message queueing engine that operates within SQL Server. It's contract/schema based, and lets you enqueue/dequeue messages within DML transactions. New MESSAGE, CONTRACT, QUEUE, and SERVICE objects in T-SQL are used to support this.
  10. CLR integration looks pretty useful (as long as applied correctly). UDT's and Aggregate UDF's look most promising here.
  11. You can use Service Broker to perform long-running transactions, as long as the requester does not need to be notified of completion/failure, or you can use Notification Services to send a message back to them.
  12. Microsoft decided to not supply Query Analyzer tool with SQL 2005. Bad move IMO. QA was nice because it was very lightweight, and it also didnt give developers a whole lot of chance to screw up with the "right-click database drop" stuff.
  13. ADO.NET 2.0 has a few new handy features...
    1. SNAC - Sql Native Client, no longer need MDAC. I am guessing this is a full native .NET implementation of SqlClient, but not clear on that point.
    2. MARS - Multiple Active Result Sets. You can essentially have more than one DataReader open on a single connection (useful when doing nested loops) (of course, nested loops are probably bad in your middle tier anyways, but who am *I* to judge this feature?).
    3. New Async versions of operations. BeginConnect()/EndConnect(), BeginExecute*()/EndExecute*(), etc.
    4. You can now load a DataTable directly from an existing DataReader. No longer need a DataAdapter... MyTable.Load(MyReader).
    5. New DataTableReader is an IDataReader implementation that sits on top of a DataTable. MyReader = MyTable.GetReader().
    6. In order to enable MARS and async operations, you need to specify "Asynchronous Processing=true" in your connection string. This might end up unnecessary when SQL 2005 is released.

 

Wednesday, February 16, 2005 7:10:24 PM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [0] | 

Oh dear....

This will work in SQL 2005...

 

Create trigger trgHmm1 on DATABASE for CREATE_TABLE, DROP_TABLE, ALTER_TABLE

AS

   ROLLBACK;

GO

Create trigger trgHmm2 on DATABASE for CREATE_TRIGGER, DROP_TRIGGER

AS

   ROLLBACK;

GO

not sure about this one though:

Create trigger trgHmm3 on DATABASE for CREATE_TRIGGER, DROP_TRIGGER, DISABLE_TRIGGER

AS

   ROLLBACK;

GO

 

Kinda makes a strong case for really keeping tight control over who has db_ddladmin in a database doesn't it?


 

Wednesday, February 16, 2005 6:34:07 PM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [1] | 

 Thursday, February 10, 2005

Geek Dinner tonight

OK so I am really late on the heads-up, but tonight is our monthly Atlanta geek dinner. Hey there! Yes, you reading this, you are coming right? You did RSVP to Shawn right? Thought so.

 

Thursday, February 10, 2005 3:01:43 PM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [1] | 

NVEdit Downloads available now

The Powerpoint Presentation and Source Code I used in monday's Visual Studio Integration topic can now be downloaded from this link.

If you just want to install the NVEdit Add-In (with Core Library and Help File), you can download it from this link.

If you have no idea what I am talking about:

NVEdit is a simple Visual Studio 2003 Add-In that I created as a working example for my presentation to the Atlanta C# Users Group. This Add-In allows you to store large "non-volatile" textual data (SQL queries, XML/XSD documents, etc) as an embedded resource in your assemblies. The NVEditor keeps seperate name/value collections (Dictionaries) for SQL, XML, XSL, XSD, and HTML. The values are accessible in a very easy manner at runtime using static members, not too unlike the ConfigurationSettings class of the .NET Framework. Unlike the ConfigurationSettings class however, the NVData values are not stored in the .config file (which is succeptible to tampering).

The whole idea is that this gives you a very viable alternative to cramming stuff that doesn't belong into .config files or into hard-coded string constants.

Here you can see a screen capture of the simple NVEditor UI:

NVEditUI.jpg

I apologize for the delay in getting this uploaded. I tried (again) to get the RichTextBox to perform colorizing the way I wanted it, and it just wasn't working out (jeez that control really sucks). All of that stuff is ripped out now, and I cleaned up a few other bits since my presentation.

And I also compiled a help file that gets installed as well now (Hooray for NDoc!). Even though it really didn't need a help file. I mean, come on, this is a pretty darn simple tool!

 

Thursday, February 10, 2005 2:13:11 AM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [4] | 

 Wednesday, February 09, 2005

Atlanta Motorcycle Show

Anyone else dig motorcycles?

The 2005 Great American Motorcycle Show is being held in Norcross this weekend. I went last year, and some of the bikes really kicked ass! So I am thinking about going this year too. Anyone else into hogs and choppers and all that, and wanna go check it out too?

Tattoos and grizzly beards are optional!

And yeah, I know my VTX has been sitting in the garage for a year now (undriven), but one day... one day.. I will get to take it out again on the road :/

 

My VTX (well, mine also has saddlebags and stuff):

VTX_(Retro_1300)_Metallic_Silver.jpg

(yeah, it's not a Harley... can't afford a HD or a custom bike just yet...)

 

Wednesday, February 09, 2005 12:13:56 AM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [5] | 

 Sunday, February 06, 2005

Framework source code

Shawn Burke is attempting to get the Windows Forms framework source code and PDBs released with the FX 2.0 SDK.

First Post

Second Post

Sweet.

Sounds like it will be stripped of comments and such if it happens (at first deployment at least), but who cares. We can at least see the original variable names and step through it in the debugger.

Back in my years of working with the Delphi platform, I always saw the inclusion of core library source code as invaluable. Just being able to clearly see how the framework is implemented internally provides immense insights into how you *should* be interacting with it.

It was also a very good learning tool. I spent many hours (days) just browsing through the VCL source, finding little nuggets here and there - useful techniques, undocumented features, and internal implementation details that can make all the difference in a production application.

I sure wish I had access to that source code when I found an anomaly with animated GIF's in the PictureBox control. Instead of debugging and troubleshooting that issue for weeks (at my own expense I should add), I most likely would have uncovered the culprit far sooner if I had the source code in my hands.

I hope this goes through, and further hope that even more of the framework gets opened up like this in the future.

Sunday, February 06, 2005 7:06:19 PM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [0] | 

 Thursday, February 03, 2005

Upcoming Atlanta C# User Group presentation

This coming monday, I expect to be doing a presentation to the local C# group. The last time I presented to the group, it was a hastily prepared practical examination of WSE2 programming (without ASMX), schema-oriented messaging, service agents, and other basics of using WSE2 in a SOA environment.

The presentation this month is completely different.

This time, I will define a common issue/concern with application design: the handling of non-volatile textual data. Stuff like SQL queries, HTML fragments, template XML documents, and so forth that often pepper the codebase of our projects, making maintenance difficult.

I will present a solution to this issue in two parts: A simple core library to provide an extremely friendly "developer experience", and also a Visual Studio Add-In that works hand-in-hand with the core library to make the solution very simple to use.

We will talk about the issues I encountered while building the core library, the process of building and deploying a VS Add-In, and also the issues that may arise during construction of an Add-In.

At the conclusion, we will end up with a functional and useful tool that can be employed in our code projects, along with a better understanding of how sometimes extending the Visual Studio environment can provide a good return on investment.

So, if this subject interests you at all (I find it extremely interesting - but I am truly a geek), or if you simply want to get your hands on this useful project tool, then make sure to attend this months Atlanta C# User Group meeting!

 

Thursday, February 03, 2005 5:10:37 PM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [0] | 

I have much <3 for microsoft

I have been watching a fair number of live webcasts lately... from Systems Builder events (OEM info for MCE configurations), to Visual Studio integration, to Web Services topics, to... well... pretty much almost everything. I love free seminars and presentations, I guess its why I go to so many user group events.

Well, two days ago I got an email from Microsoft...

"Congratulations, Keith, you have been randomly selected as a winner in the Windows Mobility Marvels Sweepstakes!  You became eligible for this sweepstakes by attending the MSDN Webcast: .NET Compact Framework 2.0 (Level 100) on January 19, 2005 and by submitting a completed webcast evaluation."

After confirming my mailing address, the following day they overnighted a new Pocket PC to me!

It arrived today, as promised. I didn't know anything about it (mfg, model, etc) until it arrived... but it turned out to be an HP iPaq h2200. Not the fastest or most feature-rich PPC, but definately good enough for what I want (something to bang code against). Honestly, the only downsides to it are the (relatively) slower CPU (intel pxa255), not a huge amount of onboard memory, and lack of WiFi. However, it has CompactFlash2 and SDIO/MMC slots, so the memory and networking can easily be addressed.

I have been wanting a PPC for a long time now, just never worked up enough "impulse shopping" momentum to actually click the "buy now" button on any merchant sites. And now I don't have to!

I love this - not only do I get FREE great-quality education, I now also get great gizmos!

 

Thursday, February 03, 2005 4:41:32 PM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [0] | 
View Keith Rome's profile on LinkedIn

On this page....

Archives

Navigation

Categories

Microsoft Weblogs

Web 2.0 / AJAX

Local Atlanta Bloggers

SharePoint / MOSS

WPF

Other Weblogs

MSDN Monitoring

My Blogmap

About

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

Sign In

Certification Logo Certification Logo Certification Logo Certification Logo Certification Logo

Powered by: newtelligence dasBlog 2.0.7226.0