Oracle Data Tools (ODT) - schema compare - visual-studio-2010

We are wanting to source control our Oracle Schema - as we have a number of SQL Server databases on our estate we would like to use a common tool - for the SQL Server databases we use Visual Studio 2010 / dbpro which nicely source controls each object, integrates into our CI environment, and assists build/deploy to UAT and Live.
We would like to do the same for our Oracle databases however, from the tools on offer, they don't seem to be at all close to the functionality VS2010 provides - the VS2010 Toad plugin is no longer supported; we are trialing the ODT (Oracle Data Tools) plugin however I can't seem to locate how I can generate a delta script (compare) of an Oracle database project Vs a target Oracle instance - this seems to be a fairly fundamental requirement
Does anyone have any ideas ? It might mean we may need to combine the source control capabilities of VS2010 with the compare (generate delta scripting) of another tool like SQL Developer. Has anyone gone down this path ?

Found this update in the Oracle forums:
Question:
Hi,
how can i do a schema compare in Oracle Developer Tools for visual studio ? and is it possible to do compare through command line from ODT or by any other way?
Answer:
This is now available in ODT 12.1 or later.
Here is a walkthrough:
http://apex.oracle.com/pls/apex/f?p=44785:24:1995235124222:::24:P24_CONTENT_ID%2CP24_PROD_SECTION_GRP_ID%2CP24_PREV_PAGE:8210%2C%2C24
Edit:
From my brief check, it enables comparison of existing schemas, but not comparison of the project with a database.

I haven't used it but redgate has schema control and source control for Oracle.
http://www.red-gate.com/products/oracle-development/

Oracle sell a Change Management pack and a Configuration Management pack , which they sell as chargeable extras to the Enterprise Edition licence. Yes, that is two products. Well not even multi-billionaires know where the next tropical island hideaway is coming from :)
Anyway, if your project has the spare cash you can find out more here and here.

Related

Using Oracle Developer Tools with Source Control for Visual Studio

I'm a bit lost in implmementing/using tfs version control with Oracle products. The project I'm on is using visual studio 2012, tfs 2013, an oracle 11g server, a few copies of Oracle SQL Developer, and a few copies of toad.
I was recently looking for a way to do tfs version control through visual studio using oracle developer tools*. Is this a viable approach?
When tooling around with it, I've been able to create a database project with tables, procs, etc and put this under tfs version control. I've also been able to run these procs against my normal database server. However, I have not been able to put my existing database under version control. I have also not been able to run my code against the visual studio database project.
So can tfs be used with oracle developer tools to provide a version control solution?
Alternatively, are there any ways to integrate tfs version control with both Oracle SQL develoeper and toad?
*Oracle Developer Tools - http://www.oracle.com/technetwork/developer-tools/visual-studio/overview/index-097110.html
On the oracle developer tools promo page it says
"SQL Script Lifecycle with Source Control Integration: Generate SQL
scripts for Oracle schema objects that your .NET application uses,
manage them in an Oracle Database Project, check them into source
control, edit the scripts in the Oracle SQL Editor, and execute them
with a built in SQL*Plus execution engine."
How does this work? Can I automatically generate the scripts each night and check them in or something?
Yes, after you install Oracle Developer Tools for Visual Studio, you can configure your Oracle Data Connections in the Server Explorer, create a new Oracle Database Project, then drag and drop packages or other items from the Server Explorer to your new project. Then, after editing the .sql files that were generated, you can right-click on the .sql files generated and "Run" or "Run on...". Finally, you can also run subsets of each script by right-clicking on a selection and choosing "Run selection".
You still need the discipline to ensure everyone edits packages via source control and not on the database directly.
SSDT database projects in Visual Studio only support SQL Server.
One option is to try Red Gate Source Control for Oracle, a tool developed by the company I work for. This supports both TFS and Subversion. I'd be interested to know if this is something that might work for you.
You can use Toad to integrate Microsoft TFS changes. Please see : http://www.toadworld.com/products/toad-for-oracle/m/media-library/689.aspx

Visual Studio Project that execute an SQL script

I have this question... probably is similar to Executing scripts from a database project in visual studio
but i didn't understand the solution given.
So i made a Database Server 2008 project inside visual studio.
Just one table. When i press DEPLOY the database is created inside SQLServer2008 and the table is created.
Now what if i would like to give the project to someone who has SQLServer and he needs to recreate the database and the table in his computer?..
Apart form executing the query from Visual Studio is there any way to create an executable that automatically "deploy" from outside Visual Studio?..
Thanks,
There are different types of Database projects in Visual Studio. The old ones, which were not so feature rich. The 'Data Dude' ones that came with Visual Studio 2010 Team Database Edition and the most recent iteration that comes with the SQL Server Data Tools. All of these can be installed on top of the standard Visual Studio Professional and don't require additional licenses.
SQL Server Data Tools is the latest, and also the best integrated and most powerful variant of the bunch. It can also be used to compare existing schema's and generate upgrade scripts or automatically upgrade the schema in an existing database for you.
During build, a package will be created that holds all the schema information for your database. You can then use the command line tools provided by the SQL Server data tools or MSDeploy to deploy your compressed schema file to a new or an existing database.
This deployment mechanism can also upgrade existing schema if needed.

Advantages of using SQL Server 2008 Database Project

What are the advantages in using SQL Server 2008 Database Project which comes with Visual Studio 2010? When you Google about it, you don't find much details on that. Is it outdated or people have better ways of doing what SQL Server 2008 Database Project can do?
Pros
The data compare functionality makes applying and extracting changes very easy, and on numerous objects (both different & same types -- table, view, function, etc). It will also script out the changes - we use it for versioning scripts. We've encountered the issue regarding updatable views, which is to be fixed in the next Visual Studio.
The schema compare functionality is helpful when you want to check data that's different between databases.
Cons
I would never use it for SQL development. It's not interactive like Management Studio, so it's not a wise thing to rely on.
If you have lots of objects (tables, views, functions, sprocs, triggers), VS can take a while to load. It's not the Database Project issue, so much as Visual Studio as I'm told -- just too many files.
CLR support in data compare is questionable (scripting export/import), I have yet to look into this

How Do I Attach a SQL Server Express Database to a Visual Studio 2010 project?

How do I do this?
Attach an SQL Server Express Database to a Visual Studio project so that...
my source control contains the most resent schema for the database including stored procedures (can'
t use SQL Compact Ed. because need to be able write stored procedures against the database),
can be version controlled using TFS without using tools like Red Gate Source Control,
can be automatically set up/updated when a developer gets the latest version of a project (using MS Build or similar build script api),
(would be nice) can be published after entire project passes unit tests.
Is any of this possible and if so how do I do it?
Sounds like you want a migration framework, more than you want to store the actual database. Look into migration libraries for .Net like FluentMigrator.
This sounds like continuous Database Integration:
http://www.codeproject.com/KB/architecture/Database_CI.aspx

Setting up nHibernate with an Oracle database and Visual Studio 2010

I'm creating a .ASPNET project and I would like to setup nHibernate as my ORM tool. I will be using an existing oracle database and Visual Studio 2010. ORM tools are very new to me and really could use any advice to better understand the tool and the process required to implement them.
I've been following an article at http://nhforge.org/wikis/howtonh/your-first-nhibernate-based-application.aspx to learn about it and am stuck where they say to create a local database as mine only give me the option to create a SQL server database (perhaps this a new for visual studio 2010?). Is the purpose of this database just to cache results from the live database?
Thanks for your help!
Geoff
have a look to SchemaExport helper class, NH can create the DataBase Schema for you ( anyway you have to create the "user" in the oracle database to connect to ). AFAIK VS2010 does not support OracleDB out of the box.
If you need to reverse engineering the DB in thehbm mapping files, you can try (my) OS tool: http://nhforge.org/wikis/howtonh/how-to-use-db2hbm.aspx, but yet again, complete Oracle is not supported, but you can do the work by configuring.

Resources