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.
Related
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.
I wonder if anyone knows if it is possible to use a Database Project in Visual Studio with Firebird? It seems that the DataSource in Target connection in the Deploy tab in the project properties is locked to Microsoft SQL Server and same goes for the "import database objects and settings".
It would be really neat to be able to version control and handle a Firebird database the same way I can version control and handle a MS SQL database.
If this isn't possible, does anyone know of a good way to version control a Firebird database? :)
You can't. This is only for MS SQL.
Actually you can still use it with Firebird, but you'll not be able to use 90% of features, because it's expecting MS SQL - connection to database or syntax or ...
Maybe this Sourceforge project can help: http://sourceforge.net/projects/fbnetinstaller/ :)
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.
All,
I have Oracle database project in VS2008. Now i upgraded my project to VS2010.While trying to create a database project , i can see i can't select any other Data source other than SQL Server. But in VS2008 i have option to select different data source.
I read about Toad Extension for Visual Studio and but its also not supported anymore.
http://www.toadworld.com/Blogs/tabid/67/EntryId/519/Creating-an-Oracle-Project-with-Toad-Extension-for-Visual-Studio.aspx
http://toadworld.com/Blogs/tabid/67/EntryId/876/What-happened-to-Toad-Extension-for-Visual-Studio.aspx
How can i set up oracle database project in VS2010. Is there any way through TFS?
Any suggestions??
Thanks
I believe you may want to install the Oracle Data Provider for .NET. (ODP.NET)
http://www.oracle.com/technetwork/topics/dotnet/index-085163.html
EDIT:
also you may want to check this one that supports entity framework
http://www.devart.com/news/2008/directs475.html
I've added a SQL Server 2008 database project to my Visual Studio 2010 Professional Edition solution in the hope that it might allow me to include my database in version control.
I can commit the schema files for each database object into version control, however these schema files all script objects as create rather than alter, so are not good for colleges getting my changes and updating their databases.
Is this a good way to get my database into source control?
And what would the workflow be for actually using it to update databases to a given revision without losing all the data associated with dropping and re-creating all the tables?
Update: on Premium and Ultimate versions, there is a schema compare tool which makes this easy. This does not exist on Professional. Is there any straightforward manual workaround?
I'm not sure if you can do this in VS 2010 Professional, but in VS 2010 Premium, you can do a schema comparison (Data -> Schema Compare -> New Schema Comparison) between your project and database, and update changes in either direction.
When going from project to database, VS generates a script that copies existing data into a temporary table before dropping the existing one.
The database project has a deploy step (which is present in my Professional copy of VS2010) that will generate a sql script with your sql objects in it.
The key thing here is if you r-click the project, properties, goto deploy and change target database settings to a specific database, when you deploy it will generate a change script for that specific database so it matches the objects in the project (and in theory keep existing data etc).
You can get it to either generate a sql script, or directly update the database. Generating a script is probably a better idea :)