Export DTS to bas

Finally, after searching, reading, and testing, I found a solution. Not entirely difficult either, but could take a while depending on how many you have to export. I did 111 in an hour.

I took the GUI macro tool approach. Downloaded a macro recorder from http://www.eventcorder.com/ec_downloads.htm, used the lite version, it's free.

Install recorder
Open SQL Server enterprise manager -> get to your local packages.
Now, you'll need to use the keyboard entirely to open,save and close, so try it out first.

I used the following keystrokes, to save a package currently highlighted in the local packages, in the right pane.

  1. {ENTER}
  2. {ALT + P}
  5. {ENTER} #at this point you should see "saving as"
  6. {TAB}
  7. {TAB}
  8. {TAB}
  11. {TAB}
  12. {TAB}
  13. {ENTER} #at this point you should see "saving as" dialog box, this defaults to your "my documents" folder
  14. {ENTER}
  15. {ENTER} #File saved
  16. {CTRL + F4}
  17. {ARROW KEY DOWN} # to start on new package
Once you are satisfied this is working properly, open eventcorder, position the window so that the red circle(the record button on the far left) appears just to the right of the "Local Packages" title, which appears above the "name" column in the right pane of SQL Enterprise manager. At this point select the first package in your list, now click record(the eventcoder app will minimize to the upper left of your screen and say REC:1, or similar). Then, witout moving the mouse, just click again, this will set focuse to the SQL manager window. Now begin the key stroke sequence you practice above. Once you completed step 17, press {CTRL + ESC} to stop recording. Eventcorder should now be appearing right where it was prior to starting the record. Go to "Edit" -> "Events", here we need to set the "Seen Window" in the "Windows" tab. Hopefully you'll see 4 listing in the "Expected window" list. Click on the "Seen Window" drop down, a prompt should appear, say yes(work with previious....), now the first option selected should be the "SQL Server Enterprise Manager -[Console root..." or something similar, the main thing is that it has the class name of "MMCMainFrame".

You should be ready to go, just click "Close", focus is given back to the eventcorder app. You should see your list of packages in the back of the eventcorder app, with the second package in the list selected, if not, make it so. Click "Play" --> "Repeatedly", and watch the magic happen. One thing to note, when it gets to the end there will be an issue, since it can't key down any further than the last item, it will open the last item and play the macro again. When it tries to save, the package will prompt you to overwrite the existing package. At this point I believe I {CTRL + ESC} to end the macro. Now check you "My documents" Folder, if all went well you should be smiling. If not, ... eh, review your process, sorry.

This is as accurate as i can get at the moment, I hope this helps.... This approach worked 100% for me, and I can recreate the whole process from scracth, so I know this works.

Comments :

0 comments to “Export DTS to bas”