Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 24 consistency errors in database

Author  Topic 

SistemDoktoru
Starting Member

5 Posts

Posted - 2007-09-06 : 06:52:05
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

22859 Posts

Posted - 2007-09-06 : 10:05:57
"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

5 Posts

Posted - 2007-09-06 : 10:51:44
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

22859 Posts

Posted - 2007-09-06 : 10:53:58
'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

5 Posts

Posted - 2007-09-06 : 11:02:18
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

22859 Posts

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

Kristen
Go to Top of Page

SistemDoktoru
Starting Member

5 Posts

Posted - 2007-09-06 : 11:07:31
not exactly :)
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-09-06 : 11:16:25
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

5 Posts

Posted - 2007-09-06 : 11:23:42
Ok, thank you very much Kristen.
i haven't been resolved but not problem ;)
Greetings from sistemdoktoru.com
Regards.

Go to Top of Page
   

- Advertisement -