Page 1 of 1

copydb sample

Posted: Tue Nov 20, 2001 11:33 am
by Mr. Bigglesworth
I've got a table I'd like to move from NT to the Unix version of texis. Trouble is, I can't get the syntax of copydb correct.

the remote server's name is vortex1, and the remove database is e:\database\mydb. The table in question is called "mytable"

I only want to copy "mytable" to the unix database (located in /db03/databases/newdb), and not the whole e:\database\mydb database itself. Could someone show me the syntax to pull that off?

Oh, and if you could do one more thing-- in case I can't get copydb to work for me, I'll just write out the table to a carat delimited text file. Trouble is, I've forgotten how to do that with the tsql command. I thought it was something like:

tsql -hq"^" "select * from mytable"

but that doesn't seem to work. Again, if you could correct my faulty memory I'd be grateful.

copydb sample

Posted: Tue Nov 20, 2001 1:16 pm
by John
cpdb is usually the most appropriate tool. Run cpdb on the unix box, and then:

cpdb -d e:\database\mydb -h vortex1 -r /db03/databases/newdb -t mytable -p

on the NT box. With copydb you need texisd running on the Unix box, and texisdnt running on the Windows box. Then, on the Unix machine run:

copydb -tmytable nthost e:/database/mydb /db03/databases/newdb

The tsql option you were thinking of was -f instead of -h.