Import oracle dump to PostgreSQL - oracle

I have a plain text not oracle binary dump. How can I import this to postgres? Are there tools available for this out there? Or is there some other one, anyone did this before?
What I though is to convert one dump (oracle) into another dump (postgres).

Check out ETL tools like Talend and Pentaho for conversion between Oracle and PostgreSQL.
From an Oracle dump it's going to be much more difficult. Your best bet is almost certainly to load it into an Oracle instance and then use migration/ETL tools from there. Depending on the dump size, features required, etc, you might be able to use a free Oracle version for this.

I don't think it is feasible in an easy immediate way. Is the plain text in sqlloader format? I think it may be easier for you, if the database size isn't huge, to export DDL and then data in INSERT format.
An alternative would be a migration tool, such as Talend, but again, it isn't immediate. The shortest path go through standard SQL, IMHO.

With newer PostgreSQL versions (9.1 or later) you might be able to use a foreign data wrapper to access the Oracle schema from within your PostgreSQL database, e.g.:
http://laurenz.github.io/oracle_fdw/

Related

Does SQL Developer GUI use an encoding?

I'm using SQL Developer and I have a doubt about displaying data in the SQL Developer GUI. Indeed, I have an encoding concern, and I wanted to check the real state of the data, because I think that maybe the SQL Developer GUI also uses an encoding....
I don't know if my question is clear?
Oracle SQL Developer is a Java application, everything we do is 'Unicode'
That being said, when you open or create a file, you most definitely cause an 'encoding' to be set.
What most folks run into, problem-wise, is using a FONT that doesn't support the characterset being used in their database.
This setting affects display of BOTH your code and your data.
Disclaimer: I work for Oracle and I am the product manager for SQL Developer.

Convert old oracle joins to ANSI SQL joins

Is there a tool that would help me with rewriting thousands of lines of code?
We are going to migrate from Oracle server to Vertica and therefore the older
Oracle joins would no longer be supported and a lot of SQL needs to be rewritten.
Best regards
Toad 11.0 (query builder) is suppose to be able to do this. I've not use this in great detail, but for the most part it works. i would double check any code provided by any tool as nothing is 100% fool proof. Another promising tools that many like seems to be swissql. No matter which tool you use, you're going to need to have lots of manual proof reading to make sure the resulting query is what you want.
Vertica's variant of SQL is the same as PostgreSQL. So you may want to see if any tools handle that already.
Here's a link that may be a good starting point: Tool for translation of Oracle PL/SQL into Postgresql PL/pgSQL

T-SQL: is there a way to force conformance to ANSI SQL?

We are planning on writing a load process that uses SSIS and loads a SQL 2008 database. Transformations may be done in the packages or in stored procedures that are called from a package or directly from our job scheduler.
What can we do now while in planning stage to minimize the impact should we have to migrate the app to Oracle in teh future?
I picture the SSIS packages could be changed to use a different provider.
What about the SQL that we use?
Q: Is there a way to put, for example, a stored procedure in "ANSI mode" for lack of a better term to ensure that only standard SQL is used within to increase our chances that the SQL will migrate to Oracle?
One thing you can do is SET FIPSFLAGGER FULL etc. More info here: http://msdn.microsoft.com/en-us/library/ms189781.aspx
I am not aware of any ANSI Standard for RDBMS programming languages. And the constructs between TSQL and PL/SQL are quite different.
But can you use the Common Runtime Environment (I think that's what its called) in SQL Server to run JAVA? If you can, and given that Oracle can run JA VA this might offer a pathway to what you want to acheive.

Database Re-engineering/Schema Generator Tools

I have joined a project which has been already developed and its a legacy project with very large database and its in Java/J2EE.
I am trying to understand the Database Design & Architecture and so is there a tool available which can generate schema from the populated table representing all the constraints like foreign keys etc ?
Basically am looking for an Database Re-engineering Tool. My database is Oracle 10g.
Inputs would be highly appreciated.
I use ER/Studio and I absolutely love it for all my data modeling, reverse engineering and database design work.
http://www.embarcadero.com/products/er-studio
I should really become an ER/Studio evangelist.. but really, it is a great product.
Haven't played much with it, but Oracle has a tool included with SQL Developer: Oracle SQL Developer Data Modeler. I agree with #Raj that ER Studio is very good; I've also used ERWin. Both have the drawback of being quite pricey. For a while there was free downloads, but I see now it appears they're charging for it. Don't know how much.

Can I use imp/exp tools to migrate database from Oracle 9 to Oracle 10

I'm subcontractor and my client wants to upgrade Oracle database from 9 to 10. Other vendor is going to perform the upgrade process, and I was asked to create whatever backup I need before the upgrade, and then recreate the environment in Oracle 10. All my data is stored in a separate database in a single schema. No fancy relations, scripts or anything like this (actual app supports different dbs: Oracle, SQL Server, Postgres so we want to avoid any DB-specific code).
I was hoping to use imp/exp but I'm not sure if imp/exp are backward compatible (exp from O9 and imp to O10)?
If there is a better/recommended way of dealing with similar situation, I'll be grateful for any advice.
Yes, you can use imp/exp to achieve that. And when you are on Oracle10, use Oracle's new Data Pump utilities instead of imp/exp.
You can for sure use the exp tool to export your database and then use the imp tool to import it to the new database.
Can one import/export between different versions of Oracle?
Different versions of the import
utility are upwards compatible. This
means that one can take an export file
created from an old export version,
and import it using a later version of
the import utility. This is quite an
effective way of upgrading a database
from one release of Oracle to the
next.
Oracle also ships some previous
catexpX.sql scripts that can be
executed as user SYS enabling older
imp/exp versions to work (for
backwards compatibility). For example,
one can run
$ORACLE_HOME/rdbms/admin/catexp7.sql
on an Oracle 8 database to allow the
Oracle 7.3 exp/imp utilities to run
against an Oracle 8 database.
For more information on this matter, take a look at Import Export FAQ.
While you can use exp/imp to "upgrade" from an older version, i wouldn't do it!
By using exp/imp you are effectively creating a new database. You are going to loose all table statistics. Sure, you can recreate them. But why? You will also need to create new logins/passwords. Make sure, that there are no 3-rd party tools involved, which are used for querying the database. Perhaps in the meantime, a second schema (eg. for report generation) has been created which has grants on "your" application tables.
In my opinion it would be better to install the oracle 10 software and then to upgrade the existing database. Oracle provides sufficient migration tools.
No matter what road you are choosing, you should test it throroughly on an intergration server using the full volume of the "production" data. Also be aware, that the import can take much much longer than the export did.

Resources