Re: Unzip file using DTS

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Good point Jim, I still forget that just because we are in a DTS NG the question could be about anywhere <grin>

I looked back to the original Q and saw this

"...I have one XML file whcih is a zip file, which i do want to unzip using DTS..."




"Jim Vierra" <jvierra@xxxxxxx> wrote in message news:jvierra@xxxxxxx:

Except you are in a DTS session.  It will work and provides better control
than the shell method but will only work under DTS.  The example I gave
should work under any script environment.  Don't know if the user needed it
in DTS.  The question seemed to come from outside the DTS scripting arena
and I didn't want to go down the long road of debugging a first time DTS
script.


-- Jim Vierra

"Allan Mitchell" <allan@xxxxxxxxxxxxxxxxxx> wrote in message
news:eYzdsDSVFHA.544@xxxxxxxxxxxxxxxxxxxxxxx
> Yep.
>
> I use environment variables al the time as something to pass between
> environments so maybe
>
> Database Name
> Server Name
>
>
> Things like that.  Real Easy.
>
>
> I addition to using WScript to do the execution we could use the
> ExecuteProcess task
>
>
> How to manipulate the Execute Process task.
> (http://www.sqldts.com/default.aspx?251)
>
>
>
>
> "Jim Vierra" <jvierra@xxxxxxx> wrote in message news:jvierra@xxxxxxx:
>
>> I couldn't resist - it was sitting on my desktop from a previous
>> mis-adventure so I just cut out the fat an voila'!
>>
>> Ended up learning something too.  Setting environment variables from
>> script
>> is not documented but it can be done.
>>
>> WshEnvironment("VARNAME") = "var_setting"
>>
>> Won't persist outside the script scope but is useable for passing vars in
>> a
>> script or for changing the environment for provider calls and to alter
>> what
>> a spawned process see in the environment.
>> --
>> Jim Vierra
>>
>> "Allan Mitchell" <allan@xxxxxxxxxxxxxxxxxx> wrote in message
>> news:eE8Uf1NVFHA.1040@xxxxxxxxxxxxxxxxxxxxxxx
>> > Thanks Jim - the code fairy <grin>
>> >
>> > --
>> >
>> > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
>> > www.SQLDTS.com - The site for all your DTS needs.
>> > www.SQLIS.com - SQL Server 2005 Integration Services.
>> > www.Konesans.com
>> >
>> >
>> > "Jim Vierra" <jvierra@xxxxxxx> wrote in message
>> > news:eV0MDwNVFHA.2128@xxxxxxxxxxxxxxxxxxxxxxx
>> >> Code on demand. - just happened to use this the other day.
>> >>
>> >> strCommand = "c:\temp\pkunzip test.zip"
>> >> Set oShell = CreateObject("WScript.Shell")
>> >> oShell.Run strCommand
>> >> --
>> >> Jim Vierra
>> >>
>> >> "mvp" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> >> news:74880DBA-F472-4EF8-BD29-6D104A66BB7C@xxxxxxxxxxxxxxxx
>> >>> Hi Allan,
>> >>> Can you pls provide me small code example because i am very new in VB
>> >>> Script
>> >>> coding. I have already installed cmdline version of winzip.. i do
>> >>> have
>> >>> my zip
>> >>> file in C:\Temp\Test.zip, so pls provide me small example of activex
>> >>> script,
>> >>> so that i can create activex  task in DTS and test.
>> >>>
>> >>> thx in advance
>> >>>
>> >>>
>> >>> "Allan Mitchell" wrote:
>> >>>
>> >>>> I would call the cmdline version of Winzip or PKZip in an
>> >>>> ExecuteProcess task.
>> >>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>>
>> >>>> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
>> >>>> www.SQLDTS.com - The site for all your DTS needs.
>> >>>> www.SQLIS.com - SQL Server 2005 Integration Services.
>> >>>> www.Konesans.com
>> >>>>
>> >>>>
>> >>>> "mvp" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> >>>> news:EC1C6BF4-0528-45AD-ADED-33584F6CA437@xxxxxxxxxxxxxxxx
>> >>>> > Hello everybody,
>> >>>> > I have one XML file whcih is a zip file, which i do want to unzip
>> >>>> > using DTS
>> >>>> > and then want to load XML into SQL SERVER table, so can u pls let
>> >>>> > me
>> >>>> > know,
>> >>>> > how can i unzip file using DTS.
>> >>>> >
>> >>>> > thx
>> >>>>
>> >>>>
>> >>>>
>> >>
>> >>
>> >
>> >
>

.



Relevant Pages

  • Re: Unzip file using DTS
    ... Except you are in a DTS session. ... should work under any script environment. ... > I addition to using WScript to do the execution we could use the ...
    (microsoft.public.sqlserver.dts)
  • Re: Unzip file using DTS
    ... I use environment variables al the time as something to pass between environments so maybe ... ExecuteProcess task ... Setting environment variables from script ... > Allan Mitchell MCSE,MCDBA, > www.SQLDTS.com - The site for all your DTS needs. ...
    (microsoft.public.sqlserver.dts)
  • Re: Revealing error info from objects instanced in script tasks
    ... I have logging in place for ALL package events, ... Microsoft Data Transformation Services (DTS) Package ... I have observed if there are syntax errors in the script, for example, ... I wrote an ActiveX script host some years ago, and I know it IS possible ...
    (microsoft.public.sqlserver.dts)
  • Re: Revealing error info from objects instanced in script tasks
    ... >I have logging in place for ALL package events, ... >times-out when executing in an ActiveX script. ... Microsoft Data Transformation Services (DTS) Package ... >script code (such as ADO). ...
    (microsoft.public.sqlserver.dts)
  • Re: How to DTS SQL Files to update Procs?
    ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. ... You would script>> them out to text file, change the CREATE to ALTER and then replay the file>> using OSQL ... >>> procs in one step via DTS. ...
    (microsoft.public.sqlserver.dts)