Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2008
    Posts
    27

    Unanswered: suspected databases

    Hi All,

    How we will find the suspected databases ?


    select name,status from master..sysdatabases


    if i will run the above quere? how do i find out the suspected databases

  2. #2
    Join Date
    Sep 2006
    Location
    Czech Republic
    Posts
    82

  3. #3
    Join Date
    Feb 2008
    Posts
    27
    Thank's David

  4. #4
    Join Date
    Mar 2008
    Posts
    7
    You will find it in status column
    if u want full syntax of removing suspect status to normal then plz reply...

  5. #5
    Join Date
    Feb 2008
    Posts
    27

    Hi

    Quote Originally Posted by sunil_manake
    You will find it in status column
    if u want full syntax of removing suspect status to normal then plz reply...
    Hi sunil, You can send me the syntax with details and there are any number to findout suspeted databases .................

  6. #6
    Join Date
    Mar 2008
    Posts
    7

    suspect databases

    //To remove Suspect

    use master
    go
    sp_configure "allow update",0

    select * from sysdatabases
    go

    in status column u will get -48 or some other number other than database.

    update sysdatabases
    set status = -36
    where name = ' suspect database name in single quote'
    go
    checkpoint
    go

    //restart the server
    update sysdatabases
    set status = 0
    where name = ' suspect database name in single quote'
    go
    checkpoint
    go

  7. #7
    Join Date
    Feb 2008
    Posts
    27

    Hi

    Quote Originally Posted by sunil_manake
    //To remove Suspect

    use master
    go
    sp_configure "allow update",0

    select * from sysdatabases
    go

    in status column u will get -48 or some other number other than database.

    update sysdatabases
    set status = -36
    where name = ' suspect database name in single quote'
    go
    checkpoint
    go

    //restart the server
    update sysdatabases
    set status = 0
    where name = ' suspect database name in single quote'
    go
    checkpoint
    go

    Hi,

    if the status column contain "-48" it is suspected database and one more thing is that sp_configure "allow update",0 is it ---"zero/one" and we are setting that to -36 so, if the db containing status column -36 it is not suspected database, is this right..........

  8. #8
    Join Date
    Mar 2008
    Posts
    7
    --one is correct for updation
    sp_configure "allow update",1

    --after your job done don't forget to turn it off by zero


    --about -36 ..u just execute that query it will sove ur problem.

  9. #9
    Join Date
    Feb 2008
    Posts
    27
    Hi Sunil,

    Actully my question is how we will identify the suspected databases?

    u said that "in status column u will get -48 or some other number other than database." i meen to ask u that if satus column containing -48 other number is it suspected database?

  10. #10
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Not sure what sunil_manake is smoking

    select name,status from master..sysdatabases
    where status&256=256

    to reset suspect status see
    http://infocenter.sybase.com/help/in.../svrtsg153.htm
    update sysdatabases
    set status = status & ~256
    where name="database_name"
    and status&256=256

Posting Permissions

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