Attempt to run AeXConfig.exe to configure database failed with error: Failed to construct DatabaseContext object
search cancel

Attempt to run AeXConfig.exe to configure database failed with error: Failed to construct DatabaseContext object

book

Article ID: 176994

calendar_today

Updated On:

Products

IT Management Suite Client Management Suite

Issue/Introduction

The following command was run to attempt to reinstall a Symantec Management Platform (Notification Server 7) database, using local Windows Authentication as the credentials:

AeXConfig /db dbserver: DatabaseServerName\Instance  dbname:Symantec_CMDB2 dbusername: dbpassword: dbtimeout:600

Note: The Instance needs to be specified in 'dbserver'. If the instance is missing or incorrect, the command will run to completion but the NS will not be able to establish a database connection.

After running for a short time, the process (viewed from within the Notification Server log viewer) would terminate with the following errors:

Source: global.asax
Description: Unhandled exception.  Type=System.Web.HttpException Msg=Error executing child request for Header.aspx.

Source: Altiris.TaskManagement.ClientTask.*
Description: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

Description: BaseXmlHttpCallback Exception: Altiris.NS.Exceptions.DatabaseNotReadyException: Failed to construct DatabaseContext object. Connection to database failed. ---> Altiris.NS.Exceptions.AeXException: Failed to open database connection. Current user is . Error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

Cause

The IP address for the database server could be resolved to a name using the command ping -a <SMP Server FQDN>, a hidden problem with DNS resolving was affecting the program's ability to connect with or resolve the database server's name and address.

Resolution

Correct the Entry in DNS for the SQL server or add the database server's address and host name to the ".\Windows\System32\drivers\etc\hosts " file.