Skip to content

Database Restore Procedure

Pre-requisites

  • Valid backup of the CONPROSOFT database (for example, a .bak file).
  • Access to the hosting provider database tools for the target environment.
  • Credentials with permission to restore or import the target database.

Steps

  1. Open Hosting Provider Database Tools

  2. Sign in to the hosting provider control panel for the target environment.

  3. Navigate to the SQL restore/import utility provided by the host.

  4. Upload and Restore Backup

  5. Upload the backup file using the hosting provider workflow.

  6. Select the correct target database for the specific application instance.
  7. Complete the restore/import process in the hosting tool.

  8. Important Shared Hosting Constraint

  9. There is no direct access to local SQL Server file paths such as C:\SQL_Backups.

  10. Remote SSMS-based restore operations are not available in this environment.
  11. All restore operations must be performed through hosting provider tools.

  12. Set Permissions

  13. Confirm the application login/user is mapped to the restored database.

  14. Confirm required roles are assigned (for example, db_owner where applicable).

  15. Update Connection String

  16. Confirm the MyCompany connection string in web.config points to the restored database.

  17. Verify

  18. Sign in to the affected application instance.

  19. Run a smoke test of key workflows.
  20. Confirm data is visible and current.

Shared Hosting Schema Ownership Note

  • The application schema is built under dbo.
  • In this shared hosting environment, ad-hoc changes may default to host namespace ownership (currently conproso) if schema is not specified explicitly.
  • Creating objects as conproso.TableName instead of dbo.TableName can cause object binding and runtime issues.
  • Always qualify object names explicitly with dbo. when creating or altering tables, views, or procedures.

If the Restore Fails

Symptom Likely Cause Action
Upload fails or times out File too large for the provider tool Contact the hosting provider for an alternative upload method (SFTP or support-assisted restore)
Restore completes but the application cannot connect User mapping lost after restore Re-map the application login to the restored database and confirm db_owner role assignment
Restore fails with insufficient space Disk quota exceeded Contact the hosting provider to expand storage allocation or remove old databases
Restore tool reports locks or conflicts Target database still in use Stop all Application Pools referencing that database before retrying the restore

Schema Validation After Restore

After any restore, run the following query to confirm all objects are under the correct schema:

SELECT SCHEMA_NAME(schema_id) AS [Schema], name AS [Object]
FROM sys.tables
WHERE SCHEMA_NAME(schema_id) != 'dbo'
ORDER BY SCHEMA_NAME(schema_id), name;

If any rows are returned, escalate to the Developer — a corrective script is required to rebind those objects under dbo.

Rollback if the Restore Is Corrupted

If the restore partially completed and left the database in an inconsistent state:

  1. Do not attempt to continue the restore from the hosting provider console.
  2. Request the hosting provider restore the most recent known-good database backup.
  3. Update the MyCompany connection string in web.config to point to the restored database.
  4. Re-run the smoke test described in Testing Key Functions.