Follow instructions for each step of database migration procedures using Microsoft SQL Server Management Studio:

Step 1: Inform Users about the Test

Before you begin the database migration procedure, it's important to inform your users about the upcoming test. This will help minimize disruption and ensure that they are aware of potential downtime during the migration. Consider sending out an email or a notification through your organization's communication channels with the following information:

Step 2: Export Database

In this step, you will find basic overview of how you can perform a backup:

Follow these instructions:

  1. Open SQL Server Management Studio (SSMS).

  2. Connect to the SQL Server instance where the database is located.

  3. In the Object Explorer, expand the Databases node to view the list of databases.

  4. Right-click on the database you want to back up and select "Tasks" > "Backup."

  5. The "Back Up Database" window will appear. Choose the appropriate options, such as the backup type (Full, Differential, Transaction Log), destination, and backup file name.

  6. Review and confirm the backup settings.

  7. Click the "OK" button to start the backup process.

Step 3: Import Database

After exporting the database, you can import it into the target environment. Here's how:

  1. Open SQL Server Management Studio (SSMS).

  2. Connect to the SQL Server instance where you want to import the database.

  3. In the Object Explorer, right-click on the "Databases" node and select "Restore Database."

  4. In the Restore Database window:

  5. Click the "OK" button to start the database import process.

Step 4: Fix Orphaned Users

Orphaned users may occur when migrating databases. These are users in the database without a corresponding login. for detailed instructions for this step please go to: How to fix orphaned SQL Server users after migration - epiCentre Knowledge Base - AHSRI (atlassian.net)
OR
fix orphaned users, follow these steps:

  1. In SQL Server Management Studio (SSMS), connect to the target database.

  2. Open a new query window.

  3. Run the following script to identify orphaned users:

    USE YourDatabaseName;
    EXEC sp_change_users_login 'Report';

    Replace "YourDatabaseName" with the actual name of your database.

  4. The query will display a list of orphaned users. To fix them, use the following command for each orphaned user:

    USE YourDatabaseName;
    EXEC sp_change_users_login 'Auto_Fix', 'UserName';

    Replace "YourDatabaseName" with the database name and "UserName" with the orphaned user's name.

  5. Verify that all orphaned users have been fixed by re-running the sp_change_users_login 'Report' query.

Step 5: Change Database Name in Config File

In this step, you will locate the configuration file, update it with the new database server name, and then replace the old configuration file on each epiCentre installation. Follow these instructions:

  1. Locate the Configuration File:

  2. Send Config File and New Database Server Name to Eppoc Team:

  3. Receive Altered Config File:

  4. Replace the Old Config File on Each epiCentre Installation:

By following these steps, you will ensure that the epiCentre application is configured to connect to the new database server after the migration, and all installations will use the updated configuration file.

That's it! You have successfully created test database migration procedures for Microsoft SQL Server Management Studio. Make sure to thoroughly test the migration in a non-production environment before applying it to a production database.