转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 数据库 >> SyBase >> 正文
usage of bcp command.(快来看)。         ★★★★

usage of bcp command.(快来看)。

作者:闵涛 文章来源:闵涛的学习笔记 点击数:3547 更新时间:2009/4/22 23:09:59
r than the value of -T or the default, bcp does  not send the overflow.
-U username
specifies an Adaptive Server login name. If you do not  specify username, bcp uses  the current user's operating system login name.
-z language
is the official name of an alternate language the  server uses to display bcp prompts and messages.  Without the -z flag, bcp uses  the server's default language. You can add languages to  an Adaptive Server during installation or afterward, using the langinst utility  or the sp_addlanguage stored procedure.
The following error message will appear if an incorrect or  unrecognized language is named with the -z parameter: 
Unrecognized localization object. Using default  value 'us_english'.
Starting  copy...
 => warning.
-v 
reports the current version and copyright message  of the bcp program.
Examples 
Example  1 
bcp pubs2..publishers out pub_out  -c -t , -r \r
Copies data out of the publishers table  in character format (using char for all fields)  using the -c parameter. The -t field_terminator parameter  ends each field with a comma, and the -r row_terminator parameter  ends each line with a Return. bcp prompts only  for a password.
Example  2 
bcp pubs2..publishers out pub_out
Password:
Enter the  file storage type of field pub_id [char]:
Enter  prefix length of field pub_id [0]:
Enter  length of field pub_id [4]:
Enter  field terminator [none]:
Enter the file  storage type of field pub_name [char]:
Enter  prefix length of field pub_name [1]:
Enter  length of field pub_name [40]:
Enter  field terminator [none]:
Enter the file  storage type of field city [char]:
Enter  prefix length of field city [1]:
Enter  length of field city [20]:
Enter field  terminator [none]:
Enter the file storage  type of field state [char]:
Enter prefix  length of field state [1]:
Enter length  of field state [2]:
Enter field terminator [none]:
Copies data from the publishers table  to a file named pub_out for later reloading  into Adaptive Server. Press Return to accept the defaults specified by the  prompts. The same prompts appear when you copy data into the publishers table.
Example  3 
bcp pubs2..publishers out pub_out  -c -t , -r \r
Copies data out of the publishers table  in character format (using char for all fields).  The -t field_terminator parameter  ends each field with a comma, and the -r row_terminator parameter  ends each line with a Return. bcp prompts only  for a password.
Example  4 
bcp pubs2..publishers out pub_out
Password:
Enter the  file storage type of field pub_id [char]:
Enter  prefix length of field pub_id [0]:
Enter  length of field pub_id [4]:
Enter  field terminator [none]:
Enter the file  storage type of field pub_name [char]:
Enter  prefix length of field pub_name [1]:
Enter  length of field pub_name [40]:
Enter  field terminator [none]:
Enter the file  storage type of field city [char]:
Enter  prefix length of field city [1]:
Enter  length of field city [20]:
Enter field  terminator [none]:
Enter the file storage  type of field state [char]:
Enter prefix  length of field state [1]:
Enter length  of field state [2]:
Enter field terminator [none]:
Copies data from the publishers table  to a file named pub_out for later reloading  into Adaptive Server. Press Return to accept the defaults specified by the  prompts. The same prompts appear when you copy data into the publishers table.
Usage 
稴ee Chapter 2, "Using  bcp to Transfer Data to and from Adaptive Server" for an  in-depth discussion of bcp.
稴ee the Performance and Tuning Guide for more  information on how changing certain parameters can affect bcp for  large batches.
穊cp provides a convenient, high-speed  method for transferring data between a database table or view and  an operating system file. bcp can read or write  files in a wide variety of formats. When copying in from a file, bcp inserts  data into an existing database table; when copying out to a file, bcp overwrites  any previous contents of the file.
穀ou cannot copy into a view from an operating system  file.
稶pon completion, bcp informs  you of the number of rows of data successfully copied, the total  time the copy took, the average amount of time, in milliseconds,  that it took to copy one row and the number of rows copied per second.
稵he current version of bcp ignores  the -y sybase_directory parameter.
穀ou cannot use named pipes to copy files in or out.
稥rror message format is different than previous  versions of bcp. If you have scripts that perform  routines based on the values of these messages you may need to re-write  them, for example:
The display message that indicates the number of rows transferred  has been changed. During a session, this version of bcp periodically  reports a running total of rows transferred. This message replaces  the "1000 rows transferred" message displayed  by the previous bcp.
稤o not use -t or -r parameters  with bcp in native format. Results are unpredictable  and data could become corrupted.
Copying Tables with Indexes or Triggers
稵he bcp program  is optimized to load data into tables that do not have indexes or  triggers associated with them. It loads data into tables without indexes  or triggers at the fastest possible speed, with a minimum of logging.  Page allocations are logged, but the insertion of rows is no

上一页  [1] [2] [3] [4] [5]  下一页


[办公软件]如何实现Office工具栏、菜单以及菜单命令重命名  [办公软件]如何在Office文档(大)括号内输入多行文字
[办公软件]如何在office(PowerPoint,Word,Excel)中制作带圈的…  [办公软件]批量删除Office文档(word,excle,powerpoint)中的超…
[办公软件]Office(Word,Excel)密码破解软件(Office Password…  [办公软件]如何让低版本的Office也能顺利编辑2007文档
[办公软件]设置office艺术字的形状  [办公软件]如何将Office菜单设置、工具设置、宏设置等应用到…
[办公软件]在Office(word,excel)中输入各级钢筋符号的方法  [办公软件]打开Office文档就提示安装的原因及解决方案
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · Sql Server  · MySql
    · Access  · ORACLE
    · SyBase  · 其他
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台