test company, test database, live company in test database, test company in live database…

How times have changed. Now we have a SAN and ESX Hypervisors hosting our servers, virtualisation and new hardware platforms have made managing enterprise infrastructure so much easier. For developers this had made possible the cloning of live environments, yes webservers, databases, ERP and various integrations can all be plucked from operational service and plonked down into a test environment.

This means testing and development can take place in environments that are almost identical to production live environments. Importantly I said almost identical – users can log in and test scenarios and perform UAT, performing end to end UAT scripts without interruption. Years ago they would have had to test one section at a time and everyone would pray when it was all stitched together and launched into the production environment that it would hang together. The confidence factor from testing is increased as a consequence of the improved environments and this mostly makes for safer deployments.

As developers we have almost identical copies of the production environments to work with, whilst so helpful It introduces new hazards and risks. We noticed just how much time is spent orientating every conversation, prefacing it with what version of the various systems we are talking about for fear of misunderstanding. Much akin to the header on information packets. It is risky when production and live database are open in SQL server, oh so easy to run a script against the wrong system. I am happy to say I’ve never taken GP down by running SQL against it.. yet, but when we changed to this arrangement I became very aware of how easy it is to make a mistake now. When it was a test company we were developing in, then the connection was obvious. The problem is when both databases look the same including the name and only the server is different then it becomes all to easy to make mistakes. It becomes essential to keep an eye on the connections shown in by hovering over the tabs of the SQL pane.

I also use an add in for SQL server management studio, SSMS Boostthat has recovered many scripts from loss during system crashes or simply discarding a script I wish I hadn't.  It keeps a history of everything in SQL management studio, saved or not and lets the user go back to scripts ran days ago. It also provides search for that history too- highly recommended. Anyway I am off track, this add in also has the facility to colour the connections on the task bar at the bottom. This can be another helpful aid if orientation when working between multiple connections between live and test website and GP databases.



GP Power Tools (Support Debugging Tool)

It is also dangerous for users of GP, using the GP client and developers working between the clone environment and production. Even with explicit warnings about not entering genuine orders into the test system, it only took a day for someone to do it! Luckily it was only one order and not a whole day’s worth.

The GP power tools gives us the ability to colour windows in GP according to the company database it belongs to. This provides a visual cue to the user to instantly recognise which company the user is working in. See the screen shot for the configuration of this feature. I don’t know if the newer power tools is exactly the same, but with this version, it cannot differentiate between the database server the company is running on. Hence we cannot use this program to identify the difference between servers.


Visual Studio Tools

Due to the accidental use of the clone server, it became apparent we needed something to tell the difference easily, when users are logged into GP in the clone environment. We used the same idea of colouring the user interface depending upon the company, but instead used the server name as the identifier. The solution is implementing as part of the Visual Studio Tools plugin we have written. It takes advantage of the same Dexterity calls (Color_SetSystemColor) as shown in the references that follow, pay particular attention to “Colours Depending on Company.zip” in the VBA example.

We see here how the bar is coloured, this is enough to know we are in danger.


There is still the problems of multiple test and production GP companies, servers and databases, but at least when in GP it is clear which connection is currently in use from the user interface. Thanks to Michael on the team for developing this solution.


Differentiating Companies in Microsoft Dynamics GP

Hybrid – Changing Screen Colours Depending on Company Example

Comments (1) -

  • I have almost run scripts on live by accident too, the only thing that has stopped me is the fact I always check the database name before running them.

Add comment