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.


Discover more from Arun Potti's Power Platform blog

Subscribe to get the latest posts to your email.

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

Leave a Reply