使用Sybase ASE BCP到远程服务器 [英] Using Sybase ASE BCP to a Remote Server

查看:117
本文介绍了使用Sybase ASE BCP到远程服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有时使用BCP导出/导入数据到无法登录OS的远程服务器,而只能连接到DB.使用BCP可以成功连接到服务器,如下所示:

I am using BCP to export/import data sometimes to remote servers where i cannot login into the OS, only connect to the DB. I have success with using BCP to connect to a server like this:

MyTable.bcp中的bcp mytester.dbo.MyTable -S Sybase157 -U sa -P SyAdmin -n

bcp mytester.dbo.MyTable in MyTable.bcp -S Sybase157 -U sa -P SyAdmin -n

这当然是有效的,因为Sybase157是在我的sql.ini中定义的.

This of course only works becuase Sybase157 is defined in my sql.ini.

我的问题:

a)是否可以回避整个sql.ini事情,而仅执行-S mydb.server.com或-S 123.123.123.123

a) Is it possible to sidestep the whole sql.ini thing and just do something like -S mydb.server.com or -S 123.123.123.123

如果没有....

b)我需要在sql.ini中添加什么才能连接到远程服务器?

b) what do i need to add to sql.ini in order to connect to a remote server?

推荐答案

sql.ini所需的条件是主机名(或ip)端口号远程服务器.您必须至少拥有这两条信息.您不需要知道远程服务器的服务器名称.

The peices required for the sql.ini is the hostname(or ip) and port number of the remote server. You must have those two pieces of information at a minimum. You do not need to know the servername of the remote server.

Sybase建议使用Open Client Directory Service编辑器(dsedit)更改sql.ini文件(或unix上的interfaces文件)

Sybase recommends using the Open Client Directory Service Editor (dsedit) to make changes to the sql.ini file (or interfaces file on unix)

开始>程序> Sybase连接> Open Client Directory Service编辑器

只要主机名(或ip)和端口正确,您就可以为服务器选择任何有效的名称.这将成为服务器名称,例如-S theNameYouUsedInSqlIni.

As long as the hostname(or ip) and port are correct, you can choose any valid name for the server you want. This will become the the servername, e.g. -S theNameYouUsedInSqlIni.

这不会更改远程服务器的服务器名称,也不会以任何方式影响远程服务器,只会影响来自本地系统的连接.

This does not change the remote server's servername, or affect the remote server in any way, it only affects connections from your local system.

将服务器添加到接口文件

在您的环境中,也可以使用LDAP:

It's also possible to use LDAP if that is an option in your environment:

配置libctl.cfg用于LDAP/使用目录服务

这篇关于使用Sybase ASE BCP到远程服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆