Showing posts with label containing. Show all posts
Showing posts with label containing. 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

Scheduling a job containing a DTS package on Sql server 2000

I've tried several different possibilities but don't have enough basic
understanding of the ownerships and permissions that are involved so
I'm looking for someone to explain what is required:

I created a DTS package that includes a drop table, create table, and
data transformation task. Originally, my owner was local to the pc
workstation with administrator priveleges. When I executed the
package on demand (manually, not scheduled), it runs just fine. No
errors. When I schedule the package to run at a scheduled day/time,
it fails with an access is denied message.

I originally was using the sql admin user and password in the
connection but the view job history kept referencing "Executed as
user: sqlservername\SYSTEM..." and errored with an access is denied
message. Where did it get the SYSTEM user from since my connection
used the sql admin user in my DTS package? Do I need to determine how
to get the sql admin user or should the SYSTEM user really have to run
this scheduled job? How do I get the sql admin user to show as the
"executed as user"?

I created another admin user to see if it had someone to do with the
sql admin account but I got similar results. I tried creating the
package as an NT domain user but got similar results.

I'm sure it has something to do with permissions and ownerships but I
really don't have a clear understanding of how it was intended to
work.

Any advise you can give is greatly appreciated. I've read alot of
postings and I'm still not clear on the requirements."ano1optimist" <ano1optimist@.aol.com> wrote in message
news:253240f3.0308222018.3fdc0579@.posting.google.c om...
> I've tried several different possibilities but don't have enough basic
> understanding of the ownerships and permissions that are involved so
> I'm looking for someone to explain what is required:
> I created a DTS package that includes a drop table, create table, and
> data transformation task. Originally, my owner was local to the pc
> workstation with administrator priveleges. When I executed the
> package on demand (manually, not scheduled), it runs just fine. No
> errors. When I schedule the package to run at a scheduled day/time,
> it fails with an access is denied message.
> I originally was using the sql admin user and password in the
> connection but the view job history kept referencing "Executed as
> user: sqlservername\SYSTEM..." and errored with an access is denied
> message. Where did it get the SYSTEM user from since my connection
> used the sql admin user in my DTS package? Do I need to determine how
> to get the sql admin user or should the SYSTEM user really have to run
> this scheduled job? How do I get the sql admin user to show as the
> "executed as user"?
> I created another admin user to see if it had someone to do with the
> sql admin account but I got similar results. I tried creating the
> package as an NT domain user but got similar results.
> I'm sure it has something to do with permissions and ownerships but I
> really don't have a clear understanding of how it was intended to
> work.
> Any advise you can give is greatly appreciated. I've read alot of
> postings and I'm still not clear on the requirements.|||<snip
Oops, I meant to paste this:

This KB article covers this issue in detail:

http://support.microsoft.com/?kbid=269074

Simon