|The ScopeSET Support and Community Portal|
Dump and Load Sybase Databases
This can be required if a Sybase server needs to be relocated to another machine. This cookbook describes the necessary steps to dump and load all Sybase databases.
There is a sybaseDumpLoad.qrl script available, which can be used in three modes:
This script will be started from the command line. In order to this, please make sure, that <OpenAmeos install dir>\bin\W32NTX86 is part of your path environment.
It is important that the Sybase Server name remains the same. Since this name is stored in every system, this stored name is the entry point for opening a Sybase database. If this does not match the new name, none of the systems can be opened afterwards.
The name of the computer that runs the server can be different, because this can be easily switched via the Sybase Server definitions.
Print information about the databases
Before you dump and load the Sybase databases, it might be useful to get some information on the databases first. In order to get this, start a command line window and run the following command:
qrp <path to script>/sybaseDumpLoad.qrl -x sybaseServer <ServerName> -x justInfo True
For each database you will get information about the owner of the system, the list of users allowed to access the system in readonly mode ("Readers") and a list allowed to modify the system ("Writers"), the size of the system and the calculated new size in the new Sybase server. The calculated new size is the current used size in the database + 30%, with a minimum of 12MB.
Finally a list of Sybase Sysmakers and Users is printed. Sysmakers are users with additional privileges to create new repositories.
This information will help to plan the size of the new server.
Dump all databases
To dump all databases to a directory, execute the following command:
qrp <path to script>/sybaseDumpLoad.qrl -x sybaseServer <ServerName> -x dumpDir <empty dump Directory>
For each database a new subdirectory will be created, which contains all the information to restore the database. The dumpDir directory needs to exist and it has to be empty.
Additional information about the Sybase Users and Sysmakers is also stored in this directory.
Load all databases
To load all databases from the dump directory, execute the following command:
qrp <path to script>/sybaseDumpLoad.qrl -x sybaseServer <ServerName> -x dumpDir <dump Directory> -x loadData True
First the list of Sybase Users and Sysmakers is loaded into Sybase.
Then, for each subdirectory a new database is created, owner and users of the database is set properly and finally all data is reloaded.
Each database which already exists in the Sybase server is not touched. So, if something goes wrong (eg. the recomputed size is for some reason too small) you can start the loading again (for example with slighlty modified new size in dumpDir/<System>/sys_size2 or with the additional parameter -x origSize True). Similar is done with users, if a user already exists in Sybase it may get the additional privileges to create new systems, but this privilege is never revoked, if the user already has it.