Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2006
    Posts
    6

    Exclamation Unanswered: offline database

    Hi all,
    Can someone plz tell me how to take database offilne by query.
    & how to check whether database is online or offline by query.

  2. #2
    Join Date
    Jan 2003
    Location
    Geneva, Switzerland
    Posts
    353
    AFAIK it is not possible to take a database offline (apart by doing a LOAD DATABASE). You can place it in single user, or dbo only which is probably the closest that you can come.

    You can check the status2 column in sysdatabases to see if a database is offline:
    Code:
    select ... from master..sysdatabases where status2 & 16
    Michael

  3. #3
    Join Date
    Sep 2002
    Location
    Sydney, Australia
    Posts
    255

    Why Offline a database ?

    Why are you attempting to take the db offline "by query", ie. what do you really want to do ? Given that Sybase is totally online (online db dumps and transaction dumps) and you cannot change that, are you trying to stop updates to the db (for synchronisation with some other system or whatever) for some duration ?

    Both methods regress to the days of offline databases, but:
    *The older method was brain surgery but that cannot be published.
    The current method is a Transact SQL command:
    Code:
    quiesce database < tag_name > hold < dbname list > [for external dump] 
    [to <manifest_file> [with override]]
    Is this what you are looking for ?
    Derek Asirvadem
    Senior Sybase DBA/Information Architect derekATsoftwaregemsDOTcomDOTau
    Anything worth doing is worth doing Right The First Time
    Spend your money on standards-compliant development or spend 10 times more fixing it

Posting Permissions

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