Doorgaan naar de website
OCLC Support

Backup SQL Server and create test databases

Learn how to create and backup databases in Amlib.

If you have any queries about backup do not hesitate to contact our office.

The following databases must be backed up:

  • AMCAT
  • AMLIB
  • AMLOCAL
  • AMSTATS
  • AMWEB (Please note: Some customers may not have an AMWEB database.)

Backup

  1. Launch Microsoft SQL Server Management Studio
  2. Expand the Databases selection tree [+]
  3. Right-click on the AMCAT database and select Tasks > Back Up...
  4. The Back Up Database window will open
  5. Select the General page
  6. Choose the following options:
    • Source
      • Database: AMCAT
      • Backup type: Full
    • Destination (can leave as default)
      • Click on the Add button to open the Select Backup Destination window
      • Click on the ... button to browse to and select a destination
      • Click on the OK button
  7. Select the Options page
  8. Choose the following options:
    • Overwrite media
      • Overwrite all existing backup sets
    • Reliability
      • Verify backup when finished
  9. Click the OK button
  10. When complete the following message will appear: The backup of database ‘AMCAT’ completed successfully.
  11. Repeat steps 3 – 10 for the AMLIB, AMLOCAL, AMSTATS and AMWEB (If applicable) databases

Create a Test Database

The following databases will be created:

  • TECAT
  • TELIB
  • TELOCAL
  • TESTATS
  • TEWEB (If Applicable)

Create Databases

  1. Launch Microsoft SQL Server Management Studio
  2. Right-click on Databases and select New Database... – the New Database window will open
  3. Database Name = TECAT
  4. Click the OK button to create the database
  5. Repeat steps 2-4 to create the TELIB, TELOCAL, TESTATS and TEWEB (If applicable) databases

Restore Backed Up Databases to New Test Databases

  1. Expand the Databases selection tree [+]
  2. Right-click on the TECAT database and select Tasks > Restore > Database... – the Restore Database window will open
  3. Select the From device: radio button
  4. Click the ... (Select Devices)button – the Specify Backup screen will open
  5. Click the Add button – the Locate Backup File window will open
  6. Select the corresponding AMCAT.BAK file
  7. Click the OK button to return to the Specify Backup window
  8. Click the OK button to return to the Restore database window
  9. Tick the Restore box for the selected database
  10. Select the Options page
  11. Restore options – select Overwrite the existing database (WITH REPLACE)
  12. Edit the paths of the Data and Log files in the Restore Database files as: table so that they reflect the path of the test database file name – for example: TECAT.mdf and TECAT_log.ldf
  13. Click the OK button – the database will be restored
  14. The following message will appear when complete: The restore of the database XXXX completed successfully.
  15. Repeat steps 2-14 for all the TE databases

Map User Schema

It may be necessary to clear the old user schema first.

  1. Click the New Query button – this will open up the SQL Query screen
  2. Type in the following:
    • use TECAT
    • drop schema sysadm
    • drop user sysadm
  3. Click the ! Execute button
  4. Repeat for all TE databases

Map User Schema

  1. Expand the Security selection tree [+]
  2. Expand the Login selection tree [+]
  3. Right-click on the SYSADM and select Properties – the Login Properties window will open
  4. Select a page = User Mapping
  5. Users mapped to this login: ensure there are ticks against ALL the TE databases
  6. Database role membership for: ensure that db_owner is ticked
  7. Click the OK button when complete

Link the Amlib Client to the Test Database

  1. In the Amlib folder on the Amlib server, locate the SQL.ini file
  2. Open the SQL.ini file in Notepad
  3. Scroll down to the server paths section – you should see the existing server paths for the default (Live) SQL databases:

    ; This is the server paths used for the default SQL server

    REMOTEDBNAME=AMCAT,DRIVER=SQL SERVER;SERVER=MYSERVERNAME\SQLEXPRESS;DATABASE=AMCAT
    REMOTEDBNAME=AMLIB,DRIVER=SQL SERVER;SERVER= MYSERVERNAME \SQLEXPRESS;DATABASE=AMLIB
    REMOTEDBNAME=AMLOCAL,DRIVER=SQL SERVER;SERVER= MYSERVERNAME \SQLEXPRESS;DATABASE=AMLOCAL
    REMOTEDBNAME=AMSTATS,DRIVER=SQL SERVER;SERVER= MYSERVERNAME \SQLEXPRESS;DATABASE=AMSTATS
    REMOTEDBNAME=AMWEB,DRIVER=SQL SERVER;SERVER= MYSERVERNAME \SQLEXPRESS;DATABASE=AMWEB
  4. Copy the existing set and then paste underneath, then edit the new set to create the link to the TE

    ; This is the server paths used for the test SQL server

    REMOTEDBNAME=TECAT,DRIVER=SQL SERVER;SERVER=MYSERVERNAME\SQLEXPRESS;DATABASE=TECAT
    REMOTEDBNAME=TELIB,DRIVER=SQL SERVER;SERVER= MYSERVERNAME \SQLEXPRESS;DATABASE=TELIB
    REMOTEDBNAME=TELOCAL,DRIVER=SQL SERVER;SERVER= MYSERVERNAME \SQLEXPRESS;DATABASE=TELOCAL
    REMOTEDBNAME=TESTATS,DRIVER=SQL SERVER;SERVER= MYSERVERNAME \SQLEXPRESS;DATABASE=TESTATS
    REMOTEDBNAME=TEWEB,DRIVER=SQL SERVER;SERVER= MYSERVERNAME \SQLEXPRESS;DATABASE=TEWEB
  5. Save the changes

The test database is now linked to Amlib.

 

  • Heeft dit artikel u geholpen?