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.
how to create sql for constraints when migrating from oracle
Moderator: NorbertKrupa
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: how to create sql for constraints when migrating from oracle
Jim Knicely
![Image](http://vertica-forums.com/MyUploads/ASE_ebadge.png)
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
![Image](http://vertica-forums.com/MyUploads/ASE_ebadge.png)
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Re: how to create sql for constraints when migrating from oracle
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.
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.