Advertisement

07.02.2008 at 02:19PM PDT, ID: 23535174
[x]
Attachment Details

SQL Server 2000 + Transaction log out of control + urgent

Asked by robbhill in MS SQL Server

Recently our transaction logs have been growing out of control at the same time every day on Sunday.  There is a job that runs at the exact same time this happens...which has always run though....but that seems to be the only rhyme or reason we can come up with as to why its growing so large.  The job runs some update commands...which causes and update trigger on one table in the database to kick off...the the job also runs a stored procedure.  
Does anyone have any suggestions on why this might all of a sudden be happening and maybe a betteer way to prevent it.
I have pasted the stored procedure in the snippet below as it seems to have the most beef.  If anyone needs to see the trigger or the other event in the job I can post those later or any other relevent information one might need to help me with this issue.  This is a major problem though as it is maxing out this servers capacity.

Thank you!!Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
/****** Object:  Stored Procedure dbo.sp_CH1GradeType    Script Date: 4/21/00 12:54:30 PM ******/
CREATE  Procedure sp_CH1GradeType
 
As
	declare tempcur cursor for 
	select s.objid
	,coalesce(cs.x_6_enrollment, 0) as x_6_enrollment
	,coalesce(cs.x_7_enrollment, 0) as x_7_enrollment
	,coalesce(cs.x_8_enrollment, 0) as x_8_enrollment
	,coalesce(cs.x_9_enrollment, 0) as x_9_enrollment
	,coalesce(cs.x_10_enrollment, 0) as x_10_enrollment
	,coalesce(cs.x_11_enrollment, 0) as x_11_enrollment
	,coalesce(cs.x_12_enrollment, 0) as x_12_enrollment
	from table_site s join table_conv_site cs on cs.conv_site2site = s.objid
	where (x_grade_type is null or x_grade_type = '')
	and x_network = 'CH1' and status = 0
	for read only
 
open tempcur
declare @M int
	,@H int
	,@6th int
	,@7th int
	,@8th int
	,@9th int
	,@10th int 
	,@11th int
	,@12th int
	,@ObjectID int
 
fetch next from tempcur into @objectid, @6th,@7th,@8th,@9th,@10th,@11th,@12th
 
while @@fetch_status <> -1
begin
	select @M = 0
	select @H = 0
	if @6th > 0 select @M = 100 
	if @7th > 0 select @M = @M + 1 
	if @8th > 0 select @M = @M + 1 
	if @9th > 0 select @H = @H + 1 
	if @10th > 0 select @H = @H + 1 
	if @11th > 0 select @H = @H + 1 
	if @12th > 0 select @H = @H + 1 
 
	if  @M <> 0 or @H <> 0 begin
		if @M >= @H 
			update table_site set x_grade_type = 'M' where objid = @objectid
		else
			update table_site set x_grade_type = 'H' where objid = @objectid
	end
 
	fetch next from tempcur into @objectid, @6th,@7th,@8th,@9th,@10th,@11th,@12th
end
 
close tempcur
deallocate tempcur
return
GO
[+][-]07.02.2008 at 03:05PM PDT, ID: 21921292

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.02.2008 at 03:10PM PDT, ID: 21921312

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 03:10PM PDT, ID: 21921316

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 03:11PM PDT, ID: 21921328

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 03:16PM PDT, ID: 21921355

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Sign Up Now!
Solution Provided By: rickchild
Participating Experts: 1
Solution Grade: B
 
 
[+][-]07.02.2008 at 04:34PM PDT, ID: 21921725

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 04:37PM PDT, ID: 21921734

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 04:38PM PDT, ID: 21921741

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.06.2008 at 08:43AM PDT, ID: 22171519

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.06.2008 at 08:44AM PDT, ID: 22171531

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906