Reference Manual
CHAPTER 4. Database Administration Utilities
With the Erase utility, you can erase a database file or write file and its associated transaction log, or you can erase a transaction log file or transaction log mirror file. All database files, write files, and transaction log files are marked read-only to prevent accidental damage to the database and accidental deletion of the database files. Deleting a database file that references other dbspaces does not automatically delete the dbspace files.
If you erase a database file or write 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.
You can access the Erase utility in the following ways:
From Sybase Central, for interactive use under Windows 95 or NT.
From the system command line, using the dberase command-line utility. This is useful for incorporating into batch or command files.
Open the Database Utilities folder in the left panel.
Double-click Erase Database in the right panel. The Erase a Database wizard is displayed.
Follow the instructions in the wizard.
For full information on erasing a database from Sybase Central, see the Sybase Central online Help.
dberase [switches] database-file
dberasew [switches] database-file
Switch |
Description |
---|---|
-o |
Output log messages to a file |
-q |
Operate quietly—do not print messages |
-y |
Erase files without confirmation |
The database-file may be a database file, write file, or transaction log file. The full filename must be specified, including extension. If a database file or write file is specified, the associated transaction log file (and mirror, if one is maintained) is also erased.
For more information about the command-line switches, see Erase utility options.
Output log messages to file (-o ) Redirect log messages to the named file. Do not display messages on a window. This option is available only from the command-line utility.
Operate without confirming actions (-y ) Without this option, you are prompted to confirm the deletion of each file.