Interview Question in Data Transformation Services (DTS)


 

Interview Question :: How do I copy a table from a remote database to local


I have access to a remote database and wish to copy some tables to do work on localhost.

(1) I have no physical access to remote. I only have login credentials and the names of the tables I need. I don't even know the table structures. I think this rules out DTS and exporting stuff but I could be wrong.

(2) I'm running Xampp on local (Apache, MySQL, phpMyAdmin).

-
I thought of:

CREATE TABLE localdb.table LIKE remotedb.table;
INSERT INTO localdb.table SELECT * FROM remotedb.table;

...but this is pure SQL and I think only works if both databases are on the same machine? Plus I'm a newbie at phpMyAdmin, and I haven't figured out how to make it work like that (getting data from remote to local).

Any ideas, other tools I should be using? All I need is to get those tables from remote to local. Once they're here I can work on them.
Answers to "How do I copy a table from a remote database to local"
RE: How do I copy a table from a remote database to local?

mysql -u username -p password -h hostname dbname

SHOW TABLES;

^D

man mysqldump

man gzip # or man tar

man sftp
 
Vote for this answer ::  
Update Alert Setting