Friday, March 23, 2012

it is save to reindex table system ?

Hi friends,
Is it save to reindex (dbcc reindex) table system in db
master, msdb, model ?
Can we truncate datafile & log in tempdb ?
How to determine size of db in tempdb ?
Please advice.
Thanks.> Is it save to reindex (dbcc reindex) table system in db
> master, msdb, model ?
I wouldn't recommend this unless you have a very good backup in place. Why
do you think you need to reindex these tables?
> Can we truncate datafile & log in tempdb ?
Sure, see http://www.aspfaq.com/2446
> How to determine size of db in tempdb ?
Using Query Analyzer:
USE tempdb
GO
EXEC sp_spaceused|||Not only that but DBCC DBREINDEX does not allow system tables to be
reindexed (in SQL Server 2000)
--
Paul Randal
DBCC Technical Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message
news:e1bDwGooDHA.1096@.TK2MSFTNGP11.phx.gbl...
> > Is it save to reindex (dbcc reindex) table system in db
> > master, msdb, model ?
> I wouldn't recommend this unless you have a very good backup in place.
Why
> do you think you need to reindex these tables?
> > Can we truncate datafile & log in tempdb ?
> Sure, see http://www.aspfaq.com/2446
> > How to determine size of db in tempdb ?
> Using Query Analyzer:
> USE tempdb
> GO
> EXEC sp_spaceused
>|||But I found , they are fragmented, this is one of them in
master db:
DBCC SHOWCONTIG scanning 'sysaltfiles' table...
Table: 'sysaltfiles' (94); index ID: 1, database ID: 1
TABLE level scan performed.
- Pages Scanned........................: 8
- Extents Scanned.......................: 5
- Extent Switches.......................: 4
- Avg. Pages per Extent..................: 1.6
- Scan Density [Best Count:Actual Count]......: 20.00%
[1:5]
- Logical Scan Fragmentation ..............: 25.00%
- Extent Scan Fragmentation ...............: 80.00%
- Avg. Bytes Free per Page................: 4760.0
- Avg. Page Density (full)................: 41.19%
If we cannot use reindex (dbcc reindex), can we defrag it
with dbcc defrag ? or just leave it as it is.
Thanks.
>--Original Message--
>Not only that but DBCC DBREINDEX does not allow system
tables to be
>reindexed (in SQL Server 2000)
>--
>Paul Randal
>DBCC Technical Lead, Microsoft SQL Server Storage Engine
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in
message
>news:e1bDwGooDHA.1096@.TK2MSFTNGP11.phx.gbl...
>> > Is it save to reindex (dbcc reindex) table system in
db
>> > master, msdb, model ?
>> I wouldn't recommend this unless you have a very good
backup in place.
>Why
>> do you think you need to reindex these tables?
>> > Can we truncate datafile & log in tempdb ?
>> Sure, see http://www.aspfaq.com/2446
>> > How to determine size of db in tempdb ?
>> Using Query Analyzer:
>> USE tempdb
>> GO
>> EXEC sp_spaceused
>>
>
>.
>|||There are only 8 pages in this table. You shouldn't worry about
fragmentation until you get several dozen pages at least.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"kresna rudy kurniawan" <anonymous@.discussions.microsoft.com> wrote in
message news:096c01c3a28a$d412bc10$a401280a@.phx.gbl...
> But I found , they are fragmented, this is one of them in
> master db:
> DBCC SHOWCONTIG scanning 'sysaltfiles' table...
> Table: 'sysaltfiles' (94); index ID: 1, database ID: 1
> TABLE level scan performed.
> - Pages Scanned........................: 8
> - Extents Scanned.......................: 5
> - Extent Switches.......................: 4
> - Avg. Pages per Extent..................: 1.6
> - Scan Density [Best Count:Actual Count]......: 20.00%
> [1:5]
> - Logical Scan Fragmentation ..............: 25.00%
> - Extent Scan Fragmentation ...............: 80.00%
> - Avg. Bytes Free per Page................: 4760.0
> - Avg. Page Density (full)................: 41.19%
> If we cannot use reindex (dbcc reindex), can we defrag it
> with dbcc defrag ? or just leave it as it is.
> Thanks.
>
> >--Original Message--
> >Not only that but DBCC DBREINDEX does not allow system
> tables to be
> >reindexed (in SQL Server 2000)
> >
> >--
> >Paul Randal
> >DBCC Technical Lead, Microsoft SQL Server Storage Engine
> >
> >This posting is provided "AS IS" with no warranties, and
> confers no rights.
> >
> >"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in
> message
> >news:e1bDwGooDHA.1096@.TK2MSFTNGP11.phx.gbl...
> >> > Is it save to reindex (dbcc reindex) table system in
> db
> >> > master, msdb, model ?
> >>
> >> I wouldn't recommend this unless you have a very good
> backup in place.
> >Why
> >> do you think you need to reindex these tables?
> >>
> >> > Can we truncate datafile & log in tempdb ?
> >>
> >> Sure, see http://www.aspfaq.com/2446
> >>
> >> > How to determine size of db in tempdb ?
> >>
> >> Using Query Analyzer:
> >>
> >> USE tempdb
> >> GO
> >> EXEC sp_spaceused
> >>
> >>
> >
> >
> >.
> >sql

No comments:

Post a Comment