- 论坛徽章:
- 11
|
不熟悉WIN版informix,希望下面的内容对你有帮助..
http://www.ibm.com/developerwork ... _security_subsystem
Could not initialize security subsystem - part 1
A common user error when running command line IDS utilities on Windows is the "Could not initialize security subsystem" error. Below is an example of the kind of email I receive fairly frequently..
Any idea why I get this error msg? I've set INFORMIXSERVER in system environment. c:\informix> set | find "INF" INFORMIXDIR=C:\informix INFORMIXSERVER=serv1_sec c:\informix> onstat - ERROR: Could not initialize the security subsystem. Please ensure that this acco unt has the necessary privileges and ensure INFORMIXSERVER value exists in the r egistry and environment. How do I fix it ?
The "security subsystem" part of this message is misleading, in that it generally doesn't relate to anything about security from a user perspective. The key part of the message is nearly always "ensure INFORMIXSERVER value exists in the registry and environment".
The way to troubleshoot this error is:
* echo %INFORMIXSERVER% - does it have the correct value? if not make sure you have run the %INFORMIXDIR%\%INFORMIXSERVER%.cmd script to set your environment correctly.
* Run regedit and check HKEY_LOCAL_MACHINE/SOFTWARE/Informix/Online/%INFORMIXSERVER% - does it exist? Does it have the Environment, Setup, Security subkeys? If not your IDS instance could be corrupted or installed with a different INFORMIXSERVER value to the one you were expecting. If you suspect corruption, try running the buildreg.exe utility which is part of the ntutils package downloadable from IIUG.
art 2 looks at a more obscure case of this error. Here's an email I received last week:
I installed a Cygwin environment and a telnet server on our Windows 64-bit machine.
I can now access the machine and log-in as informix to a nice UNIX-like bash shell.
However I would like to access the informix server from this shell.
When I have defined INFORMIXDIR/INFORMIXSERVER etc. However I always end up with
ERROR could not initialize security subsystem.
Since this is usually a problem accessing the Informix part of the registry, my first thought was that this had something to do with Cygwin being 32-bit and not being able to access the 64-bit registry keys under HKEY_LOCAL_MACHINE\Software\Informix. With hindsight this couldn't be the problem, since it would be the 64-bit IDS utilities which access the registry keys, not Cygwin.
Strangely the problem only occurred when connecting via the telnet server. A Cygwin shell executed via Remote Desktop worked fine.
To investigate further, I used the Sysinternals utility Regmon to monitor which registry keys were accessed when the onstat utility was executed via a telnet session. This showed one problem - the Informix environment variables were being set in a "DOS format" environment shell, which added an extra linefeed character at the end of the INFORMIXSERVER environment value. This showed up as a mysterious block at the end of the Registry access string in Regmon.
Once the environment variables were fixed, onstat would still not run in the telnet session. It failed with:
GLS initialization failed, error -23101
This error is usually indicative of an incorrect DB_LOCALE, CLIENT_LOCALE, SERVER_LOCALE or INFORMIXDIR environment variable. In this case INFORMIXDIR was set as follows:
export INFORMIXDIR=/cygdrive/C/PROGRA~1/IBM/IBMINF~1/11.10
This was the problem. It was fine to use "/cygdrive/C/PROGRA~1/IBM/IBMINF~1/11.10/bin" in the PATH, but "/cygdrive" did not mean anything to onstat which is unaware of the Cygwin environment. The correct setting for INFORMIXDIR was:
export INFORMIXDIR=C:/PROGRA~1/IBM/IBMINF~1/11.10
Once this was set, running IDS command line utilities via a Cygwin telnet session worked correctly. |
|