MKMS Help

Restoring Database Files

Restoring Database Files

Previous topic Next topic  

Restoring Database Files

Previous topic Next topic  
I.T. professionals know you must Backup Databases on a regular basis to ensure that they can be retrieved and used in the event of an emergency (the loss or corruption of the current set of Database and Log files).
The Backup Databases Utility within MKMS makes a copy of an existing Database (the one which you are currently logged into - see Multiple Companies) and its related Log file.
It places those Database and Log file copies in a folder on a different drive, or in a different folder on the same drive (usually not the best method) as specified when that Backup procedure was executed.
Restoring those Database and Log files, when needed, requires a precise, step-by-step process be performed that is simple and straight forward.
The seven (7) basic steps are outlined below (and explained in detail later in the chapter):
1.Exit - Exit MKMS (and MKMSCS and any other applications that are accessing the current - damaged - database).
2.Shutdown - Shutdown the SQL Anywhere Database Server.
3.Rename - Rename the current (bad) Database and Log file that is in the MKMS Program Files folder.
4.Locate - Locate the Backup that is to be used to replace the currently corrupted (bad) Database file.
5.Copy - Copy that replacement Database and its related Log file to the MKMS Program Files folder.
6.Start SQL - Restart the SQL Database Server (and SPA, if using MKMSCS).
7.Login - Log into MKMS (and any other applications that will be needed).

 

Each section below provides the details of each step (outlined above) that is required to properly restore a Backup.
I.Exit - Exit MKMS (and MKMSCS and any other applications that are accessing the current - damaged - database).
a.There are many applications that may be running - all of which access MKMSDefault.db and its related MKMSDefault.log file.
b.These may include (in addition to MKMS) MKMSCS Central Station Monitoring module, SPA, the Communications module, Virtual Operator and the Dealer Access module, among others.
c.Each of the applications connected to the SQL Database Server must be closed.
II.Shutdown - Shutdown the SQL Database Server.
a.Even if some workstations are using the SQL Database Server to access data in a different Company (see Multiple Companies), those Users must also logoff, and close the related programs.

 

HelpFilesSQLAnywhereIcon

b.Locate the SQL Icon (which is displayed on the Windows® Desktop on the bottom right of the screen where all of the Services are listed) on the Files Server where the SQL Database Server is running (or stand alone workstation, if that is where it is running).
c.Right-Click the SQL Icon and Choose Restore from the pop-up option list presented.

 

HelpFilesSQLServerShutdownButton

d.Click the Shutdown button to close the database.
III.Rename - Use the standard Windows® File Locator dialog to rename the current (bad) Database and Log file that is in the MKMS Program Files folder.
a.Assuming that you will be restoring the MKMSDefault.db and its related MKMSDefault.log file, locate and rename each file.
b.Usually, you will Navigate to the C:\Program Files\MKS\MKMS folder to locate these files.
Note: Although the database is usually located on your C: drive, it may instead have been installed on a File Server Drive.

If you are connected to a Network, ask your System Administrator for the proper drive location of the database.

c.Right-Click on the Database file and Choose Rename, adding the current date to the filename (e.g., MKMSDefault20110531.db).
d.Right-Click on the Log file and Choose Rename, and add the current date to the filename (e.g., MKMSDefault20110531.log)
IV.Locate - Use the standard Windows® File Locator dialog to locate the Backup which is to be used to replace the currently corrupted (bad) Database and Log file.
a.The required Backup files are located in the Backup Directory you chose when the Database Backup was created.
b.Control-Click on the two files (MKMSDefault.db and its related MKMSDefault.log file).
V.Copy - Copy that replacement Database and its related Log file to the MKMS Program Files folder.
a.Right-Click on one of these selected files and Choose Copy from the menu presented.
b.Navigate to the the C:\Program Files\MKS\MKMS folder (see Note above).
c.Right-Click within the folder and Choose Paste from the menu presented.
d.Remember to always copy the Log file that was backed up with the Database file.
VI.Start SQL - Restart the SQL Database Server (and SPA, if using MKMSCS).

 

HelpFilesSQLDatabaseServerIcon

a.Locate the Icon which is used to manually start the SQL Database Server.
b.Double-Click the Icon to start the Database.
VII.Login - Log into MKMS (and any other applications that will be needed).
a.You have completed Restoring the selected copy of the Database Files.