What are the challenges you face when working across database platforms? Take the survey
Options

How to migrate my SQL Comparison SDK scenario to DLM Automation?

Supposedly this product is a replacement for the SQL Comparison SDK. As far as I can tell, it isn't.

I need to be able to do the following from my C# code:
  • Generate a script of the schema differences for just the tables from database A to database B, ignoring objects whose name contains any of a set of strings.
  • Generate a script of the schema differences for just the tables from database B to database A, with the same name filter as above.
  • Generate a script of the schema differences for a list of object types that we care about from database A to B, with the same name filter as above.
  • Generate a script of data differences for some tables from database A to B, following a somewhat complex list of rules:
    • All tables that start with any of a list of prefixes, AND that aren't in a list of excluded tables.
    • Tables that don't start with one of our prefixes, but are in a separate list of must-include tables.
  • As part of the above, set a manual comparison key for one of the tables, as I can do in the SQL Data Compare UI. (This one might not be possible from the SDK - it's a new requirement that I'm still working on implementing. But it's still something we would need DLM Automation to support in order to migrate.)

How can I accomplish these with DLM Automation?
  • Which cmdlets do I need to use? (I can't find the data comparison cmdlet at all. Sync-DlmDatabaseSchema seems the most relevant for the schema comparison, but it doesn't allow file output.)
  • How do I call the cmdlets from C#?
  • How do I tell them what tables to use? Is writing a filter.scpf file the only answer, or is there some other method? And if that is that only answer, where can I find the schema for it so I know how to create one?
  • How do I distribute this without each of my end users needing a DLM Automation license?
Tagged:

Answers

  • Options
    OK, there's a lot to this. Best recommendation, check out the documentation located here. What you're looking for is Build. That's the one that's going to let you do the comparison and generate scripts and output. Sync will actually do the move after you've completed the Build. Come back here after you check that out if you have more questions.

    As to C#, I don't know. I've only done this work using PowerShell and the examples will show that. I'll see if I can get someone to show that for you.

    You can pass in a filter to the Build process.

    You can distribute the artifacts you generate, but if you need to do a compare to each of the clients to generate that artifact, that's tougher. We'd need to drill down on what you're doing, why and how.
Sign In or Register to comment.