Skip to content

Commit 2bc5080

Browse files
committed
create setup article with rpc server unavailable error
1 parent dd12c93 commit 2bc5080

2 files changed

Lines changed: 237 additions & 0 deletions

File tree

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
---
2+
title: SQL Server setup fails with "The RPC server is unavailable" when provisioning service accounts
3+
description: This article helps you troubleshoot a problem where setting SQL Server instances fails when provisioning the service account.
4+
ms.date: 08/26/2025
5+
ms.custom: sap:Installation, Patching, Upgrade, Uninstall
6+
ms.author: jopilov
7+
---
8+
# SQL Server setup fails with "The RPC server is unavailable" when provisioning service accounts
9+
10+
This article helps you troubleshoot a problem where setting SQL Server instances fails when provisioning the service account.
11+
12+
13+
## Symptoms
14+
15+
You try to install SQL Server and during the service account provisioning phase, installation fails with error:
16+
17+
`The RPC Server is unavailable.`
18+
19+
This error happens when SQL Server setup provisions service accounts for the SQL Server services. Here are the entries in the setup log indicating where the failure occurred. Let’s assume that the account chosen for the SQL Server services is a domain account with name CONTOSO\SQLSvcAcct:
20+
21+
```output
22+
(05) 2024-01-19 15:00:42 Slp: Sco.User.LookupADEntry - Attempting to find user account CONTOSO\SQLSvcAcct
23+
(05) 2024-01-19 15:00:42 Slp: Sco: Attempting to check if container 'WinNT://CONTOSO of user account exists
24+
(05) 2024-01-19 15:01:03 Slp: Prompting user if they want to retry this action due to the following failure:
25+
(05) 2024-01-19 15:01:03 Slp: ----------------------------------------
26+
(05) 2024-01-19 15:01:03 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
27+
(05) 2024-01-19 15:01:03 Slp: Inner exceptions are being indented
28+
(05) 2024-01-19 15:01:03 Slp:
29+
(05) 2024-01-19 15:01:03 Slp: Exception type: Microsoft.SqlServer.Configuration.Sco.ScoException
30+
(05) 2024-01-19 15:01:03 Slp:     Message:
31+
(05) 2024-01-19 15:01:03 Slp:         The RPC server is unavailable.
32+
(05) 2024-01-19 15:01:03 Slp:        
33+
(05) 2024-01-19 15:01:03 Slp:     HResult : 0x84bb0001
34+
(05) 2024-01-19 15:01:03 Slp:         FacilityCode : 1211 (4bb)
35+
(05) 2024-01-19 15:01:03 Slp:         ErrorCode : 1 (0001)
36+
(05) 2024-01-19 15:01:03 Slp:     Data:
37+
(05) 2024-01-19 15:01:03 Slp:       WatsonData = Domain
38+
(05) 2024-01-19 15:01:03 Slp:       DisableRetry = true
39+
(05) 2024-01-19 15:01:03 Slp:     Inner exception type: System.Runtime.InteropServices.COMException
40+
(05) 2024-01-19 15:01:03 Slp:         Message:
41+
(05) 2024-01-19 15:01:03 Slp:                 The RPC server is unavailable.
42+
(05) 2024-01-19 15:01:03 Slp:                
43+
(05) 2024-01-19 15:01:03 Slp:         HResult : 0x800706ba
44+
(05) 2024-01-19 15:01:03 Slp:         Stack:
45+
(05) 2024-01-19 15:01:03 Slp:                 at System.DirectoryServices.DirectoryEntries.Find(String name, String schemaClassName)
46+
(05) 2024-01-19 15:01:03 Slp:                 at Microsoft.SqlServer.Configuration.Sco.User.LookupADEntry()
47+
(05) 2024-01-19 15:01:03 Slp: ----------------------------------------
48+
```
49+
50+
You can see from the log that [System.DirectoryServices.DirectoryEntries.Find()](/dotnet/api/system.directoryservices.directoryentries.find) method is failing with the error: The RPC server is unavailable.
51+
52+
You can look up the HResult error `0x800706ba` by using CertUtil.exe command line tool.
53+
54+
```cmd
55+
certutil /error 0x800706ba
56+
```
57+
58+
Result:
59+
60+
```output
61+
0x800706ba (WIN32: 1722 RPC_S_SERVER_UNAVAILABLE) -- 2147944122 (-2147023174)
62+
Error message text: The RPC server is unavailable.
63+
CertUtil: -error command completed successfully.
64+
```
65+
66+
67+
## Cause
68+
69+
This error is typically related to Windows issues. For more information, you can see [The system can't log you on with the following error: The RPC server is unavailable](../../../../windows-server/user-profiles-and-logon/not-log-on-error-rpc-server-unavailable.md). The article lists these reasons:
70+
71+
- The "Remote Registry" service isn't running.
72+
- Incorrect DNS settings.
73+
- Incorrect Time and Time zone settings.
74+
- The "TCP/IP NetBIOS Helper" service isn't running.
75+
76+
## Resolution
77+
78+
Troubleshoot the Windows error by following [The system can't log you on with the following error: The RPC server is unavailable](../../../../windows-server/user-profiles-and-logon/not-log-on-error-rpc-server-unavailable.md).
79+
80+
## More information
81+
82+
Here's a sample C# (.NET Framework) application that you can build yourself. The goal is to test the account that is having issues. The application is likely to reproduce the same `The RPC Server is unavailable.` error and eliminate SQL Setup process as a possible cause.
83+
84+
### Build an `ADLookup` application with .NET CLI
85+
86+
These steps provide command line instructions on how to build the application. Alternatively, you can use Visual Studio to accomplish the same result.
87+
88+
1. Ensure the .NET SDK is installed on your machine
89+
90+
```bash
91+
dotnet --version
92+
```
93+
94+
1. Open a Command Prompt or PowerShell terminal
95+
96+
1. Create a Project Folder
97+
98+
```bash
99+
md ADLookup
100+
cd ADLookup
101+
```
102+
103+
1. Initialize a Console project
104+
105+
```bash
106+
dotnet new console -n ADLookup
107+
cd ADLookup
108+
```
109+
110+
This step creates a basic console app structure.
111+
112+
1. Replace the `Program.cs` contents with this code
113+
114+
You can copy-paste the code into the file using a text editor.
115+
116+
```csharp
117+
using System;
118+
using System.Collections.Generic;
119+
using System.Linq;
120+
using System.Text;
121+
using System.DirectoryServices;
122+
using System.Runtime.InteropServices;
123+
124+
namespace ADLookup
125+
{
126+
public class Program
127+
{
128+
static void Main(string[] args)
129+
{
130+
if (args.Count() < 2)
131+
{
132+
Console.WriteLine("Specify at least 2 parameters. Closing App");
133+
Console.ReadLine();
134+
}
135+
else
136+
{
137+
string param1 = args[0];
138+
string param2 = args[1];
139+
string myADPath = "WinNT://" + param1 + ", " + param2;
140+
141+
// Examples
142+
// user "john" in the "contoso" domain
143+
// string myADPath = "WinNT://contoso/john, user";
144+
// Domain "contoso""
145+
// string myADPath = "WinNT://contoso, domain";
146+
bool adRes = false;
147+
148+
Console.WriteLine("Checking {0} for type {1}", param1, param2);
149+
150+
try
151+
{
152+
Console.WriteLine("The string ADPath is : {0}", myADPath);
153+
adRes = DirectoryEntry.Exists(myADPath);
154+
System.Console.WriteLine(Marshal.GetLastWin32Error());
155+
}
156+
catch (COMException e)
157+
{
158+
Console.WriteLine("Error Encountered: {0}", e.ErrorCode);
159+
}
160+
161+
if (!adRes)
162+
{
163+
Console.WriteLine("The path is invalid");
164+
Console.WriteLine("Press any key to quit");
165+
}
166+
else
167+
{
168+
Console.WriteLine("The path is valid");
169+
Console.WriteLine("Press any key to quit");
170+
}
171+
Console.ReadLine();
172+
}
173+
}
174+
}
175+
}
176+
```
177+
178+
179+
180+
1. Add required References
181+
The code uses `System.DirectoryServices`, which might require adding a reference.
182+
183+
```bash
184+
dotnet add package System.DirectoryServices
185+
```
186+
187+
1. Build the project
188+
189+
```bash
190+
dotnet build --configuration Release
191+
```
192+
193+
This compiles the code and generates an `.exe` in the `bin\Release\netX.X\` folder (depending on your .NET version).
194+
195+
### Run the application
196+
197+
1. Navigate to the directory where the executable is built:
198+
199+
```bash
200+
cd bin\Release\netX.X\
201+
```
202+
203+
1. Run the `ADLookup.exe` with the **domain** parameter to look up the domain name first:
204+
205+
```bash
206+
adlookup CONTOSO domain
207+
```
208+
209+
Results might look like this:
210+
211+
```output
212+
Checking CONTOSO for type domain
213+
The string ADPath is : WinNT://CONTOSO, domain
214+
1150
215+
The path is valid
216+
Press any key to quit
217+
```
218+
219+
1. Look up the account name with the **user** parameter:
220+
221+
```bash
222+
adlookup CONTOSO/SQLSvcAcct user
223+
```
224+
225+
Note: the forward slash, not back slash
226+
227+
Possible output for the service account you're having issues with:
228+
229+
```output
230+
Checking CONTOSO/SQLSvcAcct for type user
231+
The string ADPath is : WinNT:// CONTOSO\SQLSvcAcct, user
232+
Error Encountered: -2147023174
233+
The path is invalid
234+
Press any key to quit
235+
```

support/sql/database-engine/install/windows/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ items:
1111
href: description-update-cache-folder.md
1212
- name: Errors when installing SQL Server
1313
href: error-install-sql-server.md
14+
- name: RPC server is unavailable error during setup
15+
href: error-rpc-server-unavailable-provisioning-account.md
1416
- name: Issues when upgrading to SQL Server 2022
1517
href: issues-upgrading-sql-server-2022.md
1618
- name: Driver installation check

0 commit comments

Comments
 (0)