Showing posts with label contain. Show all posts
Showing posts with label contain. Show all posts

Monday, March 26, 2012

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

Wednesday, March 21, 2012

Scheduled report w/ Parameters

I have a sproc w/ 3 parameters. I'd like the schedule to kick in and
run through a list that would contain the parametes, I'm guessing this
won't work this way in Reporting services, but rather I'd have to
schedule x number of reports... is that right?
say for example Terretory 1 for Startdate 6/1/2004 EndDate 6/30/2004
then repeat that criteria for Territory 2-29
next month the dates should auto-cycle to 7/1/2004 - 7/31/2004.
Thanks for any tips or pointers :DYou can use data driven subsciption:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rswork/htm/rms_subscribing_v1_7oj9.asp
Check also this walkthrough
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSAMPLES/htm/rss_tutorials_v1_59ye.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Francisco H Tapia" <fhtapia@.hotmail.com> wrote in message
news:%23doGqsBdEHA.644@.tk2msftngp13.phx.gbl...
>I have a sproc w/ 3 parameters. I'd like the schedule to kick in and run
>through a list that would contain the parametes, I'm guessing this won't
>work this way in Reporting services, but rather I'd have to schedule x
>number of reports... is that right?
>
> say for example Terretory 1 for Startdate 6/1/2004 EndDate 6/30/2004
> then repeat that criteria for Territory 2-29
> next month the dates should auto-cycle to 7/1/2004 - 7/31/2004.
>
> Thanks for any tips or pointers :D|||Well, you should do the following:
1) Set the date parameters to have expression based default values that
calculate based on the current date and generate the appropriate date range.
2) configure a data driven subscrpiption to the retrieves the correct set of
territories from a database
3) schedule the D-D sub to run monthly.
With this approach you'll need to save the rendered report somewhere and you
won't have snapshots on the server.
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
"Francisco H Tapia" <fhtapia@.hotmail.com> wrote in message
news:%23doGqsBdEHA.644@.tk2msftngp13.phx.gbl...
>I have a sproc w/ 3 parameters. I'd like the schedule to kick in and run
>through a list that would contain the parametes, I'm guessing this won't
>work this way in Reporting services, but rather I'd have to schedule x
>number of reports... is that right?
>
> say for example Terretory 1 for Startdate 6/1/2004 EndDate 6/30/2004
> then repeat that criteria for Territory 2-29
> next month the dates should auto-cycle to 7/1/2004 - 7/31/2004.
>
> Thanks for any tips or pointers :D|||Lev Semenets [MSFT] wrote On 7/27/2004 3:53 PM:
> You can use data driven subsciption:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rswork/htm/rms_subscribing_v1_7oj9.asp
> Check also this walkthrough
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSAMPLES/htm/rss_tutorials_v1_59ye.asp
>
thanks for the links :D|||Lukasz Pawlowski [MSFT] wrote On 7/27/2004 3:54 PM:
> Well, you should do the following:
> 1) Set the date parameters to have expression based default values that
> calculate based on the current date and generate the appropriate date range.
> 2) configure a data driven subscrpiption to the retrieves the correct set of
> territories from a database
> 3) schedule the D-D sub to run monthly.
> With this approach you'll need to save the rendered report somewhere and you
> won't have snapshots on the server.
> -Lukasz
>
This gives me more to go on, thanks for helping me.

Tuesday, March 20, 2012

Scheduled Job Sometimes Error Sometimes Not

I have a scheduled job contain 2 steps. Step 1 is execute DTS Package
using CmdExec 'DTSRun', step 2 using TSQL to execute just simple query.
This job execute recurely every day, every 6 hours.
The problem is, sometimes this job was successfull, but sometimes
failed with error as below :

...
...
Process Exit Code -1073741819. The step failed.

Please help me, what the cause of the error?
Any help would be greatly appreciated.Resant (resant_v@.yahoo.com) writes:
> I have a scheduled job contain 2 steps. Step 1 is execute DTS Package
> using CmdExec 'DTSRun', step 2 using TSQL to execute just simple query.
> This job execute recurely every day, every 6 hours.
> The problem is, sometimes this job was successfull, but sometimes
> failed with error as below :
> ...
> ...
> Process Exit Code -1073741819. The step failed.
> Please help me, what the cause of the error?
> Any help would be greatly appreciated.

In View Job History, there is a check box for "Show step details". Check
that box, and you may find some more details.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Thanks for your reply.
The error that I've post is taken after I've checked "Show step
details". OK, I'll post the error again completely :

Executed as user: XXXX\xxxx. ...un OnStart:
DTSStep_DTSExecuteSQLTask_6 DTSRun OnFinish:
DTSStep_DTSExecuteSQLTask_6 DTSRun OnStart:
DTSStep_DTSExecuteSQLTask_10 DTSRun OnFinish:
DTSStep_DTSExecuteSQLTask_10 DTSRun OnStart:
DTSStep_DTSDataPumpTask_1 DTSRun OnStart: DTSStep_DTSDataPumpTask_2
DTSRun OnStart: DTSStep_DTSDataPumpTask_4 DTSRun OnStart:
DTSStep_DTSDataPumpTask_3 DTSRun OnStart: DTSStep_DTSDataPumpTask_2
DTSRun OnStart: DTSStep_DTSDataPumpTask_4 DTSRun OnStart:
DTSStep_DTSDataPumpTask_4 DTSRun OnStart: DTSStep_DTSDataPumpTask_4
DTSRun OnStart: DTSStep_DTSDataPumpTask_4 DTSRun OnStart:
DTSStep_DTSDataPumpTask_4 DTSRun OnStart: DTSStep_DTSDataPumpTask_4
DTSRun OnStart: DTSStep_DTSDataPumpTask_4 DTSRun OnStart:
DTSStep_DTSDataPumpTask_4 DTSRun OnStart: DTSStep_DTSDataPumpTask_4
DTSRun OnStart: DTSStep_DTSDataPumpTask_4 DTSRun OnStart:
DTSStep_DTSDataPumpTask_4 DTSRun OnStart: DTSStep_DTS... Process
Exit Code -1073741819. The step failed.|||Resant (resant_v@.yahoo.com) writes:
> Thanks for your reply.
> The error that I've post is taken after I've checked "Show step
> details". OK, I'll post the error again completely :
> Executed as user: XXXX\xxxx. ...un OnStart:
> DTSStep_DTSExecuteSQLTask_6 DTSRun OnFinish:
> DTSStep_DTSExecuteSQLTask_6 DTSRun OnStart:
> DTSStep_DTSExecuteSQLTask_10 DTSRun OnFinish:
> DTSStep_DTSExecuteSQLTask_10 DTSRun OnStart:
> DTSStep_DTSDataPumpTask_1 DTSRun OnStart: DTSStep_DTSDataPumpTask_2
> DTSRun OnStart: DTSStep_DTSDataPumpTask_4 DTSRun OnStart:
> DTSStep_DTSDataPumpTask_3 DTSRun OnStart: DTSStep_DTSDataPumpTask_2
> DTSRun OnStart: DTSStep_DTSDataPumpTask_4 DTSRun OnStart:
> DTSStep_DTSDataPumpTask_4 DTSRun OnStart: DTSStep_DTSDataPumpTask_4
> DTSRun OnStart: DTSStep_DTSDataPumpTask_4 DTSRun OnStart:
> DTSStep_DTSDataPumpTask_4 DTSRun OnStart: DTSStep_DTSDataPumpTask_4
> DTSRun OnStart: DTSStep_DTSDataPumpTask_4 DTSRun OnStart:
> DTSStep_DTSDataPumpTask_4 DTSRun OnStart: DTSStep_DTSDataPumpTask_4
> DTSRun OnStart: DTSStep_DTSDataPumpTask_4 DTSRun OnStart:
> DTSStep_DTSDataPumpTask_4 DTSRun OnStart: DTSStep_DTS... Process
> Exit Code -1073741819. The step failed.

That's pretty anonymous. Unfortunately I don't know DTS, so I don't
have any suggestions to offer. Maybe the people in
microsoft.public.sqlserver.dts has any ideas.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Some Googling suggests that the error may be caused by a Windows bug:

http://support.microsoft.com/defaul...kb;EN-US;306497
http://groups-beta.google.com/group...lr=&sa=N&tab=wg

If you don't already have the latest servicepacks for Windows and
MSSQL, it would probably be worth installing them to see if that
resolves the issue. Since a few people seem to have seen this error in
connection with a virus infection, that would be something else to
check. If this doesn't help, then it might be worth calling Microsoft.

Simon