Non-Production Database Stuck in a Restoring State

Description of Issue

Non-Production database has been stuck in a restoring state since trying to run a refresh

Context
  • Munis
  • Refresh
  • Database
  • Restoring
Cause

Refresh of the Non-Production database from Production failed or the command window was closed before the refresh completed

Resolution

Perform the following for the database stuck in a restoring state.

  1. Open SQL Server Management Studio
  2. Right click the database and select Properties 
    1. Make note of the database name and owner. You will need to re-enter them when re-creating the database.
  3. Delete the database
    1. Right click on the database and select Delete
    2. A database deletion window will pop up. Select the two checkboxes at the bottom of the general tab:
      1. Close existing connections
      2. Delete backup and restore history for database
  4. Recreate the database
    1. Right click on Databases and select New Database
    2. Enter Database Name and Owner (example: Database name: muntest; Owner: muntest)
  5. Run refresh script for the environment