Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 15th, 2009, 11:40 PM
vahnski vahnski is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 1 vahnski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 35 sec
Reputation Power: 0
How do i move data from a database into another database using perl script.

kindly post some of your ideas regarding to this prob.

i can connect the 2 databases. but i cant move the files into another database.

Reply With Quote
  #2  
Old June 24th, 2009, 12:05 PM
gw1500se gw1500se is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 268 gw1500se User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 4 h 11 m 59 sec
Reputation Power: 7
I think you need to be more explicit about what you are doing. First, I don't understand 'files' in this context. Do you mean records? Second I have to assume these are disimilar databases otherwise export/import would suffice without perl.

The basic technique is pretty straight forward. You read a record from one database then map its fields to the appropriate fields in records of the other database and write/update the new record. The hard work, it seems to me, is the mapping.

Reply With Quote
  #3  
Old June 24th, 2009, 01:30 PM
keath's Avatar
keath keath is offline
!~ /m$/
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: May 2004
Location: Leawood, Kansas
Posts: 3,488 keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level)keath User rank is General 3rd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 17 h 29 m 29 sec
Reputation Power: 1151
I considered replying to this also. The answer could be as simple as "select", then "insert".

Most databases have much more efficient means of uploading large amounts of information though. PostgreSQL has COPY from STDIN; and also dump methods for saving, then uploading a copy of the tables.

Reply With Quote
  #4  
Old June 24th, 2009, 09:04 PM
fuzzybunny's Avatar
fuzzybunny fuzzybunny is offline
C Neophyte.
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Melbourne Australia
Posts: 390 fuzzybunny User rank is Sergeant Major (2000 - 5000 Reputation Level)fuzzybunny User rank is Sergeant Major (2000 - 5000 Reputation Level)fuzzybunny User rank is Sergeant Major (2000 - 5000 Reputation Level)fuzzybunny User rank is Sergeant Major (2000 - 5000 Reputation Level)fuzzybunny User rank is Sergeant Major (2000 - 5000 Reputation Level)fuzzybunny User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Days 23 h 49 m 35 sec
Reputation Power: 41
listen to vegeta.



If you don't need to automate this or do this on a regular interval, you don't need PERL.

Just dump the database into a text file, and import it into the other database. The way you dump and import is database dependent.
__________________
For one to know everything, first one must accept he knows nothing.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > How do i move data from a database into another database using perl script.


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek