For forums, blogs and more please visit our
Developer Tools Community.
By: Steven Shaughnessy
Abstract: This article provides information on how to execute some built-in stored procedures to backup a Blackfish SQL database.
The following steps can be used to backup a Blackfish SQL database for both the windows and java platforms.
To create a new backup database, just open the database with the create connection property set to true.
If you want to make a backup while other users are connected to the source database, you can connect to the source database using readonly transactions. Note that there are two notions of readonly when connecting to a Blackfish SQL database. The readOnly connection property prohibits all write access to the database for all connections. The readOnlyTx property provides a transactionally consistent read only view of the database for the connection that has the readOnlyTx property set to true. So to backup a database that is online for write access, the readOnlyTx property should be used.
For dbExpress connection properties can be set in the dbxconnections.ini
For ADO.NET connection properties are set in the connection string.
For JDBC connection properties can be set using a DataSource implementation or by appending them to a JDBC URL.
Next copy the users into the new database by executing this stored procedure using a connection to the source database:
CALL DB_ADMIN.COPY_USERS('c:\backup\employee_copy.jds', 'sysdba', 'masterkey', false, true)
The first parameter is the destination database name. The second and third are the user and password for the destination database. The fourth parameter indicates that the target database should use the same encryption key as the source database. The fifth parameter indicates whether existing users should be overwritten in the destination database.
Next copy the contents of the database into the backup database using a connection to the source database:
CALL DB_ADMIN.COPY_STREAMS('c:\backup\employee_copy.jds', 'sysdba', 'masterkey', true, False)
The fifth parameter indicates whether existing streams should be over written. The sixth parameter indicates whether errors should be ignored.
Connection properties and the DB_ADMIN methods are documented in the Blackfish SQL developer guide which can be downloaded from: https://cc.codegear.com/Item/24980
Could not retrieve comments. Please try again later.
Server Response from: ETNASC03