Database in "suspect" mode (SQL Server Management Studio 2005)

  • This morning, I made a backup copy of the SQL Server database. Because the log file has grown too big (over 15GB), I first shrank it to 1mb. After copying it, I opened SQL Server Management Studio 2005, tried to attach the backup database to it, but the operation failed. My guess is because the original database, which has the same name, has been previously attached to the SQL Server Management Studio. By trying to attach another db with the same name, I created a conflict and the operation failed. But what troubles me now is that the original database is labeled as "suspect" in SQL Server Management Studio. It looks like the original db has been corrupted.

    I ran the following sql command:

    DBCC CHECKDB ('DatabaseName’) WITH NO_INFOMSGS, ALL_ERRORMSGS

    and the following message appeared:

    Msg 102, Level 15, State 1, Line 1

    Incorrect syntax near '‘'.

    Msg 319, Level 15, State 1, Line 1

    Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.

    I used the copied database to overwrite the original one but it did not help. The problem exists, it looks like now the copied db is also corrupted. Too bad now I cannot even use the log file to restore the database because I have shrunk it to almost nothing.

    Can any offer a solution? This is urgent because I used this database to run my own business at home. Thanks.

  • henryvuong1000 (3/19/2011)


    This morning, I made a backup copy of the SQL Server database. Because the log file has grown too big (over 15GB), I first shrank it to 1mb. After copying it, I opened SQL Server Management Studio 2005, tried to attach the backup database to it, but the operation failed. My guess is because the original database, which has the same name, has been previously attached to the SQL Server Management Studio. By trying to attach another db with the same name, I created a conflict and the operation failed. But what troubles me now is that the original database is labeled as "suspect" in SQL Server Management Studio. It looks like the original db has been corrupted.

    I ran the following sql command:

    DBCC CHECKDB ('DatabaseName’) WITH NO_INFOMSGS, ALL_ERRORMSGS

    and the following message appeared:

    Msg 102, Level 15, State 1, Line 1

    Incorrect syntax near '‘'.

    Msg 319, Level 15, State 1, Line 1

    Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.

    I used the copied database to overwrite the original one but it did not help. The problem exists, it looks like now the copied db is also corrupted. Too bad now I cannot even use the log file to restore the database because I have shrunk it to almost nothing.

    Can any offer a solution? This is urgent because I used this database to run my own business at home. Thanks.

    seems a bit scary what you did ....

    Your statement didn't work because you didn't use "regular" single quotes.

    That also happens when you copy quoted text from e.g. MSWord.

    Replace the quotes by editing in a tsql panel and replace with new quotes.

    Why didn't you create a regular tsql backup ?

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • A critically important database with no backups that's suspect. Usually I'd say URLT, but not applicable in this case unfortunately.

    What you did could not cause the suspect status. Recovery pending maybe, but not suspect. Suspect means that the database engine encountered some form of corruption while doing crash recovery.

    What is the current situation?

    If there's still a suspect DB...

    Query sys.databases and post exactly what the state_desc for the database is

    Open the SQL error log and find any and all messages relating to this database.

    The error on checkDB is, as ALZDBA said, due to the quotes. There's a ` where there should be '

    That said, you can't run checkDB on a suspect database. Hence the request for the database state and error log.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • p.s. When (if) you recover the DB, you maybe should take a read through this - Managing Transaction Logs[/url]

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • @SSCertifiable:

    Can you explain further? I am not a SQL Server expert. I know some tsql but I'm still at beginning level. Note that I did not use any tsql command why performing the above operations. I only used GUI.

    Why didn't I create a regular tsql backup? Because it is simpler to copy and paste the files than running a tsql command. The person who works with me does not know anything about sql. That's the way she backs up sql database.

  • henryvuong1000 (3/19/2011)


    Note that I did not use any tsql command why performing the above operations. I only used GUI.

    What do you mean you used the GUI? There's no mechanism through the SSMS GUI to run CheckDB.

    You said you 'ran the command'. If by that you mean a query window, paste that, press F5 (or use the menu), then the previous comments stand, there's an incorrect ` in that command.

    Why didn't I create a regular tsql backup? Because it is simpler to copy and paste the files than running a tsql command. The person who works with me does not know anything about sql. That's the way she backs up sql database.

    Simpler, wrong and quite likely to give you useless 'backups' that cannot be 'restored'. A file copy is not a SQL backup. That the person you work with does it, does not make it a good way or even a workable way.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Simpler, wrong and quite likely to give you useless 'backups' that cannot be 'restored'. A file copy is not a SQL backup. That the person you work with does it, does not make it a good way or even a workable way.

    So when I overwrote the original file with the "Backup" (or that's what I thought) file, I have replaced the original file with a useless file? If that is so, am I hopeless? 🙁

  • henryvuong1000 (3/19/2011)


    So when I overwrote the original file with the "Backup" (or that's what I thought) file, I have replaced the original file with a useless file?

    Quite possible.

    If that is so, am I hopeless? 🙁

    Can you go through all the questions I asked in my initial post here and answer them? Without all of that info, no way to tell how bad things are.

    To be blunt, most likely outcome here is either recovery with some data loss or no recovery at all.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I am such a moron. I thought the error message was telling what's wrong with the database, but it appears I typed in the wrong sql command. Honestly, this is what I copied and pasted after search for a solution on google. Here's the error message I got with the CHECKDB command:

    Database 'BTData' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.

    Here's the last log file:

    2011-03-19 13:53:35.92 Server Microsoft SQL Server 2005 - 9.00.1406.00 (Intel X86)

    Mar 3 2007 18:40:02

    Copyright (c) 1988-2005 Microsoft Corporation

    Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

    2011-03-19 13:53:35.92 Server (c) 2005 Microsoft Corporation.

    2011-03-19 13:53:35.92 Server All rights reserved.

    2011-03-19 13:53:35.92 Server Server process ID is 4224.

    2011-03-19 13:53:35.92 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.

    2011-03-19 13:53:35.92 Server This instance of SQL Server last reported using a process ID of 716 at 3/19/2011 1:16:10 PM (local) 3/19/2011 8:16:10 PM (UTC). This is an informational message only; no user action is required.

    2011-03-19 13:53:35.92 Server Registry startup parameters:

    2011-03-19 13:53:35.92 Server -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf

    2011-03-19 13:53:35.92 Server -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG

    2011-03-19 13:53:35.92 Server -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf

    2011-03-19 13:53:35.95 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.

    2011-03-19 13:53:35.95 Server Detected 2 CPUs. This is an informational message; no user action is required.

    2011-03-19 13:53:36.01 Server Error: 8313, Severity: 16, State: 1.

    2011-03-19 13:53:36.01 Server Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

    2011-03-19 13:53:36.01 Server Error: 3409, Severity: 16, State: 1.

    2011-03-19 13:53:36.01 Server Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    2011-03-19 13:53:36.01 Server Set AWE Enabled to 1 in the configuration parameters to allow use of more memory.

    2011-03-19 13:53:36.62 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.

    2011-03-19 13:53:36.70 Server Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.

    2011-03-19 13:53:36.75 Server The Microsoft Distributed Transaction Coordinator (MS DTC) service could not be contacted. If you would like distributed transaction functionality, please start this service.

    2011-03-19 13:53:36.75 Server Database Mirroring Transport is disabled in the endpoint configuration.

    2011-03-19 13:53:36.76 spid4s Starting up database 'master'.

    2011-03-19 13:53:36.89 spid4s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.

    2011-03-19 13:53:37.00 spid4s SQL Trace ID 1 was started by login "sa".

    2011-03-19 13:53:37.03 spid4s Starting up database 'mssqlsystemresource'.

    2011-03-19 13:53:37.26 spid4s Server name is 'MAIN-STATION'. This is an informational message only. No user action is required.

    2011-03-19 13:53:37.26 spid8s Starting up database 'model'.

    2011-03-19 13:53:37.40 spid8s Clearing tempdb database.

    2011-03-19 13:53:37.57 Server A self-generated certificate was successfully loaded for encryption.

    2011-03-19 13:53:37.59 Server Server is listening on [ 'any' <ipv4> 1433].

    2011-03-19 13:53:37.59 Server Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].

    2011-03-19 13:53:37.59 Server Server local connection provider is ready to accept connection on [ \\.\pipe\sql\query ].

    2011-03-19 13:53:37.61 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].

    2011-03-19 13:53:37.61 Server Dedicated admin connection support was established for listening locally on port 1434.

    2011-03-19 13:53:37.64 Server The SQL Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x54b. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies.

    2011-03-19 13:53:37.64 Server SQL Server is now ready for client connections. This is an informational message; no user action is required.

    2011-03-19 13:53:37.68 spid13s Starting up database 'ProList'.

    2011-03-19 13:53:37.68 spid11s Starting up database 'msdb'.

    2011-03-19 13:53:37.68 spid12s Starting up database 'test_BTData'.

    2011-03-19 13:53:37.68 spid14s Starting up database 'BTData'.

    2011-03-19 13:53:38.17 spid14s Error: 9003, Severity: 20, State: 9.

    2011-03-19 13:53:38.17 spid14s The log scan number (7941:97506:1) passed to log scan in database 'BTData' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.

    2011-03-19 13:53:38.17 spid14s Error: 3414, Severity: 21, State: 1.

    2011-03-19 13:53:38.17 spid14s An error occurred during recovery, preventing the database 'BTData' (database ID 7) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.

    2011-03-19 13:53:40.11 spid8s Starting up database 'tempdb'.

    2011-03-19 13:53:40.64 spid11s The Service Broker protocol transport is disabled or not configured.

    2011-03-19 13:53:40.64 spid11s The Database Mirroring protocol transport is disabled or not configured.

    2011-03-19 13:53:40.73 spid11s Service Broker manager has started.

    2011-03-19 13:53:41.86 spid4s Recovery is complete. This is an informational message only. No user action is required.

    2011-03-19 13:54:10.84 spid52 Using 'xpstar90.dll' version '2005.90.1399' to execute extended stored procedure 'xp_instance_regread'. This is an informational message only; no user action is required.

    2011-03-19 14:15:42.76 Logon Error: 18456, Severity: 14, State: 16.

    2011-03-19 14:15:42.76 Logon Login failed for user 'MAIN-STATION\SHOCKINGPRICE'. [CLIENT: <local machine>]

    The database that has problem is "BTData". From this log, it looks like I have a corrupted log file? When I copy the files from one machine and pasted it on another machine for backup, then use the backup to overwrite the original file, I may have corrupted the log file?

  • Exactly as you have, just replacing the ` (at the end of the database name) with '

    However if the database is suspect, that will fail. You cannot checkDB a suspect database. Please go back to the first post I made in this thread and answer the questions that are there.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I just edited the post above. Please view it. Thanks.

  • Good. Fortunately not fatal. Consider yourself lucky.

    ALTER DATABASE BTData SET EMERGENCY

    ALTER DATABASE BTData SET SINGLE_USER

    DBCC CHECKDB('BTData', REPAIR_ALLOW_DATA_LOSS)

    ALTER DATABASE BTData SET ONLINE

    Run them one by one if any give an error post it here and do not run anything further.

    I don't know how you copy the files, but anything's possible. Corruption is typically an IO subsystem problem.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • The first two commands went through successfully. This is the message I got after the third command, namely DBCC CHECKDB:

    Failed to restart the current database. The current database is switched to master.

    Warning: The log for database 'BTData' has been rebuilt. Transactional consistency has been lost. The RESTORE chain was broken, and the server no longer has context on the previous log files, so you will need to know what they were. You should run DBCC CHECKDB to validate physical consistency. The database has been put in dbo-only mode. When you are ready to make the database available for use, you will need to reset database options and delete any extra log files.

    DBCC results for 'BTData'.

    Service Broker Msg 9675, State 1: Message Types analyzed: 14.

    Service Broker Msg 9676, State 1: Service Contracts analyzed: 6.

    Service Broker Msg 9667, State 1: Services analyzed: 3.

    Service Broker Msg 9668, State 1: Service Queues analyzed: 3.

    Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.

    Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.

    Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.

    DBCC results for 'sys.sysrowsetcolumns'.

    There are 1970 rows in 22 pages for object "sys.sysrowsetcolumns".

    DBCC results for 'sys.sysrowsets'.

    There are 324 rows in 6 pages for object "sys.sysrowsets".

    DBCC results for 'sysallocunits'.

    There are 392 rows in 12 pages for object "sysallocunits".

    DBCC results for 'sys.sysfiles1'.

    There are 2 rows in 1 pages for object "sys.sysfiles1".

    DBCC results for 'sys.syshobtcolumns'.

    There are 1970 rows in 23 pages for object "sys.syshobtcolumns".

    DBCC results for 'sys.syshobts'.

    There are 324 rows in 6 pages for object "sys.syshobts".

    DBCC results for 'sys.sysftinds'.

    There are 0 rows in 0 pages for object "sys.sysftinds".

    DBCC results for 'sys.sysserefs'.

    There are 392 rows in 2 pages for object "sys.sysserefs".

    DBCC results for 'sys.sysowners'.

    There are 14 rows in 1 pages for object "sys.sysowners".

    DBCC results for 'sys.sysprivs'.

    There are 120 rows in 1 pages for object "sys.sysprivs".

    DBCC results for 'sys.sysschobjs'.

    There are 543 rows in 14 pages for object "sys.sysschobjs".

    DBCC results for 'sys.syscolpars'.

    There are 1522 rows in 35 pages for object "sys.syscolpars".

    DBCC results for 'sys.sysnsobjs'.

    There are 1 rows in 1 pages for object "sys.sysnsobjs".

    DBCC results for 'sys.syscerts'.

    There are 0 rows in 0 pages for object "sys.syscerts".

    DBCC results for 'sys.sysxprops'.

    There are 0 rows in 0 pages for object "sys.sysxprops".

    DBCC results for 'sys.sysscalartypes'.

    There are 27 rows in 1 pages for object "sys.sysscalartypes".

    DBCC results for 'sys.systypedsubobjs'.

    There are 0 rows in 0 pages for object "sys.systypedsubobjs".

    DBCC results for 'sys.sysidxstats'.

    There are 1211 rows in 30 pages for object "sys.sysidxstats".

    DBCC results for 'sys.sysiscols'.

    There are 1335 rows in 8 pages for object "sys.sysiscols".

    DBCC results for 'sys.sysbinobjs'.

    There are 23 rows in 1 pages for object "sys.sysbinobjs".

    DBCC results for 'sys.sysobjvalues'.

    There are 1563 rows in 419 pages for object "sys.sysobjvalues".

    DBCC results for 'sys.sysclsobjs'.

    There are 14 rows in 1 pages for object "sys.sysclsobjs".

    DBCC results for 'sys.sysrowsetrefs'.

    There are 0 rows in 0 pages for object "sys.sysrowsetrefs".

    DBCC results for 'sys.sysremsvcbinds'.

    There are 0 rows in 0 pages for object "sys.sysremsvcbinds".

    DBCC results for 'sys.sysxmitqueue'.

    There are 0 rows in 0 pages for object "sys.sysxmitqueue".

    DBCC results for 'sys.sysrts'.

    There are 1 rows in 1 pages for object "sys.sysrts".

    DBCC results for 'sys.sysconvgroup'.

    There are 0 rows in 0 pages for object "sys.sysconvgroup".

    DBCC results for 'sys.sysdesend'.

    There are 0 rows in 0 pages for object "sys.sysdesend".

    DBCC results for 'sys.sysdercv'.

    There are 0 rows in 0 pages for object "sys.sysdercv".

    DBCC results for 'sys.syssingleobjrefs'.

    There are 133 rows in 1 pages for object "sys.syssingleobjrefs".

    DBCC results for 'sys.sysmultiobjrefs'.

    There are 137 rows in 1 pages for object "sys.sysmultiobjrefs".

    DBCC results for 'sys.sysdbfiles'.

    There are 2 rows in 1 pages for object "sys.sysdbfiles".

    DBCC results for 'sys.sysguidrefs'.

    There are 0 rows in 0 pages for object "sys.sysguidrefs".

    DBCC results for 'sys.sysqnames'.

    There are 91 rows in 1 pages for object "sys.sysqnames".

    DBCC results for 'sys.sysxmlcomponent'.

    There are 93 rows in 1 pages for object "sys.sysxmlcomponent".

    DBCC results for 'sys.sysxmlfacet'.

    There are 97 rows in 1 pages for object "sys.sysxmlfacet".

    DBCC results for 'sys.sysxmlplacement'.

    There are 17 rows in 1 pages for object "sys.sysxmlplacement".

    DBCC results for 'sys.sysobjkeycrypts'.

    There are 0 rows in 0 pages for object "sys.sysobjkeycrypts".

    DBCC results for 'sys.sysasymkeys'.

    There are 0 rows in 0 pages for object "sys.sysasymkeys".

    DBCC results for 'sys.syssqlguides'.

    There are 0 rows in 0 pages for object "sys.syssqlguides".

    DBCC results for 'sys.sysbinsubobjs'.

    There are 0 rows in 0 pages for object "sys.sysbinsubobjs".

    DBCC results for 'Attributes'.

    There are 5 rows in 1 pages for object "Attributes".

    DBCC results for 'Pictures'.

    There are 300544 rows in 5900 pages for object "Pictures".

    DBCC results for 'AutoText'.

    There are 25 rows in 7 pages for object "AutoText".

    DBCC results for 'ProductFinders'.

    There are 443 rows in 2 pages for object "ProductFinders".

    DBCC results for 'Buyers'.

    There are 89102 rows in 1448 pages for object "Buyers".

    DBCC results for 'StoreCategories'.

    There are 375 rows in 10 pages for object "StoreCategories".

    DBCC results for 'sysdiagrams'.

    There are 0 rows in 0 pages for object "sysdiagrams".

    DBCC results for 'Suppliers'.

    There are 12 rows in 1 pages for object "Suppliers".

    DBCC results for 'Sales'.

    There are 182737 rows in 18035 pages for object "Sales".

    DBCC results for 'UserLogins'.

    There are 2 rows in 1 pages for object "UserLogins".

    DBCC results for 'VCS'.

    There are 737 rows in 107 pages for object "VCS".

    DBCC results for 'Categories'.

    There are 82567 rows in 6982 pages for object "Categories".

    DBCC results for 'CategoryFavorites'.

    There are 6 rows in 1 pages for object "CategoryFavorites".

    DBCC results for 'Themes'.

    There are 801 rows in 490 pages for object "Themes".

    DBCC results for 'Charities'.

    There are 15564 rows in 220 pages for object "Charities".

    DBCC results for 'ConsignmentModels'.

    There are 1 rows in 1 pages for object "ConsignmentModels".

    DBCC results for 'Views'.

    There are 136 rows in 7 pages for object "Views".

    DBCC results for 'CISPresets'.

    There are 1 rows in 1 pages for object "CISPresets".

    DBCC results for 'Reports'.

    There are 44 rows in 18 pages for object "Reports".

    DBCC results for 'PSStoreCategories'.

    There are 0 rows in 0 pages for object "PSStoreCategories".

    DBCC results for 'ReportsSQL'.

    There are 44 rows in 19 pages for object "ReportsSQL".

    DBCC results for 'Consignors'.

    There are 2 rows in 1 pages for object "Consignors".

    DBCC results for 'SalesStatus'.

    There are 39 rows in 1 pages for object "SalesStatus".

    DBCC results for 'Layouts'.

    There are 63 rows in 14 pages for object "Layouts".

    DBCC results for 'ListingStatus'.

    There are 28 rows in 1 pages for object "ListingStatus".

    DBCC results for 'ItemStatus'.

    There are 20 rows in 1 pages for object "ItemStatus".

    DBCC results for 'CreditCards'.

    There are 2 rows in 1 pages for object "CreditCards".

    DBCC results for 'Listings'.

    There are 164578 rows in 42176 pages for object "Listings".

    DBCC results for 'States'.

    There are 85 rows in 1 pages for object "States".

    DBCC results for 'Countries'.

    There are 230 rows in 2 pages for object "Countries".

    DBCC results for 'DescriptionFields'.

    There are 11584 rows in 6433 pages for object "DescriptionFields".

    DBCC results for 'ShippingServices'.

    There are 207 rows in 5 pages for object "ShippingServices".

    DBCC results for 'DescTemplates'.

    There are 14 rows in 11 pages for object "DescTemplates".

    DBCC results for 'Servant'.

    There are 10 rows in 1 pages for object "Servant".

    DBCC results for 'FitmentProductSearchXSL'.

    There are 1 rows in 1 pages for object "FitmentProductSearchXSL".

    DBCC results for 'Emails'.

    There are 8 rows in 4 pages for object "Emails".

    DBCC results for 'EmailTemplates'.

    There are 4 rows in 1 pages for object "EmailTemplates".

    DBCC results for 'ServantByUser'.

    There are 12 rows in 1 pages for object "ServantByUser".

    DBCC results for 'FitmentCompatibilityData'.

    There are 0 rows in 0 pages for object "FitmentCompatibilityData".

    DBCC results for 'FeatureSets'.

    There are 3 rows in 1 pages for object "FeatureSets".

    DBCC results for 'FitmentCompatibilitySearchNames'.

    There are 6 rows in 1 pages for object "FitmentCompatibilitySearchNames".

    DBCC results for 'EMGiftIcon'.

    There are 16 rows in 1 pages for object "EMGiftIcon".

    DBCC results for 'FitmentCompatibilitySearchValues'.

    There are 183120 rows in 4807 pages for object "FitmentCompatibilitySearchValues".

    DBCC results for 'FeatureTemplates'.

    There are 28722 rows in 89 pages for object "FeatureTemplates".

    DBCC results for 'FitmentProductSearchNames'.

    There are 7 rows in 3 pages for object "FitmentProductSearchNames".

    DBCC results for 'FitmentCompatibilityMetadataVersion'.

    There are 8 rows in 1 pages for object "FitmentCompatibilityMetadataVersion".

    DBCC results for 'Settings'.

    There are 80 rows in 3 pages for object "Settings".

    DBCC results for 'ShipDestTemplates'.

    There are 16 rows in 1 pages for object "ShipDestTemplates".

    DBCC results for 'Feedbacks'.

    There are 4 rows in 1 pages for object "Feedbacks".

    DBCC results for 'ShippingDiscountProfile'.

    There are 4 rows in 1 pages for object "ShippingDiscountProfile".

    DBCC results for 'ShippingTemplateDP'.

    There are 4 rows in 1 pages for object "ShippingTemplateDP".

    DBCC results for 'FinanceOffers'.

    There are 7 rows in 1 pages for object "FinanceOffers".

    DBCC results for 'ShippingTemplates'.

    There are 27698 rows in 815 pages for object "ShippingTemplates".

    DBCC results for 'Lists'.

    There are 0 rows in 0 pages for object "Lists".

    DBCC results for 'Folders'.

    There are 17 rows in 1 pages for object "Folders".

    DBCC results for 'FitmentData'.

    There are 0 rows in 0 pages for object "FitmentData".

    DBCC results for 'MsgEbayUpdates'.

    There are 617 rows in 9 pages for object "MsgEbayUpdates".

    DBCC results for 'IHostTemplates'.

    There are 8 rows in 1 pages for object "IHostTemplates".

    DBCC results for 'FitmentCompatibilitySearchValues2'.

    There are 101346 rows in 1909 pages for object "FitmentCompatibilitySearchValues2".

    DBCC results for 'MsgEmailHistory'.

    There are 354 rows in 13 pages for object "MsgEmailHistory".

    DBCC results for 'MsgFeedbackHistory'.

    There are 168 rows in 5 pages for object "MsgFeedbackHistory".

    DBCC results for 'MsgImportErrors'.

    There are 0 rows in 0 pages for object "MsgImportErrors".

    DBCC results for 'Inventory'.

    There are 4642 rows in 34 pages for object "Inventory".

    DBCC results for 'MsgListingHistory'.

    There are 3431 rows in 84 pages for object "MsgListingHistory".

    DBCC results for 'FieldNameLookup'.

    There are 837 rows in 37 pages for object "FieldNameLookup".

    DBCC results for 'MsgProgramErrors'.

    There are 1010 rows in 324 pages for object "MsgProgramErrors".

    DBCC results for 'ExcludeShipToLocations'.

    There are 915 rows in 8 pages for object "ExcludeShipToLocations".

    DBCC results for 'sys.queue_messages_1977058079'.

    There are 0 rows in 0 pages for object "sys.queue_messages_1977058079".

    DBCC results for 'OrgTemplates'.

    There are 4 rows in 2 pages for object "OrgTemplates".

    DBCC results for 'sys.queue_messages_2009058193'.

    There are 0 rows in 0 pages for object "sys.queue_messages_2009058193".

    DBCC results for 'Items'.

    There are 4651 rows in 1018 pages for object "Items".

    DBCC results for 'sys.queue_messages_2041058307'.

    There are 0 rows in 0 pages for object "sys.queue_messages_2041058307".

    DBCC results for 'Addresses'.

    There are 92866 rows in 1363 pages for object "Addresses".

    DBCC results for 'ShippingServiceCategories'.

    There are 17 rows in 1 pages for object "ShippingServiceCategories".

    DBCC results for 'PaymentTemplates'.

    There are 5025 rows in 665 pages for object "PaymentTemplates".

    CHECKDB found 0 allocation errors and 0 consistency errors in database 'BTData'.

    DBCC execution completed. If DBCC printed error messages, contact your system administrator.

    Is this a success? Should I proceed with the last command? Thanks.

    :unsure:

  • CHECKDB found 0 allocation errors and 0 consistency errors in database 'BTData'.

    DBCC execution completed. If DBCC printed error messages, contact your system administrator.

    Yup, that's a success.

    Right. Now since that's past...

    You were exceedingly, incredibly lucky. I have had three cases in the last 2 weeks (forums and private mail) where people had databases go suspect and they had no backups and the databases were a complete loss, not recoverable at all. Complete, 100% data loss.

    Think for a minute how much it will cost you and your business if you lose every piece of data in that database with no possibility of recovery. Companies have closed as a result of losing their databases. (http://www.scarydba.com/2011/02/14/dba-101-why-dont-people-run-backups/)

    Going forward you need to either learn enough SQL administration (or have someone in your company learn it) to at least be able to do routine maintenance on the database (backups, integrity checks, index maintenance, test restores), preferably also log backups and a proper recovery strategy, or you should get a consultant in who can assist you with that

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I ran the last command and it's also a success. Now it looks like my database become "Single User". I can see the list of tables but whenever I try to open a table it pops up an error message:

    Database 'BTData' is already open and can only have one user at a time (Microsoft SQL Server, Error: 924)

    Here's the log file:

    2011-03-19 15:28:44.01 Server Microsoft SQL Server 2005 - 9.00.1406.00 (Intel X86)

    Mar 3 2007 18:40:02

    Copyright (c) 1988-2005 Microsoft Corporation

    Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

    2011-03-19 15:28:44.01 Server (c) 2005 Microsoft Corporation.

    2011-03-19 15:28:44.03 Server All rights reserved.

    2011-03-19 15:28:44.03 Server Server process ID is 5708.

    2011-03-19 15:28:44.03 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.

    2011-03-19 15:28:44.03 Server This instance of SQL Server last reported using a process ID of 4224 at 3/19/2011 3:28:40 PM (local) 3/19/2011 10:28:40 PM (UTC). This is an informational message only; no user action is required.

    2011-03-19 15:28:44.03 Server Registry startup parameters:

    2011-03-19 15:28:44.03 Server -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf

    2011-03-19 15:28:44.03 Server -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG

    2011-03-19 15:28:44.03 Server -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf

    2011-03-19 15:28:44.04 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.

    2011-03-19 15:28:44.04 Server Detected 2 CPUs. This is an informational message; no user action is required.

    2011-03-19 15:28:44.11 Server Error: 8313, Severity: 16, State: 1.

    2011-03-19 15:28:44.11 Server Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

    2011-03-19 15:28:44.11 Server Error: 3409, Severity: 16, State: 1.

    2011-03-19 15:28:44.11 Server Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    2011-03-19 15:28:44.11 Server Set AWE Enabled to 1 in the configuration parameters to allow use of more memory.

    2011-03-19 15:28:44.70 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.

    2011-03-19 15:28:44.78 Server Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.

    2011-03-19 15:28:44.82 Server The Microsoft Distributed Transaction Coordinator (MS DTC) service could not be contacted. If you would like distributed transaction functionality, please start this service.

    2011-03-19 15:28:44.84 Server Database Mirroring Transport is disabled in the endpoint configuration.

    2011-03-19 15:28:44.84 spid4s Starting up database 'master'.

    2011-03-19 15:28:44.90 spid4s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.

    2011-03-19 15:28:44.98 spid4s SQL Trace ID 1 was started by login "sa".

    2011-03-19 15:28:45.00 spid4s Starting up database 'mssqlsystemresource'.

    2011-03-19 15:28:45.25 spid4s Server name is 'MAIN-STATION'. This is an informational message only. No user action is required.

    2011-03-19 15:28:45.25 spid8s Starting up database 'model'.

    2011-03-19 15:28:45.40 spid8s Clearing tempdb database.

    2011-03-19 15:28:45.54 Server A self-generated certificate was successfully loaded for encryption.

    2011-03-19 15:28:45.56 Server Server is listening on [ 'any' <ipv4> 1433].

    2011-03-19 15:28:45.56 Server Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].

    2011-03-19 15:28:45.57 Server Server local connection provider is ready to accept connection on [ \\.\pipe\sql\query ].

    2011-03-19 15:28:45.57 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].

    2011-03-19 15:28:45.59 Server Dedicated admin connection support was established for listening locally on port 1434.

    2011-03-19 15:28:45.61 Server The SQL Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x54b. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies.

    2011-03-19 15:28:45.61 Server SQL Server is now ready for client connections. This is an informational message; no user action is required.

    2011-03-19 15:28:45.65 spid12s Starting up database 'test_BTData'.

    2011-03-19 15:28:45.65 spid13s Starting up database 'ProList'.

    2011-03-19 15:28:45.65 spid11s Starting up database 'msdb'.

    2011-03-19 15:28:45.67 spid14s Starting up database 'BTData'.

    2011-03-19 15:28:47.04 spid14s CHECKDB for database 'BTData' finished without errors on 2011-03-19 14:48:29.077 (local time). This is an informational message only; no user action is required.

    2011-03-19 15:28:48.37 spid8s Starting up database 'tempdb'.

    2011-03-19 15:28:48.89 spid11s The Service Broker protocol transport is disabled or not configured.

    2011-03-19 15:28:48.89 spid11s The Database Mirroring protocol transport is disabled or not configured.

    2011-03-19 15:28:49.01 spid11s Service Broker manager has started.

    2011-03-19 15:28:50.06 spid4s Recovery is complete. This is an informational message only. No user action is required.

    2011-03-19 15:28:54.22 spid52 Using 'xpstar90.dll' version '2005.90.1399' to execute extended stored procedure 'xp_instance_regread'. This is an informational message only; no user action is required.

    2011-03-19 15:29:35.64 Logon Error: 18456, Severity: 14, State: 16.

    2011-03-19 15:29:35.64 Logon Login failed for user 'MAIN-STATION\SHOCKINGPRICE'. [CLIENT: <local machine>]

    2011-03-19 15:30:24.68 Logon Error: 18456, Severity: 14, State: 16.

    2011-03-19 15:30:24.68 Logon Login failed for user 'MAIN-STATION\SHOCKINGPRICE'. [CLIENT: <local machine>]

    2011-03-19 15:32:36.45 Logon Error: 18456, Severity: 14, State: 16.

    2011-03-19 15:32:36.45 Logon Login failed for user 'MAIN-STATION\SHOCKINGPRICE'. [CLIENT: <local machine>]

    2011-03-19 15:40:13.86 Logon Error: 18456, Severity: 14, State: 16.

    2011-03-19 15:40:13.86 Logon Login failed for user 'MAIN-STATION\SHOCKINGPRICE'. [CLIENT: <local machine>]

    2011-03-19 15:40:54.07 Logon Error: 18456, Severity: 14, State: 16.

    2011-03-19 15:40:54.07 Logon Login failed for user 'MAIN-STATION\SHOCKINGPRICE'. [CLIENT: <local machine>]

    2011-03-19 15:42:02.01 Logon Error: 18456, Severity: 14, State: 16.

    2011-03-19 15:42:02.01 Logon Login failed for user 'MAIN-STATION\SHOCKINGPRICE'. [CLIENT: <local machine>]

    2011-03-19 15:43:01.06 Logon Error: 18456, Severity: 14, State: 16.

    2011-03-19 15:43:01.06 Logon Login failed for user 'MAIN-STATION\SHOCKINGPRICE'. [CLIENT: <local machine>]

    "Main-Station" is the computer name and "SHOCKINGPRICE" is the log in name of my computer. What is wrong here?

Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic. Login to reply