The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


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 !!


Other UNIX.COM Threads 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 07:20 PM
Unix is killing mysql or something else is happening Legend986 UNIX for Dummies Questions & Answers 5 12-20-2007 07:02 PM
mysql would not start: missing mysql.sock xnightcrawl UNIX for Advanced & Expert Users 2 05-26-2006 07:06 AM
MySQL problem >> missing mysql.sock _hp_ UNIX for Advanced & Expert Users 8 11-03-2002 10:44 AM
Linux/Unix/PHP/MySQL & servers? kolton UNIX for Dummies Questions & Answers 5 04-10-2001 08:05 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-07-2004
Registered User
 

Join Date: Jan 2004
Location: Canada
Posts: 3
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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
Forum Sponsor
  #2 (permalink)  
Old 01-07-2004
photon's Avatar
Registered User
 

Join Date: Jul 2002
Posts: 119
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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
Registered User
 

Join Date: Jan 2004
Location: Canada
Posts: 3
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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
Registered User
 

Join Date: Jul 2002
Posts: 119
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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
Registered User
 

Join Date: Jan 2004
Posts: 8
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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.
Google UNIX.COM
Closed Thread



Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 12:43 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102