copydb sample

Post Reply
Mr. Bigglesworth
Posts: 56
Joined: Fri Feb 16, 2001 6:54 pm

copydb sample

Post 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.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

copydb sample

Post 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.
John Turnbull
Thunderstone Software
Post Reply