Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013

    Exclamation Unanswered: Trying to drop device on the wrong database

    Hello Sybase Gurus,

    I am new to Sybase and we have a Sybase 15.7 database. I accidentally executed the alter database command below on the wrong database "DEV" and assigned space into it instead of assigning the space into the "tools" database.

    alter database DEV on datatools_1=1000

    therefore when I try to execute the sp_dropdevice command below
    sp_dropdevice datatools_1

    I get the error below:
    Device is being used by a database. You can't drop it.
    database_name device size
    --------------- --------------- ------------
    DEV datatools_1 1000 MB
    tools datatools_1 2048 MB

    I would like to drop the device datatools_1 on the DEV database but keep it in the tools database. What is the best way to do this? Any help is greatly appreciated.

    Thanks in advance.
    Attached Thumbnails Attached Thumbnails DEV_database_on_the_wrong_device.jpg  

  2. #2
    Join Date
    May 2005
    South Africa
    Provided Answers: 1
    I suggest you create a new device & DB, load the new DB from the dump then drop the old.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts