Erases dbspaces and transaction log files associated with a database.
dberase [ options ] database-file
Reads in options from the specified environment variable or configuration file. See Using configuration files.
If you want to protect passwords or other information in the configuration file, you can use the File Hiding utility to obfuscate the contents of the configuration file. See File Hiding utility (dbfhide).
|-ek key||Specifies the encryption key for strongly encrypted databases directly in the command. If you have a strongly encrypted database, you must provide the encryption key to use the database or transaction log in any way. For strongly encrypted databases, you must specify either -ek or -ep, but not both. The command will fail if you do not specify the correct key for a strongly encrypted database.|
|-ep||Specifies that you want to be prompted for the encryption key. This option causes a window to appear, in which you enter the encryption key. It provides an extra measure of security by never allowing the encryption key to be seen in clear text. For strongly encrypted databases, you must specify either -ek or -ep, but not both. The command will fail if you do not specify the correct key for a strongly encrypted database.|
|-o filename||Writes output messages to the named file.|
|-q||Runs in quiet mode—do not display output messages. If you specify this option, you must also specify -y, otherwise the operation fails.|
|-y||Deletes each file without being prompted for confirmation. If you specify -q, you must also specify -y, otherwise the operation fails.|
With the Erase utility, you can erase a database file and its associated transaction log, or you can erase a transaction log file or transaction log mirror file. All database files and transaction log files are marked read-only to prevent accidental damage to the database and accidental deletion of the database files.
The database-file may be a database file or transaction log file. The full file name must be specified, including extension. If a database file is specified, the associated transaction log file (and mirror, if one is maintained) is also erased.
The Erase utility does not erase dbspaces. If you want to erase a dbspace, you can do so with the DROP DATABASE statement or by using the Erase Database Wizard in Sybase Central. See DROP DBSPACE statement.
You can also use the Erase Database Wizard to erase dbspaces and transaction log files. See Erasing a database.
Deleting a database file that references other dbspaces does not automatically delete the dbspace files. If you want to delete the dbspace files on your own, change the files from read-only to writable, and then delete the files individually. As an alternative, you can use the DROP DATABASE statement to erase a database and its associated dbspace files.
If you erase a database file, the associated transaction log and transaction log mirror are also deleted. If you erase a transaction log for a database that also maintains a transaction log mirror, the mirror is not deleted.
The database being erased must not be running when this utility is used.
Exit codes are 0 (success) or non-zero (failure). See Software component exit codes.
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|