简体   繁体   中英

Oracle Developer Tools for Visual Studio 2017 (ODT)

I have created an Oracle Database Project Version 2 on visual studio 2017 and imported an existing database to the project to obtain the database schema on my project, and I got an SQLfile for such object in my project. The problem is when I'm modifying a table for example and saving the changes on my oracle database project and build it, I get a create script as output instead of an alter script so this script can't be deployed to my database due to "existing object error".

I tried to do it otherwise by proceeding to schema compare option:

  • I launched the schema comparison by mentionning my oracle database project as source and my database as target
  • The result of the comparison indicated that there is an non indentical object between the source and the target which was the table (because i added a coloumn to the table)

Again the problem is when I generate the update script it gives a drop/create table script instead of an alter and I can't deploy this script because I will lose data.

Does anyone have any ideas? how can I get the alter script by building the project or launching a schema compare operation?

I've found that comparing two databases DO generate a "somewhat" correct diff script (it may need some manual adjustment). So you can run the SQL file generated by the database project against a different oracle instance, and then compare both.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM