MSSQL 2000 Export Import from the command promt

2008 September 17 at 3:14 pm Leave a comment

Bulk Copy Program (BCP) merupakan utility command-line yang disediakan SQL Server 2000

bcp   {dbtable | query} {in | out | queryout | format} datafile
 [-n native type] [-c character type]
   [-S server name] [-U username]
 [-P password] [-T trusted connection]

contoh :
1. Export ke File
bcp "Select * from select * from NamaDataBase.dbo.TableName" queryout D:\attga\abc.txt -c -t, -T -SSerVer1
ketrangan: mengekspor table TableName database NamaDataBase di server SerVer1 disimpan ke file
D:\attga\abc.txt

1. Import dari File
bcp "DBNAME.dbo.TABLENAME" in D:\attga\source.txt -c -t, -T -SPEBDB1 -e errors.txt
isi source.txt:
ahmad,cianjur
yusuf,jambi

table TABLENAME:
create TABLENAME (nama varchar(50), kota(50));

Entry filed under: MSSQL. Tags: .

Execute DTS MSSQL 2000 from the command prompt tata cara sholat Nabi

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Categories


%d bloggers like this: