I am having a real headscratcher of a problem using the sdeversion command line utility on HP-UX and it seems related to the services file.
I can start and stop the SDE service using sdemon-o start and -o shutdown and it will find the appropriate instance information from the $SDEHOME/etc/services.sde file.
Running sdeversion -o compress -u sde gives me this error:
Error: Entry for SDE instance not found in services file (-102).
Error: Cannot get configuration information
Running sdeversion -o compress -i 5153 -u sde (this particular service is running on 5153), I go through the SDE password prompt and compress confirmation and then get this error:
Error: Insufficient permissions (-25).
Error: Unable to compress state tree.
The truly strange part is that I can do the same thing on another system pointing to another database that is supposed to be configured almost identically and it works. The differences in configuration are the path to $SDEHOME, the database name and the SDE service running on 5151 instead of 5153.
I have compared the $SDEHOME/etc/services.sde file on the two systems and they are idendtical in layout and have identical file permissions. Aside from the user names, home directory and SDE-related paths, the environment variables on the two systems are set the same. The .profile files for the sde admin user account on the two machines are identical (aside from path environment variables). The SDE user has identical permissions on both databases.