SQL Server

Could Not Open Connection To SQL Server

A Network 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.

What it means

The Recast Management Server is not able to connect to the configured SQL server for some reason. Because of this inability to connect, the Management Server will not function correctly.


  • If the SQL database is located on a separate computer from your Recast Management Server verify that the SQL server is powered on, is online and is reachable from your Recast Management Server computer (try pinging the specified computer).

  • Verify that the correct server address and port are specified in the appsettings.Production.json file. This file is located at C:\Program Files(x86)\Recast Software\Recast Management Server\appsettings.Production.json and can be viewed and edited with a text editor.

Additional Information

Information on configuring SQL Server is located here: Configuring SQL Server

File Group Is Full

If you look at the Recast Management Server or Event Viewer Logs, the full error is: ---> Microsoft.Data.SqlClient.SqlException (0x80131904): Could not allocate space for object 'dbo.ActionExecutions'.'PK_ActionExecutions' in database 'RecastManagementServer' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

What it means

The Recast Management Server is not able to write to the SQL Database because the disk or SQL instance is full.


In SQL Express

SQL Express is limited to a 10GB database, and when it fills up you will receive the file group is full notice.

To remove information from the database you should

  1. Open SQL Server Management Studio
  2. Open the list of Databases
  3. Right Click on the RecastManagementServer database and select "New Query"
  4. In the window that appears on the right side, type delete from ActionExecutions. Note: This will remove all previous action executions from the Audit Log.
  5. Once the query is done, it will show how many rows were affected in the bottom window.
  6. We recommend opening IIS and restarting the Recast Management Server and recycling the AppPool after running the query.

SQL Query

In Enterprise SQL

To remediate this error in Enterprise SQL, you can follow the same steps as above, or you can expand the database size.

  1. Open SQL Server Management Studio
  2. Open the list of Databases
  3. Right Click on the RecastManagementServer database and select "Properties"
  4. In "Database Properties" select the "Files" Page
  5. Increase the value in the initial size (MB) column for the file.
  6. Click "OK"
  7. We recommend opening IIS and restarting the Recast Management Server and recycling the AppPool after running the query.

Database Properties

Preventing the problem's return

Audit logs are the item that takes up the most space in the Recast Management Server Database. By default, those logs are stored indefinitely. You can change the length of time the logs are stored in the Settings section of the Recast Management Server. In the Global Settings section, click change on MaxAuditLogAge and enter the number of days you would like to keep the logs.

RMS Audit Age Setting

SQL Could Not Allocate Space

What is happening?

When attempting to add a user to the Recast Management Server, or when attempting to run an action in Right Click Tools, nothing appears to happen. Sometimes this error will show in the Recast Management Server as an error, This error can appear in the stdout logs for the Recast Management Server.

Why is this happening?

This is happening because SQL can no longer expand the RecastManagementServer database, and the database is full. This can happen when:

  1. The Hard Disk the RecastManagementServer database resides on is full
  2. SQL has an upper limit assigned for the amount of space that the RecastManagementServer database can grow.
  3. You are using SQLEXPRESS which only allows a database to grow to 10gb, at which time it is full.

How do I fix the error?

  1. If you are using a full version of SQL, and the hard drive is full, you can either move the database to a new location, or add space to that drive (if it is virtual). If you move the database to a new location, you will need to change the location that the Recast Management Server looks for the database. That information is stored in the appsettings.production.json file which is located here C:\Program Files (x86)\Recast Software\Recast Management Server\appsettings.production.json. You will need to change the "Server=" setting to include the FQDN of the server as well as the port in the form: Server=FQDN,1433

  2. Change the upper limit for the database. It is possible to allow the database to grow larger (if space is available) by changing the maximum size. Check here for more information on how to define the size of a SQL database. How to change the database size

  3. Unfortunately, SQLEXPRESS limits the size of any one database to 10gb. If you have hit that limit you will need to remove some data from the Database. To do that you will need to run a query to delete items from SQL Server Management Studio (SSMS).

    a. Log into SQL Server Management Studio.

    b. Right Click on the RecastManagementServer database and select New Query

    c. Enter the following query into the window that opens: delete from ActionExecutions

    d. Click Execute in the ribbon above the Object Explorer. The execution will take some time, but will list the number of rows deleted when it is complete.

Reduce Database Storage Allotment

If your RecastManagementServer database is nearing or at capacity, you'll need to increase its size, if possible. An additional strategy for avoiding SQL errors is to reduce the space allotted for database storage by switching your SQL Server recovery model from full recovery to simple recovery.

A database can be switched to a different recovery model at any time, but we recommend consulting the SQL administrator for your organization before changing models.

To learn more about the difference between simple, full, and bulk-logged recovery, see Recovery Models (SQL Server) | Microsoft Learn.

Verify SQL Server Port

1. Open SQL Server Configuration Manager.

2. Click SQL Server Network Configuration and open Protocols for MSSQLSERVER.

3. Open TCP/IP.

4. Select the IP Addresses tab.

5. In the IPAll section, you'll see the TCP port being used in your environment. For most people this will be 1433, but it can be changed.