|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I have a SQL Server 2005 Std Edition. I am running the checkdb command on a Database which is about 71 MB (mdf file). How long does CheckDB run. I have been informed that it could run for 24 hours, 48, hours, or even more. I want to know from people have run this command, How long did it run. Whats the size of your mdf file. How complex is your database. Does your Database have over 100 tables, Views. USE master DBCC CHECKDB ('mydatabase'') WITH ALL_ERRORMSGS ALTER DATABASE mydatabase SET emergency ALTER DATABASE mydatabase SET SINGLE_USER WITH ROLLBACK IMMEDIATE DBCC CheckDB ('mydatabase', REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS ALTER DATABASE mydatabase SET MULTI_USER |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
nitadmin,
First, Regarding REPAIR_ALLOW_DATA_LOSS. Never run this in any automated process. This is definitely a last resort step to take on a database and should only be run after you have run out of all other ideas of how to save the data. Second, performance is subject to too many factors to detail. But examples: I just ran one on all databases on a server with about 500 GB, made up of about 60 databases, some with over a thousand tables. My server has two dual cores and a suboptimal disk array. (It is a development server, not a production machine.) The CHECKDB ran across all databases in about 3.5 hours. I also did this on a production server with about 300 GB of databases, an optimized disk array, and more powerful processors ran in about 45 minutes. So, I don't know how to answer your question exactly, but that should give you a feel for the issue. A 71 MB database should finish VERY quickly. RLF "nitadmin" <nygiantswin2005@hotmail.com> wrote in message news:3584f42a-a5fa-4b52-a29c-3ab52d5f6e1e@26g2000hsk.googlegroups.com... > Hi, > > I have a SQL Server 2005 Std Edition. > > I am running the checkdb command on a Database which is about 71 MB > (mdf file). > > How long does CheckDB run. I have been informed that it could run for > 24 hours, 48, hours, or even more. > > I want to know from people have run this command, How long did it run. > Whats the size of your mdf file. How complex is your database. Does > your Database have over 100 tables, Views. > > > > > USE master > > DBCC CHECKDB ('mydatabase'') WITH ALL_ERRORMSGS > > ALTER DATABASE mydatabase SET emergency > ALTER DATABASE mydatabase SET SINGLE_USER WITH ROLLBACK IMMEDIATE > DBCC CheckDB ('mydatabase', REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS > ALTER DATABASE mydatabase SET MULTI_USER |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
I'd have to agree. A 71 MB database should run in just a few minutes.
I ran it against a dev database about 4 Gig in size, with about 1.8 Gig of data and it finished in about 2 minutes. The machine is a VMware machine running on a VMware ESX server, so the disk is about as slow as possible. The closest database I have is 600 Megs and DBCC CHECKDB ran in ~20 seconds. I would also have to agree that REPAIR_ALLOW_DATA_LOSS shouldn't ever be automated. Denny On Tue, 15 Jul 2008 19:37:02 -0400, "Russell Fields" <russellfields@nomail.com> wrote: >nitadmin, > >First, Regarding REPAIR_ALLOW_DATA_LOSS. Never run this in any automated >process. This is definitely a last resort step to take on a database and >should only be run after you have run out of all other ideas of how to save >the data. > >Second, performance is subject to too many factors to detail. But examples: > >I just ran one on all databases on a server with about 500 GB, made up of >about 60 databases, some with over a thousand tables. My server has two >dual cores and a suboptimal disk array. (It is a development server, not a >production machine.) The CHECKDB ran across all databases in about 3.5 >hours. > >I also did this on a production server with about 300 GB of databases, an >optimized disk array, and more powerful processors ran in about 45 minutes. > >So, I don't know how to answer your question exactly, but that should give >you a feel for the issue. A 71 MB database should finish VERY quickly. > >RLF > >"nitadmin" <nygiantswin2005@hotmail.com> wrote in message >news:3584f42a-a5fa-4b52-a29c-3ab52d5f6e1e@26g2000hsk.googlegroups.com... >> Hi, >> >> I have a SQL Server 2005 Std Edition. >> >> I am running the checkdb command on a Database which is about 71 MB >> (mdf file). >> >> How long does CheckDB run. I have been informed that it could run for >> 24 hours, 48, hours, or even more. >> >> I want to know from people have run this command, How long did it run. >> Whats the size of your mdf file. How complex is your database. Does >> your Database have over 100 tables, Views. >> >> >> >> >> USE master >> >> DBCC CHECKDB ('mydatabase'') WITH ALL_ERRORMSGS >> >> ALTER DATABASE mydatabase SET emergency >> ALTER DATABASE mydatabase SET SINGLE_USER WITH ROLLBACK IMMEDIATE >> DBCC CheckDB ('mydatabase', REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS >> ALTER DATABASE mydatabase SET MULTI_USER > |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
i had Checkdb find and fix errors in a table just yesterday.
It took about 38 seconds to fix the errors in a 630MB database. |
|
![]() |
| Outils de la discussion | |
|
|