Error "SQL Server does not exist or access denied" during NSSetup

book

Article ID: 179906

calendar_today

Updated On:

Products

Management Platform (Formerly known as Notification Server)

Issue/Introduction

 

Resolution

Problem
 

The error(s) "SQL Server does not exist or access denied" or "Failed to connect to database" appears when trying to install Notification Server or trying to open the Notification Server Console.
 

During NSSetup, when trying to specify the SQL Server name, you may see errors related to failed to validate credentials or unable to retrieve database list.

When running NSSetup, in the SQL Setup section the installer is unable to find the SQL Server or database. Reviewing the a.log, errors similar to the following appear:

Priority: 1
Tick Count: 158827125
Host Name: SQLserver
Process: aexsvc.exe (1956)
Thread ID: 356
Module: AltirisNativeHelper.dll
Source: Altiris.NS.ClientMessaging.ClientEvtQueueWatcher.LogEventQueueStatusThreadProc
Description: Caught unknown exception. Error=Altiris.NS.Exceptions.AeXException: Failed to open database connection. Current user is Domain\administrator. Error: SQL Server does not exist or access denied. ---> System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.
   at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
   at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
   at System.Data.SqlClient.SqlConnection.Open()
   at Altiris.NS.Utilities.DbUtils.OpenConnection(SqlConnection dbConn)
   --- End of inner exception stack trace ---
   at Altiris.NS.Utilities.DbUtils.OpenConnection(SqlConnection dbConn)
   at Altiris.NS.Utilities.DbUtils.CreateConnection(String configKey)
   at Altiris.NS.Utilities.DbUtils.GetNSDatabaseVersion()
   at Altiris.NS.Utilities.DbUtils.IsNSDatabaseReady()
   at Altiris.NS.ClientMessaging.ClientEvtQueueWatcher.LogEventQueueStatusThreadProc()

Other similar errors include:

Priority: 1
Tick Count: 158745828
Host Name: SQLserver
Process: aexsvc.exe (1956)
Thread ID: 12408
Module: AltirisNativeHelper.dll
Source: Altiris.NS.Scheduling.ScheduleService.ProcessSchedule
Description: Failed to process schedule 'Collection Delta Update Schedule'. Exception: Failed to construct DatabaseContext object. Connection to database failed.    at Altiris.NS.ContextManagement.DatabaseContext..ctor(ContextIdentity identity, Boolean beginTransaction, IsolationLevel isolationLevel)
   at Altiris.NS.ContextManagement.DatabaseContext.GetContext(Boolean createNewTransaction, IsolationLevel isolationLevel, ContextIdentity identity, Boolean independentContext)
   at Altiris.NS.ItemManagement.Item.GetItem(Guid itemGuid)
   at Altiris.NS.Scheduling.ScheduleService.ProcessSchedule(String scheduleId)

 

Environment
Notification Server 6.0.xxxx
MSDE 2000 8.00.2039
Microsoft SQL Server 2000
Microsoft SQL Server 2005 Express
Microsoft SQL Server 2005

Cause
Sometimes during the installation of MSDE 2000 or Micrsoft SQL Server 2000/2005, the networking protocols are not enabled properly.

Resolution
 

The following steps will enable the correct network protocols on MSDE 2000 | Microsoft SQL Server 2000 for use with Notification Server:

1. Go to <C:>\Program Files\Microsoft SQL Server\80\Tools\Binn and run svrnetcn.exe.
2. In the resulting SQL Server Network Utility window, make sure that you have selected the right Instance on your server for the Altiris Database.
3. In addition, you should have on the Enabled Protocols list "Named Pipes" and "TCP/IP". If not, enable them. Click OK.
4. Stop and Start the SQL Server services.
5. Try to open the Notification Server Console (if you had Notification Server already running previously). Otherwise, run NSSetup one more time.

The following steps will enable the correct network protocols on Microsoft SQL Server 2005 or Microsoft SQL Server 2005 Express for use with Notification Server:

1. Go to Start>All Programs>Microsoft SQL Server 2005>Configuration Tools>SQL Server Configuration Manager
2. Under SQL Server 2005 Network Configuration, make sure that TCP/IP and Named Pipes are listed as 'Enabled' (in order to enable them, right-click>Enable). If you had to enable them, you will need to restart the SQL Server service in order to take effect.
3. Under SQL Native Client Configuration, make sure that TCP/IP and Named Pipes are listed as 'Enabled' as well.
4. Try to open the Notification Server Console (if you had Notification Server already running previously). Otherwise, run NSSetup one more time.

Note:  Whenever you run a repair or NSSSETUP, and you are not at the Notification Server, you must remote in as session 0.

 start>run  Mstsc.exe /v:<NSServerName> /console OR start>run  Mstsc.exe /v:<NSServerName> /admin to connect to the NS

It is also recommended to use the Application Identity Account.