DBA > Job Interview Questions > Sybase Interview Questions and Answers

Can I use a named pipe to bcp/dump data out or i

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

Can I use a named pipe to bcp/dump data out or in in Sybase?

System 10 and above.
If you would like to bcp copy from one table to a named pipe and compress:
1. %mknod bcp.pipe p
2. %compress sysobjects.Z &
3. %bcp master..sysobjects out bcp.pipe -c -U .. > bcp.pipe
4. Use ps(1) to determine when the compress finishes.

To bcp from my1db..dummy_table_1 to my2db..dummy_table_2:

1. %mknod bcp.pipe p
2. %bcp my2db..dummy_table_2 in bcp.pipe -c -U .. &

To avoid confusion between the above bcp and the next, you may choose to either use a separate window or redirect the output to a file.

3. %bcp my1db..dummy_table_1 out bcp.pipe -c -U ..

(Continued on next question...)

Other Job Interview Questions