Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SP_makewebtask

Author  Topic 

glenneken
Starting Member

4 Posts

Posted - 2011-06-06 : 08:03:38
Following are three stored procedures running on a server, when i copy them to another the job fails. Any thoughts?

CREATE PROCEDURE sp_M300_Webpagina2 AS

/*M300 Alarmen vandaag */
EXECUTE sp_makewebtask
@outputfile = N'C:\data\Alarmen_M300_vandaag.html',
@query=N'EXECUTE [sp_M300_Alm_alles_vandaag]',
@fixedfont=1,
@HTMLheader=3,
@webpagetitle=N'Alarmen MAAL 300 vandaag',
@resultstitle=N'Alarmen MAAL 300 vandaag',
@dbname=N'MAAL300',
@whentype=1,
@procname=N'M300 Web Page',
@codepage=65001,@charset=N'utf-8'


/*M300 Alarmen alles*/
EXECUTE sp_makewebtask
@outputfile = N'C:\data\Alarmen_M300_allemaal.html',
@query=N'EXECUTE [sp_M300_Alm_alle_alarmen]',
@fixedfont=1,
@HTMLheader=3,
@webpagetitle=N'Alarmen MAAL 300 alles',
@resultstitle=N'Alarmen MAAL 300 alles',
@dbname=N'MAAL300',
@whentype=1,
@procname=N'M300 Web Page',
@codepage=65001,@charset=N'utf-8'
GO


CREATE PROCEDURE sp_M300_Alm_alle_alarmen AS

select [timestamp] as 'Tijdstip',
log_action as 'Log actie',
alarm_message as 'Alarm boodschap',
resource as 'Resource'
from
alarm_log
where
alarm_class = 'M300' and
(log_action = 'G' or log_action = 'R')
order by
[timestamp] desc
GO


CREATE PROCEDURE sp_M300_Alm_alles_vandaag AS
select [timestamp] as 'Tijdstip',
log_action as 'Log actie',
alarm_message as 'Alarm boodschap',
resource as 'Resource'
from
alarm_log
where
alarm_class = 'M300' and
(log_action = 'G' or log_action = 'R') and
datediff(hh,[timestamp],getdate()) <= 24
order by
[timestamp] desc
GO

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2011-06-06 : 08:06:46
Any messages that you get when they fail?
Starting with SP_ is bad. That makes SQL Server look for the proc in MASTER first.

http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-06-06 : 08:07:24
Do you have any error messages to post?

...

No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

glenneken
Starting Member

4 Posts

Posted - 2011-06-06 : 08:11:25
SQL Server Scheduled Job 'M300_WEBPAGINAS' (0xBC14856583EEDB4187C9407168C0CA4B) - Status: Failed - Invoked on: 2011-06-06 14:10:00 - Message: The job failed. The Job was invoked by Schedule 4 (s300). The last step to run was step 1 (go300).

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

This is what I've got from the event viewer, not sure if its helpfull
Go to Top of Page

glenneken
Starting Member

4 Posts

Posted - 2011-06-06 : 08:18:38
Maybe some more info is needed,

I'm working on sql server 2000
the object is to read alarm data from a table and
divide the into two html pages: todays events and historical events.

First the output file was on another server, I've changed this to a local address (C\data) to rule out network problems, still the job fails.

The job is normally invoked by a shedule every 5 minutes and is done by web assistant on user sa.
Go to Top of Page

glenneken
Starting Member

4 Posts

Posted - 2011-06-06 : 08:46:37
Nevermind, I've found the problem, the service started on another user.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-06-07 : 07:22:57
Also note that sp_makewebtask is an undocumented procedure which may not be supported in future release of SQL Server


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -