dbTalk Databases Forums  

[pl/sql] procedure making mysql script

comp.databases.oracle.server comp.databases.oracle.server


Discuss [pl/sql] procedure making mysql script in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
zks
 
Posts: n/a

Default [pl/sql] procedure making mysql script - 02-28-2006 , 05:04 AM






Hi my name is lukas im from poland. i dont speak english very well so
sorry if you dont understand me. i dont find anything about it in
polish disciussion groups.
i must create procedure. this procedure has 1 parameter and return CLOB
with mysql script . this parameter is table name.
for example create procedure aaa(table_name varchar2). then this
procedure must receive name of fields,type of fields and data from this
fields and create mysql commands with this information.(create tables
and a lot of inserts) to CLOB and return this clob.

i dont any idea to solve this problem. ( thanks for any information.

i hope that i explain all clearly.


Reply With Quote
  #2  
Old   
frank.van.bortel@gmail.com
 
Posts: n/a

Default Re: procedure making mysql script - 02-28-2006 , 01:16 PM






Do you have the table(s), that hold the data you must return in the
CLOB?
In other words, is it just the procedure, or do you need to design the
tables, too?

Regards,
Frank van Bortel


Reply With Quote
  #3  
Old   
Geoff Muldoon
 
Posts: n/a

Default Re: [pl/sql] procedure making mysql script - 02-28-2006 , 04:16 PM



fabi150 (AT) poczta (DOT) onet.pl says...

Quote:
i must create procedure. this procedure has 1 parameter and return CLOB
with mysql script . this parameter is table name.
for example create procedure aaa(table_name varchar2). then this
procedure must receive name of fields,type of fields and data from this
fields and create mysql commands with this information.(create tables
and a lot of inserts) to CLOB and return this clob.
Try posting to comp.databases.mysql not comp.databases.oracle.server.

Cheers and good luck.

Geoff M


Reply With Quote
  #4  
Old   
Gerry Atric
 
Posts: n/a

Default Re: [pl/sql] procedure making mysql script - 02-28-2006 , 05:11 PM



zks wrote:

Quote:
Hi my name is lukas im from poland. i dont speak english very well so
sorry if you dont understand me. i dont find anything about it in
polish disciussion groups.
i must create procedure. this procedure has 1 parameter and return CLOB
with mysql script . this parameter is table name.
for example create procedure aaa(table_name varchar2). then this
procedure must receive name of fields,type of fields and data from this
fields and create mysql commands with this information.(create tables
and a lot of inserts) to CLOB and return this clob.

i dont any idea to solve this problem. ( thanks for any information.

i hope that i explain all clearly.
You can use the data dictionaries (like USER_TABLES, USER_TAB_COLUMNS) etc
to reverse engineer Oracle tables.

There is also a perl script floating around called "oradump.pl" that may
also be helpful... it works much like the "mysqldump" utility.

http://www.eveandersson.com/writing/...se-engineering


Reply With Quote
  #5  
Old   
zks
 
Posts: n/a

Default Re: procedure making mysql script - 03-01-2006 , 03:00 AM



i have table in oracle. i put name of this table as parameter in
procedure(pl/sql procedure). then thiis procedure must receive name of
fields,type of fields ,data from rows (from table who i put as
parameter) and from this information i must create mysql script and
return it as CLOB. ufff .


Reply With Quote
  #6  
Old   
Gerry Atric
 
Posts: n/a

Default Re: procedure making mysql script - 03-01-2006 , 12:57 PM



zks wrote:

Quote:
i have table in oracle. i put name of this table as parameter in
procedure(pl/sql procedure). then thiis procedure must receive name of
fields,type of fields ,data from rows (from table who i put as
parameter) and from this information i must create mysql script and
return it as CLOB. ufff .
Hehe... there is no magic built-in function that will do this. You have to
use the data dictionaries to retrieve schema object details... then develop
code to recreate the mysql-compatible DDL... then more code to dump the
data into mysql-compatible DML. I've been there done that, and I'd be
happy to license my code to you for an appropriate fee.



Reply With Quote
  #7  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: [pl/sql] procedure making mysql script - 03-01-2006 , 02:32 PM



Geoff Muldoon wrote:

Quote:
Try posting to comp.databases.mysql not comp.databases.oracle.server.

Thought it was rather kewl to use Oracle to generate mysql...

--
Regards,
Frank van Bortel

Top-posting is one way to shut me up...


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.