查找Informix DB服务器 [英] Finding Informix DB Server

查看:80
本文介绍了查找Informix DB服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台服务器,并且我知道在服务器上安装了Informix,但是我不知道是谁安装了它.有一个关闭源客户端连接到该服务器,但是除了用户名和密码之外,我无法获得任何有关它的信息.我不知道如何连接它,我不知道它的端口号和服务器名称是什么.我已经使用JDBC Informix驱动程序下载了SQuirreL.

I have a server and I know that there is an Informix installed on it, but I don't know who installed it. There is closed source client connecting to this server but I cannot get anything about it apart from username and password. I have no idea how to connect it, I don't know what would be the port number and server name of it. I have downloaded SQuirreL with JDBC Informix drivers.

如何在不知道端口和服务器名称的情况下连接到JDBC Informix服务器?

How can I connect to JDBC Informix server without knowing the port and server name?

推荐答案

简而言之,您将需要端口号,服务器名称(以及数据库名称)才能连接到Informix.

In short, you will need the port number, server name (and database name as well) to connect to Informix.

假设您有权在安装Informix的包装盒上四处走动,那么可能会在一些地方找到有关Informix服务器的详细信息.由于在您的案例中没有看到有关安装IDS(Informix)的平台的任何详细信息,因此,我将尝试提供Unix和Windows平台的信息.但是首先,要有一些背景知识:

Assuming that you have permissions to hunt around on the box where Informix is installed, there are a few places where the details about your Informix server are likely to be found. Since I don't see any details as to the platform on which IDS (Informix) is installed in your case, I'll try to provide info for both Unix and Windows platforms. But first, a bit of background:

建立与Informix的连接不需要太多参数.通常,您需要做的只是:

There are not too many parameters needed to set up a connection to Informix. Typically, all you would need are:

  • 用户名
  • 密码
  • 服务器IP地址
  • 端口
  • 服务器名称(Informix实例的名称)
  • 数据库名称(您要连接的[服务器名称]上的数据库名称)

听起来您需要找出最后三个.

It sounds like you need to find out the last three.

Linux:

在Linux平台(以及Windows,我相信)上,存在一些环境变量,这些变量指向在系统上Informix的安装位置.其中最重要的是%INFORMIXDIR%,它指向Informix安装的根目录.但是,很多时候,Informix是安装在/opt 中的,所以在那里尝试.

On a Linux platform (as well as Windows, I believe), there are environment variables that point the way to where on your system Informix is installed. The most important of these is %INFORMIXDIR%, which points to the root directory of your Informix installation. A lot of the time however, Informix is installed in /opt, so try there.

在典型安装的%INFORMIXDIR%/etc 中,有一个名为

In %INFORMIXDIR%/etc on typical installs is a file called sqlhosts (it may have a suffix for your specific server instance, but it'll start with sqlhosts). In this file is the server name, and possibly the port number. %INFORMIXDIR%/etc/sqlhosts contains plaintext data in the following format:

ServerName  NetType   HostName   Port/ServicesName

第一个值是您要查找的服务器名称.第四个值(Port/ServicesName)是端口号,或者是/etc/services 中引用该端口号的条目的名称.如果没有看到端口号,请查看/etc/services .

The first value is the server name you seek. The fourth value (Port/ServicesName) is either the port number, or the name of the entry in /etc/services which references the port number. If you don't see a port number, look in /etc/services.

例如,sqlhosts可能包含以下内容:

For example, sqlhosts will probably contain something like this:

myservername   onsoctcp   informix.mydomain.com   12345

在这种情况下,您的服务器名称是"myservername",端口是12345

In this case, your server name is "myservername" and the port is 12345

或者,它看起来像这样:

Alternatively, it could look like this:

myservername   onsoctcp   informix.mydomain.com   informixservice

在这种情况下,您将不得不在/etc/services 中查找提示行

in which case you would have to go look in /etc/services for a line that says

informixservice     12345/tcp

这将告诉您端口.

Windows

注意事项:我从未处理过Windows上安装的Informix服务器,但是根据IBM文档,在手头任务方面似乎并没有太大不同.

Caveat: I've never dealt with Informix servers installed on Windows, however based on the IBM documentation, it doesn't seem much different in regards to the task at hand.

您要查找的信息包含在注册表项

Instead of the file %INFORMIXDIR/etc/sqlhosts, the information you seek is contained in the registry key

HKEY_LOCAL_MACHINE\SOFTWARE\INFORMIX\SQLHOSTS

使用regedit.exe读取存储在此条目中的值.

Use regedit.exe to read the values stored in this entry.

如果在该reg键中找不到端口号,则Windows上与Unix的/etc/services 文件等效的

If you don't find a port number in that reg key, the Windows equivalent of Unix's /etc/services file is

C:\Windows\System32\drivers\etc\services

使用文本编辑器检查此文件(记事本可以正常工作).

Examine this file with a text editor (notepad works fine).

希望这会有所帮助.祝你好运.

Hopefully this helps. Good luck.

这篇关于查找Informix DB服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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