How to get Organization & Sql Server Database name in MS CRM using SQL Server

It is not mandatory to have the same CRM Organization Name (On-Premises) with same Database Name in Sql Server.

So to check which Oragnization pointing to the database can be known by using the below query

SELECT DatabaseName [DATABASE NAME],
FriendlyName [ORGANIZATION NAME],
SqlServerName [SQL SERVER NAME],
SrsUrl [SSRS URL],
[ORGANIZATION STATUS] =
CASE
WHEN STATE=1 THEN 'ENABLED'
WHEN STATE=0 THEN 'DISABLED'
END
FROM
[MSCRM_CONFIG].[DBO].[ORGANIZATION]

Please share your valuable feedback on this article.

Advertisement

4 thoughts on “How to get Organization & Sql Server Database name in MS CRM using SQL Server

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.