Sunday, May 20, 2007

Drop a Sybase Database and its Device

Occasionally, you may need to drop a Sybase database and its device. For example, the database may need to be expanded but there is enough space on the device. But first, you will need to drop the database before dropping its device. Then confirm whether the database and the device were dropped or not. Here is an example.

# isql -Usa -Ppassword
1> use master
2> go
1> sp_helpdb
2> go
1> drop database MYDB
2> go
1> sp_dropdevice MYDB_device
2> go
1> sp_helpdb
2> go
1> sp_helpdevice
2> go

No comments: