How to Restore a SQL Database for PTP Accounts Production

This topic explains how to restore a PTP Accounts Production SQL database using the tools provided with SQL Server 2008 Express.

  1. Click Start | Programs | Microsoft SQL Server 2008 R2 – SQL Server Management Studio
  1. In the Server name field, select the PTPACCOUNTS instance.

Restore_SQL_db_1.jpg

Restore_SQL_db_2.jpg


The programs folder, server name and database name are displayed on this screen. In the example above, the programs are in C:\IRIS, the server name is TCVMCAP\PTPACCOUNTS and the database name is PTPACCTS.

  1. Click the + next to Databases on the left-hand side:

Restore_SQL_db_3.jpg

  1. Right-click on the appropriate database (normally PTPACCTS) and choose Tasks – Restore – Database…
  1. Select the From device: option:

Restore_SQL_db_4.jpg

  1. Click the  (to the right of the From device option).

  2. On the Specify Backup screen, click Add:

Restore_SQL_db_5.jpg

  1. In the Locate Backup window, browse to the location of your backup file.

  2. Highlight the backup file.

  3. Click OK.

Restore_SQL_db_6.jpg

  1. On the Specify Backup screen, click OK.

Restore_SQL_db_7.jpg

  1. On the Restore Database screen, select the option next to the database you want to restore.

Restore_SQL_db_9.jpg

  1. Click the Options link.

  2. Select Overwrite the existing database (WITH REPLACE).

Restore_SQL_db_9.jpg

  1. Click OK.

  2. Once the restore is complete you will get the confirmation message. Click OK.

Restore_SQL_db_10.jpg

 



Recreating the PTP login scripts

For Windows XP or Server 2003 machines:

  1. Click Start – Run.

  2. Type in cmd and click OK.

Restore_SQL_db_11.jpg

 

For Windows Vista, Windows 7 or Server 2008 machines:

  1. Click Start.

  2. Type cmd into the Search box and press Enter.

Restore_SQL_db_12.jpg

  1. This will open a command prompt. You now need to change to the PTP folder (see the path in the Help – About screen from the start of this guide).

  2. Type cd\ and press Enter.

  3. Type cd IRIS and press Enter (this assumes that C:\IRIS is the folder the program is installed to). If the programs folder is C:\apps\IRIS, then you need to type cd apps\IRIS

Restore_SQL_db_13.jpg

  1. Type hostname and press Enter.

  2. Type createpracticelogin hostname\PTPACCOUNTS PTPACCTS and press Enter (where hostname is the result from the previous step and PTPACCOUNTS is the SQL instance name used for PTP).

Restore_SQL_db_14.jpg