Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
borderColor#03396c
titleColorWhite
titleBGColor#03396c
titleDescription of Issue

Restore a SQL Database From Backupfrom a backup

Panel
borderColor#03396c
titleColorWhite
titleBGColor#03396c
titleContext
  • SQL Server Management Studio

  • Restore Database

  • Database Backup

  • On-Prem

  • SaaS

  • Manual EERP Data Refresh

...

Panel
borderColor#03396c
titleColorWhite
titleBGColor#03396c
titleResolution

SaaS: Please contact TSM Support for assistance

On-Prem:

From the database server, launch and sign into

Back Up Database(s)

  1. Log into the source environment's database server with tylerservice or an administrative account

  2. Open Microsoft SQL Server Management Studio (SSMS) with  and connect to the specific server name

  3. From the Object Explorer (on the left), ensure the server's drop down has been selected, right click Databases, click Restore Databases

  4. From the Restore Database window, under Source click the button for Device and click the button labeled ... to the right 

  5. Click Add to see a list of .bak database backups within the default backup folder or browse to a specific folder as needed

  6. Click the database (IE: <database.bak>) to be restored

    1. Verify the Destination database is correct

  7. Click the Options tab on left of the Restore Database window

  8. Check the name for the instance where the source database resides

  9. Expand Databases

  10. Right click the database name and select Tasks > Back Up...

  11. Back up to Disk

    1. If there is a location already populated, remove it and click Add... to choose the desired file name and location

    2. Note: You need to add the .bak file extension to the end of the file name (Ex: D:\TylerTempBackups\munprod_01012023.bak)

  12. Click the Media Options tab

  13. Select Overwrite all existing backup sets

  14. Click OK when you are ready to start the backup and let the backup run until completion

  15. If the destination database is hosted on a different server, place a copy of the backup file on the destination database server

  16. Back up destination database (optional)

Restore Destination Database

  1. Connect to the SQL instance where the destination database resides

  2. Expand Databases

  3. Right click the destination database and select > Tasks > Restore > Database...

  4. Click the Options tab

    1. Under Restore Options, check off Overwrite the existing database (WITH REPLACE)

    restore option
  5. Check the Close Existing Connections option - If these are grayed-out, close and re-open the restore window and choose them before selecting the device to restore from

  6. If the destination database name is different from the source, select the destination. Otherwise, click Ok

  7. Right click on the server name under Object Explorer and click Refresh

  8. The newly restored database should populate under the Databases dropdown

  9. Right-Click the newly restored Database and click Properties

  10. Click on the Files tab and verify or change the filenames to the appropriate environment (IE if munprod was restored to muntrain, the .mdf and .ldf filenames in this tab need to be renamed to reflect the correct environment)

  11. On the Files tab, set the owner to satyler

  12. Click the Options tab and select the latest version available in the Compatibility Level drop down menu
    1. Under Server connections, check off Close existing connections to destination database

      1. Note: If you select your source before going to the Options tab, Close existing connections to the destination database may not be available to select.

  13. Click the General tab

    1. Under Source, select Database or Device radio option

      1. Device (with the backup path populated) will be the typical selection

    2. Database - Select the database to restore from the drop-down list. The list contains only databases that have been backed up according to the MSDB backup history.

    3. Device - Select a specific backup file to backup from. This is the typical selection.

      1. Click the ellipses

      2. Click Add

      3. Locate backup file and click OK

      4. Click OK

    4. Under Destination, select the database to be restored

  14. Click the Files tab

    1. Expand the Restore As column and verify that this row matches the location of your target MDF and LDF

    2. Click OK when you are ready to start the restore. Let run until completed. 

  15. If the source environment is different than destination environment, 

  16. Once the restore completes, right click destination database name and select New Query

    1. Run the query below to change the database owner. Update database name and owner as needed.

      1. USE muntest
        EXEC sp_changedbowner 'muntest'

  17. Right click the newly restored database and click Properties

    1. Click the Files tab

    2. Verify Owner is set correctly (Ex: cashtest)

    3. Under Database files, update Logical Name if needed (Ex: muntest and muntest_log)

    4. Click OK

  18. Redeploy product environment from Tyler Deploy with Force Redeploy checked off

Panel
borderColor#03396c
titleColorWhite
titleBGColor#03396c
titleAdditional Information

...