Link to home
Start Free TrialLog in
Avatar of Wizilling
WizillingFlag for New Zealand

asked on

How do i find which DTS package has a schedule

I have a sql 200 server which has several dts pakages.
eg Export1 , Export2, Export3.
Out of this three there is only one that is scheduled to run. How do i find out which one??

I look at the jobs and it says under step: -->  DTSRun /~Z0xC5DDEF117B86B9EC27270FA240DAC171BA48FB  (trimmed)



ASKER CERTIFIED SOLUTION
Avatar of Hillwaaa
Hillwaaa
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Aneesh
sysjobschedules :Contains schedule information for jobs to be executed by SQL Server Agent. This table is stored in the msdb database.



aneeshattingal,

This will only give the info that is available in enterprise manager - looking at sysjobsteps still just shows the DTSRun command with associated encrypted string.  

Is there a function to decrypt that string to determine the name of the dts package within the encrypted string?
Avatar of Gautham Janardhan
Gautham Janardhan

USE msdb
EXEC sp_help_job

check BOL USE msdb
EXEC sp_help_job  for schedule
Now you know why you should schedule the DTS manually using DTSRUN rather than right clicking on it... when you right click it puts that awful string in.

To work out what it is running you can:

1. Start DTSRUNUI from tha command line
2. Select the first package
2. Press Advanced
3. Tick 'Encrypt the command line'
4. Press Generate
5. This will show you the gobbledygook that matches that particular package.
6. Repeat for each package till you match up the gobblydygook.


Lucky you have only three.
There is no way to decrypt the command line, you can only go the other way.

The idea is that you can encrypt your global variables into a big ugly string, and then no one can ever pick up your DTS command line and work out your global variables values.


Using the method above, if you originally scheduled the package by right clicking/Schedule package (Most likely scenario) it should work.



The /!Y option of DTSRUN basically does the same as what I described above.... turns a DTS package name/parameter mappings into an encrypted string.
nmcdermaid,

Not to take anything away from what you said, but ... :)
>>There is no way to decrypt the command line, you can only go the other way.<<
For the record and to save the questioner some time, there is a utility out there that supposed decrypts the file.  But:
A) There is only source code in C, but even after compiling it I could never get it to do resolve the string.
B) Even if it did function as advertised, it is against the EE MA.  See here:
Hacks, cracks and keys
https://www.experts-exchange.com/Databases/Microsoft_SQL_Server/help.jsp#hi100

>>6. Repeat for each package till you match up the gobblydygook.<<
It will never match.  Each time it will produce a different result.  Try it repeatedly as follows and you will see what I mean:
dtsrun /!Y /S "(local)" /N "Your Package Name" /E
acperkins,

Good point on the EE MA - I hadn't thought of that when asking about decryption - oops!

So it looks like my original post - while a bit risky in that you are copying then deleting the packages that the script runs against - is the only way to figure this out?

aha never say never :)

Doh, so it does.... it will indeed never match.