Showing posts with label sp4. Show all posts
Showing posts with label sp4. Show all posts

Wednesday, March 28, 2012

Scheduling perl scripts with sqlagent

SQL2K SP3a Win2k Pro SP4
Probably one for people using perl for scripting.
I'm having a problem scheduling perl scripts to run with sql agent.
All permissions are OK, PERL5LIB is set and the script will run perfectly
from the command line
When running through sql agent the following:
cmd /c "perl s:\production\getdbspaceused.pl"
It seems it won't pick up the PERL5LIB environment variable. Any ideas,
(without explicitly putting the path to the modules directory) or am I going
to have to use windows scheduler'
I've got task scheduler to run this (but i want the success/failure
notification available from sql agent)
TIA.
KevinI use ActivePerl from www.activestate.com, and have never
had any problem scheduling a Perl script via SQLServer
Agent, though I use Windows Task Scheduler more often to
run Perl scripts. If you have ActivePerl installed on the
server, you can just run a Perl script as (plus whatever
command line switches you may have) using an Operating
System Command job step type.
perl yourScript.pl
perl.exe should already be on the system path.
Linchi
>--Original Message--
>SQL2K SP3a Win2k Pro SP4
>Probably one for people using perl for scripting.
>I'm having a problem scheduling perl scripts to run with
sql agent.
>All permissions are OK, PERL5LIB is set and the script
will run perfectly
>from the command line
>When running through sql agent the following:
> cmd /c "perl s:\production\getdbspaceused.pl"
>It seems it won't pick up the PERL5LIB environment
variable. Any ideas,
>(without explicitly putting the path to the modules
directory) or am I going
>to have to use windows scheduler'
>I've got task scheduler to run this (but i want the
success/failure
>notification available from sql agent)
>
>TIA.
>Kevin
>
>.
>|||Hello Kevin,
Could you please try to run cmd /c "perl s:\production\getdbspaceused.pl"
using xp_cmdshell in the Query Analyser ?
Does that work without any problem ? If yes, you might want to create a Job
to run the same cmd and that way you can use the
SQL Agent successs/failure notifications.
Honestly, I have no experience with running the PERL scripts, but just
wanted to see if above works. Please let me know.
Thanks for using MSDN Managed Newsgroups.
Vikrant Dalwale
Microsoft SQL Server Support Professional
This posting is provided "AS IS" with no warranties, and confers no rights.
Get secure !! For info, please visit http://www.microsoft.com/security.
Please reply to Newsgroups only.
--
| From: <KJGNews@.hotmail.com>
| Subject: Scheduling perl scripts with sqlagent
| Date: Wed, 21 Jan 2004 09:21:02 -0000
| Lines: 24
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <OTbE$9$3DHA.1428@.TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.server
| NNTP-Posting-Host: 62.190.182.219
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.sqlserver.server:325288
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| SQL2K SP3a Win2k Pro SP4
|
| Probably one for people using perl for scripting.
|
| I'm having a problem scheduling perl scripts to run with sql agent.
|
| All permissions are OK, PERL5LIB is set and the script will run perfectly
| from the command line
|
| When running through sql agent the following:
| cmd /c "perl s:\production\getdbspaceused.pl"
|
| It seems it won't pick up the PERL5LIB environment variable. Any ideas,
| (without explicitly putting the path to the modules directory) or am I
going
| to have to use windows scheduler'
|
| I've got task scheduler to run this (but i want the success/failure
| notification available from sql agent)
|
|
| TIA.
| Kevin
|
|
||||Thanks everybody for the help.
I came in this morning and the job has run, successfully and I don't know
why, although
I'm happy about this. Can only assume it took a period of time before the
environment
variable was recognised by the OS?
Anyway, thanks once again.
"Vikrant V Dalwale [MSFT]" <vikrantd@.online.microsoft.com> wrote in message
news:AZhoRpJ4DHA.3648@.cpmsftngxa07.phx.gbl...
>
> Hello Kevin,
> Could you please try to run cmd /c "perl s:\production\getdbspaceused.pl"
> using xp_cmdshell in the Query Analyser ?
> Does that work without any problem ? If yes, you might want to create a
Job
> to run the same cmd and that way you can use the
> SQL Agent successs/failure notifications.
> Honestly, I have no experience with running the PERL scripts, but just
> wanted to see if above works. Please let me know.
> Thanks for using MSDN Managed Newsgroups.
> Vikrant Dalwale
> Microsoft SQL Server Support Professional
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Get secure !! For info, please visit http://www.microsoft.com/security.
> Please reply to Newsgroups only.
> --
> | From: <KJGNews@.hotmail.com>
> | Subject: Scheduling perl scripts with sqlagent
> | Date: Wed, 21 Jan 2004 09:21:02 -0000
> | Lines: 24
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> | Message-ID: <OTbE$9$3DHA.1428@.TK2MSFTNGP12.phx.gbl>
> | Newsgroups: microsoft.public.sqlserver.server
> | NNTP-Posting-Host: 62.190.182.219
> | Path:
>
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
> phx.gbl!TK2MSFTNGP12.phx.gbl
> | Xref: cpmsftngxa07.phx.gbl microsoft.public.sqlserver.server:325288
> | X-Tomcat-NG: microsoft.public.sqlserver.server
> |
> | SQL2K SP3a Win2k Pro SP4
> |
> | Probably one for people using perl for scripting.
> |
> | I'm having a problem scheduling perl scripts to run with sql agent.
> |
> | All permissions are OK, PERL5LIB is set and the script will run
perfectly
> | from the command line
> |
> | When running through sql agent the following:
> | cmd /c "perl s:\production\getdbspaceused.pl"
> |
> | It seems it won't pick up the PERL5LIB environment variable. Any ideas,
> | (without explicitly putting the path to the modules directory) or am I
> going
> | to have to use windows scheduler'
> |
> | I've got task scheduler to run this (but i want the success/failure
> | notification available from sql agent)
> |
> |
> | TIA.
> | Kevin
> |
> |
> |
>

Scheduling jobs?

I need to schedule a job to run 6 days after the last Friday of the month.
How would I go about this?
Using SQL Server 2000 SP4
thanks in advanced.Hi,
SQLAgent will allow you to schedule based on the requirement. But what you
could do is schedule the job for all 30 days and
inside the procerdure you could write the logic to control this. For the
other days the procedure just checks and exits.
Thanks
Hari
"philt" <philt@.discussions.microsoft.com> wrote in message
news:3DE331CC-CE2B-4444-AB82-D80685FC099E@.microsoft.com...
>I need to schedule a job to run 6 days after the last Friday of the month.
> How would I go about this?
> Using SQL Server 2000 SP4
> thanks in advanced.|||Thanks Hari,
I understand what you are saying and did think about doing it that way. The
problem is I'm not sure what logic I could use or how as I don't write much
code. I'm reading up on GETDATE to see if that helps but if you or others
have an example it would be really helpful and appreciated.
Cheers,
Phil
"Hari Prasad" wrote:
> Hi,
> SQLAgent will allow you to schedule based on the requirement. But what you
> could do is schedule the job for all 30 days and
> inside the procerdure you could write the logic to control this. For the
> other days the procedure just checks and exits.
> Thanks
> Hari
> "philt" <philt@.discussions.microsoft.com> wrote in message
> news:3DE331CC-CE2B-4444-AB82-D80685FC099E@.microsoft.com...
> >I need to schedule a job to run 6 days after the last Friday of the month.
> > How would I go about this?
> >
> > Using SQL Server 2000 SP4
> >
> > thanks in advanced.
>
>

Friday, March 23, 2012

Scheduler appears to be hung ...

SQL 7.0 SP4 logging this message :
The Scheduler 0 appears to be hung. PSS 0x652E50D0, EC 0x652E5280, UMS Context 0x2FB7E0A0

While SQL is logging these messages SQL is blocked
This is hapening 5-10 times in week.
In traced file I found that there is no same query from application that causes this blocking.
What this qould be ?!
Is it SQL engine or is it hardware on underlaying-server ?
What with combination beetwen SQL 7.0 and Windows Server 2000.
Or even is it problems with queries from application ?HTH

http://www.eweek.com/article2/0,3959,920568,00.asp|||Thanks for linksql

Tuesday, March 20, 2012

Scheduled job is not running successfully. Event ID: 208

SQL server standard edition version 8.00.2039 [SP4] on MSWindows NT 5.2
[3790] .
We have a procedure that is scheduled to run every night . It is running
fine for last few months. Last week it stopped running successfully. In
application event log we are getting warning message:
====================================
Event Type:Warning
Event Source:SQLSERVERAGENT
Event Category:Job Engine
Event ID:208
Date:6/12/2007
Time:4:23:19 AM
User:N/A
Computer:computername1
Description:
SQL Server Scheduled Job 'abcd-Daily 1' (0xC456F221DE41D5469B869BA1657DDDC0)
- Status: Failed - Invoked on: 2007-06-12 04:00:00 - Message: The job failed.
The Job was invoked by Schedule 6 (6.x schedule). The last step to run was
step 1 (Step 1).
====================================
No error message in sql server errorlog.
ontario, canada
============================================
Its a permission error in step1.
Executed as user: username. SELECT permission denied on object
'a_bb_REQUEST_RESOURCE', database 'databasename', owner 'dbo'. [SQLSTATE
42000] (Error 229). The step failed.
============================================
ontario, canada
"vt" wrote:

> HI
> Do this
> Enterprise manager->Management->sql Server agent->jobs
> select your job and click the job history from the drop down menu
> this will open up job history dialog box, click the show step details, you
> can see the actual error message there, post that error message
> Regards
> VT
> Knowledge is power, share it...
> http://oneplace4sql.blogspot.com/
> "db" <db@.discussions.microsoft.com> wrote in message
> news:DA7F4D29-8754-4A40-ABAD-AEFE4890BB41@.microsoft.com...
>
>
|||It points to permission error.
Executed as user: abc. SELECT permission denied on object
'a_bb_REQUEST_RESOURCE', database 'databasename', owner 'dbo'. [SQLSTATE
42000] (Error 229). The step failed.
ontario, canada
"vt" wrote:

> HI
> Do this
> Enterprise manager->Management->sql Server agent->jobs
> select your job and click the job history from the drop down menu
> this will open up job history dialog box, click the show step details, you
> can see the actual error message there, post that error message
> Regards
> VT
> Knowledge is power, share it...
> http://oneplace4sql.blogspot.com/
> "db" <db@.discussions.microsoft.com> wrote in message
> news:DA7F4D29-8754-4A40-ABAD-AEFE4890BB41@.microsoft.com...
>
>
|||Its a permission error.
Executed as user: abc. SELECT permission denied on object
'a_bb_REQUEST_RESOURCE', database 'databasename', owner 'dbo'. [SQLSTATE
42000] (Error 229). The step failed.
ontario, canada
"vt" wrote:

> HI
> Do this
> Enterprise manager->Management->sql Server agent->jobs
> select your job and click the job history from the drop down menu
> this will open up job history dialog box, click the show step details, you
> can see the actual error message there, post that error message
> Regards
> VT
> Knowledge is power, share it...
> http://oneplace4sql.blogspot.com/
> "db" <db@.discussions.microsoft.com> wrote in message
> news:DA7F4D29-8754-4A40-ABAD-AEFE4890BB41@.microsoft.com...
>
>
|||It worked. Thanks vt.
ontario, canada
"Vt" wrote:

> Hi
> ok..Now give the proper permission and try..
>
> Regards
> Vt
> Knowledge is power;Share it
> http://oneplace4sql.blogspot.com
>
> "db" <db@.discussions.microsoft.com> wrote in message
> news:9AE94423-FD7C-4552-BFB5-4EDA062914D8@.microsoft.com...
>
>

Scheduled job is not running successfully. Event ID: 208

SQL server standard edition version 8.00.2039 [SP4] on MSWindows NT 5.2
[3790] .
We have a procedure that is scheduled to run every night . It is running
fine for last few months. Last week it stopped running successfully. In
application event log we are getting warning message:
==================================== Event Type: Warning
Event Source: SQLSERVERAGENT
Event Category: Job Engine
Event ID: 208
Date: 6/12/2007
Time: 4:23:19 AM
User: N/A
Computer: computername1
Description:
SQL Server Scheduled Job 'abcd-Daily 1' (0xC456F221DE41D5469B869BA1657DDDC0)
- Status: Failed - Invoked on: 2007-06-12 04:00:00 - Message: The job failed.
The Job was invoked by Schedule 6 (6.x schedule). The last step to run was
step 1 (Step 1).
====================================
No error message in sql server errorlog.
--
ontario, canadaHI
Do this
Enterprise manager->Management->sql Server agent->jobs
select your job and click the job history from the drop down menu
this will open up job history dialog box, click the show step details, you
can see the actual error message there, post that error message
Regards
VT
Knowledge is power, share it...
http://oneplace4sql.blogspot.com/
"db" <db@.discussions.microsoft.com> wrote in message
news:DA7F4D29-8754-4A40-ABAD-AEFE4890BB41@.microsoft.com...
> SQL server standard edition version 8.00.2039 [SP4] on MSWindows NT 5.2
> [3790] .
> We have a procedure that is scheduled to run every night . It is running
> fine for last few months. Last week it stopped running successfully. In
> application event log we are getting warning message:
> ====================================> Event Type: Warning
> Event Source: SQLSERVERAGENT
> Event Category: Job Engine
> Event ID: 208
> Date: 6/12/2007
> Time: 4:23:19 AM
> User: N/A
> Computer: computername1
> Description:
> SQL Server Scheduled Job 'abcd-Daily 1'
> (0xC456F221DE41D5469B869BA1657DDDC0)
> - Status: Failed - Invoked on: 2007-06-12 04:00:00 - Message: The job
> failed.
> The Job was invoked by Schedule 6 (6.x schedule). The last step to run
> was
> step 1 (Step 1).
> ====================================> No error message in sql server errorlog.
> --
> ontario, canada|||============================================Its a permission error in step1.
Executed as user: username. SELECT permission denied on object
'a_bb_REQUEST_RESOURCE', database 'databasename', owner 'dbo'. [SQLSTATE
42000] (Error 229). The step failed.
============================================--
ontario, canada
"vt" wrote:
> HI
> Do this
> Enterprise manager->Management->sql Server agent->jobs
> select your job and click the job history from the drop down menu
> this will open up job history dialog box, click the show step details, you
> can see the actual error message there, post that error message
> Regards
> VT
> Knowledge is power, share it...
> http://oneplace4sql.blogspot.com/
> "db" <db@.discussions.microsoft.com> wrote in message
> news:DA7F4D29-8754-4A40-ABAD-AEFE4890BB41@.microsoft.com...
> > SQL server standard edition version 8.00.2039 [SP4] on MSWindows NT 5.2
> > [3790] .
> >
> > We have a procedure that is scheduled to run every night . It is running
> > fine for last few months. Last week it stopped running successfully. In
> > application event log we are getting warning message:
> >
> > ====================================> > Event Type: Warning
> > Event Source: SQLSERVERAGENT
> > Event Category: Job Engine
> > Event ID: 208
> > Date: 6/12/2007
> > Time: 4:23:19 AM
> > User: N/A
> > Computer: computername1
> > Description:
> > SQL Server Scheduled Job 'abcd-Daily 1'
> > (0xC456F221DE41D5469B869BA1657DDDC0)
> > - Status: Failed - Invoked on: 2007-06-12 04:00:00 - Message: The job
> > failed.
> > The Job was invoked by Schedule 6 (6.x schedule). The last step to run
> > was
> > step 1 (Step 1).
> > ====================================> >
> > No error message in sql server errorlog.
> >
> > --
> > ontario, canada
>
>|||It points to permission error.
Executed as user: abc. SELECT permission denied on object
'a_bb_REQUEST_RESOURCE', database 'databasename', owner 'dbo'. [SQLSTATE
42000] (Error 229). The step failed.
--
ontario, canada
"vt" wrote:
> HI
> Do this
> Enterprise manager->Management->sql Server agent->jobs
> select your job and click the job history from the drop down menu
> this will open up job history dialog box, click the show step details, you
> can see the actual error message there, post that error message
> Regards
> VT
> Knowledge is power, share it...
> http://oneplace4sql.blogspot.com/
> "db" <db@.discussions.microsoft.com> wrote in message
> news:DA7F4D29-8754-4A40-ABAD-AEFE4890BB41@.microsoft.com...
> > SQL server standard edition version 8.00.2039 [SP4] on MSWindows NT 5.2
> > [3790] .
> >
> > We have a procedure that is scheduled to run every night . It is running
> > fine for last few months. Last week it stopped running successfully. In
> > application event log we are getting warning message:
> >
> > ====================================> > Event Type: Warning
> > Event Source: SQLSERVERAGENT
> > Event Category: Job Engine
> > Event ID: 208
> > Date: 6/12/2007
> > Time: 4:23:19 AM
> > User: N/A
> > Computer: computername1
> > Description:
> > SQL Server Scheduled Job 'abcd-Daily 1'
> > (0xC456F221DE41D5469B869BA1657DDDC0)
> > - Status: Failed - Invoked on: 2007-06-12 04:00:00 - Message: The job
> > failed.
> > The Job was invoked by Schedule 6 (6.x schedule). The last step to run
> > was
> > step 1 (Step 1).
> > ====================================> >
> > No error message in sql server errorlog.
> >
> > --
> > ontario, canada
>
>|||Its a permission error.
Executed as user: abc. SELECT permission denied on object
'a_bb_REQUEST_RESOURCE', database 'databasename', owner 'dbo'. [SQLSTATE
42000] (Error 229). The step failed.
--
ontario, canada
"vt" wrote:
> HI
> Do this
> Enterprise manager->Management->sql Server agent->jobs
> select your job and click the job history from the drop down menu
> this will open up job history dialog box, click the show step details, you
> can see the actual error message there, post that error message
> Regards
> VT
> Knowledge is power, share it...
> http://oneplace4sql.blogspot.com/
> "db" <db@.discussions.microsoft.com> wrote in message
> news:DA7F4D29-8754-4A40-ABAD-AEFE4890BB41@.microsoft.com...
> > SQL server standard edition version 8.00.2039 [SP4] on MSWindows NT 5.2
> > [3790] .
> >
> > We have a procedure that is scheduled to run every night . It is running
> > fine for last few months. Last week it stopped running successfully. In
> > application event log we are getting warning message:
> >
> > ====================================> > Event Type: Warning
> > Event Source: SQLSERVERAGENT
> > Event Category: Job Engine
> > Event ID: 208
> > Date: 6/12/2007
> > Time: 4:23:19 AM
> > User: N/A
> > Computer: computername1
> > Description:
> > SQL Server Scheduled Job 'abcd-Daily 1'
> > (0xC456F221DE41D5469B869BA1657DDDC0)
> > - Status: Failed - Invoked on: 2007-06-12 04:00:00 - Message: The job
> > failed.
> > The Job was invoked by Schedule 6 (6.x schedule). The last step to run
> > was
> > step 1 (Step 1).
> > ====================================> >
> > No error message in sql server errorlog.
> >
> > --
> > ontario, canada
>
>|||Hi
ok..Now give the proper permission and try..
Regards
Vt
Knowledge is power;Share it
http://oneplace4sql.blogspot.com
"db" <db@.discussions.microsoft.com> wrote in message
news:9AE94423-FD7C-4552-BFB5-4EDA062914D8@.microsoft.com...
> ============================================> Its a permission error in step1.
> Executed as user: username. SELECT permission denied on object
> 'a_bb_REQUEST_RESOURCE', database 'databasename', owner 'dbo'. [SQLSTATE
> 42000] (Error 229). The step failed.
> ============================================> --
> ontario, canada
>
> "vt" wrote:
>> HI
>> Do this
>> Enterprise manager->Management->sql Server agent->jobs
>> select your job and click the job history from the drop down menu
>> this will open up job history dialog box, click the show step details,
>> you
>> can see the actual error message there, post that error message
>> Regards
>> VT
>> Knowledge is power, share it...
>> http://oneplace4sql.blogspot.com/
>> "db" <db@.discussions.microsoft.com> wrote in message
>> news:DA7F4D29-8754-4A40-ABAD-AEFE4890BB41@.microsoft.com...
>> > SQL server standard edition version 8.00.2039 [SP4] on MSWindows NT 5.2
>> > [3790] .
>> >
>> > We have a procedure that is scheduled to run every night . It is
>> > running
>> > fine for last few months. Last week it stopped running successfully. In
>> > application event log we are getting warning message:
>> >
>> > ====================================>> > Event Type: Warning
>> > Event Source: SQLSERVERAGENT
>> > Event Category: Job Engine
>> > Event ID: 208
>> > Date: 6/12/2007
>> > Time: 4:23:19 AM
>> > User: N/A
>> > Computer: computername1
>> > Description:
>> > SQL Server Scheduled Job 'abcd-Daily 1'
>> > (0xC456F221DE41D5469B869BA1657DDDC0)
>> > - Status: Failed - Invoked on: 2007-06-12 04:00:00 - Message: The job
>> > failed.
>> > The Job was invoked by Schedule 6 (6.x schedule). The last step to run
>> > was
>> > step 1 (Step 1).
>> > ====================================>> >
>> > No error message in sql server errorlog.
>> >
>> > --
>> > ontario, canada
>>|||It worked. Thanks vt.
--
ontario, canada
"Vt" wrote:
> Hi
> ok..Now give the proper permission and try..
>
> Regards
> Vt
> Knowledge is power;Share it
> http://oneplace4sql.blogspot.com
>
> "db" <db@.discussions.microsoft.com> wrote in message
> news:9AE94423-FD7C-4552-BFB5-4EDA062914D8@.microsoft.com...
> > ============================================> > Its a permission error in step1.
> > Executed as user: username. SELECT permission denied on object
> > 'a_bb_REQUEST_RESOURCE', database 'databasename', owner 'dbo'. [SQLSTATE
> > 42000] (Error 229). The step failed.
> > ============================================> > --
> > ontario, canada
> >
> >
> > "vt" wrote:
> >
> >> HI
> >>
> >> Do this
> >>
> >> Enterprise manager->Management->sql Server agent->jobs
> >>
> >> select your job and click the job history from the drop down menu
> >> this will open up job history dialog box, click the show step details,
> >> you
> >> can see the actual error message there, post that error message
> >>
> >> Regards
> >> VT
> >> Knowledge is power, share it...
> >> http://oneplace4sql.blogspot.com/
> >> "db" <db@.discussions.microsoft.com> wrote in message
> >> news:DA7F4D29-8754-4A40-ABAD-AEFE4890BB41@.microsoft.com...
> >> > SQL server standard edition version 8.00.2039 [SP4] on MSWindows NT 5.2
> >> > [3790] .
> >> >
> >> > We have a procedure that is scheduled to run every night . It is
> >> > running
> >> > fine for last few months. Last week it stopped running successfully. In
> >> > application event log we are getting warning message:
> >> >
> >> > ====================================> >> > Event Type: Warning
> >> > Event Source: SQLSERVERAGENT
> >> > Event Category: Job Engine
> >> > Event ID: 208
> >> > Date: 6/12/2007
> >> > Time: 4:23:19 AM
> >> > User: N/A
> >> > Computer: computername1
> >> > Description:
> >> > SQL Server Scheduled Job 'abcd-Daily 1'
> >> > (0xC456F221DE41D5469B869BA1657DDDC0)
> >> > - Status: Failed - Invoked on: 2007-06-12 04:00:00 - Message: The job
> >> > failed.
> >> > The Job was invoked by Schedule 6 (6.x schedule). The last step to run
> >> > was
> >> > step 1 (Step 1).
> >> > ====================================> >> >
> >> > No error message in sql server errorlog.
> >> >
> >> > --
> >> > ontario, canada
> >>
> >>
> >>
>
>