Showing posts with label fails. Show all posts
Showing posts with label fails. Show all posts

Wednesday, March 28, 2012

scheduling dts jobs fails

Hello,
Could somebody tell me what i'm doing wrong. I have created a dts job from
the client console on my computer. Next i want to schedule the dts job, but
whenever it starts it is always failing.
Is it because i've created the dts job on my computer? I can see the owner
of the job is the name of my computer/username.
Greetings,
Zeke
I guess it has to do with security. When you schedule a job, it is executed
under different user account, not under yours. if you are a member of the
sysadmin role, then it is executed using SQL Server Agent's account.
Otherwise you can use so-called proxy account (check more in Books OnLine).
And the account used might not have permissions (maybe on file system as
well, not just SQL Server, depends on whatever the package is doing). Or it
does not see the drives you mapped using your account, etc.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Ezekil" <ezekiel@.lycos.nl> wrote in message
news:%23EwqWe1MEHA.2540@.TK2MSFTNGP10.phx.gbl...
> Hello,
> Could somebody tell me what i'm doing wrong. I have created a dts job from
> the client console on my computer. Next i want to schedule the dts job,
but
> whenever it starts it is always failing.
> Is it because i've created the dts job on my computer? I can see the owner
> of the job is the name of my computer/username.
> Greetings,
> Zeke
>

scheduling dts jobs fails

Hello,
Could somebody tell me what i'm doing wrong. I have created a dts job from
the client console on my computer. Next i want to schedule the dts job, but
whenever it starts it is always failing.
Is it because i've created the dts job on my computer? I can see the owner
of the job is the name of my computer/username.
Greetings,
ZekeI guess it has to do with security. When you schedule a job, it is executed
under different user account, not under yours. if you are a member of the
sysadmin role, then it is executed using SQL Server Agent's account.
Otherwise you can use so-called proxy account (check more in Books OnLine).
And the account used might not have permissions (maybe on file system as
well, not just SQL Server, depends on whatever the package is doing). Or it
does not see the drives you mapped using your account, etc.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Ezekil" <ezekiel@.lycos.nl> wrote in message
news:%23EwqWe1MEHA.2540@.TK2MSFTNGP10.phx.gbl...
> Hello,
> Could somebody tell me what i'm doing wrong. I have created a dts job from
> the client console on my computer. Next i want to schedule the dts job,
but
> whenever it starts it is always failing.
> Is it because i've created the dts job on my computer? I can see the owner
> of the job is the name of my computer/username.
> Greetings,
> Zeke
>

Monday, March 26, 2012

scheduling dts jobs fails

Hello,
Could somebody tell me what i'm doing wrong. I have created a dts job from
the client console on my computer. Next i want to schedule the dts job, but
whenever it starts it is always failing.
Is it because i've created the dts job on my computer? I can see the owner
of the job is the name of my computer/username.
Greetings,
ZekeI guess it has to do with security. When you schedule a job, it is executed
under different user account, not under yours. if you are a member of the
sysadmin role, then it is executed using SQL Server Agent's account.
Otherwise you can use so-called proxy account (check more in Books OnLine).
And the account used might not have permissions (maybe on file system as
well, not just SQL Server, depends on whatever the package is doing). Or it
does not see the drives you mapped using your account, etc.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Ezekiël" <ezekiel@.lycos.nl> wrote in message
news:%23EwqWe1MEHA.2540@.TK2MSFTNGP10.phx.gbl...
> Hello,
> Could somebody tell me what i'm doing wrong. I have created a dts job from
> the client console on my computer. Next i want to schedule the dts job,
but
> whenever it starts it is always failing.
> Is it because i've created the dts job on my computer? I can see the owner
> of the job is the name of my computer/username.
> Greetings,
> Zeke
>

Scheduling a package with variables containing spaces or dashes fails

Using the "set values" tab, I am trying to set the values of package variables to strings that contain spaces and/or dashes. If I run the package using the integrations services server, it runs perfectly. If I schedule the package on SQL Server agent, I get the following error.

"Executed as user: GBP\SQLServer. Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Option "-restofstring" is not valid. The command line parameters are invalid. The step failed."

Looking at the command line generated by the SQL Agent interface, the value is quoted using double quotes like this:

/SQL "\PackageName" /SERVER SQL1 /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "\Package.Variables[LogFolder].Value";"\\remoteservername\inetpub\the-restofstring\restofstring\" /REPORTING E

It seems that the command line parser is not recognising the quotes, or maybe the slashes are throwing it off, or sql server agent is doing something funny to the command line before it executes it.

Anybody got any ideas?

Can you just test this in DtExecUI for ease. I tried to replicate the problem just now and cannot.

I grabbed the nearest package, created a variable called LogFolder and it works fine.

Here is the command line generated for me-

/FILE "C:\DevDays\SimpleTask\Integration Services Project1\Package.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EW /SET "\Package.Variables[LogFolder].Value";"\\remoteservername\inetpub\the-restofstring\restofstring\"

Scheduling a package with variables containing spaces or dashes fails

Using the "set values" tab, I am trying to set the values of package variables to strings that contain spaces and/or dashes. If I run the package using the integrations services server, it runs perfectly. If I schedule the package on SQL Server agent, I get the following error.

"Executed as user: GBP\SQLServer. Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Option "-restofstring" is not valid. The command line parameters are invalid. The step failed."

Looking at the command line generated by the SQL Agent interface, the value is quoted using double quotes like this:

/SQL "\PackageName" /SERVER SQL1 /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "\Package.Variables[LogFolder].Value";"\\remoteservername\inetpub\the-restofstring\restofstring\" /REPORTING E

It seems that the command line parser is not recognising the quotes, or maybe the slashes are throwing it off, or sql server agent is doing something funny to the command line before it executes it.

Anybody got any ideas?

Can you just test this in DtExecUI for ease. I tried to replicate the problem just now and cannot.

I grabbed the nearest package, created a variable called LogFolder and it works fine.

Here is the command line generated for me-

/FILE "C:\DevDays\SimpleTask\Integration Services Project1\Package.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EW /SET "\Package.Variables[LogFolder].Value";"\\remoteservername\inetpub\the-restofstring\restofstring\"

sql

Friday, March 23, 2012

Scheduled task alerts in 6.5

Is it possible to setup SQL server 6.5 to automatically inform me via email
when a scheduled task fails? Im told that this is possible in 2000, but not
in 6.5.
Is there any work around? some scripts or a 3rd party util ?
olly
________________________________________________
Macinley.co.uk
http://www.macinley.co.uk
Hi,
Yes, You can do an Email alert in SQL 6.5
1. Enterprise manager -- Select Server menu -- choose Alerts / Operators
2. Click in the Operator tab -- New OPerator -- Mention a operator ID and
give the email address
3. CLick OK
4. Go to ALerts tab -- CReate new alert
5. Mention and id and in the respose definition select the "Scheduled Task
to fire"
6. Mention the Alert Notification message and click ok
So when ever there is a error raised an Email alert will be send.
Thanks
Hari
MCDBA
"Harry Hudini" <harry.hudini@.nospam@.simplicity.co.uk> wrote in message
news:#dzjybIcEHA.3016@.tk2msftngp13.phx.gbl...
> Is it possible to setup SQL server 6.5 to automatically inform me via
email
> when a scheduled task fails? Im told that this is possible in 2000, but
not
> in 6.5.
> Is there any work around? some scripts or a 3rd party util ?
> olly
> --
> ________________________________________________
> Macinley.co.uk
> http://www.macinley.co.uk
>
|||Harry,
As a side note, you should be aware that SQL Server 6.5 is no longer
supported by Microsoft. I do not recommend you use it in production (or
anywhere else). Upgrade to SQL Server 2000 as soon as you can.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Harry Hudini wrote:
> Is it possible to setup SQL server 6.5 to automatically inform me via email
> when a scheduled task fails? Im told that this is possible in 2000, but not
> in 6.5.
> Is there any work around? some scripts or a 3rd party util ?
> olly
>

Scheduled task alerts in 6.5

Is it possible to setup SQL server 6.5 to automatically inform me via email
when a scheduled task fails? Im told that this is possible in 2000, but not
in 6.5.
Is there any work around? some scripts or a 3rd party util ?
olly
________________________________________
________
Macinley.co.uk
http://www.macinley.co.ukHi,
Yes, You can do an Email alert in SQL 6.5
1. Enterprise manager -- Select Server menu -- choose Alerts / Operators
2. Click in the Operator tab -- New OPerator -- Mention a operator ID and
give the email address
3. CLick OK
4. Go to ALerts tab -- CReate new alert
5. Mention and id and in the respose definition select the "Scheduled Task
to fire"
6. Mention the Alert Notification message and click ok
So when ever there is a error raised an Email alert will be send.
Thanks
Hari
MCDBA
"Harry Hudini" <harry.hudini@.nospam@.simplicity.co.uk> wrote in message
news:#dzjybIcEHA.3016@.tk2msftngp13.phx.gbl...
> Is it possible to setup SQL server 6.5 to automatically inform me via
email
> when a scheduled task fails? Im told that this is possible in 2000, but
not
> in 6.5.
> Is there any work around? some scripts or a 3rd party util ?
> olly
> --
> ________________________________________
________
> Macinley.co.uk
> http://www.macinley.co.uk
>|||Harry,
As a side note, you should be aware that SQL Server 6.5 is no longer
supported by Microsoft. I do not recommend you use it in production (or
anywhere else). Upgrade to SQL Server 2000 as soon as you can.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Harry Hudini wrote:
> Is it possible to setup SQL server 6.5 to automatically inform me via emai
l
> when a scheduled task fails? Im told that this is possible in 2000, but no
t
> in 6.5.
> Is there any work around? some scripts or a 3rd party util ?
> olly
>sql

Scheduled task alerts in 6.5

Is it possible to setup SQL server 6.5 to automatically inform me via email
when a scheduled task fails? Im told that this is possible in 2000, but not
in 6.5.
Is there any work around? some scripts or a 3rd party util ?
olly
--
________________________________________________
Macinley.co.uk
http://www.macinley.co.ukHi,
Yes, You can do an Email alert in SQL 6.5
1. Enterprise manager -- Select Server menu -- choose Alerts / Operators
2. Click in the Operator tab -- New OPerator -- Mention a operator ID and
give the email address
3. CLick OK
4. Go to ALerts tab -- CReate new alert
5. Mention and id and in the respose definition select the "Scheduled Task
to fire"
6. Mention the Alert Notification message and click ok
So when ever there is a error raised an Email alert will be send.
Thanks
Hari
MCDBA
"Harry Hudini" <harry.hudini@.nospam@.simplicity.co.uk> wrote in message
news:#dzjybIcEHA.3016@.tk2msftngp13.phx.gbl...
> Is it possible to setup SQL server 6.5 to automatically inform me via
email
> when a scheduled task fails? Im told that this is possible in 2000, but
not
> in 6.5.
> Is there any work around? some scripts or a 3rd party util ?
> olly
> --
> ________________________________________________
> Macinley.co.uk
> http://www.macinley.co.uk
>|||Harry,
As a side note, you should be aware that SQL Server 6.5 is no longer
supported by Microsoft. I do not recommend you use it in production (or
anywhere else). Upgrade to SQL Server 2000 as soon as you can.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Harry Hudini wrote:
> Is it possible to setup SQL server 6.5 to automatically inform me via email
> when a scheduled task fails? Im told that this is possible in 2000, but not
> in 6.5.
> Is there any work around? some scripts or a 3rd party util ?
> olly
>

Wednesday, March 21, 2012

Scheduled report by email with attached report fails

Can anyone offer any help with this?

Error maesage:
Status:
Failure sending mail: The Report Server has encountered a configuration error; more details in the log files

Windows 200 Server: SP4
RS 2000: SP2
SQL Server 2000, on the same server as RS.

We

get this error whenever we try to run a report with the report

attached. However, the email sends fine if the report is not attached.

Reports can also be exported into different formats without problem when viewing the report through report manager.
I received a email telling me there had been a reply to this thread, but I see nothing.

Can anyone help with this?|||Did you check the log files to see what the error is?|||Bringing this topic back from the dead a little I know, but I've finally had chance to get back to trying to use this since being switched onto other projects.

Which log would likely contain the information needed.
The logs located at: C:\Program Files\Microsoft SQL Server\MSSQL\LOG
called: SQLAGENT.OUT ?|||I am having the same problem. The report service log file only re-iterates the message, and does not provide any further details.
I checked the Report Server configuration file and it looks okay, nothing unusual.
Does anyone have any idea what may be causing the problem?|||

The RS log files are located here:

%Program Files%\Microsft SQL Server\MSSQL.2\Reporting Services\LogFiles

The Windows Service log file (which processes subscription events) should have a name like this:

ReportServerService__03_19_2007_00_01_09.log

|||

No entry is made in that folder when it fails the job.

However, we have noticed that if my colleague creates the subscription then it works fine without the error. So I suspect it might be related to permissions in sql server or on the win 2000 server box. So far I've been unable to determine which permission is causing it. Despite ensuring I am in the same permission groups as he is, my subscriptions still fail.

Scheduled report by email with attached report fails

Can anyone offer any help with this?

Error maesage:
Status:
Failure sending mail: The Report Server has encountered a configuration error; more details in the log files

Windows 200 Server: SP4
RS 2000: SP2
SQL Server 2000, on the same server as RS.

We

get this error whenever we try to run a report with the report

attached. However, the email sends fine if the report is not attached.

Reports can also be exported into different formats without problem when viewing the report through report manager.
I received a email telling me there had been a reply to this thread, but I see nothing.

Can anyone help with this?|||Did you check the log files to see what the error is?|||Bringing this topic back from the dead a little I know, but I've finally had chance to get back to trying to use this since being switched onto other projects.

Which log would likely contain the information needed.
The logs located at: C:\Program Files\Microsoft SQL Server\MSSQL\LOG
called: SQLAGENT.OUT ?|||I am having the same problem. The report service log file only re-iterates the message, and does not provide any further details.
I checked the Report Server configuration file and it looks okay, nothing unusual.
Does anyone have any idea what may be causing the problem?|||

The RS log files are located here:

%Program Files%\Microsft SQL Server\MSSQL.2\Reporting Services\LogFiles

The Windows Service log file (which processes subscription events) should have a name like this:

ReportServerService__03_19_2007_00_01_09.log

|||

No entry is made in that folder when it fails the job.

However, we have noticed that if my colleague creates the subscription then it works fine without the error. So I suspect it might be related to permissions in sql server or on the win 2000 server box. So far I've been unable to determine which permission is causing it. Despite ensuring I am in the same permission groups as he is, my subscriptions still fail.

Scheduled report by email with attached report fails

Can anyone offer any help with this?

Error maesage:
Status:
Failure sending mail: The Report Server has encountered a configuration error; more details in the log files

Windows 200 Server: SP4
RS 2000: SP2
SQL Server 2000, on the same server as RS.

We get this error whenever we try to run a report with the report attached. However, the email sends fine if the report is not attached.

Reports can also be exported into different formats without problem when viewing the report through report manager.
I received a email telling me there had been a reply to this thread, but I see nothing.

Can anyone help with this?
|||Did you check the log files to see what the error is?|||Bringing this topic back from the dead a little I know, but I've finally had chance to get back to trying to use this since being switched onto other projects.

Which log would likely contain the information needed.
The logs located at: C:\Program Files\Microsoft SQL Server\MSSQL\LOG
called: SQLAGENT.OUT ?
|||I am having the same problem. The report service log file only re-iterates the message, and does not provide any further details.
I checked the Report Server configuration file and it looks okay, nothing unusual.
Does anyone have any idea what may be causing the problem?|||

The RS log files are located here:

%Program Files%\Microsft SQL Server\MSSQL.2\Reporting Services\LogFiles

The Windows Service log file (which processes subscription events) should have a name like this:

ReportServerService__03_19_2007_00_01_09.log

|||

No entry is made in that folder when it fails the job.

However, we have noticed that if my colleague creates the subscription then it works fine without the error. So I suspect it might be related to permissions in sql server or on the win 2000 server box. So far I've been unable to determine which permission is causing it. Despite ensuring I am in the same permission groups as he is, my subscriptions still fail.

Tuesday, March 20, 2012

Scheduled job fails when old db's offline

I have a SQL Server 2000 db, that has db's unrelated to an application that
I run some sql server scheduled tasks. I decided I wanted to dump these old
db's, so the first step is to take the db's offline for a week before
deleting them. Well for some reason all tasks for an unrelated (?) system
would fail and until I brought these unconnected db's back online they
wouldn't run.
If I went into dts and run the apps they run fine, the Id is my elevated
domain admin account. The sql server agent that runs the task is a domain
account with local admin privileges.
Is there something I can check for to try and get more info? Nothing in the
sql logs, in the Event logs this is all I get. Stumped?
Event Type: Warning
Event Source: SQLSERVERAGENT
Event Category: Job Engine
Event ID: 208
Date: 10/9/2007
Time: 11:02:10 AM
User: N/A
Computer: some_SQL
Description:
SQL Server Scheduled Job 'Extract_Command_Center_Meters'
(0x21F52611A08A0C4F85974069429F69E0) - Status: Failed - Invoked on:
2007-10-09 11:02:10 - Message: The job failed. The Job was invoked by User
some_domain\some_admin. The last step to run was step 1
(Extract_Command_Center_Meters 2).
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
--
Paul Bergson
MVP - Directory Services
MCT, MCSE, MCSA, Security+, BS CSci
2003, 2000 (Early Achiever), NT
http://www.pbbergs.com
Please no e-mails, any questions should be posted in the NewsGroup
This posting is provided "AS IS" with no warranties, and confers no rights.SQL Agent itself doesn't care about what dbs are on or offline. But the job
obviously does so I would start there. Look in the DTS package to see where
it references these databases. You can also try looking at the job step
itself in the job history. You will need to expand the history listing to
see the individual steps.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Paul Bergson [MVP-DS]" <pbergson@.allete_nospam.com> wrote in message
news:uWt8T$oCIHA.4228@.TK2MSFTNGP02.phx.gbl...
>I have a SQL Server 2000 db, that has db's unrelated to an application that
>I run some sql server scheduled tasks. I decided I wanted to dump these
>old db's, so the first step is to take the db's offline for a week before
>deleting them. Well for some reason all tasks for an unrelated (?) system
>would fail and until I brought these unconnected db's back online they
>wouldn't run.
> If I went into dts and run the apps they run fine, the Id is my elevated
> domain admin account. The sql server agent that runs the task is a domain
> account with local admin privileges.
> Is there something I can check for to try and get more info? Nothing in
> the sql logs, in the Event logs this is all I get. Stumped?
> Event Type: Warning
> Event Source: SQLSERVERAGENT
> Event Category: Job Engine
> Event ID: 208
> Date: 10/9/2007
> Time: 11:02:10 AM
> User: N/A
> Computer: some_SQL
> Description:
> SQL Server Scheduled Job 'Extract_Command_Center_Meters'
> (0x21F52611A08A0C4F85974069429F69E0) - Status: Failed - Invoked on:
> 2007-10-09 11:02:10 - Message: The job failed. The Job was invoked by
> User some_domain\some_admin. The last step to run was step 1
> (Extract_Command_Center_Meters 2).
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
>
> --
> Paul Bergson
> MVP - Directory Services
> MCT, MCSE, MCSA, Security+, BS CSci
> 2003, 2000 (Early Achiever), NT
> http://www.pbbergs.com
> Please no e-mails, any questions should be posted in the NewsGroup
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Done that already. Dang... I just am truly stumped.
As you notice it will run if done directly from the DTS editor.
--
Paul Bergson
MVP - Directory Services
MCT, MCSE, MCSA, Security+, BS CSci
2003, 2000 (Early Achiever), NT
http://www.pbbergs.com
Please no e-mails, any questions should be posted in the NewsGroup
This posting is provided "AS IS" with no warranties, and confers no rights.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%23VSwWdpCIHA.464@.TK2MSFTNGP02.phx.gbl...
> SQL Agent itself doesn't care about what dbs are on or offline. But the
> job obviously does so I would start there. Look in the DTS package to see
> where it references these databases. You can also try looking at the job
> step itself in the job history. You will need to expand the history
> listing to see the individual steps.
> --
> Andrew J. Kelly SQL MVP
> Solid Quality Mentors
>
> "Paul Bergson [MVP-DS]" <pbergson@.allete_nospam.com> wrote in message
> news:uWt8T$oCIHA.4228@.TK2MSFTNGP02.phx.gbl...
>>I have a SQL Server 2000 db, that has db's unrelated to an application
>>that I run some sql server scheduled tasks. I decided I wanted to dump
>>these old db's, so the first step is to take the db's offline for a week
>>before deleting them. Well for some reason all tasks for an unrelated (?)
>>system would fail and until I brought these unconnected db's back online
>>they wouldn't run.
>> If I went into dts and run the apps they run fine, the Id is my elevated
>> domain admin account. The sql server agent that runs the task is a
>> domain account with local admin privileges.
>> Is there something I can check for to try and get more info? Nothing in
>> the sql logs, in the Event logs this is all I get. Stumped?
>> Event Type: Warning
>> Event Source: SQLSERVERAGENT
>> Event Category: Job Engine
>> Event ID: 208
>> Date: 10/9/2007
>> Time: 11:02:10 AM
>> User: N/A
>> Computer: some_SQL
>> Description:
>> SQL Server Scheduled Job 'Extract_Command_Center_Meters'
>> (0x21F52611A08A0C4F85974069429F69E0) - Status: Failed - Invoked on:
>> 2007-10-09 11:02:10 - Message: The job failed. The Job was invoked by
>> User some_domain\some_admin. The last step to run was step 1
>> (Extract_Command_Center_Meters 2).
>> For more information, see Help and Support Center at
>> http://go.microsoft.com/fwlink/events.asp.
>>
>> --
>> Paul Bergson
>> MVP - Directory Services
>> MCT, MCSE, MCSA, Security+, BS CSci
>> 2003, 2000 (Early Achiever), NT
>> http://www.pbbergs.com
>> Please no e-mails, any questions should be posted in the NewsGroup
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>|||I had have the very same problem with a customer, they disabled the user
account which was the owner of the job and they were getting exactly the
same error...
--
Ekrem Önsoy
"Paul Bergson [MVP-DS]" <pbergson@.allete_nospam.com> wrote in message
news:Oq9f%23fqCIHA.4752@.TK2MSFTNGP04.phx.gbl...
> Done that already. Dang... I just am truly stumped.
> As you notice it will run if done directly from the DTS editor.
> --
> Paul Bergson
> MVP - Directory Services
> MCT, MCSE, MCSA, Security+, BS CSci
> 2003, 2000 (Early Achiever), NT
> http://www.pbbergs.com
> Please no e-mails, any questions should be posted in the NewsGroup
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:%23VSwWdpCIHA.464@.TK2MSFTNGP02.phx.gbl...
>> SQL Agent itself doesn't care about what dbs are on or offline. But the
>> job obviously does so I would start there. Look in the DTS package to see
>> where it references these databases. You can also try looking at the job
>> step itself in the job history. You will need to expand the history
>> listing to see the individual steps.
>> --
>> Andrew J. Kelly SQL MVP
>> Solid Quality Mentors
>>
>> "Paul Bergson [MVP-DS]" <pbergson@.allete_nospam.com> wrote in message
>> news:uWt8T$oCIHA.4228@.TK2MSFTNGP02.phx.gbl...
>>I have a SQL Server 2000 db, that has db's unrelated to an application
>>that I run some sql server scheduled tasks. I decided I wanted to dump
>>these old db's, so the first step is to take the db's offline for a week
>>before deleting them. Well for some reason all tasks for an unrelated
>>(?) system would fail and until I brought these unconnected db's back
>>online they wouldn't run.
>> If I went into dts and run the apps they run fine, the Id is my elevated
>> domain admin account. The sql server agent that runs the task is a
>> domain account with local admin privileges.
>> Is there something I can check for to try and get more info? Nothing in
>> the sql logs, in the Event logs this is all I get. Stumped?
>> Event Type: Warning
>> Event Source: SQLSERVERAGENT
>> Event Category: Job Engine
>> Event ID: 208
>> Date: 10/9/2007
>> Time: 11:02:10 AM
>> User: N/A
>> Computer: some_SQL
>> Description:
>> SQL Server Scheduled Job 'Extract_Command_Center_Meters'
>> (0x21F52611A08A0C4F85974069429F69E0) - Status: Failed - Invoked on:
>> 2007-10-09 11:02:10 - Message: The job failed. The Job was invoked by
>> User some_domain\some_admin. The last step to run was step 1
>> (Extract_Command_Center_Meters 2).
>> For more information, see Help and Support Center at
>> http://go.microsoft.com/fwlink/events.asp.
>>
>> --
>> Paul Bergson
>> MVP - Directory Services
>> MCT, MCSE, MCSA, Security+, BS CSci
>> 2003, 2000 (Early Achiever), NT
>> http://www.pbbergs.com
>> Please no e-mails, any questions should be posted in the NewsGroup
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>

Scheduled job fails because locks were not released on the table

Hi,
I have a scheduled job that has started failing frequently because of a user
who only works on the weekends. Even though the user stops working on the
application, somehow the locks stay on the table making the scheduled job to
fail. Is there a way to release the locks on a particular table through TSQL
before the job runs so that the job gets completed successfully?Not some general way. You could use procedures such as sp_who, sp_lock, sp_who2 etc to find the SPID
you need to get rid of and then use the KILL command to force a rollback and termination of the
connection in question. Another option is to set the database to single user and specify a ROLLBACK
option (see ALTER DATABASE).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"ronnie" <ronnie@.discussions.microsoft.com> wrote in message
news:DDE09196-44F6-4681-BD95-40472FB8112A@.microsoft.com...
> Hi,
> I have a scheduled job that has started failing frequently because of a user
> who only works on the weekends. Even though the user stops working on the
> application, somehow the locks stay on the table making the scheduled job to
> fail. Is there a way to release the locks on a particular table through TSQL
> before the job runs so that the job gets completed successfully?|||Well, what exactly is the user doing to lock the table? What do they do
when they "stop working" on it?
"ronnie" <ronnie@.discussions.microsoft.com> wrote in message
news:DDE09196-44F6-4681-BD95-40472FB8112A@.microsoft.com...
> Hi,
> I have a scheduled job that has started failing frequently because of a
> user
> who only works on the weekends. Even though the user stops working on the
> application, somehow the locks stay on the table making the scheduled job
> to
> fail. Is there a way to release the locks on a particular table through
> TSQL
> before the job runs so that the job gets completed successfully?|||The user works remotely and connects to the application through a VPN. I am
trying to find out from the user how he logs off after he stops working.
Maybe he doesn't even logs off and leave the application open on the machine
and just closes the VPN connection. I will post the answer as soon as I hear
from the user.
As this job runs during the night, I can get the spid from the username and
then put in a TSQL command to kill the spid/s created by this user so that
the locks get released from the table.
"Aaron Bertrand [SQL Server MVP]" wrote:
> Well, what exactly is the user doing to lock the table? What do they do
> when they "stop working" on it?
>
> "ronnie" <ronnie@.discussions.microsoft.com> wrote in message
> news:DDE09196-44F6-4681-BD95-40472FB8112A@.microsoft.com...
> > Hi,
> >
> > I have a scheduled job that has started failing frequently because of a
> > user
> > who only works on the weekends. Even though the user stops working on the
> > application, somehow the locks stay on the table making the scheduled job
> > to
> > fail. Is there a way to release the locks on a particular table through
> > TSQL
> > before the job runs so that the job gets completed successfully?
>|||I found out from the user that while running an update on the table, his
machine froze and he wasn't able to do anything afterwards. Since the machine
is at a remote location and he is connecting through VPN he wasn't even able
to reboot the machine. This might have caused the locks to remain on this
table.
What should be done to handle situations like this to prevent future
scheduled job failures?
"ronnie" wrote:
> The user works remotely and connects to the application through a VPN. I am
> trying to find out from the user how he logs off after he stops working.
> Maybe he doesn't even logs off and leave the application open on the machine
> and just closes the VPN connection. I will post the answer as soon as I hear
> from the user.
> As this job runs during the night, I can get the spid from the username and
> then put in a TSQL command to kill the spid/s created by this user so that
> the locks get released from the table.
> "Aaron Bertrand [SQL Server MVP]" wrote:
> > Well, what exactly is the user doing to lock the table? What do they do
> > when they "stop working" on it?
> >
> >
> >
> > "ronnie" <ronnie@.discussions.microsoft.com> wrote in message
> > news:DDE09196-44F6-4681-BD95-40472FB8112A@.microsoft.com...
> > > Hi,
> > >
> > > I have a scheduled job that has started failing frequently because of a
> > > user
> > > who only works on the weekends. Even though the user stops working on the
> > > application, somehow the locks stay on the table making the scheduled job
> > > to
> > > fail. Is there a way to release the locks on a particular table through
> > > TSQL
> > > before the job runs so that the job gets completed successfully?
> >|||> What should be done to handle situations like this to prevent future
> scheduled job failures?
Well, what I was trying to get at what was, what exactly is the user doing
to hold locks on the table in the first place? Using what app(s)? Is he
opening data in a grid? Ideally he should be submitting short transactions
(using stored procedures or insert/update statements) and should not be as
exposed to the risk of connection interruptions. If this has happened more
than once then my guess is his data manipulation techniques are not ideal.|||The user was working on an Microsoft Access application that uses SQL Server
database as the backend. This user did an update / insert into a table using
an Access Form and while he was doing that using VPN and remote desktop his
machine froze and the connection broke down. This somehow created the
situation where the entire table got locked and the connection to SQL Server
persisted even though the user's machine has frozen.
"Aaron Bertrand [SQL Server MVP]" wrote:
> > What should be done to handle situations like this to prevent future
> > scheduled job failures?
> Well, what I was trying to get at what was, what exactly is the user doing
> to hold locks on the table in the first place? Using what app(s)? Is he
> opening data in a grid? Ideally he should be submitting short transactions
> (using stored procedures or insert/update statements) and should not be as
> exposed to the risk of connection interruptions. If this has happened more
> than once then my guess is his data manipulation techniques are not ideal.
>

Monday, March 12, 2012

Scheduled job executing Stored procedures fails

Hi,
I have 4 seperate stored procedures that if I run manually from Query
Analyzer work fine. Each one picks rows from a number of joined tables
depending on a date criteria. Each SP is exactly the same except for the
date ranges.
When they are run manually they do what I expect and I end up with 4 tables
each populated with a 1/2 dozen records.
However when I create a job in Enterprise Manager and add four steps into it
(one for each job) I end up with it creating four empty tables even though
two minutes ago I ran them manually and got what I expect and if I run them
manually after the scheduled job ran I get the correct results.
Each step says something like "Exec MoneyLaundering_21Days" and that's it.
The correct database is chosen in the top of the scheduled job dialogue box.
I've even tried scheduling a new job and just putting one SP into it but I
get the same result. I'm kinda at my wits end here so any assistance would
be much appreciated.
Regards,
Matt Lemon.Do you have the sp wrapped in a transaction that you are not committing?
Andrew J. Kelly SQL MVP
"news.esat.net" <matt.lemon@.williamfry.ie> wrote in message
news:dvttn9$cj4$1@.reader01.news.esat.net...
> Hi,
> I have 4 seperate stored procedures that if I run manually from Query
> Analyzer work fine. Each one picks rows from a number of joined tables
> depending on a date criteria. Each SP is exactly the same except for the
> date ranges.
> When they are run manually they do what I expect and I end up with 4
> tables each populated with a 1/2 dozen records.
> However when I create a job in Enterprise Manager and add four steps into
> it (one for each job) I end up with it creating four empty tables even
> though two minutes ago I ran them manually and got what I expect and if I
> run them manually after the scheduled job ran I get the correct results.
> Each step says something like "Exec MoneyLaundering_21Days" and that's it.
> The correct database is chosen in the top of the scheduled job dialogue
> box.
> I've even tried scheduling a new job and just putting one SP into it but I
> get the same result. I'm kinda at my wits end here so any assistance
> would be much appreciated.
> Regards,
> Matt Lemon.
>|||Did you look at error log? Have you tried profiler?
I assume, your procedures create tables AND populate them with some records
right?
Maybe the identity under which job is running doesn't have appropriate
credentials to populate tables?
Peter

Scheduled DTS packages

Hi All,
I'm running into a problem executing a dts package. The package completes
fine, however once it gets scheduled it fails. The package references a
script on another server, so I'm assuming the job scheduler is not passing
along my credentials, however I schedule to job to runas me. I've seen the
problem with it would schedule a job that referenced \\machine\c$, but
references shares don't seem to work too.
what am i doing wrong?
Have a look at
INF: How to Run a DTS Package as a Scheduled Job
http://support.microsoft.com/default...;en-us;Q269074
This has a section on the various security contexts involved. If you are a
sysadmin then the SQLAgent service account needs to be given access to the
remote server.
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"michael" <michael@.discussions.microsoft.com> wrote in message
news:E298049D-0691-4262-8A28-C340806E52A1@.microsoft.com...
> Hi All,
> I'm running into a problem executing a dts package. The package
> completes
> fine, however once it gets scheduled it fails. The package references a
> script on another server, so I'm assuming the job scheduler is not passing
> along my credentials, however I schedule to job to runas me. I've seen
> the
> problem with it would schedule a job that referenced \\machine\c$, but
> references shares don't seem to work too.
> what am i doing wrong?

Scheduled DTS packages

Hi All,
I'm running into a problem executing a dts package. The package completes
fine, however once it gets scheduled it fails. The package references a
script on another server, so I'm assuming the job scheduler is not passing
along my credentials, however I schedule to job to runas me. I've seen the
problem with it would schedule a job that referenced \\machine\c$, but
references shares don't seem to work too.
what am i doing wrong?Have a look at
INF: How to Run a DTS Package as a Scheduled Job
http://support.microsoft.com/defaul...b;en-us;Q269074
This has a section on the various security contexts involved. If you are a
sysadmin then the SQLAgent service account needs to be given access to the
remote server.
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"michael" <michael@.discussions.microsoft.com> wrote in message
news:E298049D-0691-4262-8A28-C340806E52A1@.microsoft.com...
> Hi All,
> I'm running into a problem executing a dts package. The package
> completes
> fine, however once it gets scheduled it fails. The package references a
> script on another server, so I'm assuming the job scheduler is not passing
> along my credentials, however I schedule to job to runas me. I've seen
> the
> problem with it would schedule a job that referenced \\machine\c$, but
> references shares don't seem to work too.
> what am i doing wrong?

Scheduled DTS Package not running

I have a DTS package setup that runs just fine when I fire
it off as a DTS package, but when I schedule it to run it
fails.
I'm running SQL2K, sp3. SQLAgent is running.
Has anyone seen this before ?
TIA...
Michael.What is the package trying to do when it fails? This can happen because of
privileges (or lack thereof) of the SQL Agent service account that differ
from the privileges used when running the package from Enterprise Manager.
--
Bob
Microsoft Consulting Services
--
This posting is provided AS IS with no warranties, and confers no rights.|||as indicated before it depends on a number of things . .
1) if DTS references a file that SQLAgent Account cannot Access/does not have access t
2) if non-sysadmin created SQLAgentJob and SQLProxy a/c exist then job will be executed in SQLProxy a/c contex
3) if DTS is executed using exec xp_cmdshell 'DTSRun' or xp_cmdshell exists inside DTS and SQLAgent job creator account does not have rights to execute xp_cmdshell and no sqlproxy account then could get the problem
hope this helps|||The first part is an ActiveX script that gets file names
off a dir. and inserts them into a table.
The acct mesSQL01 is the account that SQL logs in under as
well as SQLAgent. It is also the owner of the DTS Package,
and has full control on the dir that it is looking on.
heres the fail message that is returned by sendmail:
STATUS: Failed
MESSAGES: The job failed. Unable to determine if
the owner (WILL\mesql01) of job GetFileName has server
access (reason: Could not obtain information about Windows
NT group/user 'WILL\mesql01'. [SQLSTATE 42000] (Error
8198))
I'm gonna start tearing it apart to see if there are other
parts of it that it CAN run. I am quite at a loss here.
Thanks for your help !!
m.
>--Original Message--
>What is the package trying to do when it fails? This can
happen because of
>privileges (or lack thereof) of the SQL Agent service
account that differ
>from the privileges used when running the package from
Enterprise Manager.
>--
>Bob
>Microsoft Consulting Services
>--
>This posting is provided AS IS with no warranties, and
confers no rights.
>
>.
>|||Ok, I think I've nailed down what is causing it to fail,
but I can't seem to find a solution.
Here's the ActiveX script...
Function Main()
Dim FSys
Dim Folder
Dim Files
Dim Comm
Dim Conn
Set FSys = CreateObject
("Scripting.FileSystemObject")
Set Folder = FSys.GetFolder
("\\fsq\Files\DM\Lab\TechReports")
Set Files = Folder.files
Set Conn = CreateObject("ADODB.Connection")
Set Comm = CreateObject("ADODB.Command")
With Conn
.Provider = "sqloledb"'
.open "Data Source = fsq\Mes_SQL01;
Initial Catalog =Lab Tech Library; User id=MesSQL01;
password=xxxxx"
end with
Set Comm.ActiveConnection = Conn
It all works with the WITH statement stuff rem'ed out, so
it's the stuff in the WITH statement that is causing the
fail, even though the MesSQL01 acct is a Domain account,
and has Admin priv on the SQL server. It even fails when I
log on as MesSQL01 and run the package local.
Why would this fail, even though it has the permissions ?
This is the domain acct that the server and SQLAgent logs
in under ?
help ?
TIA
>--Original Message--
>What is the package trying to do when it fails? This can
happen because of
>privileges (or lack thereof) of the SQL Agent service
account that differ
>from the privileges used when running the package from
Enterprise Manager.
>--
>Bob
>Microsoft Consulting Services
>--
>This posting is provided AS IS with no warranties, and
confers no rights.
>
>.
>|||Need to connect with trusted connection(not
your account is a trusted connection therefore no requirement to have userid and passwor
Dim IsTrusted ' IsTrusted is 0 by defaul
Dim oServe
Dim strServe
' Create DMO server object
Set oServer = CreateObject("SQLDMO.SQLServer"
' Use secure login and then login (trusted connection
IsTrusted = 0
oServer.LoginSecure = Tru
' connect to the server requeste
oServer.Connect (strServer)

Scheduled DTS package fails

Hi,

A DTS package which is running fine when execute ,always fails as
scheduled job.

I read from the previous posts about MS KB article 269074, security
and MDAC, but I don't understand and don't know how to solve it.

Please help.

My scenerio:

SERVER : MS Windows 2000 server is in a PRODUCT DOMAIN
MS SQL SERVER 7.0 SP2
- Agent started up by SYSTEM ACCOUNT and
Connection as NT Authentication

WORKSTATION (Enterprise Manager as Tool to connect MS SQL SERVER and
write and schedule DTS Package)
: MS Windows XP connect as NT Authentication
but in WORKGROUP DOMAIN

Best Regards
Nipon Wongtrakulniponw@.yahoo.com (Nipon) wrote in message news:<4c537316.0402050110.46f6f014@.posting.google.com>...
> Hi,
> A DTS package which is running fine when execute ,always fails as
> scheduled job.
> I read from the previous posts about MS KB article 269074, security
> and MDAC, but I don't understand and don't know how to solve it.
> Please help.
> My scenerio:
> SERVER : MS Windows 2000 server is in a PRODUCT DOMAIN
> MS SQL SERVER 7.0 SP2
> - Agent started up by SYSTEM ACCOUNT and
> Connection as NT Authentication
> WORKSTATION (Enterprise Manager as Tool to connect MS SQL SERVER and
> write and schedule DTS Package)
> : MS Windows XP connect as NT Authentication
> but in WORKGROUP DOMAIN
> Best Regards
> Nipon Wongtrakul

It would be helpful if you could post the error message, as it usually
gives a clue to the permissions problem. Since the agent is running
as System, that means the scheduled execution will not be able to
access network drives, for example. But without seeing the error
message, we can only guess.

Simon

Scheduled DTS fails, manual works. Help!

Hey all. I've got a DTS package that's scheduled to run after business hours on the last day of the month. This package copies some tables from an offsite SQL Server, then runs through a series of SQL Statements and finally exports an excel file with the results.

My problem is that the DTS will run if I manually start it, but the scheduled job always fails. Of course, the error I get is that the job failed at step one, and I have no other info.

I'm not a heavy DBA (mor eon the client app side of things), so I'm unsure as to how I can dbug this. Any help would be greatly appreciated!It's likely that the account that is setup for SQL server to use against your off-site resource does not have the credentials required. When you run the package manually, it's actually running as you. When it's run as a job, it's run under the server's account. I would check to make sure credentials are setup properly for your server.|||I'd just change the credentials used by the job step that runs the DTS package so that it actually DOES run as you, making the conflict a non-issue!

Note that this neatly side-steps a much larger problem. User accounts should not be required to make scheduled jobs run. You ought to have a "service account" with sufficient privledges to perform the task. This is a cornerstone concept for enterprise job scheduling.

-PatP|||Thanks for the info, I'll check that out. I do have one other job that runs 100% locally, and that one fails as well. We do have a load of jobs that run various times during the day, btu these are the only two that fail. I've checked the schedules, and the databases being used i nthe DTS aren't being accessed in any way when these are supposed to be running.|||Your "other" job may or may not have any of the same symptoms as the DTS you originally posted regarding. Does the "other" job run when scheduled as a job but not when run locally? If not, then that is a seperate issue...

scheduled dts fails but runs when done manually

I'm a newbie to sql2000. i have some jobs that copy stuff from a non microsoft database(titanium) to SQL2000. i use the propriety odbc drivers provided by titanium. when run manually in enterprize manager,it works. but scheduled as a job it fails with the message "System cannot find the specified File" i've read up and tried microsofts suggestions ie ensuring that the sql server agent has rights to the folders used etc. i've also tried puttin in the the dts owner and user passwords. each time it fails with the same error.
any one out there who can help?:confused:I'm a SQL2K newbie and I've experienced a similar problem.

When you run the DTS pkg manually, it runs on your client machine;
when you run it as a job it runs on the SQL server.

If you can run the DTS pkg manually on the SQL server (from its console), do that. You should get more details on the error. Most likely
something is missing from the PATH environment variable on the SQL
server (and you can compare to what you have for this on your client
machine).

Good luck!

Jeff|||Jeff's on the right track. When you develop a DTS package remotely, it remembers the paths based on where you developed it. You would either need to
- develop the package locally (on the server), in which case it would not run interactively from a remote machine, or

- use a unc path, ie. \\servername\sharename\filename. In this case, it should run interactively or scheduled.

Steve|||I'd also add to check permissions. You need to keep in mind that the job on the server is not going to run as "you" but as the sql server agent, so it maynot have the same authorization to access drives and shares as you do. That's the one that always catches me.