Wednesday, March 28, 2012
Maintenance Plan DBCC Functionality
when SQL re-organizes data and index pages, will data be able to be
inserted and read during these operations?
Thanks,
ben mMaint wiz uses DBCC DBREINDEX.
From memory, DBREINDEX will acquire shared table lock when rebuilding
non-clustered index. This will allow reads, but writes will be blocked.
Again, from memory, DBREINDEX will acquire exclusive table lock when
rebuilding clustered index- This will block both readers (unless code does
dirty reads) and writers.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Ben" <ben@.brainspout.com> wrote in message
news:O9Tb4hR5DHA.2732@.TK2MSFTNGP09.phx.gbl...
> When setting up a maintenance plan ,with the maintenance plan wizard,
> when SQL re-organizes data and index pages, will data be able to be
> inserted and read during these operations?
> Thanks,
> ben m
>|||Would it be possible to manually execute the DBCC REINDEX command with
an option not to lock writes?
This is a transaction processing box.
thanks again,
-Ben
Tibor Karaszi wrote:
> Maint wiz uses DBCC DBREINDEX.
> From memory, DBREINDEX will acquire shared table lock when rebuilding
> non-clustered index. This will allow reads, but writes will be blocked.
> Again, from memory, DBREINDEX will acquire exclusive table lock when
> rebuilding clustered index- This will block both readers (unless code does
> dirty reads) and writers.
>|||Nope, there's currently no such option for DBCC DBREINDEX, I'm afraid.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Ben" <ben@.brainspout.com> wrote in message news:ON8FIKa5DHA.1664@.TK2MSFTNGP11.phx.gbl...
> Would it be possible to manually execute the DBCC REINDEX command with
> an option not to lock writes?
> This is a transaction processing box.
> thanks again,
> -Ben
> Tibor Karaszi wrote:
> > Maint wiz uses DBCC DBREINDEX.
> >
> > From memory, DBREINDEX will acquire shared table lock when rebuilding
> > non-clustered index. This will allow reads, but writes will be blocked.
> > Again, from memory, DBREINDEX will acquire exclusive table lock when
> > rebuilding clustered index- This will block both readers (unless code does
> > dirty reads) and writers.
> >
>|||Do you know of any other maintenance tools that can be used, that will
allow writes to the table being modified?
Tibor Karaszi wrote:
> Nope, there's currently no such option for DBCC DBREINDEX, I'm afraid.
>|||It is not the client's decision whether to write at the same time as a rebuild is happening. It is
the server's decision. In SQK Server, all the methods to rebuilds an index, will in the end call the
same code (the code which is called when an index is created by CREATE INDEX), and this code uses
locks to protect against other modifications.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Ben" <ben@.brainspout.com> wrote in message news:%235k9sja5DHA.2764@.TK2MSFTNGP09.phx.gbl...
> Do you know of any other maintenance tools that can be used, that will
> allow writes to the table being modified?
> Tibor Karaszi wrote:
> > Nope, there's currently no such option for DBCC DBREINDEX, I'm afraid.
> >
>|||See my reply to your previous post... checkout the whitepaper below that
gives you full details on this problem.
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/sql/maintain/optimize/ss2kidbp.asp
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ben" <ben@.brainspout.com> wrote in message
news:#5k9sja5DHA.2764@.TK2MSFTNGP09.phx.gbl...
> Do you know of any other maintenance tools that can be used, that will
> allow writes to the table being modified?
> Tibor Karaszi wrote:
> > Nope, there's currently no such option for DBCC DBREINDEX, I'm afraid.
> >
>|||Also, you might want to check out DBCC INDEXDEFRAG in case you haven't already. I do recommend
reading the document that Paul posted. Good stuff.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
news:u$Sut4a5DHA.2064@.TK2MSFTNGP11.phx.gbl...
> It is not the client's decision whether to write at the same time as a rebuild is happening. It is
> the server's decision. In SQK Server, all the methods to rebuilds an index, will in the end call
the
> same code (the code which is called when an index is created by CREATE INDEX), and this code uses
> locks to protect against other modifications.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "Ben" <ben@.brainspout.com> wrote in message news:%235k9sja5DHA.2764@.TK2MSFTNGP09.phx.gbl...
> > Do you know of any other maintenance tools that can be used, that will
> > allow writes to the table being modified?
> > Tibor Karaszi wrote:
> > > Nope, there's currently no such option for DBCC DBREINDEX, I'm afraid.
> > >
> >
>
Maintenance Plan DBCC Functionality
when SQL re-organizes data and index pages, will data be able to be
inserted and read during these operations?
Thanks,
ben mMaint wiz uses DBCC DBREINDEX.
From memory, DBREINDEX will acquire shared table lock when rebuilding
non-clustered index. This will allow reads, but writes will be blocked.
Again, from memory, DBREINDEX will acquire exclusive table lock when
rebuilding clustered index- This will block both readers (unless code does
dirty reads) and writers.
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=...ublic.sqlserver
"Ben" <ben@.brainspout.com> wrote in message
news:O9Tb4hR5DHA.2732@.TK2MSFTNGP09.phx.gbl...
quote:|||Would it be possible to manually execute the DBCC REINDEX command with
> When setting up a maintenance plan ,with the maintenance plan wizard,
> when SQL re-organizes data and index pages, will data be able to be
> inserted and read during these operations?
> Thanks,
> ben m
>
an option not to lock writes?
This is a transaction processing box.
thanks again,
-Ben
Tibor Karaszi wrote:
quote:|||Nope, there's currently no such option for DBCC DBREINDEX, I'm afraid.
> Maint wiz uses DBCC DBREINDEX.
> From memory, DBREINDEX will acquire shared table lock when rebuilding
> non-clustered index. This will allow reads, but writes will be blocked.
> Again, from memory, DBREINDEX will acquire exclusive table lock when
> rebuilding clustered index- This will block both readers (unless code does
> dirty reads) and writers.
>
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ls
erver
"Ben" <ben@.brainspout.com> wrote in message news:ON8FIKa5DHA.1664@.TK2MSFTNGP11.phx.gbl...
quote:|||Do you know of any other maintenance tools that can be used, that will
[c
olor=darkred]
> Would it be possible to manually execute the DBCC REINDEX command with
> an option not to lock writes?
> This is a transaction processing box.
> thanks again,
> -Ben
> Tibor Karaszi wrote:
>
>[/color]
allow writes to the table being modified?
Tibor Karaszi wrote:
quote:|||It is not the client's decision whether to write at the same time as a rebui
> Nope, there's currently no such option for DBCC DBREINDEX, I'm afraid.
>
ld is happening. It is
the server's decision. In SQK Server, all the methods to rebuilds an index,
will in the end call the
same code (the code which is called when an index is created by CREATE INDEX
), and this code uses
locks to protect against other modifications.
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ls
erver
"Ben" <ben@.brainspout.com> wrote in message news:%235k9sja5DHA.2764@.TK2MSFTNGP09.phx.gbl...
quote:|||See my reply to your previous post... checkout the whitepaper below that
> Do you know of any other maintenance tools that can be used, that will
> allow writes to the table being modified?
> Tibor Karaszi wrote:
>
gives you full details on this problem.
http://www.microsoft.com/technet/tr...ze/ss2kidbp.asp
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ben" <ben@.brainspout.com> wrote in message
news:#5k9sja5DHA.2764@.TK2MSFTNGP09.phx.gbl...
quote:|||Also, you might want to check out DBCC INDEXDEFRAG in case you haven't alrea
> Do you know of any other maintenance tools that can be used, that will
> allow writes to the table being modified?
> Tibor Karaszi wrote:
>
dy. I do recommend
reading the document that Paul posted. Good stuff.
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ls
erver
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message
news:u$Sut4a5DHA.2064@.TK2MSFTNGP11.phx.gbl...
quote:
> It is not the client's decision whether to write at the same time as a reb
uild is happening. It is
> the server's decision. In SQK Server, all the methods to rebuilds an index, will in the en
d call
the
quote:
> same code (the code which is called when an index is created by CREATE IND
EX), and this code uses
> locks to protect against other modifications.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at: http://groups.google.com/groups?oi=...
lserver
>
> "Ben" <ben@.brainspout.com> wrote in message news:%235k9sja5DHA.2764@.TK2MSF
TNGP09.phx.gbl...
>
Wednesday, March 21, 2012
Maintenance
Before doing a backup of our databases I would like to execute a DBCC
checkdb command. Is this enough for a daily maintenance plan?
Is there a white paper for the daily maintenance of a MSS database?
Thank you in advance.You can the maintenance plan wizard to do this for you buy doing an
integrity check periodically and check the "perform these checks before
doing backups" box.
--
Nik Marshall-Blank MCSD/MCDBA
Linz, Austria
"Praetorian Guard" <praetorian@.gatekeeper.com> wrote in message
news:OCzkILMyFHA.3312@.TK2MSFTNGP09.phx.gbl...
> Hi NG,
> Before doing a backup of our databases I would like to execute a DBCC
> checkdb command. Is this enough for a daily maintenance plan?
> Is there a white paper for the daily maintenance of a MSS database?
> Thank you in advance.
>|||The SQL Server 2000 Operations Guide has a System
Administration section which covers recommended daily,
weekly, monthly tasks.
http://www.microsoft.com/TechNet/prodtechnol/sql/2000/maintain/sqlops0.mspx
-Sue
On Tue, 4 Oct 2005 17:05:33 +0800, "Praetorian Guard"
<praetorian@.gatekeeper.com> wrote:
>Hi NG,
>Before doing a backup of our databases I would like to execute a DBCC
>checkdb command. Is this enough for a daily maintenance plan?
>Is there a white paper for the daily maintenance of a MSS database?
>Thank you in advance.
>|||... and also read http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:dkq4k1pleke9o2gs97fiqjcu17l3edvja0@.4ax.com...
> The SQL Server 2000 Operations Guide has a System
> Administration section which covers recommended daily,
> weekly, monthly tasks.
> http://www.microsoft.com/TechNet/prodtechnol/sql/2000/maintain/sqlops0.mspx
> -Sue
> On Tue, 4 Oct 2005 17:05:33 +0800, "Praetorian Guard"
> <praetorian@.gatekeeper.com> wrote:
>>Hi NG,
>>Before doing a backup of our databases I would like to execute a DBCC
>>checkdb command. Is this enough for a daily maintenance plan?
>>Is there a white paper for the daily maintenance of a MSS database?
>>Thank you in advance.
>|||Thanks guys!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OmtFvuOyFHA.2500@.TK2MSFTNGP10.phx.gbl...
> ... and also read
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
> news:dkq4k1pleke9o2gs97fiqjcu17l3edvja0@.4ax.com...
> > The SQL Server 2000 Operations Guide has a System
> > Administration section which covers recommended daily,
> > weekly, monthly tasks.
> >
http://www.microsoft.com/TechNet/prodtechnol/sql/2000/maintain/sqlops0.mspx
> >
> > -Sue
> >
> > On Tue, 4 Oct 2005 17:05:33 +0800, "Praetorian Guard"
> > <praetorian@.gatekeeper.com> wrote:
> >
> >>Hi NG,
> >>
> >>Before doing a backup of our databases I would like to execute a DBCC
> >>checkdb command. Is this enough for a daily maintenance plan?
> >>
> >>Is there a white paper for the daily maintenance of a MSS database?
> >>
> >>Thank you in advance.
> >>
> >
>
maintenanace
we have a sqlserver 2000 server which is 24*7 running .we have to do dbcc
maintenanace but our management is not accepting for that.
Luckly in sql2005 there is a new feature called mirroring.is it possible to
do dbcc maintenance in mirroring if so what is the plan..
Please be advised
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200705/1Hi
"pardhiveswar via SQLMonster.com" wrote:
> Hi,
> we have a sqlserver 2000 server which is 24*7 running .we have to do dbcc
> maintenanace but our management is not accepting for that.
I assume that you mean DBCC DBREINDEX which is an offline operation?
>
> Luckly in sql2005 there is a new feature called mirroring.is it possible to
> do dbcc maintenance in mirroring if so what is the plan..
Mirroring will create a copy of your database, it will not help to maintain
the indexes, but it is a means of reducing planned/unplanned downtime
especially if you are not using hardware clustering. Features such as online
index rebuilds and partitioning should help to reduce the impact of your
maintenance operations.
Check out
http://www.microsoft.com/technet/prodtechnol/sql/2005/onlineindex.mspx
http://www.microsoft.com/technet/prodtechnol/sql/2005/spdw.mspx
> Please be advised
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200705/1
>
John|||"pardhiveswar via SQLMonster.com" <u8956@.uwe> wrote in message
news:71b635c0e76f4@.uwe...
> Hi,
> we have a sqlserver 2000 server which is 24*7 running .we have to do dbcc
> maintenanace but our management is not accepting for that.
>
What do you need to do specifically. Sometimes there are other options.
> Luckly in sql2005 there is a new feature called mirroring.is it possible
> to
> do dbcc maintenance in mirroring if so what is the plan..
No, I don't think this will work.
But the row-versioning features may help you if you're looking at rebuilding
indices.
> Please be advised
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200705/1
>
--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html|||Basically our database is about 100 GB and 24*7 is up and running.as a dba we
need to do some maint activity like dbcc inddedfrag or rebuild indes that are
out dataed.since our database is so big indexdefrag also starts blocking just
like rebuild.and more over this server acts as subscriber (replication)
so i am guessing does mirroring allows to do maintenance(reindexing)with all
the above mentioned points in 2005 ?
Greg D. Moore (Strider) wrote:
>> Hi,
>> we have a sqlserver 2000 server which is 24*7 running .we have to do dbcc
>> maintenanace but our management is not accepting for that.
>What do you need to do specifically. Sometimes there are other options.
>> Luckly in sql2005 there is a new feature called mirroring.is it possible
>> to
>> do dbcc maintenance in mirroring if so what is the plan..
>No, I don't think this will work.
>But the row-versioning features may help you if you're looking at rebuilding
>indices.
>> Please be advised
>
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200705/1|||"pardhiveswar via SQLMonster.com" wrote:
> Basically our database is about 100 GB and 24*7 is up and running.as a dba we
> need to do some maint activity like dbcc inddedfrag or rebuild indes that are
> out dataed.since our database is so big indexdefrag also starts blocking just
> like rebuild.and more over this server acts as subscriber (replication)
> so i am guessing does mirroring allows to do maintenance(reindexing)with all
> the above mentioned points in 2005 ?
No, it will give you a copy that can be used in case of failover to maintain
availability see the links I posted in my previous reply and also
http://msdn2.microsoft.com/en-us/library/ms190202.aspx
http://msdn2.microsoft.com/en-us/library/ms177412.aspx
John|||ok thanks
John Bell wrote:
>> Basically our database is about 100 GB and 24*7 is up and running.as a dba we
>> need to do some maint activity like dbcc inddedfrag or rebuild indes that are
>[quoted text clipped - 3 lines]
>> so i am guessing does mirroring allows to do maintenance(reindexing)with all
>> the above mentioned points in 2005 ?
>No, it will give you a copy that can be used in case of failover to maintain
>availability see the links I posted in my previous reply and also
>http://msdn2.microsoft.com/en-us/library/ms190202.aspx
>http://msdn2.microsoft.com/en-us/library/ms177412.aspx
>John
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200705/1
Maintance Plan dbcc checkdb
When I exectue the maintance plan dbcc checkdb it doesn't do anything because it takes 1 second to do de check. Doesn't appers any error.
When I execute the command in the query analizer it takes 2 hours to do the check.
Can you help me?
Thanks,
Marta Masnou
I advice you to forget black box named "maintance plan" and develop your own maintance job. Why? Becouse, in this case you can control all processes which coded by yourself. And catch all necessary information.
For example
Code Snippet
use db_namecreate table #result
(
field1,
field2
...
...
)
insert #result exec ('dbcc checkdb with tableresults')
if (select count(*) from #result where status <> 0) > 0
begin
exec master..xp_cmdshell 'net send you_computer "ahtung: db_name is corrupt. Rerun CheckDB"'
end
So, as you can see, if some errors detected, you immediately will receive message.|||Hi,
thanks a lot Alexandr.
Now the job works correctly.
See you soon.
Marta
sql