Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Connecting Dynamics 365 BC 2022 with SQL Database

(0) ShareShare
ReportReport
Posted on by 5

Im installing Dynamics 365 BC 2022 on a server while my database is on another server. I have been having problems connecting the application with the server. The last error from the event viewer below

Server instance: BC220 Tenant ID: Environment Name: Environment Type: User: Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavCSideException Remappable: True ErrorCode: 22924076 ErrorNumber: 52012 ModuleNumber: 93 ShouldCalculateALCallStack: True SuppressMessage: False ContainsPersonalOrRestrictedInformation: True DiagnosticsSuppress: True DiagnosticsMessage: Message not shown because the NavBaseException constructor was used without privacy classification NavTenantId: nav-systemapplication EnvironmentType: Production MessageWithoutPrivateInformation: Message not shown because the NavBaseException constructor was used without privacy classification SuppressExceptionCreatedEvent: False FatalityScope: None ErrorLevel: Error Message: Cannot establish a connection to the SQL Server/Database. This could be due to one of the following reasons: * SQL Server is not started. * The database does not exist. * Proper permissions have not been given to the NAV Server Account. Try again later or contact your system administrator. Source: Microsoft.Dynamics.Nav.Ncl HResult: -2146233088 StackTrace: at Microsoft.Dynamics.Nav.Runtime.NavDatabase.VerifyConnection(Int32 attemptCount) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddSystemTenant(String appDatabaseServerName, String appDatabaseName, String appDatabaseUserName, ProtectedDatabasePassword appDatabasePassword, Boolean verifyConnection, String newEncryptionKey, IDatabasePasswordPublicEncryptionKeyStorage keyStorage, Boolean allowOverwritePublicKey, Boolean verifyServerInstanceKey, Boolean isNewDatabase, NavDatabaseConnectionCredentialType databaseConnectionCredentialType, Boolean isInPlacePublishing) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddSingleLegacyTenant(String databaseServerName, String databaseName, String databaseUserName, ProtectedDatabasePassword databasePassword, EncryptionProvider encryptionProvider, AzureKeyVaultSettings azureKeyVaultSettings, NavDatabaseConnectionCredentialType databaseConnectionCredentialType, Boolean isInPlacePublishing) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.ConfigureTenants(ServerUserSettings settings, String encryptionKey, Boolean isInPlacePublishing) at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.SetNavEnviroment(String commandLineServiceInstanceName, ServerUserSettings settings) at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.Start(String commandLineServiceInstanceName) at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.OnStart(String[] args, ServiceBase serviceBase) at Microsoft.Dynamics.Nav.WindowsServices.WindowsService.NavWindowsServiceLifetime.OnStart(String[] args) at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state) --- End of stack trace from previous location --- at System.ServiceProcess.ServiceBase.Run(ServiceBase[] services) at System.ServiceProcess.ServiceBase.Run(ServiceBase service) at Microsoft.Extensions.Hosting.WindowsServices.WindowsServiceLifetime.Run() --- End of stack trace from previous location --- at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) at Microsoft.Dynamics.Nav.WindowsServices.DynamicsNavServer.Main(String[] args) StackTrace: at Microsoft.Dynamics.Nav.Runtime.NavDatabase.VerifyConnection(Int32 attemptCount) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddSystemTenant(String appDatabaseServerName, String appDatabaseName, String appDatabaseUserName, ProtectedDatabasePassword appDatabasePassword, Boolean verifyConnection, String newEncryptionKey, IDatabasePasswordPublicEncryptionKeyStorage keyStorage, Boolean allowOverwritePublicKey, Boolean verifyServerInstanceKey, Boolean isNewDatabase, NavDatabaseConnectionCredentialType databaseConnectionCredentialType, Boolean isInPlacePublishing) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddSingleLegacyTenant(String databaseServerName, String databaseName, String databaseUserName, ProtectedDatabasePassword databasePassword, EncryptionProvider encryptionProvider, AzureKeyVaultSettings azureKeyVaultSettings, NavDatabaseConnectionCredentialType databaseConnectionCredentialType, Boolean isInPlacePublishing) at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.ConfigureTenants(ServerUserSettings settings, String encryptionKey, Boolean isInPlacePublishing) at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.SetNavEnviroment(String commandLineServiceInstanceName, ServerUserSettings settings) at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.Start(String commandLineServiceInstanceName) at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.OnStart(String[] args, ServiceBase serviceBase) at Microsoft.Dynamics.Nav.WindowsServices.WindowsService.NavWindowsServiceLifetime.OnStart(String[] args) at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state) --- End of stack trace from previous location --- at System.ServiceProcess.ServiceBase.Run(ServiceBase[] services) at System.ServiceProcess.ServiceBase.Run(ServiceBase service) at Microsoft.Extensions.Hosting.WindowsServices.WindowsServiceLifetime.Run() --- End of stack trace from previous location --- at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) at Microsoft.Dynamics.Nav.WindowsServices.DynamicsNavServer.Main(String[] args).

Please i will appreciate support

  • IT-Sherlock Profile Picture
    IT-Sherlock 14 on at
    RE: Connecting Dynamics 365 BC 2022 with SQL Database

    Hey HBO,

    can you check the permissions from the Service Account is correctly setten on SQL Server und the section "Security -> Logins".  

    learn.microsoft.com/.../provision-server-account

    and the SQL Services are all started.

    Hope this helps

  • HBO Profile Picture
    HBO 5 on at
    RE: Connecting Dynamics 365 BC 2022 with SQL Database

    Hi Zhu,

    Thanks for your help. I was able to ping the database server from the application server. The name is correct and database was started. Im not sure what else to look at

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,115 Super User 2024 Season 2 on at
    RE: Connecting Dynamics 365 BC 2022 with SQL Database

    Hi, it looks like you are not connected to the database. Please check whether the server can be accessed from your application server, whether the data has been started normally, and whether the name of the database is correct.

    Hope this helps.

    Thanks

    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans