Database Backup Instructions for Network Users For SQL Anywhere 17

Backing up the Database
Everything you enter into ProjectPAK/ShopPAK is stored in the ProjectPAK/ShopPAK database. Protect this valuable asset by backing it up daily.  We recommend taking 5 separate back-ups, one for each day of the week. That way, a database problem that goes undetected for a couple of days will not corrupt your only backup.  It is critical that the backup not be stored on your hard drive in case of a hard drive crash.  We also recommend that you keep a fairly recent backup off site to protect you from fire or weather-related damage.

Backing up your database protects you from:

    • *Viruses
    • *Theft
    • *Mistakenly deleted information
    • *Hard disk crashes
    • *Hard disk surface errors
    • *Corrupted databases that cannot be opened or fixed
    • *Damage caused by flooding, high winds, or fire.

 

Database Location
The default location of the database for the network version is C:\PpakSrvr17. This would be on the computer that you installed the Sybase Database Server on.

Backup Utility
You’ll find our backup utility in the SQL Anywhere Server 11 Program Files folder in the Start menu on the server.  Just because you are backing up your server on a nightly basis doesn’t mean you are getting a backup of your ProjectPAK database.  If you run the SQL Anywhere Server 24/7, it ‘owns’ the underlying database files and they WON’T be included in an automated tape backup.  To solve this problem, run our backup utility prior to running your automated backup.  The backup utility copies a mirror image of the shared database to C:\PPAKSRVR17\BACKUP\ENGINE.DB.  The backup database is then ready to be picked up by your nightly backup utility.

Scheduling the Backup Utility
Create a scheduled task that runs our backup utility before running your system backup.  Go to Start | All Programs | Accessories | System Tools | Task Scheduler.  Under the Action section on the right-hand side, choose Create Basic Task.

Type in the name you want to call this task. We recommend something simple, such as TradeSoft Database Backup. Click Next.

Specify a time that you want this task to run.  Choose a time that is 45 minutes before your normal system backup is scheduled to run. Click Next.

Choose ‘Start a program’ for the action you want the task to perform. Click Next.

Click the Browse button and navigate to your SQL Anywhere 17 Program Files directory. The location on 64-bit Windows is C:\Program Files\SQL Anywhere 17\BIN64\dbbackup.exe. The location on 32-bit Windows is C:\Program Files\SQL Anywhere 17\BIN32\dbbackup.exe.

In the Add Arguments and Start In fields, enter the following:

Add Arguments
-y -d -c “eng=TradeSoft17;uid=dba;enp=002100c384d89d4a9e6b3a7b2d20” C:\PpakSrvr17\backup

Start In (Optional)
Depending on your environment, this entry may or may not be required.

If using 64-bit Windows:
C:\Program Files\SQL Anywhere 17\BIN64

If using 32- bit Windows:
C:\Program Files\SQL Anywhere 17\BIN32

Please Note:
If you did not keep the default installation directory of the database (C:\PpakSrvr17), please adjust the directory location inside the Add Arguments section accordingly.

Click Next.

If you don’t require separate user account to properly run a Scheduled Task, click Finish and you’re done. However, if you do, check the ‘Open the Properties dialog for this task when I click Finish’ box and then click Finish.

Here is where you’ll choose the appropriate user account and any other settings for your particular server environment. If you don’t have administrative privileges on the server, then you will need to get someone who does to enter this information for you.

Finally, click OK and you’re done.

To make sure that everything is correctly configured, go ahead and run the scheduled task. You should see a copy of the TradeSoft database, Engine.db, in the C:\PPAKSRVR17\BACKUP directory.

Note: The backup database retains the same date and time that the database was started. This can be a little confusing since you’d expect a newly created file to have the current date and time.  Don’t worry. If the backup utility runs, it is creating a new copy of the database regardless of the date and time on the ENGINE.DB file. To test this, delete the backup ENGINE.DB and re-run the scheduled backup task. You’ll see that it creates a copy of ENGINE.DB and places it in C:\PPAKSRVR17\BACKUP.

Restoring The Database
In the event that you lose your ProjectPAK database or it becomes corrupt and stops working, you can restore it from the most recent backup you’ve taken. Locate Engine.DB in your system wide backup.  It should be in C:\PPAKSRVR17\BACKUP. Copy ENGINE.DB to your Sybase 17 installation folder. If you took our defaults this should be C:\PpakSrvr17. If you see a file called ENGINE.LOG in the Sybase 17 installation folder, make sure you delete it. Whenever you start up the Sybase Database Server, it should automatically create a new engine.log file to go with the database file.