简单问题,100分奉上!急啊!

funlove2002 2003-10-15 11:24:05
1。我这里有个dmp文件,怎么导入到Sybase数据库中。请写明步骤。 80分
不知道用bcp导dmp文件怎么样?我这里用
bcp MAZX.dbo.SZDS in c:\qnuse1013.dmp -U qnsoft -P qnsoft -S MAZX >>c:\log.txt命令行导文件,老实报告以下错误:
Server Message: - Msg 208, Level 16, State 1:
MAZX.dbo.SZDS not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).

Unexpected result type returned.
Retrieving table format failed.
Server Message: - Msg 208, Level 16, State 1:
MAZX..SZDS not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).

Unexpected result type returned.
Retrieving table format failed.
Server Message: - Msg 208, Level 16, State 1:
MAZX.qnsoft.SZDS not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).

Unexpected result type returned.
Retrieving table format failed.

bcp里面参数(第一个到底是怎么用啊?)

2。sybase服务器端软件能否和客户端软件安装在同一台机器上啊?怎么服务器端的软件比客户端的工具还少啊?怎么导入一个sql文本创建表和视图、存储过程啊? 20分


谢谢
...全文
274 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
广州云天 2003-10-20
  • 打赏
  • 举报
回复
文件是用dump 生成的, 所以要用load database from "" 恢复回去, 再online 数据库即可
ropriest 2003-10-17
  • 打赏
  • 举报
回复
1、你的数据库没有SZDS这张表。
首先确认一下你的.dmp是不是文本格式的数据文件——用文本打开,看看是不是一条条的数据库记录。如果是就可以用bcp导入到数据库中,导入时确认导入的表是否在数据库中存在。
bcp dbo.tab_name in x.dmp -Uusername -Ppassword -Sservice -c

2、客户端和服务器可以在同一台机器上。导入一个sql文本创建表和视图、存储过程有分多方法,可以在Sybase Advantage中Server-->Connect,连接好要导入的数据库,然后在File-->Open 或者Load,选择相应的*.sql文件,然后执行。
也可以将*.sql文件用文本打开,拷贝到可以执行sql语句的工具中,连接数据库,执行即可。
也可以在isql中运行相应的sql语句,但是这个操作起来比较麻烦。
zoohoo 2003-10-17
  • 打赏
  • 举报
回复
第一个问题不可能是bcp导入的,因为bcp导入导出的都是文本,你用编辑器打开看看这个文件是不是文本。可能需要reload,你在central中恢复一个数据库看看。

最后一个问题,client和server当然可以装在一起了,少也很正常,没有人规定一定是服务器多的。导入用isql或是sybase advantage
attila2003 2003-10-15
  • 打赏
  • 举报
回复
象图象等大的二进制文件没法用bcp导入导出。对大的二进制文件操作在pb中是用updateblob table_name set col_name = :blob_var using sqlca;
至于其他编程语言不晓得,关注。
sky125 2003-10-15
  • 打赏
  • 举报
回复
1:usage: bcp [[database_name.]owner.]table_name[:slice_number] {in | out} datafile

[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n] [-c] [-t field_terminator] [-r row_terminator]
[-U username] [-P password] [-I interfaces_file] [-S server]
[-a display_charset] [-q datafile_charset] [-z language] [-v]
[-A packet size] [-J client character set]
[-T text or image size] [-E] [-g id_start_value] [-N] [-X]
[-M LabelName LabelValue] [-labeled]
[-K keytab_file] [-R remote_server_principal]
[-V [security_options]] [-Z security_mechanism] [-Q]

常用数据备份格式为:
bcp dbname..tablename out c:\temp\filename -Usa -Ppassword –Sservername –c
即可。
其中 –U后为SYBASE登录名称,–P后为SYBASE登录口令,–S后为SYBASE服务名称,–c代表使用可见文本方式导出数据
如果为数据恢复只需要将out 替换为 in 即可。

2:可以安装在同一台机器;‘导入一个sql文本创建表和视图、存储过程啊?’直接用create就行了嘛,为什么还要什么‘导入’

2,596

社区成员

发帖
与我相关
我的任务
社区描述
Sybase相关技术讨论区
社区管理员
  • Sybase社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧