Showing posts with label newbie. Show all posts
Showing posts with label newbie. Show all posts

Monday, March 19, 2012

Defragging SQL Tables

Guys
Firstly I know exceptionally little about SQL so apologies for the newbie
question.
We run SQL 2K at work on a w2k MP box. I'm not charged with looking after
the apps, our MIS team are. We look after the infrastructure. Their users
have complained that the box is slow and after we've carried out numerous
tests to and from the box we've established the fault lies some where at the
app layer on the server.
Our MIS guys have taken to taking the box offline on Saturdays mornings and
stopping all the SQL services and running MS defrag as they believe it will
defrag the tables. I some how don't believe this will help as I thought you
needed to compact the databases/tables inside enterprise manager to get any
redundancy removed from the tables/db's
Can some one please let me know what is the correct way to defrag a SQL db
and if possible follow it up with some MSKB links as evidence
Thanks in advance
Steve
--
If all you have is an axe, every problem looks like hours of fun.Steve,
See:
Microsoft SQL Server 2000 Index Defragmentations Best Practices
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
HTH
Jerry
"Steve Ray" <nochace@.all.com> wrote in message
news:gJR4f.2598$WI4.199@.newsfe4-gui.ntli.net...
> Guys
> Firstly I know exceptionally little about SQL so apologies for the newbie
> question.
> We run SQL 2K at work on a w2k MP box. I'm not charged with looking after
> the apps, our MIS team are. We look after the infrastructure. Their users
> have complained that the box is slow and after we've carried out numerous
> tests to and from the box we've established the fault lies some where at
> the app layer on the server.
> Our MIS guys have taken to taking the box offline on Saturdays mornings
> and stopping all the SQL services and running MS defrag as they believe it
> will defrag the tables. I some how don't believe this will help as I
> thought you needed to compact the databases/tables inside enterprise
> manager to get any redundancy removed from the tables/db's
> Can some one please let me know what is the correct way to defrag a SQL db
> and if possible follow it up with some MSKB links as evidence
> Thanks in advance
> Steve
> --
> If all you have is an axe, every problem looks like hours of fun.
>|||Lookup DBCC INDEXDEFRAG in BOL
DBCC INDEXDEFRAG (DBNAME, TABLENAME, INDEXNAME)
http://sqlservercode.blogspot.com/
"Steve Ray" wrote:
> Guys
> Firstly I know exceptionally little about SQL so apologies for the newbie
> question.
> We run SQL 2K at work on a w2k MP box. I'm not charged with looking after
> the apps, our MIS team are. We look after the infrastructure. Their users
> have complained that the box is slow and after we've carried out numerous
> tests to and from the box we've established the fault lies some where at the
> app layer on the server.
> Our MIS guys have taken to taking the box offline on Saturdays mornings and
> stopping all the SQL services and running MS defrag as they believe it will
> defrag the tables. I some how don't believe this will help as I thought you
> needed to compact the databases/tables inside enterprise manager to get any
> redundancy removed from the tables/db's
> Can some one please let me know what is the correct way to defrag a SQL db
> and if possible follow it up with some MSKB links as evidence
> Thanks in advance
> Steve
> --
> If all you have is an axe, every problem looks like hours of fun.
>
>|||... and just in case they do periodic shrink of database files:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Steve Ray" <nochace@.all.com> wrote in message news:gJR4f.2598$WI4.199@.newsfe4-gui.ntli.net...
> Guys
> Firstly I know exceptionally little about SQL so apologies for the newbie
> question.
> We run SQL 2K at work on a w2k MP box. I'm not charged with looking after
> the apps, our MIS team are. We look after the infrastructure. Their users
> have complained that the box is slow and after we've carried out numerous
> tests to and from the box we've established the fault lies some where at the
> app layer on the server.
> Our MIS guys have taken to taking the box offline on Saturdays mornings and
> stopping all the SQL services and running MS defrag as they believe it will
> defrag the tables. I some how don't believe this will help as I thought you
> needed to compact the databases/tables inside enterprise manager to get any
> redundancy removed from the tables/db's
> Can some one please let me know what is the correct way to defrag a SQL db
> and if possible follow it up with some MSKB links as evidence
> Thanks in advance
> Steve
> --
> If all you have is an axe, every problem looks like hours of fun.
>

Sunday, March 11, 2012

Defrag Indexes

Sorry for the newbie question but can't seem to find a clear anwser...
Is there a command in SQL 2000 to Defrag all Indexes?
ThanksYes! - Look at the DBCC INDEXDEFRAG command in BOL.
Immy
"M Swancott" <swancott@.metrocast.net> wrote in message
news:OSP6VeHtFHA.2912@.TK2MSFTNGP09.phx.gbl...
> Sorry for the newbie question but can't seem to find a clear anwser...
> Is there a command in SQL 2000 to Defrag all Indexes?
> Thanks
>|||You probably don't need to defrag all your indexes. Read the MS whitepaper
below for more details about fragmentation and when/how to remove it.
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
Thanks
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Imtiaz Ullah" <imtiaz_ullah@.hotmail.com> wrote in message
news:uf5Z7gHtFHA.3604@.tk2msftngp13.phx.gbl...
> Yes! - Look at the DBCC INDEXDEFRAG command in BOL.
> Immy
> "M Swancott" <swancott@.metrocast.net> wrote in message
> news:OSP6VeHtFHA.2912@.TK2MSFTNGP09.phx.gbl...
>> Sorry for the newbie question but can't seem to find a clear anwser...
>> Is there a command in SQL 2000 to Defrag all Indexes?
>> Thanks
>>
>

Defrag Indexes

Sorry for the newbie question but can't seem to find a clear anwser...
Is there a command in SQL 2000 to Defrag all Indexes?
Thanks
Yes! - Look at the DBCC INDEXDEFRAG command in BOL.
Immy
"M Swancott" <swancott@.metrocast.net> wrote in message
news:OSP6VeHtFHA.2912@.TK2MSFTNGP09.phx.gbl...
> Sorry for the newbie question but can't seem to find a clear anwser...
> Is there a command in SQL 2000 to Defrag all Indexes?
> Thanks
>
|||You probably don't need to defrag all your indexes. Read the MS whitepaper
below for more details about fragmentation and when/how to remove it.
http://www.microsoft.com/technet/pro.../ss2kidbp.mspx
Thanks
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Imtiaz Ullah" <imtiaz_ullah@.hotmail.com> wrote in message
news:uf5Z7gHtFHA.3604@.tk2msftngp13.phx.gbl...
> Yes! - Look at the DBCC INDEXDEFRAG command in BOL.
> Immy
> "M Swancott" <swancott@.metrocast.net> wrote in message
> news:OSP6VeHtFHA.2912@.TK2MSFTNGP09.phx.gbl...
>

Defrag Indexes

Sorry for the newbie question but can't seem to find a clear anwser...
Is there a command in SQL 2000 to Defrag all Indexes?
ThanksYes! - Look at the DBCC INDEXDEFRAG command in BOL.
Immy
"M Swancott" <swancott@.metrocast.net> wrote in message
news:OSP6VeHtFHA.2912@.TK2MSFTNGP09.phx.gbl...
> Sorry for the newbie question but can't seem to find a clear anwser...
> Is there a command in SQL 2000 to Defrag all Indexes?
> Thanks
>|||You probably don't need to defrag all your indexes. Read the MS whitepaper
below for more details about fragmentation and when/how to remove it.
http://www.microsoft.com/technet/pr...n/ss2kidbp.mspx
Thanks
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Imtiaz Ullah" <imtiaz_ullah@.hotmail.com> wrote in message
news:uf5Z7gHtFHA.3604@.tk2msftngp13.phx.gbl...
> Yes! - Look at the DBCC INDEXDEFRAG command in BOL.
> Immy
> "M Swancott" <swancott@.metrocast.net> wrote in message
> news:OSP6VeHtFHA.2912@.TK2MSFTNGP09.phx.gbl...
>