Prev | Advanced Operations Guide | Next |
Using Continuous Operations
Continuous Operations provides the ability to backup data files while database applications are running and users are connected. However, in the event of a hard drive failure, if you use Continuous Operations to make backups, you will lose all changes to your data since the last backup. You cannot use Archival Logging and the Maintenance utility Roll Forward command to restore changes to your data files that occurred after the last backup.
Pervasive.SQL provides two backup commands for Continuous Operations: BUTIL and SQLUTIL. The commands are similar. SQLUTIL supports data source names (DSNs) as a parameter; BUTIL requires file paths. In addition, SQLUTIL runs only on Windows-based platforms and NetWare.
This section is divided into the following sub-topics:
- Starting and Ending Continuous Operations
- Backing Up a Database with BUTIL
- Backing Up a Database with SQLUTIL
- Restoring Data Files when Using Continuous Operations
Starting and Ending Continuous Operations
This section provides detailed information on the commands: STARTBU and ENDBU.
Note
The temporary delta files created by Continuous Operations mode have the same name as the corresponding data files but use the extension ".^^^" instead. Therefore, do not create multiple data files with the same names but different extensions. For example, do not use a naming scheme such as INVOICE.HDR and INVOICE.DET for your data files. If you do, the MicroKernel returns status 85 and no files will be put in Continuous Operations.
Continuous operation mode does not significantly affect MicroKernel performance; however, using a server to back up files can affect performance.
To protect against data loss using Continuous Operation
- Use the -STARTBU command to put your files in continuous operation. See STARTBU for an explanation of the command syntax with BUTIL and for an explanation with SQLUTIL.
- Back up your data files.
- Use the -ENDBU command to take your files out of continuous operation. See ENDBU for an explanation of the command syntax with BUTIL and for an explanation with SQLUTIL.
Backing Up a Database with BUTIL
This section provides detailed information on backing up a database using the following BUTIL commands: STARTBU and ENDBU.
STARTBU
The BUTIL -STARTBU command places a file or set of files into continuous operation for backup purposes.
Format
BUTIL -STARTBU <sourceFile | @listFile> [/S]
Note
This command begins continuous operation only on the files you specify. You cannot use wildcard characters with the STARTBU command.
Examples for Windows Server
Example A The first example starts continuous operation on the COURSE.MKD file.
butil -startbu c:\pvsw\demodata\course.mkdExample B The following example starts continuous operation on all files listed in the STARTLST.FIL file.
butil -startbu @startlst.filThe STARTLST.FIL file might consist of the following entries:
c:\pvsw\demodata\course.mkd c:\pvsw\demodata\tuition.mkd c:\pvsw\demodata\dept.mkdExamples for NetWare Server
Example A The first example starts continuous operation on the COURSE.MKD file.
butil -startbu sys:\pvsw\demodata\course.mkdExample B The following example starts continuous operation on all files listed in the STARTLST.FIL file.
butil -startbu @sys:\test\startlst.filThe STARTLST.FIL file might consist of the following entries:
sys:\pvsw\demodata\course.mkd sys:\pvsw\demodata\tuition.mkd sys:\pvsw\demodata\dept.mkdENDBU
The ENDBU command ends continuous operation on a data file or set of data files previously defined for backup. Issue this command after using the STARTBU command to begin continuous operation and after performing your backup.
Format
BUTIL -ENDBU </A | sourceFile | @listFile> [/S]
/A
If you specify/A
, the utility stops continuous operation on all data files initialized by BUTIL -STARTBU and currently running in continuous operation mode. sourceFile The fully qualified name of the data file (including the drive specification for Windows NT/2000 and volume specification for NetWare) for which to end continuous operation.This fully qualifed name must reside on the same machine as the one from which you are running butil. You cannot used mapped drives with the endbu command.@
listFile The name of a text file containing a list of data files for which to end continuous operation. The text file must contain the fully qualified file name for each data file, and you must separate these file names with a carriage return/line feed. (Although the utility accepts a blank space separator as well, future versions of Pervasive.SQL may accept blank characters in file names. For compatibility with future versions of Pervasive.SQL, use the carriage return/line feed separator.) Typically, this list of data files is the same as the list used with the STARTBU command./S
(NetWare only) By default, the Maintenance utility stops at each full screen of output and waits for a keystroke before continuing. With the /S option, the utility continuously scrolls output on the screen. You cannot use /S on the command line if you specify a command file, but you can specify /S with a command inside a command file.Example for Windows Server
The following example ends continuous operation on the COURSE.MKD file.
butil -endbu c:\pvsw\demodata\course.mkdHowever, you can also just enter
butil -endbu course.mkd
instead of the full path if your current directory isf:\demodata
.Example for NetWare Server
The following example ends continuous operation on the COURSE.MKD file.
butil -endbu sys:\pvsw\demodata\course.mkdBacking Up a Database with SQLUTIL
SQLUTIL is a command-line utility that runs only on Windows-based platforms and NetWare. You can execute SQLUTIL commands from the command line or through a command file. SQLUTIL works locally on the Pervasive.SQL server or Workgroup product (as an NLM on NetWare or from a command prompt on Windows-based platforms).
This section provides detailed information on backing up a database using the following SQLUTIL commands: STARTBU and ENDBU.
STARTBU
The SQLUTIL -STARTBU command places a file or set of files into continuous operation for backup purposes.
Format
SQLUTIL -STARTBU < datasourceName | @listFile > [ /S ]Examples
The following example starts continuous operation on the university data source name:
sqlutil -startbu universityThe following example starts continuous operation on all databases listed in the DBBACKUP.TXT file.
sqlutil -startbu @dbbackup.txtENDBU
The ENDBU command ends continuous operation on a data source name previously defined for backup. Execute this command after you have issued the STARTBU command and your backup utility has finished running.
Format
SQLUTIL -ENDBU < datasourceName | @listFile > [ /S ]
datasourceName The data source name for which to end continuous operation. @listFile The name of a text file containing the list of data source names for which to end continuous operation. The text file must contain the data source names separated with a carriage return/line feed. Typically, this list of data files is the same as the list used with the STARTBU command. /S By default, the SQL Maintenance utility stops at each full screen of output and waits for a keystroke before continuing. With the /S option, the utility continuously scrolls output on the screen. You cannot use /S on the command line if you specify a command file, but you can specify /S with a command inside a command file.Examples
The following example ends continuous operation on the university data source name:
sqlutil -endbu universityThe following example ends continuous operation on all databases listed in the DBBACKUP.TXT file.
sqlutil -endbu @dbbackup.txtRestoring Data Files when Using Continuous Operations
If you are using Continuous Operations for your backup strategy, then you have no recovery log that can be used to recover changes since your last backup. All database changes since your last backup are lost, with the possible exception of any transactions stored in the transaction log. Any such transactions are automatically rolled forward by the database engine when it starts up.
To restore data and normal database operations
- Resolve the failure.
Perform the maintenance required to make the failed computer operational again.
- Restore the data files from backup, or restore the hard drive image from backup, as appropriate.
- Re-install Pervasive.SQL if it was not restored as part of a disk image.
- Re-start the database engine.
Any database operations performed since the last backup must be performed over again.
Prev Using Archival Logging |
Contents Up Check for Revisions | Next Server High-Availability Support |