I am trying to write a single query that will go out a collect all the
DBCC SHOWFILESTATS. The trick is that the query has to attach to the
remote server, then run the DBCC SHOWFILESTATS, and pull that
information back.
e.g. use servername2.master DBCC SHOWFILESTATS
This obviouly does not work even with the linked server option. Is
there another way to do this? I know you can use a select statement and
a linked server connection to query remote databases.you could create a procedure like this then call the proc on the server
create proc prShowFileStats
as
set nocount on
create table #SHOWFILESTATS (FileID int,
FileGroup int,
TotalExtents int,
UsedExtents int,
Name varchar(100),
FileName varchar(100))
insert into #SHOWFILESTATS
exec ('DBCC SHOWFILESTATS')
select * from #SHOWFILESTATS
set nocount off
http://sqlservercode.blogspot.com/
Showing posts with label dbcc. Show all posts
Showing posts with label dbcc. Show all posts
Friday, March 30, 2012
Monday, March 12, 2012
Is it ok to run DBCC Checkdb on msdb and master?
Will I encounter any issues running DBCC CHECKDB on either msdb or master?
Thanks!
I just wouldn't recommend using any of the [REPAIR_...] options.
It is a good idea to do so before a backup to have confidence that the backup is ok. (About the backup if there is a problem - and alert the DBA.
Friday, March 9, 2012
Is it better to run maintenance sequentially or pralell
we have a maintenance process which does various dbcc maintenance tasks such
as dbreindex, indexdefrag and updateusage. This process can take over 4
hours for some of the databases.
Is there any drawback to running these maintenance processes parallel on all
databases or is it better to run them sequentially?
Hi
There is no issue with running them in parallel, but, can your disk
subsystem keep up? These taks are very IO intensive.
If they run in parallel, the sum of all the jobs might decrease, but each
individual job will take longer to complete.
Regards
Mike
"DBA72" wrote:
> we have a maintenance process which does various dbcc maintenance tasks such
> as dbreindex, indexdefrag and updateusage. This process can take over 4
> hours for some of the databases.
> Is there any drawback to running these maintenance processes parallel on all
> databases or is it better to run them sequentially?
as dbreindex, indexdefrag and updateusage. This process can take over 4
hours for some of the databases.
Is there any drawback to running these maintenance processes parallel on all
databases or is it better to run them sequentially?
Hi
There is no issue with running them in parallel, but, can your disk
subsystem keep up? These taks are very IO intensive.
If they run in parallel, the sum of all the jobs might decrease, but each
individual job will take longer to complete.
Regards
Mike
"DBA72" wrote:
> we have a maintenance process which does various dbcc maintenance tasks such
> as dbreindex, indexdefrag and updateusage. This process can take over 4
> hours for some of the databases.
> Is there any drawback to running these maintenance processes parallel on all
> databases or is it better to run them sequentially?
Labels:
database,
dbcc,
dbreindex,
indexdefrag,
maintenance,
microsoft,
mysql,
oracle,
pralell,
process,
run,
sequentially,
server,
sql,
suchas,
tasks,
updateusage,
various
Is it better to run maintenance sequentially or pralell
we have a maintenance process which does various dbcc maintenance tasks such
as dbreindex, indexdefrag and updateusage. This process can take over 4
hours for some of the databases.
Is there any drawback to running these maintenance processes parallel on all
databases or is it better to run them sequentially?Hi
There is no issue with running them in parallel, but, can your disk
subsystem keep up? These taks are very IO intensive.
If they run in parallel, the sum of all the jobs might decrease, but each
individual job will take longer to complete.
Regards
Mike
"DBA72" wrote:
> we have a maintenance process which does various dbcc maintenance tasks su
ch
> as dbreindex, indexdefrag and updateusage. This process can take over 4
> hours for some of the databases.
> Is there any drawback to running these maintenance processes parallel on a
ll
> databases or is it better to run them sequentially?
as dbreindex, indexdefrag and updateusage. This process can take over 4
hours for some of the databases.
Is there any drawback to running these maintenance processes parallel on all
databases or is it better to run them sequentially?Hi
There is no issue with running them in parallel, but, can your disk
subsystem keep up? These taks are very IO intensive.
If they run in parallel, the sum of all the jobs might decrease, but each
individual job will take longer to complete.
Regards
Mike
"DBA72" wrote:
> we have a maintenance process which does various dbcc maintenance tasks su
ch
> as dbreindex, indexdefrag and updateusage. This process can take over 4
> hours for some of the databases.
> Is there any drawback to running these maintenance processes parallel on a
ll
> databases or is it better to run them sequentially?
Labels:
database,
dbcc,
dbreindex,
indexdefrag,
maintenance,
microsoft,
mysql,
oracle,
pralell,
process,
run,
sequentially,
server,
sql,
suchas,
tasks,
updateusage,
various
Is it better to run maintenance sequentially or pralell
we have a maintenance process which does various dbcc maintenance tasks such
as dbreindex, indexdefrag and updateusage. This process can take over 4
hours for some of the databases.
Is there any drawback to running these maintenance processes parallel on all
databases or is it better to run them sequentially?Hi
There is no issue with running them in parallel, but, can your disk
subsystem keep up? These taks are very IO intensive.
If they run in parallel, the sum of all the jobs might decrease, but each
individual job will take longer to complete.
Regards
Mike
"DBA72" wrote:
> we have a maintenance process which does various dbcc maintenance tasks such
> as dbreindex, indexdefrag and updateusage. This process can take over 4
> hours for some of the databases.
> Is there any drawback to running these maintenance processes parallel on all
> databases or is it better to run them sequentially?
as dbreindex, indexdefrag and updateusage. This process can take over 4
hours for some of the databases.
Is there any drawback to running these maintenance processes parallel on all
databases or is it better to run them sequentially?Hi
There is no issue with running them in parallel, but, can your disk
subsystem keep up? These taks are very IO intensive.
If they run in parallel, the sum of all the jobs might decrease, but each
individual job will take longer to complete.
Regards
Mike
"DBA72" wrote:
> we have a maintenance process which does various dbcc maintenance tasks such
> as dbreindex, indexdefrag and updateusage. This process can take over 4
> hours for some of the databases.
> Is there any drawback to running these maintenance processes parallel on all
> databases or is it better to run them sequentially?
Labels:
database,
dbcc,
dbreindex,
indexdefrag,
maintenance,
microsoft,
mysql,
oracle,
pralell,
process,
run,
sequentially,
server,
sql,
tasks,
updateusage,
various
Friday, February 24, 2012
Is DBCC shrinkfile faster then the EM equivalent ?
Using SQL 2000 and wanted to know if DBCC shrinkfile executed from QA is
faster than doing the equivalent through Enterprise Manager by selecting the
file and selecting shrink file to <size>
Thank youIts exactly the same code.
--
Paul Randal
DBCC Technical Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:#LuLYI#VDHA.1832@.TK2MSFTNGP09.phx.gbl...
> Using SQL 2000 and wanted to know if DBCC shrinkfile executed from QA is
> faster than doing the equivalent through Enterprise Manager by selecting
the
> file and selecting shrink file to <size>
> Thank you
>
faster than doing the equivalent through Enterprise Manager by selecting the
file and selecting shrink file to <size>
Thank youIts exactly the same code.
--
Paul Randal
DBCC Technical Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:#LuLYI#VDHA.1832@.TK2MSFTNGP09.phx.gbl...
> Using SQL 2000 and wanted to know if DBCC shrinkfile executed from QA is
> faster than doing the equivalent through Enterprise Manager by selecting
the
> file and selecting shrink file to <size>
> Thank you
>
Labels:
database,
dbcc,
enterprise,
equivalent,
executed,
manager,
microsoft,
mysql,
oracle,
selecting,
server,
shrinkfile,
sql
Is DBCC DBReindex minimally logged operation?
Hi gurus,
Does anyone know whether DBCC DBReindex is a minimally logged operation or
fully logged operation?
Thanks,
Jeff" fully logged "
--
"Jeffrey Yao" wrote:
> Hi gurus,
> Does anyone know whether DBCC DBReindex is a minimally logged operation or
> fully logged operation?
> Thanks,
> Jeff
>
>|||It is minimally logged when the database is in simple or bulk logged recover
y mode.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jeffrey Yao" <jxhyao1@.shaw.ca> wrote in message news:%235UKdhHqFHA.1556@.TK2MSFTNGP12.phx.g
bl...
> Hi gurus,
> Does anyone know whether DBCC DBReindex is a minimally logged operation or
> fully logged operation?
> Thanks,
> Jeff
>
Does anyone know whether DBCC DBReindex is a minimally logged operation or
fully logged operation?
Thanks,
Jeff" fully logged "
--
"Jeffrey Yao" wrote:
> Hi gurus,
> Does anyone know whether DBCC DBReindex is a minimally logged operation or
> fully logged operation?
> Thanks,
> Jeff
>
>|||It is minimally logged when the database is in simple or bulk logged recover
y mode.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jeffrey Yao" <jxhyao1@.shaw.ca> wrote in message news:%235UKdhHqFHA.1556@.TK2MSFTNGP12.phx.g
bl...
> Hi gurus,
> Does anyone know whether DBCC DBReindex is a minimally logged operation or
> fully logged operation?
> Thanks,
> Jeff
>
Subscribe to:
Posts (Atom)