1. 程式人生 > >Informix Database Connection (資料庫連線問題)

Informix Database Connection (資料庫連線問題)

The section on Setting up TCP/IP may also be useful. If you can't find what you're looking for, feel free to contact us.

Quick Links to sections below:

This generally indicates that the PATH environment variable is not set correctly.

In Windows 95 and 98 this is set in the file C:/AUTOEXEC.BAT. To edit this file run Windows Explorer, right click on the file and choose Edit

. Make sure that at the end of the file the following two lines exist.

set INFORMIXDIR=C:/INFORMIX
set PATH=%INFORMIXDIR%/BIN;%PATH%

Please note that there should be no spaces either side of the "=" character.

In Windows NT this is set in the Control Panel, System, Environment tab.

It could also indicate that the file C:/WINDOWS/SYSTEM/WSOCK32.DLL

does not exist. If this file does exist on your computer but in a different location, you should either place this location in the PATH variable or copying the WSOCK32.DLL to the C:/WINDOWS/SYSTEM directory.

This error indicates that the file C:/WINDOWS/SERVICES has not been set up correctly. It is likely that all you need to do is add the following lines at the end of this file:

  • sqlexec 1525/tcp

  • sqlturbo 1526/tcp

If this does not solve the problem then read the section The SERVICES file below.

RAMM for Windows usually takes quite a long time before it brings up this message and it indicates that the HOSTS file has not been setup correctly. This file is usually in C:/WINDOWS/HOSTS. You should read the The HOSTS file section below.

The client computer (fred_cpu) or your user id (fred) is not considered trusted by the desired database server. Ask the system administrator to include the client computer as a trusted host and/or your user id as a trusted user in the /etc/hosts.equiv file on the server computer or in the .rhosts file in your home directory on the server computer. See the UNIX manual pages regarding HOSTS.EQUIV(5) for more information.

This error occurs when Informix-Connect has not been installed yet or you are not logged on as the person who installed Informix-Connect originally. To install Informix-Connect on Windows 2000 you should read Installing RAMM on Windows 2000. To install Informix-Connect on Windows 95/98 where many users are accessing the same machine, it is important that the person who installs Informix-Connect successfully connects to a RAMM database so that certain environment variables are stored for later use by other users.

Check if INFORMIXDIR points to a valid directory where Informix products are installed. It may pay to re-install Informix-Connect again making sure that Informix is installed in the directory INFORMIXDIR (AUTOEXEC.BAT) points to.

This could also mean that INFORMIXDIR has not been set correctly if you used SETNET32.EXE. I suggest that you use SETNET32.EXE and unset the variable INFORMIXDIR.

This error message occurs when you are running Informix Online and the name of the server (typically the machine name with an _on at the end e.g. wdcramm_on) is not set at the Unix end. Find what the name is, login as root and run onmonitor. Choose Parameter, Shared-memory and enter the server name in the Server Aliases field if it is not already there. You will be asked to shutdown the engine. Do so then bring it back up again. Try RAMM for Windows to check whether the error message has gone.

Check that the sqlexec entry in the Unix /etc/services file and the PC’s C:/WINDOWS/SERVICES file have exactly the same number. I suggest that you read the Setting up TCP/IP section below and in particular the SERVICES file section within that.

This problem occurs because the machine you are installing on has an incorrect or obsolete version of the Borland Database Engine (BDE) already present. This can be corrected by

, running it, and reinstalling RAMM for Windows.

There are a number of reasons this problem could occur. If you are using Informix-Personal Edition or Informix-Dynamic Server then check that the name of the database is correct.

If you are using Informix-SE for Unix then check that the directory name is correct and that the name of the database is also correct. Make sure that the directory path contains "/" and not "/". e.g. "/usr/roads". Also make sure that the directory name has a slash at the beginning of it e.g. NOT "usr/roads" but "/usr/roads". Also make sure that the database name does not have any "/" characters in it. To check that the database and directory names are correct you can run a little test on the Unix machine by logging in as you normally do and type in "dbaccess /usr/roads/road" where "/usr/roads" is the directory name and "road" is the database name. This should start up dbaccess and connect to the database. Any error messages should be noted and please ring CJN Technologies with them.

If you are still having problems then it may be the permission's of your home directory or it's parent directories. It is important that each directory in your home directory path has execute permission for the owner, group and everyone else. If you login as 'cam' and your home directory is '/usr/users/cam' then the following commands will set the correct permission's for each of the directories. Make sure that you are logged in as root when running these commands.

chmod a+x /
chmod a+x /usr
chmod a+x /usr/users
chmod u+x /usr/users/cam

This will only occur if you are using Informix-SE for Windows or Informix-Personal Edition for Windows and will occur when you have not set up an administrator or any users within Informix. Run the program IPASSWD within the Informixprogram group to add an administrator or user.

This will only occur if you are using Informix-SE for Windows. It indicates that the directory Informix requires to store temporary files does not exist. We strongly recommend that you do not set the environment variable DBTEMP in the C:/AUTOEXEC.BAT file or within the Informix SETNET32 program.

The first thing you should do is choose Database, Maintain List from within one of the RAMM programs. Choose the database you are getting this error message on then press the Update button. Without doing anything else you should choose the OK button. Test the connection again by choosing the Connect button. If the same error message occurs then it may be the computer name. Follow the instructions below for this.

This error may also occur when the name of your computer has spaces or an underscore "_" in it. Check for this by choosing Start, Settings, Control Panel, Network and choose the Identification tab. It is suggested that the Computer name field has only characters and numbers in it. Once you have changed the name to be something else and rebooted the computer you will need to go through the procedure outlined in the paragraph above. If the error still occurs, ring CJN Technologies Ltd.

If you are still having problems then it may pay to follow the instructions below and fax (09-4154791) or email the results to CJN Technologies along with the specific error message you are getting from RAMM for Windows.

Results of the SET command

Start up an MS-DOS prompt (choose Start, Programs, MS-DOS Prompt) and run the command: SET > C:/SET.TXT

Exit the DOS prompt open the file C:/SET.TXT and print it. This can be done with either Notepad or Wordpad.

Windows 95 Registry values

Run the program REGEDIT (choose Start, Run, enter REGEDIT in the Open field and press OK). Click on the plus box for HKEY_LOCAL_MACHINE and SOFTWARE. Open the folder CJN Technologies and choose the menu Registry, Print and check the Selected branch radio button and OK.

Do the same for the following:
HKEY_LOCAL_MACHINE, SOFTWARE, INFORMIX
HKEY_CURRENT_USER, SOFTWARE, INFORMIX

Send the results

You should now have 4 printouts. Please fax (09-4154791) or email these along with the error message to CJN Technologies.

This section assumes you are using Microsoft TCP/IP software on Windows 95.

There are two files to setup before you can use RAMM for Windows to connect to your Informix database on your Unix machine. These are the HOSTS and SERVICES files:

  • In Windows 95 these are in the windows directory (usually C:/WINDOWS).

  • In Windows-NT they are found in (C:/WINNT/SYSTEM32/DRIVERS/ETC).

The HOSTS File

The HOSTS file is used by Informix-Connect to work out the IP address (i.e. 201.0.0.1) of the computer which has the RAMM database on it. This file contains a list of all known computers and their respective IP addresses. For an example HOSTS file see the end of this document.

The HOSTS file is not necessary if you have DNS (Dynamic Name Service) running on your Windows PC or you are using DCHP on Windows-NT. DNS allows your Windows PC to ask a machine on the network what the IP address is rather than look in its own HOSTS file. This allows your network administrator to look after only one HOSTS file rather than one for each computer. To find out whether your PC uses DNS you should either look in (Windows 95 only) the Control Panel, Network, TCP/IP Properties, DNS Configuration or ask your network administrator.

If you do need to set up a HOSTS file then we must find the name of your Unix computer and its IP address. If you do not know this then login to the Unix machine as root and run the command uname. This will tell you the name of the computer which is then used in the command ping to tell you the IP address of your Unix machine. An example Unix session would be as follows and the commands are shown in bold:

# uname -n uname -n
cjntech
# ping -c 3 cjntech ping -c 3 cjntech
PING cjntech (201.0.0.1): 56 data bytes
64 bytes from localhost (201.0.0.1): icmp_seq=0 ttl=255 time=0 ms
64 bytes from localhost (201.0.0.1): icmp_seq=1 ttl=255 time=0 ms
64 bytes from localhost (201.0.0.1): icmp_seq=2 ttl=255 time=0 ms
--- cjntech ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms
#

This tells us that the Unix machine is called cjntech with an IP address of 201.0.0.1
We must then create an entry in the HOSTS file on your Windows PC which looks something like this:

201.0.0.1 cjntech

If you want to test whether your Windows PC can see your Unix machine then run the following commands in an MS-DOS session on your Windows PC:

C:/WINDOWS>ping cjntech

The SERVICES File

The SERVICES file is used by Informix-Connect to determine the service name and number to use. The service name and number on your PC should be the same service name and number used on your RAMM computer. The name and number you place in the SERVICES file on your Windows PC in dictated by the contents of the file /etc/services on your RAMM computer. Look in the /etc/services file and if this has either an entry for sqlexec or sqlturbo then place the exact same line(s) in your Windows PC SERVICES file:

sqlexec 1525/tcp
sqlturbo 1526/tcp

For an example SERVICES file see the end of this document.

If your RAMM computer does not have either entries then this is likely to mean that you have not installed Informix 7.x on your Unix machine. If you pay CJN Technologies an annual Informix maintenance fee then you should have already received an Informix upgrade for Informix 7.x (July - August 1997). There are instructions in this that enable you to automatically set up the various files required by RAMM for Windows and Informix. Contact Campbell Newman at CJN Technologies if you have not received this upgrade.

Example HOSTS File

# Copyright (c) 1993-1995 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows NT.
#
# This file contains the mapping of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
201.0.0.2 ntserver
201.0.0.1 cjntech
201.0.0.5 carl
201.0.0.6 jeremy
201.0.0.7 matthew
201.0.0.9 carl2
201.0.0.12 david

Example SERVICES File

# Copyright (c) 1993-1995 Microsoft Corp.
#
# This file contains port numbers for well-known services as defined by
# RFC 1060 (Assigned Numbers).
#
# Format:
#
# <service name> <port number>/<protocol> [aliases...] [#<comment>]
#echo 7/tcp
echo 7/udp
discard 9/tcp sink null
discard 9/udp sink null
systat 11/tcp
systat 11/tcp users
daytime 13/tcp
daytime 13/udp
netstat 15/tcp
qotd 17/tcp quote
qotd 17/udp quote
chargen 19/tcp ttytst source
chargen 19/udp ttytst source
ftp-data 20/tcp
ftp 21/tcp
telnet 23/tcp
smtp 25/tcp mail



… etc.

qmaster 10012/udp
gds_db 3050/tcp
sqlexec 1525/tcp # Informix-SE
sqlturbo 1526/tcp # INFORMIX-Online

相關推薦

Informix Database Connection 資料庫連線問題

The section on Setting up TCP/IP may also be useful. If you can't find what you're looking for, feel free to contact us. Quick Links to s

若是MYsql資料庫沒有其他問題,要匯入到jre外部連結包裡資料庫連線問題

 嘗試著將mysql-connector-java-5.1.6-bin.jar的jar包加入E:\Program Files\Java\jdk1.6.0_20\jre\lib\ext資料夾下,問題解決了!!     原來是不僅僅要求將驅動加入

Spring SpringMVC配置Druid資料來源資料庫連線

之前分享過Spring boot整合使用Druid的方法,現在分享下Spring,SpringMVC配置Druid的方法。我們一般常用的資料來源(資料庫連線池)有Druid,HikariCP。 web.xml增加如下配置語句: <filter> <fil

JDBCJava資料庫連線

Stu類:存表中記錄 package cn.jdbc.entity; import java.io.Serializable; public class Stu implements Serializable{ private String sid; pr

Revit匯出到 ODBC開發資料庫連線資料庫檔案

  可以將模型構件資料匯出到 ODBC(開發資料庫連線)資料庫中。匯出的資料可以包含已指定給專案中一個或多個圖元類別的專案引數。對於每個圖元類別,Revit 都會匯出一個模型型別資料庫表格和一個模型例項資料庫表格。ODBC 匯出僅使用公制單位。 步驟: 1. 在 Revit 中

學生管理系統設計資料庫連線C#版

目錄 一.課程設計說明 1 1.1專案概述 1 1.2設計任務和要求 1 1.3開發環境說明 1 二.需求分析階段 1 2.1專案介紹 2 2.2資料需求分析 2 三.概念結構設計 3 3.1E-R圖 4 3.2資

Web專案中對配置檔案中的密碼進行加密資料庫連線密碼

Web專案的如配置檔案applicationContext.xml檔案中,如資料庫連線的使用者密碼資訊的加密。 我們平時直接寫的專案配置是這樣的: <bean id="dataSource" class="org.apache.commons.dbcp.B

cloudermanager安裝時database connection出現Unexpected error. Unable to verify database connection圖文詳解

     不多說,直接上乾貨! http://www.aboutyun.com/forum.php?mod=viewthread&tid=20455&extra=&page=2 歡迎大家,加入我的微信公眾號:大資料躺過的坑        人工智慧

JDBC4----------資料庫連線dbcp連線

1、JDBC:是提供用來執行SQL語句的java API.步驟如下:載入驅動程式、與資料庫建立連線、傳送SQL語句、處理結果。2、JTA:事務有提交和回滾兩個概念。提交:所有的操作步驟都被完整的執行後,稱為事務被提交。回滾:由於某一操作步驟執行失敗,導致所有步驟都沒有被提交,

NHibernate學習之二——.cfg.xml配置大全資料庫連線配置

一、sql2000/2005.cfg.xml <?xml version="1.0" ?> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > <session

使用Navicat或者其他資料庫工具連線阿里雲EDS資料庫伺服器例項過程詳解

使用Navicat或者其他資料庫工具連線阿里雲EDS(資料庫伺服器)例項過程詳解 背景:這幾天從阿里雲上面購買了雲伺服器,最垃圾的那種,還送oss和EDS資料庫伺服器,只不過EDS資料庫伺服器只有一個月的,就主動升級為一年的,49還是59忘了。對於配置這種EDS過程中,產生的一個念頭就是:大廠就是大廠,考慮

除錯經驗——使用自定義函式在Oracle中實現類似LISTAGG函式的行轉列字串連線功能

問題描述: LISTAGG函式是一個很實用的函式,但僅在Oracle 11.2以後的版本中才有。 生產環境中有個資料庫是Oracle 11.1,需要行轉列,但並不能使用LISTAGG函式。 解決方法: 參考以下文章: https://oracle-base.com/artic

資料庫概論學習筆記 其五資料庫完整性

第五章  資料庫完整性 資料庫的完整性:     資料的正確性:         是指資料是符合現實世界語義,反映了當前實際狀況的     資料的相容性:     &nb

資料庫概論學習筆記 其四資料庫安全性

第四章 資料庫安全性 資料庫的安全性是指保護資料庫以防止不合法使用所造成的資料洩露、更改或破壞 。 系統安全保護措施是否有效是資料庫系統主要的效能指標之一。 自主存取控制方法 通過 SQL 的GRANT 語句和REVOKE 語句實現 1.GRANT GRA

資料庫資料庫基礎

一、資料庫的發展史    (1)手工管理:藏書閣,圖書館。           優點:分類管理,直觀性強           缺點:資訊流動慢,不方便    (

資料庫MySQL字串函式

    1.ascii(str):返回字串str的第一個字元的ascii值(str是空串時返回0)        用法:mysql> select ascii('2');         &

基於TCP面向連線的socket程式設計

基於TCP的socket程式設計是採用的流式套接字(SOCK_STREAM) 伺服器端程式設計的步驟: 1:載入套接字型檔,建立套接字(WSAStartup()/socket()); 2:繫結套接字到一個IP地址和一個埠上(bind()); 3:將套接字設定為監聽模式等待

連線,左外連線連線,右外連線連線,全連線交叉連線

有兩個表A和表B。表A結構如下: Aid:int;標識種子,主鍵,自增ID Aname:varchar 資料情況,即用select * from A出來的記錄情況如下圖1所示:   圖1:A表資料 表B結構如下: Bid:int;標識

OpenStack雙節點部署—M Trove資料庫服務

Trove安裝 一、資料庫配置 二、建立服務憑證和API端點 1.安裝Trove相關包 2.修改相關配置檔案 3.同步資料庫 4.啟動trove服務並設定開機自啟 三、驗證操作,並建立

七週速學資料分析資料庫

前面提到的Excel、資料視覺化、資料分析思維等知識,一般來說Excel只能分析中小型的資料,也就是Excel不能夠應對未來的大型資料,資料視覺化知識有對呈現資料的功能。很多人的電腦中存著幾十萬條的資料,這些資料已經拖慢的計算機的效能,資料庫的出現解決了這些問題,現在很多的企業和崗位都開始要求SQL技能了