Showing posts with label integration manager. Show all posts
Showing posts with label integration manager. Show all posts

Wednesday, March 30, 2011

Where Oh Where Is My Integration Manager?

A user navigates to Microsoft Dynamics GP>>Tools>>Integrate>>Integration Manager and nothing happens.  The menu item is available, but clicking on it does NOTHING.  We can check security, but there is nothing wrong there.  We can make sure Integration Manager launches fine from the Start menu, and it does.  So what is wrong? 

Well, it's a pretty easy fix.  Browse to the GP program directory (generally C:\Program Files\Microsoft Dynamics\GP).  And then find the Dex.ini file (in the Data folder).  Open the Dex.ini in notepad, and locate the following lines:



Validate that these paths are correct, making any necessary adjustments.  Then the menu selection should launch Integration Manager successfully!

Tuesday, December 29, 2009

Integration Migration Frustration

About a month ago I was asked to review a client's integrations in preparation for their upgrade from GP 8 to GP 10. They run 4 integrations in Integration Manager on a regular basis to import employees, payroll, and invoices from their operational system.

I looked at the integrations and saw that they were relatively simple. They read from a few SQL tables in a staging database on the GP SQL Server, and only had a few simple scripts to call stored procedures to prepare the data prior to import by IM.

Pretty simple, right? I documented my findings and declared that the upgrade should have no impact on the integrations.

A month later, and many projects later, I completely forgot the details of the review that I performed. And in the meantime, the client discovered that their old SQL server was underpowered and that they would need to install GP 10 on a new SQL server machine. I didn't get that particular memo, so I was oblivious to this new detail.

On the scheduled date, the partner performed the upgrade to GP 10 on the new server, and all was swell. Except until the client tried to run their integrations.

Integration Manager complained that the source table could not be found. Hmmm. That's odd. And remember at this point, I didn't realize that a new SQL server had been installed.

When I checked the table list, a bunch of random objects were listed--none of which looked like a staging table. The integrations were using a DSN within IM, so when I checked the DSN, I found the problem. By default, DSNs created in IM do not have the database name set in the connection string. Although a new DSN had been setup to point to the new SQL server, the staging database was not listed. So I added the "Database=GPImport" parameter to the connection string, and viola, the appropriate tables appeared in the Data Source table list.

Problem solved! Right? Not so quick. IM showed that there was no data in the Employee table. And all of the invoices in the invoice table had already been imported into GP. Umm.....

Funny thing about integrations: The source data doesn't just materialize magically. Something or someone needs to prepare or make the data available for IM. Well, let's just say that I neglected to dig deep enough in that direction when I performed my initial assessment.

I saw that the integration was reading from a SQL staging table, and that table would not be affected by the upgrade to GP 10, so no worries. And the stored procedure that was being called in the Before Integration script looked good, and would also not be affected by the GP 10 upgrade.

But, what I didn't consider was what would happen if GP was moved to a new SQL server. At the time I, the partner, and the client, didn't know they would be using a new SQL server, so we didn't discuss the issues such a move would cause.

Naturally, it caused issues, and lots of them.

If you've ever heard of a Rube Goldberg machine, you'll appreciate this particular integration.

It turns out that multiple static HTML intranet web pages, circa 1994, on a separate web server, were using IDC and HTX files to call SQL stored procedures. Never heard of IDC and HTX files? Neither had I, since I started my data-driven web development with ASP 1.0. So the IDC file has a DSN, login info, and a SQL command, which was a stored procedure. When the user accesses these IDC files via IIS, the stored procedure is called.

Sounds simple, right? Well, that stored procedure calls several other stored procedures. Those stored procedures query the GP database and join to a linked SQL server to query data and fill cursors which ultimately populate data in staging tables. But wait, there's more! The stored procedures also manually build and write HTML report files to the SQL server local disk! We're talking hundreds and hundreds of lines of SQL in over a dozen stored procedures. Wait, don't touch that dial! They also use the xp_cmdshell extended stored procedure to map network drives back to the intranet web server and then copy the HTML files to the web server! Yessiree, a stored procedure to map network drives and copy files!

If you aren't scared yet, you are truly a stoic.

Thankfully the IDC files all referenced the same DSN, so I was able to change the DSN on the intranet server to point to the new GP SQL Server. And then, of course, I had to setup a linked server on the new GP SQL server. Whew, all done, right?

Nope. It turns out that the BeforeIntegration scripts in IM had hard-coded references to the old GP SQL server, and did not use RetrieveGlobals. So those scripts had to be updated as well (it was much faster to just change the server name, so I didn't bother to implement the GPConnection object in IM 10).

What was really fun was trying to figure all of this out without any documentation. Also, the integration had been developed and modified extensively by at least two different firms over the course of the last FOURTEEN YEARS, so there were pieces of code all over the place. I had to search for clues just to figure out what I should be searching for as I dug through files and settings on three different servers.

As of today, I think I finally have all of the integrations working. I didn't dare touch a line of code, lets the entire house of cards collapse, so I ended up just having to find all of the database connection settings and change them appropriately.

The real lesson was that although I performed an initial assessment of the integrations prior to the upgrade, I clearly wasn't thorough enough, and made several implicit assumptions--the biggest of which was that GP 10 would be installed on the same server.

So after going through this experience, I created an "integration review template" to help me try and detect some of these issues in advance next time. It's by no means complete, but it has several questions that I could think of that migth have helped me better anticipate some of the issues that I ran into by at least understanding the complexity of the processes that generate the source data for Integration Manager.

I've posted it for download in case anyone is interested.

Please, integrate safely.

Tuesday, January 6, 2009

"Unable to load SanScript Library" and Integration Manager

Late last month, I was asked to assist a client who was having issues with the year end update for Dynamics GP. After I had helped her through the issue, she mentioned that she had an issue with Integration Manager that her previous consultant could not resolve. She had even gone so far as to completely wipe and reload the machine in an attempt to address the issue. Naturally, in the middle of a million year end questions, this issue actually sparked my curiousity :)

She showed me that on one machine, if she tried to run an integration, it would appear to start and then would display the error "Unable to load SanScript Library". Like any good consultant, I immediately checked the KnowledgeBase and found a few articles that discussed the following possible causes and resolutions...
1. Corrupt install or corrupt IM.dic: Uninstall, clean registry, and then reinstall
2. Corrupt integration: Recreate integration

I knew she had been through #1 several times, so I tried #2 and still received the error. I tried using a backup IM.MDB, and still received the error. Hmmm.

So I started to think about the corrupt IM.dic mentioned in the article. And I started to think about how many of the articles mentioned the error when opening an integration, but she did not the error until she actually ran the integration (and that it appeared to run at first before displaying the error). It was as if it was having issues with pushing the data through the Dynamics GP client, as opposed to an issue with the Integration Manager application itself. And then I remembered that she launched Integration Manager from the start menu, because the option from Tools>>Integrate was not available to her.

I bet many of you already know where I am heading with this. I checked her Dynamics.set file (her launch file, through Tools>>Setup>>System>>Edit Launch File) and, sure enough, Integration Manager was not included in the launch file. The IM.dic was were it should be, in the GP directory, but the Dynamics.set was not even looking for it. We modified the launch file to include Integration Manager (by copying from the Dynamics.set on a working workstation), and the integration now runs perfectly.

This was on GP 9, not sure if others have run in to it on GP 10. But I thought it was an interesting find that I should share with others, to spare you the troubleshooting should you come across it. Happy New Year!