Database Restore Procedure¶
Pre-requisites¶
- Valid backup of the CONPROSOFT database (for example, a
.bakfile). - Access to the hosting provider database tools for the target environment.
- Credentials with permission to restore or import the target database.
Steps¶
-
Open Hosting Provider Database Tools
-
Sign in to the hosting provider control panel for the target environment.
-
Navigate to the SQL restore/import utility provided by the host.
-
Upload and Restore Backup
-
Upload the backup file using the hosting provider workflow.
- Select the correct target database for the specific application instance.
-
Complete the restore/import process in the hosting tool.
-
Important Shared Hosting Constraint
-
There is no direct access to local SQL Server file paths such as
C:\SQL_Backups. - Remote SSMS-based restore operations are not available in this environment.
-
All restore operations must be performed through hosting provider tools.
-
Set Permissions
-
Confirm the application login/user is mapped to the restored database.
-
Confirm required roles are assigned (for example,
db_ownerwhere applicable). -
Update Connection String
-
Confirm the
MyCompanyconnection string inweb.configpoints to the restored database. -
Verify
-
Sign in to the affected application instance.
- Run a smoke test of key workflows.
- 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.TableNameinstead ofdbo.TableNamecan 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:
- Do not attempt to continue the restore from the hosting provider console.
- Request the hosting provider restore the most recent known-good database backup.
- Update the
MyCompanyconnection string inweb.configto point to the restored database. - Re-run the smoke test described in Testing Key Functions.