marcoadf


Hi all.

I've working around this one. I have a package that receives a parameter in YYYYMMDD format. I've tried from dtsexecgui and pass parameter. Tried 20070101 and worked fine. Tried convert(varchar,getdate(),112) and the whole string is passed, not the result as I thought.

So, I google it, so I can do this convert. Find out that this can only be done by, for example, a stored procedure that runs a cmdshell (DTSRUN.exe).

I've deployed my package (LIXO) by the manifest (also tried in VS save copy as - think this is the same thing). And the package is under MSDB in SSIS.

But now, I trie to run the package with all I could, for example:

DTSRUN /S "." /N "LIXO" /E

DTSRUN /S "(localhost)" /N "LIXO" /E

Also tried with user and password. I think I tried everything. And the error is always the same.

Says

"Loading..."

but then it breaks telling that could not find the package...

I connect into SSIS, run the package and it works just fine.

Can't discover what is missing around here.

Thanks in advance.

Marco Francisco




Re: Cant' run my SSIS Package from DTSRUN

Michael Entin - MSFT


DTSRUN works for DTS 2000 package, it can't do anything with SSIS 2005 packages.

Use DTEXEC.EXE

http://technet.microsoft.com/en-us/library/ms162810.aspx







Re: Cant' run my SSIS Package from DTSRUN

marcoadf

Thank you very much Michael. That was it. Now it's all

working.






Re: Cant' run my SSIS Package from DTSRUN

marcoadf

Is there other way of executing dtexec The production team will not enable xp_cmdshell, due to policies security. So I can't use this solution.

Other solution is to "force" variable to be getdate() in the parent package, but I'ld like to have other ideas/solutions. I want to make it throught a job sending YYYYMMDD parameter (based on GETDATE()) throught /SET statement.

Thanks.





Re: Cant' run my SSIS Package from DTSRUN

marcoadf

I can execute dtexec like this:

"C:\Progra~2\Microsoft SQL Server\90\DTS\Binn\dtexec.exe" /SQL "\PACKAGE_NAME" /SERVER "SERVER_NAME" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "VARIABLES"
my problem is, how can I use some SQL function in here. Function like CONVERT(varchar,getdate(),112). From what I've seen, this whole string (of convert function) is passed as the parameter and I want it's result in YYYYMMDD.
The purpose is to create a job (with SSIS step) that runs my SSIS package. But I want to edit command line manually so I can define the parameters as CONVERT(varchar,getdate(),112). Is this possible Is this only possible with a Stored Procedure that builds this statement and execute it by xp_cmdshell




Re: Cant' run my SSIS Package from DTSRUN

Phil Brammer

Can't you edit the package so that instead of using that as a parameter, it just uses the expression as the default value for every execution

If you're always passing in "convert(varchar,getdate(),112)" to the package, it doesn't make sense to continue passing that in when you can just apply that expression to a variable's expression property.