September 4, 2009 at 12:21 pm
i want to schedule a job with dbcc updateusage(dbname) then run the dbcc sqlperf (logspace) in the same job.
how to do this.any suggessions pls...
thanks.........
September 5, 2009 at 4:30 am
whats the problem in creating it?
for dbcc sqlperf(logspace) you may want to capture the results to a table... use dynamic query for this..
September 5, 2009 at 4:40 am
for the logspace part, the following code will write the results in a table which you can query later.
create table tblLogSize(dbname varchar(100),
logsize float,
used float,
status int
)
go
----------------------
create procedure LogSpace
as
dbcc sqlperf(logspace)
go
-----------------------
Create Procedure InsertIntoTable
as
truncate table tblLogSize
insert into tblLogSize exec LogSpace
go
-----------------------
exec InsertIntoTable
select * from tblLogSize
September 5, 2009 at 10:19 am
charipg (9/4/2009)
i want to schedule a job with dbcc updateusage(dbname) then run the dbcc sqlperf (logspace) in the same job.
Why? What's the purpose of UpdateUsage in there?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply