Hi,
I would like to know if running - dbcc checkdb - on a database makes any
modifications at all to the database. It is being recommended to me that it
is a good idea to take close all open connects (shutdown all applications
using the SQL server) and then run dbcc on a regular basis. I am not too
keen on having to shutdown all apps.
I understand you can provide additional parameter to have dbcc fix the
database but would to know if simply running dbcc checkdb causes any
changes. Also, can you limit how much processing power it uses during the
run?
Thank you in advance for your help.Running DBCC CHECKDB (or CHECKTABLE) doesn't change anything provided that
you do not run with REPAIR option.
There is no way to limit processing power that it uses.
The reason why it is better to run DBCC CHECKDB without any user connection
is to avoid spurious error reported sometimes.
Yih-Yoon Lee
On Wed, 24 Mar 2004 09:13:46 -0800, Dragon wrote:
> Hi,
> I would like to know if running - dbcc checkdb - on a database makes any
> modifications at all to the database. It is being recommended to me that i
t
> is a good idea to take close all open connects (shutdown all applications
> using the SQL server) and then run dbcc on a regular basis. I am not too
> keen on having to shutdown all apps.
> I understand you can provide additional parameter to have dbcc fix the
> database but would to know if simply running dbcc checkdb causes any
> changes. Also, can you limit how much processing power it uses during the
> run?
> Thank you in advance for your help.|||On the Enterprise version on a multi-proc box, the DBCC command may run in
parallel. You can prevent this using documented (in BOL) and supported trace
flag 2528 - thus limiting the processing power available for use.
You do not need to shut down all connections. Very rarely a spurious error
may be reported because of the log analysis involved in producing a
transactionally consistent view of the database for checking.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Yih-Yoon Lee" <yihyoon@.hotmail.com> wrote in message
news:1p0m87330awrs.1tyv2rue7pf8k.dlg@.40tude.net...
> Running DBCC CHECKDB (or CHECKTABLE) doesn't change anything provided that
> you do not run with REPAIR option.
> There is no way to limit processing power that it uses.
> The reason why it is better to run DBCC CHECKDB without any user
connection
> is to avoid spurious error reported sometimes.
> Yih-Yoon Lee
> On Wed, 24 Mar 2004 09:13:46 -0800, Dragon wrote:
>
any
it
applications
the|||Hi Dragon.
If you do use WITH REPAIR, just make sure you back up the database first.
This is always a good practise prior to performing any maintenance
functions. As long as the database is not huge, I'll often perform a backup
before and after using repair & potentially discard the first backup if no
errors were reported..
Regards,
Greg Linwood
SQL Server MVP
"Dragon" <NoSpam_Baadil@.hotmail.com> wrote in message
news:uXwBfNcEEHA.3568@.tk2msftngp13.phx.gbl...
> Hi,
> I would like to know if running - dbcc checkdb - on a database makes any
> modifications at all to the database. It is being recommended to me that
it
> is a good idea to take close all open connects (shutdown all applications
> using the SQL server) and then run dbcc on a regular basis. I am not too
> keen on having to shutdown all apps.
> I understand you can provide additional parameter to have dbcc fix the
> database but would to know if simply running dbcc checkdb causes any
> changes. Also, can you limit how much processing power it uses during the
> run?
> Thank you in advance for your help.
>|||Thank you for your reply.
Is it true that when running DBCC checkdb it locks the table it is working
on? If this is true, then it will kill my app and it is necessary for me to
shutdown apps first.
Thank you.
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:O6Mn2pdEEHA.4080@.TK2MSFTNGP09.phx.gbl...
> On the Enterprise version on a multi-proc box, the DBCC command may run in
> parallel. You can prevent this using documented (in BOL) and supported
trace
> flag 2528 - thus limiting the processing power available for use.
> You do not need to shut down all connections. Very rarely a spurious error
> may be reported because of the log analysis involved in producing a
> transactionally consistent view of the database for checking.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Yih-Yoon Lee" <yihyoon@.hotmail.com> wrote in message
> news:1p0m87330awrs.1tyv2rue7pf8k.dlg@.40tude.net...
that
> connection
> any
that
> it
> applications
too
> the
>|||Thank you Greg for your reply. :-)
I always make 'Before' and 'After' backups and keep 'em for at least a week.
"Greg Linwood" <g_linwoodQhotmail.com> wrote in message
news:u9gxrjeEEHA.3672@.TK2MSFTNGP09.phx.gbl...
> Hi Dragon.
> If you do use WITH REPAIR, just make sure you back up the database first.
> This is always a good practise prior to performing any maintenance
> functions. As long as the database is not huge, I'll often perform a
backup
> before and after using repair & potentially discard the first backup if no
> errors were reported..
> Regards,
> Greg Linwood
> SQL Server MVP
> "Dragon" <NoSpam_Baadil@.hotmail.com> wrote in message
> news:uXwBfNcEEHA.3568@.tk2msftngp13.phx.gbl...
any
> it
applications
the
>|||Hi Dragon.
It won't by default, but there's a WITH TABLOCK option which will acquire a
table lock if you use it. This is written up in Books Online..
Regards,
Greg Linwood
SQL Server MVP
"Dragon" <NoSpam_Baadil@.hotmail.com> wrote in message
news:u4382sfEEHA.624@.TK2MSFTNGP10.phx.gbl...
> Thank you for your reply.
> Is it true that when running DBCC checkdb it locks the table it is working
> on? If this is true, then it will kill my app and it is necessary for me
to
> shutdown apps first.
> Thank you.
> "Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
> news:O6Mn2pdEEHA.4080@.TK2MSFTNGP09.phx.gbl...
in
> trace
error
> rights.
> that
makes
> that
> too
the
during
>|||I was just stating the obvious.. (:
Regards,
Greg Linwood
SQL Server MVP
"Dragon" <NoSpam_Baadil@.hotmail.com> wrote in message
news:O5cqltfEEHA.1092@.TK2MSFTNGP12.phx.gbl...
> Thank you Greg for your reply. :-)
> I always make 'Before' and 'After' backups and keep 'em for at least a
week.
>
> "Greg Linwood" <g_linwoodQhotmail.com> wrote in message
> news:u9gxrjeEEHA.3672@.TK2MSFTNGP09.phx.gbl...
first.
> backup
no
> any
that
> applications
too
> the
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment