What is the effort to migrate from Blackfish to Firebird ?
I use DBX4
No stored procedure, or function or views
I access all my data trough SQL queries
If you don't rely on specific Blackfish features (SP, trigger, admin packages calls etc), the change should not be a pain.
I've did this kind of migration in a DEMO for a customer.
If you have used Blackfish as a "collection of tables accessible via SQL" then the change will not be difficult at all.
There is a driver for delphi and dbx4 firebird
http://sites.google.com/site/dbxfirebird/
my guess is that is easy for you to dump the blackfish tables into csv
and then to import them in firebird and later modify only the application to access
the firebird db using the dbx4 firebird settings
For database pumping you can use tools like :
IBExpert (full version)
Database Workbench (full version)
or database comparer
Related
I maintain a Windows based application backed by SQL Server DB so there is a set of SQL entities, like tables, views. With time I add new features and fix bugs so schema of the tables and views changes. Once I need to deploy a new version of the application I deploy the DB part by relying on DacPac/DacFx which automatically generates a difference between already deployed DB and the supplied DacPac so the already deployed DB is altered to match the DacPac's content. This way I don't have to write a code which compares 2 schemas and then generates a difference - DacFx does that for me.
That works well but now I need to expand the application so it also supports SQLite DB, I will for sure have to create a new application layer working with SQLite which is doable but one place I need help with is being able to create and maintain SQLite DB schema in the same way I do for SQL Server with DacPac/DacFx so a difference in schemas is computed and applied. While doing that I ideally want do write the SQL schema once so it could be applied to SQL Server as well as SQLite. Ideally, I need to generate SQLite schema based on the schema specific to SQL Server.
I looked into sqldiff which is capable of generating difference between 2 SQLIte DBs and thought I could:
use a technique from here to migrate SQL Server schema to SQLite
generate a temporary SQLite DB based on the generated above schema
compare the above deployed temporary DB to an existing SQLite DB by using the sqldiff and finally apply the difference to the target SQLite DB
but the sqldiff, as stated in the Limitations section:
The sqldiff utility is not designed to support schema migrations
In addition it has limitations around views:
The sqldiff.exe utility does not (currently) display differences in
TRIGGERs or VIEWs.
So I interpret that like that tool could probably be used for some migration cases but it is not really recommended.
How do you suggest generating and applying the schema differences?
I'm also interested to know how others solve the task of incrementally updating schema of their SQLite DB even if I take SQL Server completely out of equation and would instead maintain SQLite schema, in the source code, only. Does everyone create their own schema comparing tools instead of using something similar like DacFx in SQL Server world?
how to create a synonym for a table of a schema in postgresql database on a server into a schema of oracle database on another server?
I have a schema on oracle database on a server and want to create a synonym a table present in a schema of postgresql database on another server.
To create the synonym, we need to have database remote link between these two databases present on two different servers.
How can we do this? Please provide me one solution.
Just to clarify, I believe the question is trying to figure out how to get PostgreSQL data to appear as a table inside of Oracle. (The existing comments seem to be reading it the other way around, in which case, yes, an FDW would be the solution, but in this case that will not work).
In the past (on older versions of Oracle) when we needed this we were forced to build custom replication scripts to transfer data from Postgres into Oracle systems. For a single table, it is pretty straightforward to do with something like Perl & DBI... feel free to substitute that with your favorite scripting language.
On newer Oracle systems, I believe you can use Oracle Database Gateway to accomplish this. I am not sure if they support Postgres directly, but they do support ODBC (and I think JDBC) which should work. Here is an example blog post setting this up with MSSQL (http://oracle-help.com/oracle-database/installation-oracle-database-gateway/), the process should be similar for Postgres.
Hope this helps!
We are trying to build a data access layer for using both Oracle and SQL Server (not at the same time).
We use EF Model-first for creating the model and the create the SQL scripts for building the database. Our first thought was to create 2 EDMX files, one for each type, and use the appropriate one depending on the client's need. We are using the Oracle and SQL Server database generation workflow and DDL generation template to create the scripts for each database.
Our main problem is when the database schema changes we do not want to drop and recreate the DB but only create the migration scripts to update the DB base on our model (clients have many data that will be lost).
We use EF power pack for extracting the migration scripts for SQL Server but there is nothing like it for Oracle.
We want help to find a good data layer (1 EDMX for both Oracle and SQL Server if it's possible and not complicated) and a good way to generate database changes from our model to update existing client DBs in case of a new application release
We found this as a starting point
http://msdn.microsoft.com/en-us/data/ff830362 but there is not mention for Oracle support.
We have tried code-first and EF Migrations but Oracle failed us again on the DB creation and migration.
Any recommendation on how we can accomplish this?
Thank You
There is no way to have single EDMX for both SQL Server and Oracle. EDMX consists of three parts CSDL (entity definition), SSDL (database definition), MSL (mapping between those definitions). SSDL must always target concrete database so you need at least separate SSDL for Oracle and SQL Server and if you are lucky you will not need separate MSL as well (mapping must be exactly same which will probably not happen if you are using any tool to generate the database).
So you always need at least part of EDMX file for second DB and manually maintain it.
If you need DB migration supporting Oracle you must look for tool from Oracle (or third party). For example RedGate offers tools supporting schema migration for both SQL Server and Oracle.
Visual Studion Premium and Ultimate edition also offers tools for comparing database schemas. It by default supports only SQL Server but Toad Extensions should add support for Oracle as well.
Once you have any of these tools you just need to compare schema deployed on customer server with your new schema and the tool should create migration script for you.
The best article I found on this topic is from Paul Reynolds Blog.
Try to go through from part 5 to part 9.
There are so many gotchas about Oracle mentioned there... is very helpful!
I have a two-part application, where there is a central database that is edited, and then at certain times, the data is released and distributed as its own application. I would like to use a standalone database for the central database (MySQL, Postgres, Oracle, SQL Server, etc.) and then have a reliable export to an embedded database (probably SQLite) for distribution.
What tools/processes are available for such an export, or is it a practice to be avoided?
EDIT: A couple of additional pieces of information. The distributed application should be able to run without having to connect to another server (ex: your spellchecker still works even you don't have internet), and I don't want to install a full DB server for read-only access to the data.
If you really only want your clients to have read-access to the offline data it should not be that difficult to update your client-data manually.
A good practice would be to use the same product for the server database and the client database. You wouldn't have to write SQL-Statements twice since they use the same SOL-Dialect and same features.
Firebird for example offers a server
and an embedded version.
Also Microsoft offers their MS SQL Server
as a mobile version (compact edition) and there are
also Synchronization services
provided by Microsoft (good blog
describing sync services in visual
studio:
http://keithelder.net/blog/archive/2007/09/23/Sync-Services-for-SQL-Server-Compact-Edition-3.5-in-Visual.aspx)
MySQL has a product which is called "MySQLMobile" but I never actually used it.
I can also recommend SQLite as an embedded database since it is very easy to use.
Depending on your bandwidth and data amount you could even download the whole database and delete the old one. (in Firebird for example only copy the database files and it will also work with the mobile version) Very easy - BUT you have to know if it will work for your scenario. If you have more data you will need something more flexible and sophisticated, only updating the data that really changed.
RedGate makes a tool for Microsoft SQL Server that allows you to snapshot the difference between two databases. It generates the scripts needed to update the database schema while preserving the data.
I need to find a tool like this for the Firebird database. We use Firebird in an embedded fashion, and would like to push out schema updates to remote machines with as little hassle as possible.
I don't know of a tool for Firebird that does exactly the same.
However, FlameRobin allows you to extract the metadata for single database objects or the complete database. It can also create scripts to recreate a certain database object including its dependencies. So you could either diff two database creation scripts and save the differences as the starting point (which may still need some changes), or you could use the recreation scripts for a single object and its dependencies.
This list contains a couple of comparison tools
As #devio suggsted, I took a look at the large list of administration tools listed on the IBPhoenix site. Of the tools on the list, the only two that generate scripts to migrate schema and data changes are XCase and Database Workbench.
Does anyone have experience with these tools? Are there others that I may have missed?
Embarcadero Change Manager will add support for InterBase and Firebird in the fall. Read all about it here. Change Manager includes schema archive compare and synchronizations, data compare, sync, and masking, and configuration management.
see IBExpert, it have a command line tool too where you can run scripts in a propietary language. You can compare two db and get the script to update the target db, it does a great job with dependecies, like views, it drops every dependency where the view is used, alter the view and then recreate the dropped objects. This can be done in GUI too, and a lot of other nice things
Migration tools for Firebird on IBPhoenix site are on a separate link Contributed Downloads - Migration Tools
Try SchemaCrawler link
SchemaCrawler is an open-source Java
API that makes working with database
metadata as easy as working with plain
old Java objects.
SchemaCrawler is also a command-line
tool to output your database schema
and data in a readable form. The
output is designed to be diff-ed with
previous versions of your database
schema.
As it requires a JDBC driver, you would also need the following: Firebird JDBC Driver