SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 24 consistency errors in database
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

SistemDoktoru
Starting Member

Turkey
5 Posts

Posted - 09/06/2007 :  06:52:05  Show Profile  Visit SistemDoktoru's Homepage  Click to see SistemDoktoru's MSN Messenger address  Reply with Quote
Hello all,

I have a problem on SQL 2000 Server Std (inc sP4)
OS: Windows 2000 Server

What can i do for errors?

DBCC CHECKDB ('GOLD_DB, REPAIR_ALLOW_DATA_LOSS)

DBCC results for 'GOLD_DB'.
DBCC results for 'sysobjects'.
...
CHECKDB found 0 allocation errors and 24 consistency errors in database 'GOLD_DB'.
CHECKDB fixed 0 allocation errors and 24 consistency errors in database 'GOLD_DB'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.


Greetings from istanbul, regards.

Kristen
Test

United Kingdom
22415 Posts

Posted - 09/06/2007 :  10:05:57  Show Profile  Reply with Quote
"What can i do for errors? REPAIR_ALLOW_DATA_LOSS"

Probably nothing now, you have allowed data loss, so DBCC will have deleted whatever records were necessary to fix the problem(s). Rerun DBCC CHECKDB and see if there are any errors still, if not you need to work out what data has been lost and re-instate it.

Note that data crucial to Referential Integrity may have been lost.

Also:

1) check your Event Log to see what hardware failure caused this problem, otherwise you wlil be likely to have further loss from the hardware failure.

2) put a proper backup stragey in place so you can restore from that in future, rather than repairing the database.

If you need any further advice ask away!

Kristen
Go to Top of Page

SistemDoktoru
Starting Member

Turkey
5 Posts

Posted - 09/06/2007 :  10:51:44  Show Profile  Visit SistemDoktoru's Homepage  Click to see SistemDoktoru's MSN Messenger address  Reply with Quote
Ok Kristen. thanks.
and also i can not run this query, because i don't know what is it mean "database_id"

'database name' =' GOLD_DB' it is ok. 'database_id': what must i write into?

Regards.



CHECKDB
[
(
'database_name' | database_id | 0
[ , NOINDEX
| { REPAIR_ALLOW_DATA_LOSS
| REPAIR_FAST
| REPAIR_REBUILD
} ]
)
]
[ WITH {
[ ALL_ERRORMSGS ]
[ , [ NO_INFOMSGS ] ]
[ , [ TABLOCK ] ]
[ , [ ESTIMATEONLY ] ]
[ , [ PHYSICAL_ONLY ] ] | [ , [ DATA_PURITY ] ]
}
]
Go to Top of Page

Kristen
Test

United Kingdom
22415 Posts

Posted - 09/06/2007 :  10:53:58  Show Profile  Reply with Quote
'database_name' | database_id | 0

means you either supply the database name, or the database ID, or "0" (to use the current database)

So if you know the database name that's fine. You do NOT also need the database ID

Kristen
Go to Top of Page

SistemDoktoru
Starting Member

Turkey
5 Posts

Posted - 09/06/2007 :  11:02:18  Show Profile  Visit SistemDoktoru's Homepage  Click to see SistemDoktoru's MSN Messenger address  Reply with Quote
OHH i c now.. :)
then how can i write this query?

is it right? because i tried but i didnt :(

CHECKDB
[
(
'database_name'
[ , NOINDEX
| { REPAIR_ALLOW_DATA_LOSS
| REPAIR_FAST
| REPAIR_REBUILD
} ]
)
]
[ WITH {
[ ALL_ERRORMSGS ]
[ , [ NO_INFOMSGS ] ]
[ , [ TABLOCK ] ]
[ , [ ESTIMATEONLY ] ]
[ , [ PHYSICAL_ONLY ] ] | [ , [ DATA_PURITY ] ]
}
]
Go to Top of Page

Kristen
Test

United Kingdom
22415 Posts

Posted - 09/06/2007 :  11:04:50  Show Profile  Reply with Quote
Do you understand what the "[...]" and "|" mean in this syntax chart?

Kristen
Go to Top of Page

SistemDoktoru
Starting Member

Turkey
5 Posts

Posted - 09/06/2007 :  11:07:31  Show Profile  Visit SistemDoktoru's Homepage  Click to see SistemDoktoru's MSN Messenger address  Reply with Quote
not exactly :)
Go to Top of Page

Kristen
Test

United Kingdom
22415 Posts

Posted - 09/06/2007 :  11:16:25  Show Profile  Reply with Quote
Well you need to read up on that then.

See Books Online : Transact-SQL Reference : Transact-SQL Syntax Conventions
quote:

Convention : Used for

UPPERCASE : Transact-SQL keywords.

italic : User-supplied parameters of Transact-SQL syntax.

| (vertical bar) : Separating syntax items within brackets or braces. You can choose only one of the items.

[ ] (brackets) : Optional syntax items. Do not type the brackets.

{} (braces) : Required syntax items. Do not type the braces.

[,...n] : Indicating that the preceding item can be repeated n number of times. The occurrences are separated by commas.

[ ...n] : Indicating that the preceding item can be repeated n number of times. The occurrences are separated by blanks.

bold : Database names, table names, column names, index names, stored procedures, utilities, data type names, and text that must be typed exactly as shown.

<label> ::= : The name for a block of syntax. This convention is used to group and label portions of lengthy syntax or a unit of syntax that can be used in more than one place within a statement. Each location in which the block of syntax can be used is indicated with the label enclosed in chevrons: <label>.


Kristen
Go to Top of Page

SistemDoktoru
Starting Member

Turkey
5 Posts

Posted - 09/06/2007 :  11:23:42  Show Profile  Visit SistemDoktoru's Homepage  Click to see SistemDoktoru's MSN Messenger address  Reply with Quote
Ok, thank you very much Kristen.
i haven't been resolved but not problem ;)
Greetings from sistemdoktoru.com
Regards.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000