Comments (4)
Theoretically this could be achieved easily but technically every type of SQL or PL/SQL code processing is separated from others using the export type. This mean that if you want to convert pl/sql code you have to use the FUNCTION, PROCEDURE or PACKAGE export type individually with the corresponding file.
For example, let's say you have a file with several Oracle functions inside, using ora2pg as follow:
ora2pg -p -t FUNCTION -i the_oracle_file.sql -o the_postgresql_file.sql
will do the code conversion. This is the same for PL/SQL packages body, just use -t PACKAGE instead.
Since release 10.0 SQL queries can also be converted by the ora2pg SQL code rewritter with the following command:
ora2pg -p -t QUERY -i the_oracle_file.sql -o the_postgresql_file.sql
This will only apply to SELECT, UPDATE, DELETE and INSERT SQL commands.
So using one file per type of SQL code it is already possible, but I understand the need. Can you send me a sample file ? It will help me to have a random file to parse instead of my own well formatted file and not very useful for others :-)
from ora2pg.
We would need a new export type, mixing function, procedure, package and queries contained in a single SQL file. Would that make sense ?
I will send you a sample file privately, as I cannot share it widely.
from ora2pg.
Yes that the goal of the feature: being able to convert anything from an input file using a new export type.
Of course by "send to me" I wanted to say privately.
from ora2pg.
This item can be closed for me, the feature is now included into Ora2Pg. The only thing is that export must be done separately using the different export type, the all-in-one export in a single output file is not possible with the actual design of Ora2Pg.
from ora2pg.
Related Issues (20)
- ora2pg -c ora2pg.conf -t COPY -a tablename not working HOT 1
- Package name is shorter when referenced in CREATE TYPE HOT 4
- Package/Schema is missing in search_path HOT 1
- Unrecognized character in Ora2Pg/PLSQL.pm line 1237 HOT 1
- ORA-12505: TNS:listener does not currently know of SID given in connect descriptor HOT 2
- Problem with slow data migration speed. HOT 5
- Function JSON_ARRAYAGG does not get translated properly
- name of a column is a reserved word in postgresql HOT 3
- ORACLE_DSN doesnt recognized HOT 10
- support for MS SQL Server to PostgreSQL HOT 10
- bad table creation operator HOT 2
- There is no control for default values HOT 2
- Invalid timestamp format conversion HOT 2
- BLOB Migration Issue HOT 8
- is this tools supports mysql 8 default authentication as I want to migrate database from mysql v8 to postgres HOT 2
- SQL queries selecting NEXVAL from the sequence in the trigger are not translated HOT 1
- DROP_FKEY happens even during --oracle_speed, when >1 table HOT 2
- error message : Unmatched ( in regex; marked by <-- HERE in m/\bg_grsamt( HOT 3
- SQL Server 2014 does not provide sys.indexes.auto_created column HOT 1
- issue using ora2pg conversion to postgresql for objects referred with mdsys.geomerty (specifically related to shapefiles) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ora2pg.