Hi. This is Jeff Podlasek with Toad DB2 Development. In Toad for DB2 version 6.2, we've introduced the capability to compare DDL on a file to your live database objects. I'm going to demonstrate that feature for you right now.
I've got Toad up and running, and in order to invoke that new feature, you could use this big, large button right here, and you could click on the Compare, and you can see it drops down to now offer this new action of Compare DDL to live objects. Another manner in which to invoke that would be from the Tools option, Compare, Compare DDL to Live Objects.
And so what this new feature does, it allows you to have files that contain DDL. We're finding that a lot of our customers have DDL on file, and they want to compare that to their live objects before they actually implement the DDL. So this gives you the ability to do that.
So the object compare screen comes up, and it's modified a little bit. It has a few buttons that allow you to select the files as input. So if you click Add and then you select the files that contain your DDL, we allow you to add more than one file because we're finding that some customers might have their table DDL in one file and their indexes in another and their views in another, so we give you the ability to concatenate source files.
So that is your source, the file, and your target will be the database, the connection, that we'll compare the objects to. And you can see as we loaded or accepted that file, a hyperlink gets opened on the bottom here. And if you click it, it will give you a log of what we did when we processed that file. So as soon as you specify the files, we process them, and we'll identify if there's any invalid syntax or if there's some objects or statements that we do not support.
And at this point in time, you can see that we do not support Grant statements, so a couple statements are going to be ignored that were found in the file. I'm going to click next here, and we're going to proceed using the Object Compare wizard, and as you see, these are all the objects that we processed and found and identified that we will support in the source file. So there's a bunch of tables, views, indexes, schemas.
And we sort of streamlined this object compare wizard now because there used to be buttons down here at the bottom, if you invoked it with live objects, where you could-- say you want to bring in referenced or you want to bring in dependent objects, obviously using files as input, there's no such object. So this wizard has been simplified.
I'm going to click Next. And on this screen, you could specify mappings if you have name changes or schema changes that you might want to map your DDL names and schemas to a different flavor in your database. You could do that, just like you could in any object compare.
I'm going to leave them the same here and click Next. And so what we're doing, we've gone out, identified the source from the file and identified the live targets from the Database Connection, and we have our compare summary. So as you click on these items on top, the bottom reflect the differences. It's already differences. If the tables or objects are the same, an equals sign symbolizes that.
And here, we have a Source Only. So this table was only defined in the source, and it was not found on the target. So this is typically your typical object compare summary screen that highlights the differences between your source and target.
And if you're happy with those differences and you want to apply them, you just click the button Send to Editor, and this will open up a SQL Editor session that will make your target, your existing live database, just like the source. So if they're new tables, they will be created. If there's alterations of existing tables, they will be modified. So this is the new feature giving you the ability to compare DDL in files to live database objects for DB2 LUW in Toad for DB2 version 6.2.