Hello, my name is Robert Pound, and I'm a product technologist from Quest. In this video, we will see how to perform a multiple schema comparison in Toad for Oracle. So first, how do we actually access the tool? We'll come up to the top and choose Database and then Compare.
And you can see we have several options for comparing data, tables, schema, databases, etc. But we're going to choose multiple schemas. And when the tool opens up, you can see the workflow at the top. So we're going to first choose our schema or schemas, choose the object types, then choose Options, and then finally view the compared results.
In this tool, you can compare one to one, one to many, or many to many. So we'll start with an example first, just a one-to-one comparison. So I have chosen my database connection and my source schema that I want to compare. And I'm going to come down here into targets and choose Add Target Schema. Now you have the option, just like you do on the source, to choose either a database or a snapshot.
I'm going to go ahead and choose a snapshot, and this is actually a snapshot of the same database. So let me go ahead and click OK. Let's see what changes have happened since we took the snapshot. So I will choose Next, and from here, you can choose what object types you want to compare. By default, it's selected all of them. I can come and right click and choose Select None and then, for instance, select just tables or stored procedures or what have you.
And I will choose Next, and there are many different options for fine-tuning your comparisons, whether you want to look at object type, storage clauses, whether you want to de-select all of them or what types of storage clauses you want to look at. Output has to do with automation. So if you're running this comparison on automation, you can choose your output file, your directory folder. Because if you do multi-comparison, which you'll see in a minute, each one of the comparisons is in a separate folder.
What options you have per script and filtering, etc. The options, unless you know what you're doing, I would just leave it default, unless you're looking for something specific. So let me go ahead and click Next again. And now, we have our comparisons. Let me go ahead and choose Compare. And now it's done it's comparison. It's found 12 differences.
And if you come to the bottom, you can expand out these lists to show which objects are different, which are in the source only, which are in the target only. And for each one of these-- in this case, all the grants-- you can de-select them and they will be removed from the sync script. So currently, we're looking at the details. We can come here to the summary and it will show us an HTML friendly version of the difference report. And you can obviously save this out and send it out and then the script itself.
So as we go in and de-select these, like I said-- and I'll go ahead and uncheck all of them through the right click menu just so you can see very distinctly. Now nothing selected. This is how you actually go about sinking. So let me go ahead and use the back to start button.
So that's all well and good, but this is a multi-schema compared tool and we're only doing a single comparison. So if we want to do multiple schema compares, we come back to target and choose Add again, and this time I will choose a database. And we'll go ahead and select that schema and click OK. And you can keep choosing the Add button to add more schemas or you can choose the dropdown button and choose Add Multiple Schemas. And you can either select from different databases or all in the same database.
And in this list of available schemas, you can come and select and move them over to Selected Schemas. Or if you want to select multiple, you can Control click or Shift click and add multiple schemas and then click OK. And they will show up in the targets list. So this is a one-to-many schema comparison, but what about a many to many?
So if we come up here to the top and choose Special Multiple Schemas, it's going to warn me that it's going to wipe out everything that I currently have selected, and I say, yes, OK. And now we have multiple schemas. Currently, you see nothing at the bottom, and that's because match schema is automatically selected. If I de-select this, it's going to ask me to choose a source. So first, I will select a connection. And now we have schemas in the source and schemas in the target.
And it's automatically chosen the schemas that have the same name in both target and source. If you wanted to select schemas on the target, for instance, that don't show up, you can come here. And then from the dropdown list, select an available schema from All Available, and then it will sync it up.
You can also choose to add empty schemas to this list. So if I de-select this, there will be a couple of schemes that show up that were apparently empty. And also, you can filter this list. So if I wanted to look at prod, for instance, or quest, I could look at it from the filters. So now I'm only selecting schemas that have the word "quest" in them, so that way if we continued forward, it would compare only these schemas.
So let me go ahead and do that. I will click Next. And again, we could select our objects and our options. And then run the comparison. While that's running, let's take a look at some of the tools at the top. So refresh, obviously, if we had already run this, we can refresh it. And if we wanted to send this report to the editor, we can do that here. We can also send the summary information to Excel and we could cancel it while it's running if we no longer wanted to wait for it to run.
And now it's completed its run. So for each one of these comparisons, if we select it, it will show the difference details on the bottom. So if I move to a different one, it will update. And obviously, the script will update as well as well as the summary.
So if I select one of these comparisons, I could from here just send it directly to the editor. And that's all there is to it. Hopefully this video shed some light on how you can compare multiple schemas from a single feature in Toad for Oracle. To get more information on this or other topics, you can choose the help content in the tool itself, which has a wide range of information and tutorials to help you get started.
You can also check out the community driven innovation going on at www.toadworld.com. I encourage you to log into the tool so you can get content specific to Toad for Oracle. For more information on this product, visit www.quest.com/products/toadfororacle. Thank you, and have an awesome day.