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
titleCause

Database needs to be restored from database backup

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
  1.  and connect to the

specific
  1. server

name
  • From the Object Explorer (on the left), ensure the server's drop down has been selected, right click Databases, click Restore Databases
  • From the Restore Database window, under Source click the button for Device and click the button labeled ... to the right 
  • Click Add to see a list of .bak database backups within the default backup folder or browse to a specific folder as needed
  • Click the database (IE: <database.bak>) to be restored
  • Click the Options tab on right of the Restore Database window
  • Check the
    1. name for the instance where the source database resides

    2. Expand Databases

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

    4. 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)

    5. Click the Media Options tab

    6. Select Overwrite all existing backup sets

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

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

    9. 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
  • 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
  • If the destination database name is different from the source, select the destination. Otherwise, click Ok
  • Right click on the server name under Object Explorer and click Refresh
  • The newly restored database should populate under the Databases dropdown
  • Right-Click the newly restored Database and click Properties
  • Click on the Files tab and verify or change the filenames to the appropriate environment (IE if munprod was restored to muntrain, the filenames need to be renamed)
  • On the Files tab, set the owner to satyler
  • 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.

    1. 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

    2. 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. 

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

    4. 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'

    5. 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

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

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

    ...