Page 1 of 1

how to create sql for constraints when migrating from oracle

Posted: Mon Oct 19, 2015 7:52 pm
by info4km
We are migrating from Oracle to Vertica. We have all of the tables created. Is there an easy way to generate generic/vertica compatible DDL/sql alter commands to add the constraints to the new Vertica DB? Maybe from the all_constraints data. Could oracle dbms_metadata.get_ddl be used to generate commands that we can run directly? I thought maybe someone had tackled this before. If there are tools that may be used that would be helpful as well.

Additionally, if there is an easier way to get the schema info from oracle (including these constraints) to do this at once and have the commands be compatible with Vertica, please let me know.

Thank you in advance.

Re: how to create sql for constraints when migrating from oracle

Posted: Tue Oct 20, 2015 1:08 pm
by JimKnicely
Check this link:

http://www.vertica-forums.com/viewtopic.php?t=840

Hopefully it'll give you a start :)

Re: how to create sql for constraints when migrating from oracle

Posted: Tue Oct 20, 2015 2:32 pm
by info4km
I have seen this already, thanks. We already have the tables, and were hoping to create the constraints all at once some how. Maybe we will need to rethink this and use the ddl to try and create the tables with the constraints at the same time.

I did try to use the get_ddl metadata functions to create the constraints only but keep getting an error on some of them. Anyway that is an oracle issue and not a vertica one.

I will keep looking for tools etc. thanks again.