CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 3751|Reply: 6

Data transfer from one database to another database

[Copy link]
Post time 3-10-2012 11:34 AM | Show all posts |Read mode
Data transfer from one database to another database   
Hi all,
i want to transfer data one sql database to another database in same sql server   . i used php programming.  i try to insert into table2 select * from table1 , but this query useful for same database, but i want to use different database, in same sql server.
help me here to solve this problem,




Reply

Use magic Report


ADVERTISEMENT


Post time 3-10-2012 01:08 PM | Show all posts
sekadar idea... sbb dlm .net kan...

a] kalo in programming > dalam function ada
- store dulu data yg nk di transfer dalam "dataset"
- kemudian read(dataset) dan for each row dalam dataset > insert into table yang kita nk letak

b] kalo guna SQL statement
- boleh guna ini.. tp x sure dlm syntax mySQL
" insert into destinationDB..destinationtable
  select * from sourcedb..sourcetable "

di harap boleh membantu sikit2..
Reply

Use magic Report

Post time 9-11-2012 09:31 PM | Show all posts
just sharing..

problem: nak transfer data dari satu database ke satu database (jenis yg sama atau jenis lain2) yg lain (dalam satu server yg sama)

my suggestion:
1. kalau guna programming - cth PHP:
- buat 2 connection (mysql_dbconnect), satu connection ke db1 (cth mysql - source) dan satu connection ke db2 (MS-SQLserver target)
- lepas tu mcm biasa la.. create table.. then insert satu data

2. kalaau guna tools/front end (e.g. phpmyadmin etc)
- export data dlm database tu dlm standard SQl format (dump file)
- lepas tu import balik file tu dlm database yg dikehendaki

senang kan?



Reply

Use magic Report

Post time 11-11-2012 02:00 PM | Show all posts
err kalo pki exchange server x bleh ka? aku x brp terer sgt bab2 database ni just bg idea bodo jah...
Reply

Use magic Report

Post time 12-11-2012 10:40 PM | Show all posts
Salam bro... soalan x lengkap..

Pakai language apa nie? C# atau VB?
Reply

Use magic Report

Post time 19-11-2012 12:44 AM | Show all posts
same server? same dbms? same instance?

mintak database admin grant full access ke database satu lagi. pastu buat insert statement camni :-

insert into targetDatabase.dbo.table1
select * from sourceDatabase.table1
Reply

Use magic Report

Follow Us
 Author| Post time 22-11-2012 11:19 AM | Show all posts
chuki2 posted on 12-11-2012 10:40 PM
Salam bro... soalan x lengkap..

Pakai language apa nie? C# atau VB?

pakai php

Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT



 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

31-12-2024 03:53 AM GMT+8 , Processed in 0.044680 second(s), 22 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list