NTUtils - A Collection of Windows Utilities for Informix Administrators Development Team: Randy House, Suma Vinod, Liesel Bach, Guy Bowerman Version: 2.0.2 Last updated: July 12 2009 Combined Readme --------------- addrights Function: add the user rights requried to start IDS to the local account specified Usage: addrights Further information: This utility adds the user rights required by the informix user to logon as a Service and start IDS. Adds the following user rights to the local account specified: SeAssignPrimaryTokenPrivilege - Replace a Process Level Token SeDebugPrivilege - Debug programs SeIncreaseQuotaPrivilege - Increase Quotas SeSecurityPrivilege - Manage Auditing and Security Log SeServiceLogonRight - Log on as a Service SeTcbPrivilege - Act as Part of the Operating System SeCreateGlobalPrivilege - Create Global Objects This utility can be used to give these rights to any user. It may be necessary to add these rights if the informix user is accidently removed and needs to be recreated. If the informix user rights are overidden by a domain level security policy it can be used to temporarily enable them until the next reboot for diagnostic purposes. Version 2.0.1 cfgpatch Function: changes onconfig.std values in the IDS Windows media. Works only for IDS verions < 11.10 Usage: cfgpatch -p path_to_media [-c config_parameter] -v value Further information: This program changes onconfig.std values in the IDS Windows media. Set path_to_media to the IDS directory containing the setup.inf file. Make sure you have write permissions to this directory. Default ONCONFIG parameter is ROOTSIZE Example setting ROOTSIZE to 100000 Kb: cfgpatch -p c:\idsmedia\iif2000 -v 100000 Example setting MAXLOGS to 20: cfgpatch -p c:\idsmedia\iif2000 -c MAXLOGS -v 20 Note some ONCONFIG parameters are set by instmgr.exe and cannot be changed. This includes ROOTSIZE but in this special case cfgpatch patches the instglrc.dll file to prevent instmgr.exe from overwriting the modified value. Requires the MSSDK utility compress.exe to be in one of the following locations: 1. %MSSDK%\bin 2. %MSTOOLS%\bin 3. Current directory. Do not confuse the MSSDK compress.exe utility with the MKS toolkit compress.exe utility - using the MKS Toolkit utility will cause the IDS installation to fail. Version 2.0.1 ch2ch Function: converts ascii characters in a file from one to another Usage: ch2ch >to_ch> [num] from-ch ascii representation of character to be changed to-ch ascii representation of new character num frequency of use of new character Further information: The following example will convert each tab (ascii 9) in the file test.txt to 4 spaces (ascii 32) ch2ch test.txt 9 32 4 Version 2.0.1 CopyDefault Function: copies the contents of: HKEY_USERS\.DEFAULT\Software\Informix to: HKEY_CURRENT_USER\Software\software\Informix Usage: copydefault -c Further information: Copydefault.exe copies the contents of: HKEY_USERS\.DEFAULT\Software\Informix to: HKEY_CURRENT_USER\Software\software\Informix It copies registry entries in the opposite direction of regcopy.exe, This could be useful when an administrator wants to give every user the same Informix Setnet settings, but doesn't want to set them manually for each user using setnet32. Instead they could set the required values in .DEFAULT (by running regcopy as a user who is already set up for example) and then setting CopyDefault to run at logon time for each user. Error messages are written ito a log file. This can be found in the TEMP|TMP directory that is set in the user profile. Version: 2.0.1 d2u.exe Function: Strips the CR from CRLF sequences in a file. Usage: d2u Further information: Used to convert DOS ASCII files to UNIX format and to repair binary files written in ASCII format by mistake, for example Informix typetab files created prior to the fix of bug 120269. Warning: if a CRLF combination occurs legitimately in a binary file, the output file will be corrupt. Version: 2.0.1 Gettoken Funtion: Returns Token information for a running NT process. Usage: gettoken [Process ID] Further information: If no argument is specified gettoken returns information about the current process. If the Process ID (PID) of a running process is specified, gettoken returns information about that process. This utility can be used to analyse problems with process user rights and security. Information returned -------------------- Process user - Username, domain, and primary group of the process user. SID User Rights - the user rights held by the SID (Security IDentifier) of the process (typically inherited from the process user). Process Groups - The groups the process is a member of (typically inherited from the process user). TokenPrivileges and TokenGroups buffer size - the size of the buffer which holds the User Rights and Group information. These values are proportional to the number of user rights/group memberships held by the process. Version: 2.0.1 ipcs Function: displays shared memory segments Usage: ipcs.exe [-m] -m shows the shared memory segments Version 2.0.1 ixset.exe Function: Sets Informix environment variables in the Registry for the specified InformixServer. Usage: Usage: ixset {-s|-d} {|VARIABLE} -s INFORMIXSERVERVARIABLE=value -- sets VARIABLE -d INFORMIXSERVERVARIABLE -- deletes VARIABLE Further Information: To set the INFORMIXSQLHOSTS variable for INFORMIXSERVER ol_beta3 to point to the machine named ruach: C:\dsd_tools>ixset -s ol_beta3 INFORMIXSQLHOSTS=ruach this returns: New value: INFORMIXSQLHOSTS=ruach To delete the INFORMIXSQLHOSTS variable for INFORMIXSERVER ol_mypc: ixset -d ol_beta3 INFORMIXSQLHOSTS this returns: Previous value: INFORMIXSQLHOSTS=ruach Value deleted Version 2.0.1 Logoff Function: Command line utility to log off, shut down or restart the machine Usage: logoff {l[ogoff] | s[hutdown] | r[eboot] | p[oweroff]} [f] Further information: Logoff.exe is a command-line utility which does one of the following: - logs the current user off. - shuts down the machine. - reboots the machine. - powers off the machine (if supported by hardware). The 'f' option forces processes to terminate. This can cause applications to lose data so should only be used as a last resort. There are no questions asked, be careful. Version 2.0.1 ntchname Function: changes either the machine name dependies for an IDS instance or the name of an IDS instance Usage: ntchname {-m|-i} -o oldname -n newname [-p password] -m: Change machine name dependencies for current IDS instance. -i: Change specified INFORMIXSERVER name. Informix password will be required when changing INFORMIXSERVER name in order to create new Windows service. Further Information: On an UAC enabled Windows Vista or 2008 server ntchname must be started from an administrative command line window. If you use ntchname to change the name of a service currently starting as LocalSystem, it will change this to "informix", you need to go back to LocalSystem through the services applet. ntchname should not be used to change the name of an instance on a machine where user informx does not exist. Version 2.0.1 nterror Function: Converts an NT Operating System error number into an error message. Usage: nterror Further information: The same error message can be found in the winerror.h file if the Microsoft C/C++ compiler is installed. Example: nterror 5 5 Access is denied. Version 2.0.1 Onpipe Function: Onpipe sends a command to the IDS named pipe to be executed in the context of the IDS process. Usage: onpipe Further Information: An example of when this might be useful is if the oninit process is running as the SYSTEM user, and there is no informix user on the machine. The System user will then be mapped to the informix user internally. As you cannot logon interactivly as the system user, you could use onpipe to have the system user execute some commands for you. Say you want to grant someone access to the sysadmin database, you could use onpipe to have the SYSTEM user do this Example: onpipe ol_myserver "c:\inf1110\bin\dbaccess sysmaster c:\work\test.sql" Note that absolute pathnames are needed for dbaccess and the sql script in the example. Note this utility must be run by an administrator user in order to access the named pipe. Version 2.0.1 Onregcheck.exe Function: Checks and prints the Informix Dynamic Server Registry settings. Usage: onregcheck {-c | -p} -c - CheckOption -p - PrintOption if is not provided, onregcheck checks all InformixServers installed on the machine. Further Information: onregcheck performs the following actions: Initial checks: --------------- Opens HKLM\Software\Informix\OnLine If no InformixServers are specified it checks every instance entry under this key. For the specified InformixServer or for each InformixServer: opens HKLM\Software\Informix\OnLine\ Environment Variables --------------------- Opens Environment subkey Checks for the following variables: CLIENT_LOCALE DB_LOCALE DBLANG INFORMIXDIR - checks this directory exists INFORMIXSERVER - checks this is the same as the InformixServer INFORMIXSQLHOSTS ONCONFIG - checks this file exists REGMACHINE SERVER_LOCALE SQLHOSTS entries ---------------- If INFORMIXSQLHOSTS points to the local machine: Opens HKLM\Sofware\Informix\SQLHOSTS\ Checks the following entries: HOST - checks it is the local machine OPTIONS - if an ER group entry (g=xxxx) is present the SQLHOSTS entry for the group is checked PROTOCOL - checks it is one of: onipcnmp olipcnmp onsoctcp olsoctcp SERVICE Informix Server Windows Service ------------------------------- Checks a Windows Service with the same name as InformixServer exists. Checks the ImagePath for this service is in the format: \bin\onscpah.exe Security entries --------------- Checks the existance of each user in the UID table and prints a warning for users who don't exist and for gaps in the UID table. SNMP Subagent entries --------------------- If the snmp service is installed, checks for the Informix extension agent entry in: HKLM\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents Opens HKLM\Informix\OnSnmpSubAgent Checks the infxsnmp.dll file pointed to by "Pathname" exists. Version 2.0.1 setsysenv Function: set system or user environment variables Usage: setsysenv {-s|-u} {-i|-d} -s : sets system environment variable -u : sets user environment variable -i : initializes environment variable -d : deletes enviornment variable Further information: Set user environment variable INFORMIXDIR to d:\inf1150 in Control Panel->System: setsysenv -u -i INFORMIXDIR d:\inf1150 Note that system environment variables might only take effect after a restart of the system, and the user environment variables might need a restart of the session. Version: 2.0.1 tapeinfo.exe Function: Gather informaton about a tape device Usage: tapeinfo Further information: This program queries a tape device using the GetTapeParameters Windows API function and returns the following information: ECC Specifies whether the device supports hardware error correction. This member is TRUE if hardware error correction is supported. Compression Specifies whether hardware data compression is enabled or disabled. This member is TRUE if hardware data compression is enabled. DataPadding Specifies whether data padding is enabled or disabled. Data padding keeps the tape streaming at a constant speed. This member is TRUE if data padding is enabled. ReportSetmarks Specifies whether setmark reporting is enabled or disabled. This member is TRUE if setmark reporting is enabled. DefaultBlockSize Specifies the device's default fixed block size. MaximumBlockSize Specifies the device's maximum block size. MinimumBlockSize Specifies the device's minimum block size. MaximumPartitionCount Specifies the maximum number of partitions that can be created on the device. FeaturesLow Specifies the low-order bits of the device features flag. BlockSize Specifies the number of bytes per block. PartitionCount Specifies the number of partitions on the tape. WriteProtected Specifies whether the tape is write-protected. If this member is TRUE, the tape is write-protected. Version: 2.0.1