0% found this document useful (0 votes)
32 views1 page

1 How To Use The Command: Version Description

The document describes how to use the bcp command to export or import data to and from tables. The bcp command format includes the database name, table name, specifying import or export using "in" or "out", the file path and name, username and password. For example, the command exports the contents of the tbl_Event table in the dcnmconsdb database to the test.bcp file in text format.

Uploaded by

Jorge Torres
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views1 page

1 How To Use The Command: Version Description

The document describes how to use the bcp command to export or import data to and from tables. The bcp command format includes the database name, table name, specifying import or export using "in" or "out", the file path and name, username and password. For example, the command exports the contents of the tbl_Event table in the dcnmconsdb database to the test.bcp file in text format.

Uploaded by

Jorge Torres
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Document Title Security Level

1 How to Use the Bcp Command

This topic describes the format of the bcp command.

Version Description

N2000 All versions Database Sybase12.0/Sybase12.5


BMS

Device SUN FIRE V245, V445, OS Solaris8/Solaris10


and V890

Command Format

The bcp command is used to export the contents of the data table and save the
exported data as a file, or import the file back to the data table. The format of the bcp
command is as follows:

#cd $SYBASE/OCS-12_0/bin

#./bcp database name..data table name [in|out] file path and name -Usa -Psa
password -c

Parameter in indicates that the file is imported back to the data table, parameter out
indicates that the contents of the data table are exported to a file, and parameter c
indicates that the contents of the data table are exported to a file in the text format. In
Sybase 12.5, the command is cd $SYBASE/OCS-12_5/bin.

For example, the #./bcp dcnmconsdb..tbl_Event out "/export/test.bcp" -Usa


-P -c command is used to export, in the text format, the contents of the tbl_Event
table in database dcnmconsdb to the test.bcp file that is saved in the /export
directory.

2021-12-08 HUAWEI Confidential Page1, Total1

You might also like