Problem with "isc_service_query" and "isc_info_svc_get_license" +"isc_info_svc_get_licensed_users"

I have problem with getting a correct result from "isc_service_query" when I 
pass "3A" (Get license and licensed_users), in fact I get an "Unexpected 
Output buffer value" error when IBX tries to read the license information 
from the result. From the debugging I have done it seems like I dont get the 
correct result from Interbase.

Looking at the result I see that I get a correct value on 
"isc_info_svc_get_licensed_users", but the rest of the buffer is filled with 
zeros where I expect to see 0x33 and information about licenses.

I am using Delphi 2009 and the IBX Admin component TIBServerProperties to 
reproduce this (Example code below)

procedure TForm1.Button1Click(Sender: TObject);
var i : integer;
begin
 ListBox1.Clear;
 IBServerProperties1.ServerName := '';
 IBServerProperties1.LoginPrompt := false;
 IBServerProperties1.Params.Add('user_name=SYSDBA');
 IBServerProperties1.Params.Add('password=masterkey');
 IBServerProperties1.Active := true;
 IBServerProperties1.Options := [License];
 if IBServerProperties1.Active then begin
  IBServerProperties1.FetchLicenseInfo;
  try
   for i := 0 to High(IBServerProperties1.LicenseInfo.Key) do begin
    ListBox1.Items.Add(IBServerProperties1.LicenseInfo.Key[i]);
   end;
  finally
   IBServerProperties1.Active := false;
  end;
 end;
end;

Looking at the code for IBX "TIBServerProperties.FetchLicenseInfo" in the 
unit IBServices.pas you will see the following:

  ServiceQueryParams := Char(isc_info_svc_get_license) +
                        Char(isc_info_svc_get_licensed_users);
  InternalServiceQuery;

It makes a request for license and number of licensed users.
This gives "request_spb_length=2" and "request_spb='3A' (0x33,0x41)" in the 
call to isc_service_query, but isc_service_query only return a result for 
0x41 (isc_info_svc_get_licensed_users).

Can "isc_service_query" only take one query in IB2009? If so, IBX needs to 
be fixed to split the query into two separate calls?

Kind regards
Magnus Flysjö
0
Utf
5/25/2009 11:48:39 AM
embarcadero.interbase.general 923 articles. 0 followers. Follow

7 Replies
1299 Views

Similar Articles

[PageSpeed] 38

Magnus Flysjö wrote:
> 
> Can "isc_service_query" only take one query in IB2009? If so, IBX needs to 
> be fixed to split the query into two separate calls?

since IB 7.5 (I think) the licensing API doesn't work.  Once IB switched to 
sanctuary for lits licensing the server API was never updated to return the 
information that while it knows is now in a different spot.

> 
> Kind regards
> Magnus Flysjö


-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)
0
Jeff
5/25/2009 7:50:09 PM
> since IB 7.5 (I think) the licensing API doesn't work.  Once IB switched 
> to
> sanctuary for lits licensing the server API was never updated to return 
> the
> information that while it knows is now in a different spot.

That explains it all then.. To bad the APIGuide isnt updated, it would have 
saved me a lot of time today.
Are there any other ways to distinguish if the user has a trial, full or 
completly lack a valid license?

Also, the source code for TIBServerProperties.FetchLicenseInfo (IBX 
component) should be changed to handle this.
At the moment it only breaks the loop for an "isc_info_flag_end" (127) 
status code.
It should also break on "isc_info_end" (1) to handle this issue correctly, 
since thats what IB sends.

/Magnus
0
Utf
5/25/2009 8:57:24 PM
Magnus Flysjö wrote:
>> since IB 7.5 (I think) the licensing API doesn't work.  Once IB switched 
>> to
>> sanctuary for lits licensing the server API was never updated to return 
>> the
>> information that while it knows is now in a different spot.
> 
> That explains it all then.. To bad the APIGuide isnt updated, it would have 
> saved me a lot of time today.
> Are there any other ways to distinguish if the user has a trial, full or 
> completly lack a valid license?
> 
> Also, the source code for TIBServerProperties.FetchLicenseInfo (IBX 
> component) should be changed to handle this.
> At the moment it only breaks the loop for an "isc_info_flag_end" (127) 
> status code.
> It should also break on "isc_info_end" (1) to handle this issue correctly, 
> since thats what IB sends.
> 
> /Magnus

To find out about what license are installed run License Manager. This 
is the best way to go since for InterBase 2007 and later. Note that 
InterBase Manager can show installed user licenses as well.
0
quinn
5/26/2009 6:50:12 PM
> To find out about what license are installed run License Manager. This
> is the best way to go since for InterBase 2007 and later. Note that
> InterBase Manager can show installed user licenses as well.

Yes, but I was more into doing something from inside our own application.

The idea is to gather information about the application environment and put 
it into a report that the end user can generate from our application and 
then send to one of our support engineers if something is wrong.

We don’t really want to include and ship the license manager with our 
installer and then also have to instruct the end user on how to manually use 
it.

/Magnus Flysjö
0
Utf
5/26/2009 9:42:11 PM
I can see how this is desirable. However, the only thing I can see you 
can get in your application is the Server version. The API to extract 
license information is not public and is not part of the InterBase server.

Note that there is a command line version of license manager. So, it 
should be possible to execute a batch file to extract license 
information. The command line version is not installed on Windows 
because we see no need for it there. It's a java application, so could 
be configured to run on windows. You'd have to get the .jar file from 
the install of another platform. If this is of interest to you let me 
know and try to give you some guidance.

Magnus Flysjö wrote:

> 
> Yes, but I was more into doing something from inside our own application.
> 
> The idea is to gather information about the application environment and put 
> it into a report that the end user can generate from our application and 
> then send to one of our support engineers if something is wrong.
0
quinn
5/27/2009 9:26:03 PM
quinn wildman wrote:
> I can see how this is desirable. However, the only thing I can see you 
> can get in your application is the Server version. The API to extract 
> license information is not public and is not part of the InterBase server.

What you don't seem to be getting is that the IB server already knows how to 
extract that for the users otherwise how can it refuse connections based on user 
counts?  I knows the licensing information, they just never updated the service 
API to return this information to clients.  Making the service API read only is 
still important, even if they disable the write portion of the API.

> 
> Note that there is a command line version of license manager. So, it 
> should be possible to execute a batch file to extract license 
> information. The command line version is not installed on Windows 
> because we see no need for it there. It's a java application, so could 
> be configured to run on windows. You'd have to get the .jar file from 
> the install of another platform. If this is of interest to you let me 
> know and try to give you some guidance.

And is worthless from remote locations like a client.  People have complained 
about not being able to read the information for several years now.  No one is 
complaining about not being able to remotely add licenses, only retrieving the 
license information.  All the service API has to do is return the information IT 
ALREADY KNOWS.

-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)
0
Jeff
5/28/2009 5:54:33 AM
I'm in complete agreement that this would be a useful feature that the 
server already knows about. It is all a mater of priorities.

Jeff Overcash wrote:
>...All the service API has to do is return the information IT
> ALREADY KNOWS.
>
0
quinn
5/28/2009 11:07:43 PM
Reply:

Similar Artilces:

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

quotes, quotes, quotes...
I am getting this error and I know what is causing it, but I have no idea how to fix it, any help would be great. The script steps through the /var/log/messages file on a linux server and puts The entries into a mysql database. However when it gets to the 'hlt' line in the messages file it just barfs. The single quotes are freaking it out. I know about quotes but not how to use in this situation. Thanks, Paul Error: May 27 17:53:00 localhost kernel: Checking 'hlt' instruction... OK. <----- doesn't like this in the messages file DBD::mysql::st exec...

"Me" is better than "You"
Yes I know, strings are frozen. But let me talk about it, I really can't get through the idea of a PC talkin to me. I consider my PC as an extension of myself, not a dumb companion who addresses Me as You. Yes there are times when I get angry with Him while I work and get wrong calculations etc.., but it really is my fault, Me using wrong istructions and eventually wanting to find someone else to blame, but it's Me. And yes, I consider Thunderbird my mail program, reading my mail on my PC as Me. So I personally like to have Me in the header bar as a compact address ...

Replacing "\\" with "\"
Hi all I'm getting this value from a CheckBoxList control - a location of file, i have to remove "\\" and replace it with "\" and pass it to Query, how to do it, i tried with Replace, but coud'nt suceed. "\\\\Blaze10xp\\BLZ_SFS_07\\Sample Excel Files\\Excel Files\\report2.xls" thank's in advance - Prakash.C you tried Replace like this? string newstring = oldstring.Replace(@"\\",@"\");Plese, do not forget to click "Mark as Answer" on the post that helped you. Thanx!My blog: Scenes From A Developer Memory yes i tr...

"Using" or "With"
Hi all Please can someone enlighten to me as regards the difference with the "Using" and "With" statement when accessing data - which is better, what are the limitations and/or any pointers. Many thanks. Regards DaveDavid WinchesterPlease mark as answer if this is the solution.  using gives you the ability to use the connection and it closes the connection directlly after you finish using it. and there is no need to try- cach - finaly. there is no limitation on using USING keywordMuhanad YOUNISMCSD.NETMy Blog || My Photos || LinkedIn I have a dataobject the re...

Using "+" or "||"
Using SQLAnywhere 5.5.04, I've gotten into the habit of using "||" in ISQL to indicate a string concatenation. I needed to paste my SQL statement into the PowerBuilder script painter for some embedded SQL, and PB didn't like the "||" very much at all. I changed it to "+" and it seems to be ok. Do these two operators indicate ~exactly~ the same thing? moin, afaik these two's are not the same! if you're using "||" and any term is NULL then in the resultstring the term will be ignored if you use "+" then the resu...

replace the "." with a ","
Oi.... I need to build a small programm in ASP.NET and chose to use C# for it.Now i got everything working but there's one little problem.the first textbox is a double. I need to make it so that when someone enters a "." then it gets replaced by a ","any ideas?Ghan  string blah = "4.2.2.2";blah = blah.Replace(".", ",");Ryan Ryan OlshanASPInsider | Microsoft MVP, ASP.NEThttp://ryanolshan.comHow to ask a question...

"-" not "_"
I wrote a SQL statement in the data tab. I wrote a bunch of alaises as example ' word-type ' but when I hit the layout tab it converts the "-" to "_". So now my field name is ' word_type '. Is there any way to prevent this? CardGunner Don' use a hypen ( - ).  It isn't a valid character for column names.   See http://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1188931,00.html   Here's an excerpt about column names: Letters as defined in the Unicode Standard 2.0 Decimal numbers from either B...

double quote
hello there...  i tried everything of think but not working the way i wanted to be... not sure what i'm missing...i'm generating a <span> in code behind and then using in javascript.... here is what i'm doing code behind: int i=0string _keywordID = "keyword";string _name = row["visit_info_nm"].ToString().Trim(); String _getElementByID = String.Format("<span id='{0}' OnClick = \"document.getElementById('{1}').value='{2}';\">{3}</span><br>", i, _keywordID, _name, _name); here is what it generate : <span id='1' OnClick = \"document.getElementById('keyword')...

"To" and "From" missing
When I print emails, the words "To" and "From" are blank, even though the "To" name and "From name (addresser, addressee) do show up. This is not a problem for other users on my system. Suggestions In mailbox right click, view. On the message window, right click and choose print options. Make sure print header is checked. -- Barry Merchant NSC Volunteer SysOp *** no email unless requested please!! *** > In mailbox right click, view. On the message window, right click and > choose print options. Make sure prin...

Regular Expression to remove "/", "\", "<", ">" and "="
Can anyone please show me the regular expression to reject a string ("<blue", "right>" etc.) which has the following expression in it: "/", "\", "<", ">" and "="  hi, It may Help u.. it is in Class file u may use this expressin in validation controls also. Regex objReg = new Regex(@"^[^,.?/\~|`;:'<>]*$", RegexOptions.Singleline); Regex objReg = new Regex(@"^[^,][^.][^?][^/][^\][^~|][^`][^;][^:][^'][[^<][^>]$", RegexOptions.IgnoreCase);Thanks &...

"JROC" / "JROK" / "JROCK" / "JROQ"
I just started a new contract and the tech lead told me that he wanted me to become familiar with something called "JROC" (among some other tools). I've been searching the web and I haven't found any dev tool called "JROC." Based on the name of the tool, it sounds like it encapsulates some javascript functionality. I have tried searching for different spellings - "JROK" / "JROCK" / "JROQ" but I haven't found any matches. Have you ever heard of a dev tool by this name?...

"SSL" "Mail" and "Code"
Does anybody know of any discussions taking place within Mozilla regarding these 3 bits in the certificate manager? Perhaps I've missed something in the discussions here. In any case, I think a new mechanism for indicating trust w/in the Mozilla apps are needed. Take for example the "StartCom Certification Authority" root. The Certificate Manager (I'm using Firefox on Windows) says it can identify web sites, email users, and code yet the cert itself says it can only be used for signing other certs (essentially, that is). At a minimum this is confusing but I have...

Web resources about - Problem with "isc_service_query" and "isc_info_svc_get_license" +"isc_info_svc_get_licensed_users" - embarcadero.interbase.general

Resources last updated: 11/24/2015 6:59:00 PM