Friday, June 26, 2015

How to identify the SQL Database from the corresponding Company Name in Dynamics GP

Since SQL database names are restricted to 5 characters by the Dynamics GP Company Creation utility, SQL database names tend to be far less instructive than the Company Name, which appears in the drop down list during the company selection process at login.

In order to ensure your technical resources understand the relationship between these two data points, it is important they understand where this corollary can be determined in SQL. The following query can be run on demand by technical resources:


SELECT 
INTERID 'Database',
CMPNYNAM 'Company_Name' 
FROM DYNAMICS..SY01500

This query will display a list of company databases and the corresponding company names, so when the finance department asks for a backup or restore operation to be completed for a particular company, mistakes can be avoided. See image one below.

Image 1 - Company Query and Results

1 comment:

  1. just used this query to answer an annoying question for some data structure diagrams i'm authoring. wanted to stop by and say thanks!

    ReplyDelete