How can I automate compare snapshots with a variable filename?

Every week, I need to create a new snapshot of a schema and use the schema compare to compare the current snapshot with the snapshot of the week prior. The issue is that the filenames used for the snapshots need to be saved with a datetime in the file name. How can I use the Automation Designer to update the filenames within the Compare Schemas utility to account for the new name?

I can't seem to find a way to point the utility to a folder and just grab any .sdxml file in there. Nor do I see any way to pass a variable into the utility, as it seems that Automation Designer variables do not allow windows or internal oracle variables.

The best idea I had was to perhaps somehow run my job from command line (no idea how to do this), and pass it a configuration file or .ini file with the job settings. I would ideally have a script that updates the .ini file with the new filenames for schema compare (using snapshots), and then it would run the job itself.

Surely there must be a better way to approach this. Any ideas? Suggestions would be greatly appreciated!

In Generate Schema Script, if you are exporting only one schema, you can name the snapshot file however you like.

I guess you are exporting multiple and that's why you see the Folder Name edit box instead.

Will that work? You could just set up multiple runs of single schemas each.

[edit] Hm, rereading this...sounds like you want to have the date/times as part of the file name, and you just need to know how to deal with that in schema compare. You're right, there's no way to specify a variable there, but....

It's a bit of a pain, but here's something you can do:

  1. set up the schema compare (temporarily) with a hard-coded snapshot file
  2. right-click on the action in automation designer and choose "create parameter file"
  3. look at the file with notepad. You'll see "Source Def File1" in there.
  4. You can edit that file to put in whatever you want for filename.
  5. You can run the action with a parameter file like this:

toad.exe -a "App1->Compare Schemas1 | c:\temp\CompareSchemas1ParamFile.ini"

I can add an enhancement for version 17.0 so that you can specify a variable for source snapshot file name.

Thank you so much for your reply! Your understanding of my question in your edit is exactly what I'm asking. And thank you so much for giving me a command to work with - I can't wait to try this tomorrow (I'll be sure to let you know if it works in a future reply)!!!

A quick follow up question: Given that I would be editing and passing the .ini file in for the Compare Schemas utility, is there any way to specify in the .ini file to send the results of the Difference Details to an Excel file? If you run Compare Schemas via the GUI, you can right click in the Difference Details tab and then click on "Send to Excel". I'd like to replicate this if possible.

Thanks again for your help!!!

Hi Justin,

Sorry, saving the difference details to Excel is just a gui function.

You can get difference details to be saved with these options, but it saves as .txt and .html

-John