The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
MySQL article - Sun and MySQL: How It Stacks Up for Developers iBot UNIX and Linux RSS News 0 02-28-2008 11:20 PM
Unix is killing mysql or something else is happening Legend986 UNIX for Dummies Questions & Answers 5 12-20-2007 11:02 PM
mysql would not start: missing mysql.sock xnightcrawl UNIX for Advanced & Expert Users 2 05-26-2006 10:06 AM
MySQL problem >> missing mysql.sock _hp_ UNIX for Advanced & Expert Users 8 11-03-2002 02:44 PM
Linux/Unix/PHP/MySQL & servers? kolton UNIX for Dummies Questions & Answers 5 04-10-2001 11:05 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-07-2004
Z24_2000 Z24_2000 is offline
Registered User
  
 

Join Date: Jan 2004
Location: Canada
Posts: 3
Oracle to MySQL through Unix

Hello All,

I'm a complete Unix newbie, and I have been asked to provide a solution for the following opportunity:

Currently there is an Oracle database residing on a Unix box that I need to connect to on a regular basis from another Unix box. Upon connecting I need to hit multiple tables and query data which will then need to be written to a MySQL database.

I've thought of the following logic:

Have an Oracle stored Procedure run nightly on the one Server to grab the data I need and throw the records into a CSV file.

Then ftp from the other server nightly and grab that file.

Then use an API to grab each record from the file and write it to the MySQL database.

Does this sound like an appropriate solution?

I would really appreciate alternate solutions as well, as I have to present a list of suitable and functional ideas.

Thank you very much in advance for all the help,
Andrew
  #2 (permalink)  
Old 01-08-2004
photon's Avatar
photon photon is offline
Registered User
  
 

Join Date: Jul 2002
Posts: 162
If the servers are on same network. All
you really need is the API part.

If the servers are on remote locations and
a dial-up connection is needed, and you
must use ftp. Then your solution of putting
the data on a CSV file sounds good.
You will then have to parse the CSV file and
load it into MySQL. There is a good script
in the Perl Cook book on parsing CSV files.
  #3 (permalink)  
Old 01-08-2004
Z24_2000 Z24_2000 is offline
Registered User
  
 

Join Date: Jan 2004
Location: Canada
Posts: 3
thanks

Thanks Photon,

They are on seperate servers, thanks for the confirmation of my idea!

Anyone else have any comments or suggestions?

Andrew
  #4 (permalink)  
Old 01-16-2004
photon's Avatar
photon photon is offline
Registered User
  
 

Join Date: Jul 2002
Posts: 162
Have you thought about using XML. XML is the ideal format.
There are plenty of API’s available to parse the format and it
is more reliable.

For instance, in a CSV file

a, comment, with, commas, is, a, problem

or “ “ is this empty?

Also there is an issue with the disordering of data.

I could probably go on and on, but will spare you.

XML is worth learning, because it solves all these problems and more.
  #5 (permalink)  
Old 01-16-2004
Brandt Brandt is offline
Registered User
  
 

Join Date: Jan 2004
Posts: 8
Just a comment on the comma delimited issue, i am no PERL or XLM person, but if you delimit with | instead of commas, your , and " issues go away and very rarely do people store | (pipes) in their data fields.

i just finished migrating 200GB of company wide data and ran across 3 homegrown tables (out of over 4000) that actaully used | in a record, and oddly enough it was a table describing delimiters!!

hope this helps.
  #6 (permalink)  
Old 01-16-2004
photon's Avatar
photon photon is offline
Registered User
  
 

Join Date: Jul 2002
Posts: 162
I do not want to beat a dead horse, but bars
and commas are passé. Unless you want to
deal with excel and some other application
that gives you no choice to do so, but Hey,
eventually even excel is going to go with XML.

The point is; there is no dynamic enough parser
that can catch every error, unless you have an
agreed standard. Agreed?
  #7 (permalink)  
Old 01-16-2004
Z24_2000 Z24_2000 is offline
Registered User
  
 

Join Date: Jan 2004
Location: Canada
Posts: 3
Thanks for all of the input

Hi All,

thank you for taking the time to respond to my post.

As it stands, it appears I am going to go with a driect data grab from the Oracle DB using a PHP script then a driect write to the the MySQL DB using PHP as well.

Thanks again,
Andrew
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:00 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0