Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2003
    Posts
    50

    Unanswered: drop database problem

    I need to drop a database and re create it due to log and data on the same device.
    When i execute the drop database command i get the following error message

    12:31:50 PM DBMS intrade_prod -- Attempt to locate entry in sysdatabases for database 'intrade_fantasy_oltp' by name failed - no entry found under that name. Make sure that name is entered properly.

    here is the data from the sysdatabases table

    name dbid suid status version logptr crdate dumptrdate status2 audflags deftabaud defvwaud defpraud def_remote_type def_remote_loc status3 status4
    business_objects 8 42 0 1 1681 1/23/2004 7:32:05 AM 1/23/2004 7:31:59 AM -32512 0 0 0 0 1 intrade_rep.business_objects.. 2 0
    dbccdb 31515 1 8 1 418405 6/5/2001 6:31:35 PM 2/2/2004 1:29:44 PM 0 0 0 0 0 [NULL] [NULL] 0 0
    intrade_dw 10 42 0 1 1456 1/23/2004 7:32:43 AM 1/23/2004 7:32:34 AM -32512 0 0 0 0 1 intrade_rep.intrade_dw.. 2 0
    intrade_fantasy_oltp 20 10 4 1 1357087 1/4/2002 2:48:04 PM 2/1/2004 12:01:09 AM -32768 0 0 0 0 [NULL] [NULL] 4 0
    intrade_oltp 4 10 4 1 2126194 1/16/2002 5:58:38 PM 5/1/2003 3:01:01 PM 0 3 0 0 0 [NULL] [NULL] 4 0
    intrade_report 14 42 0 1 2934 1/23/2004 7:33:01 AM 1/23/2004 7:34:43 AM -32512 0 0 0 0 1 intrade_rep.intrade_report.. 2 0
    intrade_test_report 16 42 0 1 3150 1/23/2004 7:35:44 AM 1/23/2004 7:36:52 AM -32512 0 0 0 0 1 intrade_rep.intrade_test_report.. 2 0
    intrade_usa_report 18 42 0 1 3148 1/23/2004 7:37:57 AM 1/23/2004 7:38:57 AM -32512 0 0 0 0 1 intrade_rep.intrade_usa_report.. 2 0
    master 1 1 0 1 55486 1/1/1900 12:00:00 AM 10/11/2003 10:41:30 AM -32768 [NULL] [NULL] [NULL] [NULL] [NULL] [NULL] [NULL] [NULL]
    model 3 1 0 1 696 1/1/1900 12:00:00 AM 1/10/2002 11:33:10 AM -32768 [NULL] [NULL] [NULL] [NULL] [NULL] [NULL] [NULL] [NULL]
    sybsecurity 31516 10 8 1 557794 7/30/2002 4:56:54 PM 9/18/2003 12:58:13 PM 0 0 0 0 0 [NULL] [NULL] 0 0
    sybsystemdb 31513 1 8 1 935 11/3/1999 9:36:57 PM 1/23/2004 7:30:38 AM -32768 0 0 0 0 [NULL] [NULL] 0 0
    sybsystemprocs 31514 1 8 1 11212 5/14/2001 1:12:37 PM 2/2/2004 11:56:44 AM -32768 0 0 0 0 [NULL] [NULL] 0 0
    tempdb 2 1 4 1 774427 1/23/2004 7:26:13 AM 2/2/2004 1:34:37 PM 0 [NULL] [NULL] [NULL] [NULL] [NULL] [NULL] [NULL] [NULL]
    tradesports_oltp 6 10 4 1 1350739 6/17/2003 10:25:34 AM 2/2/2004 1:29:55 PM 0 0 0 0 0 [NULL] [NULL] 4 0

    How do i drop this database.
    Do i have to mark it suspect and go down that route, or is their another way

    Thanks,
    Dave

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    Apparently, according with your sysdatabases table, the database intrade_prod doesn't exist => it's not possible to drop it.

  3. #3
    Join Date
    Jun 2003
    Posts
    50
    Intrade_prod is the server name
    intrade_fantasy_oltp is the database name

  4. #4
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    Sorry !

    Please, provide us a more relevant

    Code:
    SELECT name, status, status2 
    FROM master..sysdatabases 
    WHERE name LIKE "intradate%"
    and try

    Code:
    dbcc dbrepair('intrade_fantasy_oltp' , 'dropdb')

  5. #5
    Join Date
    Jun 2003
    Posts
    50
    Here is the data you requested.

    name status status2
    intrade_fantasy_oltp 4 -32768

    Thanks,
    Dave

  6. #6
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    Originally posted by ddempsey
    Here is the data you requested.

    name status status2
    intrade_fantasy_oltp 4 -32768

    Thanks,
    Dave
    status2 = 32768 => DB does not have a dedicated log device
    but status2 = -32768 => bypass the recovery

    Try my dbcc dbrepair
    Last edited by fadace; 02-02-04 at 11:27.

  7. #7
    Join Date
    Jun 2003
    Posts
    50
    Thanks for the reply.
    I have to be sure before i do anything.

    status = 4
    status2 = -32768

    doesn't that just mean that a database has some portion of the log which is not on a log-only device

    thanks,
    Dave

  8. #8
    Join Date
    Feb 2004
    Posts
    2

    Drop DB

    Originally posted by fadace
    Apparently, according with your sysdatabases table, the database intrade_prod doesn't exist => it's not possible to drop it.
    The problem could be in some datapages page linkage.
    If you suppose to delete the DB and re-create means,
    You can try DBCC DBREPAIR

    Note
    Only a System Administrator can use the dbrepair keyword.

    Thanks,
    Sivabalan.P
    Citigroup

  9. #9
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    status = 4 => the option of the database, here 4 = select into / bcp
    status2 = 32768 => DB does not have a dedicated log device
    status2 = -32768 => skip the recovery mode of the DB when the server is starting

    First of all, try to update status2 to 0, then reboot the ASE and check status2 again

    To upgrade status2:

    Code:
    exec sp_configure "allow updates",1
    update master..sysdatabases set status2=0 where name="intrade_fantasy_oltp"
    exec sp_configure "allow updates",0
    shutdown

  10. #10
    Join Date
    Jun 2003
    Posts
    50
    I change the status to 320 and then i performed the dbcc dbrepair, but i still got the same error message

    Attempt to locate entry in sysdatabases for database 'intrade_fantasy_oltp' by name failed - no entry found under that name. Make sure that name is entered properly.

    Any Other Ideas

    Thanks,
    Dave

Posting Permissions

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