donderdag 24 maart 2011

VS2010 Settings not updating

Nitty gritty detail, could drive you mad.

In Visual Studio 2010 I have a C# Windows application. I changed the connectionstring for the database in the app.config file. Later, I opened the Properties | Settings. VS noticed that the app.config had changed and suggested to change the settings accordingly. Yes, VS, I would like that, thank you. 

But then (as it turned out much later), it does NOT change the default setting in the Settings.Designer.cs, in the

[global::System.Configuration.DefaultSettingValueAttribute(....)]

When you simply run the application, it will read app.config (or actually the values that were copied to <applicationname>.exe.config). But when you - a I did - use it's classes from a Test project, it will only use the default setting.

Solution: open the editor in the Properties | Settings designer, test your connection (if you want to), and then save the setting. Now VS sees that you altered it, and adjusts the .cs file accordingly.

donderdag 24 februari 2011

Talend SSO, NTLM to SQL Server 2008

Fresh laptop, let's re-install the Talend Open Studio for some testing. I usually work with SQL Server through Integrated Authentication (automatically logging on with your Windows account). Not so easy with Talend though. I finally got it to work by:

- downloading jTDS 1.2.5 from http://sourceforge.net/projects/jtds/files/jtds/

- extracting it, navigate to subfolder x86\SSO

- copy ntlmauth.dll to Windows\System32 (could be anywhere in your PATH if I understood several posts well)

- restart TOS

- leave username and password in the DbConnection settings empty

- in ServerName just the name of my computer (no instance name appended)

And then, ole, it worked!

dinsdag 22 februari 2011

Can you express order in UML?

Today a collegue asked me if he could express order in a class diagram. Well, you can't.

Situation: class QuestionList, composition of multiple Question items. Actually, each question in the QuestionList is of a specific subtype of Question. How to express that the Question items should be in a specific order?

The Association in the class diagram offers the attribute 'ordered' in the source or target role. This leads to the first set of classes in the diagram below. However, you cannot infer from it that in the QuestionList, an Object of type FirstQuestion should be first, and an object of type SecondQuestion second. Or even that you should have one of each.

Next option is to use Objects instead of Classes. As in the second diagram. It shows that MyQuestionList consists of one object of type FirstQuestion and one of type SecondQuestion, but still no order.

Classes and Objects

The problem is that the order in which questions are to be asked is a dynamic feature, not a static one. And since a Class Diagram is for static constructions, you cannot express order very well. So we go on to a more dynamic diagram: Collaboration. In this diagram you could use the role binding to state which type of question fulfills which role. And then read 'role' as 'being the first question' and so on. See the diagram below. It still isn't machine processable, but at least you have modelled it.

I'm open to better solutions.

Collaboration

donderdag 17 februari 2011

Oops, Visual Studio 2010 installed SQL Server Express

Fresh machine! Fresh Win7 pro!

I already loaded SQL Server 2008 R2.
Next is Visual Studio 2010. Full install or custom install? Well, what the h*, let's do a full install.

Oops, I did not anticipate that the full install of an IDE includes an RDBMS. My mistake I guess.

So I ended up with two SQL Server instances, one for 2008 R2, one for Express. Fresh machine becomes mess machine. In just 2 hours.

Problem is: When you re-run VS setup, it offers to add/remove features, but SQL Server Express is NOT one of those features. The uninstall team at MS clearly did not count on an RDBMS being included either. On to Add/Remove Programs (which, on a side-note, in Dutch is called 'Software', which is still an English noun...). No such entry as 'Microsoft SQL Server Express'. Hmmm.

But hey, I found out: In Add/Remove Programs find the entry 'Microsoft SQL Server 2008'. Select it. Choose 'Uninstall/Change'. It opens a window, choose 'Remove'. After some more steps you will be presented the choice which instance you would like to remove. Choose SQL Server Express. In the selectionlist for individual features do not select the Shared Features (you'll want to keep them for your 2008 R2 instance). Next, next, finish.

Win7 may complain about the uninstall not being compatible or something like that. Ignore it. It has uninstalled properly, as you can check by not seeing the SQL Server Express services in Run | services.msc any more.

dinsdag 4 januari 2011

VMWare upgrade requires expert SQL Server knowledge

Today our System Administrator wanted to upgrade the VMWare server (aka vCenter Server) to version 4.1, thereby reusing the existing management database. Our SA is no database expert, and he shouldn't need to be. VMWare thinks otherwise.

To set the scene: the new version is 4.1, which requires a new server because the server OS has to be 64bit. The existing management database is called 'VMware' and located on a SQL Server 2005 instance. On a previous install the SA was instructed to create a 'VMware' user, and create several tables under that account. And therefore automatically in the 'VMware' schema (which in SQL Server is not exactly the same as a user). So in the VMWare database about 1/3 of the objects lives in the dbo schema, and the rest in the VMware schema. While running the upgrade that leads to the following error:

"
Setup found that multiple schemas exist in the database. Please the remove extra schemas before continuing."

Apparently, VMWare knows that such a thing may have happened before, and have written an instruction to solve it. It's here. Unfortunately, it is not enough to make it work. It took us two hours, so I write it down here to save you that time. And forget about the 8 steps on the aforementioned page.

  1. Make a backup from the original VMware database, before even starting the upgrade process.
  2. Start SQL Server Management Studio, and open a new Query Window.
  3. Execute: USE VMware;
  4. Execute: SELECT schema_id from sys.schemas where name = 'VMware';
  5. Execute: SELECT 'ALTER SCHEMA dbo TRANSFER ' + sys.objects.name from sys.objects where sys.objects.type in ('U', 'V', 'P') and sys.objects.schema_id = ;
  6. Copy the result of step 5 from the result window to the query window, and execute this list of statements. You now have moved everything from the VMware schema to the dbo schema.
  7. I suppose you still want to use the VMware user to perform the upgrade, so you have to make sure that when you do, the upgrade scripts doesn't create new objects in the associated VMware schema again. It appears that SQL Server Management Studio lets you set the default schema for user VMware in the properties window. You can change it, but it won't remember the change... So, back to scripting:
  8. Execute: DROP SCHEMA VMware;
  9. Execute: DROP USER VMware;
  10. Execute: CREATE USER VMware WITH DEFAULT_SCHEMA = dbo;
  11. Finally, we came across another error in the upgrade log: "Error while upgrading: ERROR [42000] [Microsoft][SQL Native Client][SQL Server]CREATE INDEX failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods." Well, if you know that, VMware, include a statement in the upgradescript to make sure the setting is correct. But hey, we'll do it ourselves:
  12. Execute: SET ARITHABORT ON;
  13. Make another backup of the VMware database, prior to starting the upgrade.
  14. OK, by now the vCenter Server setup worked through the database upgrade script (using the VMware login for access to the database). I hope it does for you as well.

woensdag 27 oktober 2010

TDM, a history of Impact

Today I came across the acronym 'TDM'. I've worked in the field of healthcare IT for quite some time now, and I was sure I had heard it before. Just could not find the right drawer in my head.

From the context and some other drawer in my head I derived that it had to do with an integration platform and message brokering. Enter Google. Now this is old stuff, so I had to look a bit further. The answer:

TDM is an acronym for Transaction Distribution Broker, and it is a communication broker created by CAI - Century Analysis Inc. I think it was then already bundled with the (then BAZIS, now iSoft) ZIS (Hospital Information System, but then the Dutch acronym). In 1998 it was transformed to Impact, which again was bundled with iSoft ZIS to make it communicate with the outside world.

By now, CAI does not exist anymore. It was acquired by New Era of Networks Inc. (NEON) in 1999. NEON was acquired by Sybase in 2001. Sybase now offers the product under the name "e-Biz Impact".

Thanks to Ric Cross for providing the meaning of TDM. He knows a lot more about it (I quote):

Transaction Distribution Management - There was no binary by that name in the product suite ... just a marketing name to provide some clue as to the products purpose. A "Distributed Computing Environment" (DCE) based "POSIX compliant" message broker.

At the time the term was "Message Oriented Middleware" TDM had several pieces that worked together, the Broker Server Manager (BSM) the Store and Forward Manager (SFM) and message client/servers, we called them Adaptive Interface Modules (AIMs). The concept "Common Services" was the prevalent and primary underpinning of the functionality of the suite. The TDM client GUI was in my biased opinion one of the better parsers of the day. You used the GUI to craft "Production Objects", basically, under the covers C++ class structures for the proprietary "Object Definition Language" (ODL). The ""Production Object" consisted of an inbound definition and the outbound definition. The Outbound Rules were where the transformation of data took place, rules would consist of rule components, with qualifiers and filters (pre and post), built in function calls, etc.

The GUI layout was good. What was clever was the ability load sample data to test the parse and step through the outbound rules.

Typically a developer took the the Production Objects and referenced them to a SFM. The SFM was defined with AIMs for either Inbound or Outbound and presto you were moving messages. You could embed Production Objects within the AIM, make a ODL function call to it to determine data values, set dynamic links, as an example, which SFM or any number of manipulations, use it to call another AIM to retrieve additional data etc, all in all some fairly sophisticated processing could be developed.

woensdag 20 oktober 2010

HP Envy's scroll feature won't resume

New laptop, HP Envy 14, cool piece of gear. Little problem: after resuming from hibernate it won't scroll anymore. Only after a restart of Windows, scrolling came back.

First guess was right: upgraded the Synaptics driver to version 15.0.17.4. Now it works!