Moving a GiftWrap 3.6 Database to a New Machine

You may need to move your GiftWrap database to a new server for several reasons. For example, you may have purchased a new server to replace an old one that is near end of warranty. Or, your old server may have crashed, and you need to restore GiftWrap from backup to the new server. Or, you may have set up the GiftWrap database on a local machine and need to move it to a new machine. In any case, your new server requires some special configuration for use with GiftWrap.

There are four basic steps to move a GiftWrap database to a new machine:

(A) Prepare for the move by assessing your system and backing up. (B) Install the appropriate data engine software on the new machine. (C) Configure your new machine to work with GiftWrap using the GiftWrap launch code functions or manually. (D) Move the database and make sure the PGCalcGiftWrap SQL login is the database owner.

See below for more information on each step.

(A) Assess and back up your current GiftWrap system

You need to configure the new machine as a data server for GiftWrap if:

• Your database server is local and you are replacing the local machine with a new machine. • Your database is local and you want to put the database on a network server. • Your database is on a network server and you are replacing the old server machine with a new server.

You do not need to configure the new machine for use with GiftWrap if:

• You are setting up a new client machine that will access an existing database on a server. Just install GiftWrap on the new client machine. • Your database is being moved to a server that is already up and running with other GiftWrap databases on it. The new server will already be configured for GiftWrap - skip to section D on moving the database below.

Determine if local or network server. Launch GiftWrap to identify your old server and determine if your database server is local or a network server. The server and database name appear in the status line at the bottom of the GiftWrap screen.

Check your GiftWrap license for MSDE/Express or SQL. Your GiftWrap license determines whether you can run GiftWrap on the full SQL Server or just the MSDE/Express desktop edition. To confirm your license, launch GiftWrap and open the Help – About GiftWrap window. Next to “Platforms:” you should see MSDE/Express or

Revised: September 22, 2008 1

Moving a GiftWrap 3.6 Database to a New Machine

SQL Server. If you are licensed for MSDE/Express but want to move GiftWrap to the full SQL Server, please contact PG Calc for an upgrade.

Keep old server running during transition. If possible, keep the old server running until the new server is up and running. Setting up a new server is usually straightforward, but there can be configuration snags that can delay getting your new server up and running. And it’s sometimes useful to check the configuration on the old server while setting up the new server.

Confirm recent backup before move. Before doing the move, confirm that you have a recent backup of the GiftWrap database or run a backup. If something goes wrong during the move, you will want to have a copy of your GiftWrap database backed up to a safe place.

(B) Install the data engine software on the new machine

Install MSDE 2000 for Windows XP or 2000. If you have an MSDE/Express license to GiftWrap and are running Windows XP or 2000, you will need to install the SQL Server 2000 Desktop Engine (MSDE 2000). You can install from the GiftWrap CD, or by downloading from:

http://www.pgcalc.com/download/msde.exe

The download unzips to the c:\msde directory from which you can run c:\msde\setup.exe. Using the GiftWrap CD or download is better than downloading MSDE 2000 directly from Microsoft to ensure that the install uses the setup.ini options needed for GiftWrap.

Installing SQL Server 2005 Express for . If you have an MSDE/Express license to GiftWrap and are running Windows Vista, you will need to install SQL Server 2005 Express (Express 2005). Express 2005 is needed for Vista because MSDE 2000 is incompatible with Vista. You can install from the GiftWrap CD or download from Microsoft. Be sure to selected “mixed mode” (Windows authentication and SQL authentication) as the authentication mode.

Install SQL Server 2000 or 2005. If you have an SQL license to GiftWrap, you should install Microsoft SQL Server 2000 or 2005 on the new machine using the CD or download you got from Microsoft. Note that you should select the “SQL Server and Windows” authentication mode. GiftWrap will need SQL authentication. This can be changed under the server properties in SQL Enterprise Manager (2000) or SQL Management Studio (2005). Note: SQL Server 2005 is not compatible with GiftWrap versions before GiftWrap 3.6.

SQL Server 7.0 no longer supported. While versions before GiftWrap 3.6 could be used with Microsoft SQL Server 7.0, this platform is not supported or tested for GiftWrap

Revised: September 22, 2008 2

Moving a GiftWrap 3.6 Database to a New Machine

3.6. We would recommend upgrading to Microsoft SQL Server 2000 or 2005 if you are replacing on old SQL Server 7.0 server.

(C) Configure your new machine to work with GiftWrap

Choose automatic or manual server configuration. Your new server will need to be configured at the SQL level for use with GiftWrap before you attach your GiftWrap database to the new server. Otherwise, the GiftWrap will not be able to access the database. You can let the GiftWrap application do this configuration for you automatically (recommended), or you can do this manually using SQL Enterprise Manager (for greater control). While automatic is generally easier, you may find it easier to use manual if you have already started moving databases without these instructions and don’t want to undo your work.

Automatic configuration of SQL for GiftWrap:

1. Use File – Switch Database in GiftWrap to select the new machine that will house the database. You can also do this by editing the C:\Program Files\GiftWrap\GiftWrapUser.ini file and changing the “Server=” line.

2. The first time GiftWrap connects to a data server, you will get the following screen:

Choose “First time GiftWrap setup” and click OK. Then, enter a system administrator login (such as sa) and password for the new machine. On the next screen, choose Create Tutorial Database. GiftWrap should let you log in to the Tutorial database with a blank password.

3. GiftWrap should open on the search screen. Click the Search button to see the tutorial data. This confirms your new machine has been configured up properly to work as a data server for GiftWrap.

Revised: September 22, 2008 3

Moving a GiftWrap 3.6 Database to a New Machine

Manual configuration of SQL for GiftWrap:

(1) Create an SQL login on the server called “PGCalcGiftWrap” and assign it a password. You should keep this password in a safe place. You will need it below.

(2) Create an SQL login on the server called “PGCalcGiftWrapReportUser” if you plan to do your own custom reporting and assign it a password. You should keep this password in a safe place.

(3) Detach or backup the GWMaster database on the old server. Attach or restore it on the new server.

(D) Move your GiftWrap database to the new machine

Choose from two methods: There are two methods to move your database, the detach/attach method and the backup/restore method. When you have moved the database with either method you should confirm that the database owner is set to the SQL login PGCalcGiftWrap.

Detach/attach method:

(1) Run GiftWrap Database Manager or SQL Enterprise Manager and open the server on the old machine.

(2) Highlight the database in the Databases folder that you wish to move. Right click on the database and choose Database - Detach Database. Click Yes when asked to confirm detaching of the database. Make note of the data directory path and file names for the .MDF and .LDF database files if you receive a confirmation window.

(3) Copy the .MDF and .LDF database files from the data directory on the old machine to the data directory on the new server. The default data directory path is C:\Program Files\Microsoft SQL Server\MSSQL\Data.

Note: If the GiftWrap database you wish to move replaces a previous version of the same database with the same name, you should first delete the previous version before copying the files. If you want to be able to recover this previous version for any reason, make a backup of it before you delete it. Choose Database - Delete Database in GiftWrap Database Manager or SQL Enterprise Manager.

(4) Run GiftWrap Database Manager or SQL Enterprise Manager and open the server on the new machine.

(5) Choose Database - Attach Database. Select the database .MDF and .LDF files you copied to the new machine. For example:

Revised: September 22, 2008 4

Moving a GiftWrap 3.6 Database to a New Machine

Data File: GiftWrap_Data.MDF Log File: GiftWrap_Log.LDF Attach as: GiftWrap

Backup/restore method:

(1) If you don’t have a current backup, run GiftWrap Database Manager or SQL Enterprise Manager and open the server on the old machine. Choose Database - Backup Database. Your backup will create a .BAK file, or a .BAK file and .TRN file.

(2) Copy the latest .BAK and .TRN backup files (some backups just have a .BAK file) from old machine to the data directory on the new server. The default data directory path is C:\Program Files\Microsoft SQL Server\MSSQL\Data.

(3) Run GiftWrap Database Manager or SQL Enterprise Manager and open the server on the new machine. Choose Database - Restore Database. Select the database .BAK and .TRN files you copied to the new machine. If the default data directory on the new machine is different, you may need to specify the new location when you choose Restore.

Check that the database owner is PGCalcGiftWrap

(1) If using GiftWrap Database Manager, the correct database owner should be set for you. Skip to step 4.

(2) If using SQL Enterprise Manager, double check that the PGCalcGiftWrap login is the owner of the database you copied. Check this on the Properties – General tab. Also make sure under Users that dbo has the name PGCalcGiftWrap.

(3) To fix, run the following SQL script command in SQL Query Analyzer:

sp_changedbowner ‘PGCalcGiftWrap’

(4) You should now be able to open you database on the new machine with GiftWrap.

(5) If you have additional client machines that will access the database on the new machine, you can copy the GiftWrapUser.ini and SQLManager.ini files from C:\Program Files\GiftWrap on the first machine to the other client machines.

Revised: September 22, 2008 5