|
In the PowerBuilder 11.0 timeframe, Sybase went to a new licensing scheme called "SySAM". This is based on the FLEXnet license manager by Macrovision. This is the same technology used by ASE, PowerDesigner, and other Sybase products (but not iAnywhere's SQL Anywhere...).
Basically, this uses a license file (PB_SySAM.LIC), a properties file (pb110_sysam.properties), and the magic sauce provided by the FLEXnet folks. Everything has to be properly hooked up for the PowerBuilder IDE to properly initialize, so some background and debugging tips might help for the times things DON'T work...
The PowerBuilder Help -> About dialog box provides information about your current license state. This displays whether you are currently fully licensed or whether you are running in a Trial or Grace mode. If you should be fully licensed, but the About box states you are still in Trial or even Grace, this should be looked into immediatly because these are timed and will soon expire. Leaving you with an IDE that refuses to start.
Most of the issues are because the directory being looked into is not what people expect. With Windows XP and Vista, the directory of "personalized" settings is no longer in the classic 'PowerBuilder' directory, but in a user specific location.
For Windows XP this is usually something like:
c:\documents and settings\...user...\local settings\application data\sybase\powerbuilder 11.0
For Vista this is something like:
c:\users\...user...\AppData\Local\Sybase\PowerBuilder 11.0
This directory setting can be viewed and changed in the PowerBuilder IDE in the Tools -> System Options -> Initialization Path setting. This is stored in the registry in the "InitPath" setting.
This personalized directory is the focus of attention for all SySAM activity. This contains the copies of PB.INI, *.LIC, and the properties file that are actually being used. The copies in the original \Program Files\Sybase\... directory are pristine copies from the installation process and are not used.
C.1) PB.INI
The good-old ini file with all the handy settings we are all familiar with. To assist debugging SySAM issues we have introduced a couple new properties.
C.1.1) LogSySAM
Logging is the easiest way to see what is the true nature of the SySAM complaint. This also ensures that you are dealing with the correct location for the license files.
[pb]
LogSySAM = 0 | 1 | 2
(default to zero)
0 := none
1 := normal logging level
2 := yet more logging
Logging creates the file pb110_sysam.log in the same directory. This is typically the first thing that the customer service folks will ask you to do. A quick glance at this file will solve 90% of the SySAM problems.
C.1.2) SySAMTrace
The SySAM trace provides more details about the internals of what SySAM is looking for. I have found this useful when dealing with served licenses.
[pb]
LogSySAM = 1
SySAMTRACE= 0xfffe
This adds a LOT of details (and noise) to the same log file.
C.2) pb110_sysam.properties
The properties file is partially encrypted and partially clear text. This provides information to the licensing system about the type of license to expect and whether the license file is local or from a server. You might be tempted to think that simply changing the "InstalledEdition" to Enterprise that you would be magically elevated. However, this value is used to request the edition license. The request could be refused if the true license is not really an Enterprise license.
C.3) *.LIC - Local File
The true license file, or a reference to the license server. You may have multiple license files (common with ASE and servers, not very common with a tool like PB or PD). These license files are each examined during the startup of the IDE and the first one that satisfies the license request is used. This can sometimes be confusing when you have a beta license or some other condition and things start acting odd.
When you have multiple versions of PowerBuilder installed, things can get confused. An easy way to "eyeball check" the license file, is the version field. This is in the license file on the same line as INCREMENT ...
PowerBuilder and InfoMaker 11.0, 11.1, and 11.2:
INCREMENT PB_xxxx SYBASE 2007.0212
PowerBuilder and InfoMaker 11.5:
INCREMENT PB_xxxx SYBASE 2008.0624
(BTW - since *I* picked the numbers, these are dates important to ME - anniv of first date and wedding anniv. I don't know what I will pick for PowerBuilder 12.0 and PocketBuilder 3.0 but it will be some value that I like...)
C.4) *.LIC - Server Reference
This is a simple reference to the license server. It has no real details because the license server has the true licenses. The licenses fed into the server are similar to the ones above, but the client machine has only a simple "look over there" type of information. A classic server reference is like:
# Generated by PowerBuilder at 2008-Jul-24 11:16:39
# Standalone Seat - Served
SERVER bar.tarfu.com ANY 27000
VENDOR SYBASE
USE_SERVER
There are two common problems I see on the newsgroups, and my typical approach to solve them.
D.1) License failure on IDE startup
This failure is when the IDE displays the license wizard and otherwise refuses to start up. This is typically because the true license from Sybase eShop was never applied or the initialization directory was moved without the license files being (manually!) moved. Knowing the directory details (above) and how to further investigate with the logging should help solve the vast majority of these problems.
D.2) System clock setback detected
This is happens because SySAM also looks around in Windows to make sure the customer has not diddled their system clock to gain extra days (or years!) on a 30 day trial license. However, this can be spurious because of other system tests and even bad applications.
The only solution I've found for this (well, other than formatting the C: drive and reinstalling the OS) is to use an advanced search for all files with a create/modify/access date LATER than today and either 'touch' or simply delete those files.
Of course - if you run PowerBuilder with a future date, then set the clock back, that is detected and you may be permanently locked out.
Note:
For PowerBuilder 11.5 (and probably even 12), the basic technology is the same, but the filenames and directory locations have the expected changes.
Dude, great stuff. How about doing a PBDJ article on the same material?