This is a series of 3 Parts to talk about creating Oracle DB Project on Visual studio 2010, try to use it with some good features of the DB Project like refactor columns and lastly to use Automated Build with this project
Part2: Refactor your schema and see how visual studio handle it
I made the below example on Sample DB “HR” that comes with Oracle Enterprise 11g R2
Let’s Begin
- Open Schema View
- Here I will refactor the column “Department ID” to “Dep ID”
- Right click on “Department ID” and choose Refactor –> Rename
- Change the name to Dep_ID
- if you are checking the check box of “Preview changes” then by clicking on OK will show up the “Preview Changes” screen
- Click on apply then rebuild the application but don’t deploy it yet
- Let’s see if we made a schema comparison between we we have now and what is on the server
- Click on Data Menu à Schema Compare à New Schema Comparison
- After clicking on “OK” here is the layout you will get it
- Click on the different dependencies to see its tree
- with schema comparison you can just click update and the DB server schema will be updated, but if I were you won’t use it except if my DB is free from Data
- Because with schema comparison you will find in its script is a (Drop and create) and this is bad if you already have data with forced relationship ( you will definitely get errors) but the deploy script is different because it uses ALTER in its script . (will see in a while)
- Now let’s deploy the project by right click on the project and choose deploy
- if you made the connection correctly like the example I showed in Part1 then this will be smooth
- if you look closely in the output screen you can see the output script for the deployment (that is you choose script and database as an output type when you made deploy DB connection), this files extension will be OSQL
- As you see above the deployment script is different from the schema comparison because it use ALTER command.
Tags: ALM , Oracle DB Project , Visual studio 2010 , Oracle , TFS , TFS2010 , Toad Extensions , DB Project
Hi.
I am looking for a tool or extensión for Visual Studio that allow me do all integration with oracle databases, but It´s not possible download the Toad Extension for Visual Studio anymore. Do you know another extension or tool?, that I can you. Thank you for your help.
Hi Rafael,
I was shocked by the news that the support of Toad Extension for visual studio will stop, it was really a nice tool.
The other tool i know that you can use to make Oracle Project is the Oracle Developer tools for Visual studio, but it lacks many features