Updates:
-I changed the fobs. The code for importing a license didn't work on NAV2013. I changed it to code that works on both NAV2009R2 classic and NAV2013 (I kept the old code in comment).
-Small change in the view. Field [The license] changed to [The License]. (mark the uppercase in the letter "l").
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
DBID is the ID of your current DB. If you are in the master db, it will be the master DB. If you are in a DB xyz, it will be the ID of your DB xyz.
When the query is run from NAV, the current DB is your NAV DB and DBID returns the ID of your NAV DB.
AND DB_NAME() converts the id to the name.
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Look at my three scenarios, using classic client 2009 R2, Database = KVA_TEST
License Database = '', License User Name = '', License Version = 0, License A
License Database = '', License User Name = '', License Version = 6, License B
using classic client 2009 R2, License B will be served. That's ok.
License Database = 'KVA_TEST', License User Name = '', License Version = 0, License A
License Database = '', License User Name = '', License Version = 6, License B
using classic client 2009 R2, License B will be served, although license database name for License A is the name of my used database.
License Database = 'master', License User Name = '', License Version = 0, License A
License Database = '', License User Name = '', License Version = 6, License B
using classic client 2009 R2, License A will be served, although license database name isn't the name of my used database.
Therefore my guess that the result of DBID is the ID of the master DB ...
I have to admit that I never checked that, because I considered the default (with "License Database" = "License User Name" = '' and "License Version" = 0) license, the pre NAV2013 license. I needed that because I have pre NAV2013 and NAV2013 databases on the same server and didn't want to have a license per database.
I only diversified the license for NAV2013 and beyond.
And at the moment not even that is needed anymore because the NAV2013 (R2) license also works for pre NAV2013 databases now.
I don't see a way how to to make the diversification of the license possible for pre-NAV2013 databases with the classic client (Except with filtering with "License User Name" but that means the user will ALWAYS use that license in all databases where the record has "License Database"=blank).
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
"The same problem is at the customer site. The customer works with his license, but sometimes the partner needs to do some work on the database using a development license."
I don't understand the core problem - can't the developer just Change the licence to the developer licence, while the imported/uploaded licence is the customer one for all the other users, like in Classic?
Take this scenario:
-NAV2013 or NAV2013R2 at the customer site.
-You need to run some one-shot update to fix some dataproblem in the customer DB.
At the customer, you start the development client. Change the license to your developer license and start developing (Or even better: you import the object in the customer DB). Considering the object is a one-shot-fix-dataproblem object, the customer doesn't have it in their license!
When you run the object, it is NOT the development client that runs the object, BUT THE SERVICETIER. And the servicetier has still the customer license and that customer license has no permission to run the object.
If you UPLOAD your developer license to the server, it means that from now on the service tier (if restarted) will use your developer license. That is NOT good!
So with my system you can have the basic servicetier with the customers license and an extra servicetier with your partners license. When running the client, YOU need to connect to the second servicetier that is using YOUR license.
I hope this was clear.
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I did not get it first, because I never dedicate separate object ranges to one-shot fixes, I always have a Customizations Setup Form (okay, Page now) and that has a Tools menu and then then these are put into that one. But I guess it could be very useful for those who want to fix the same problem at many sites as in those cases a separate object is meaningful.
Comments
Update: I found that importing the license in NAV2013 corrupts the license in the field. Checking this out on how to fix it.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
-I changed the fobs. The code for importing a license didn't work on NAV2013. I changed it to code that works on both NAV2009R2 classic and NAV2013 (I kept the old code in comment).
-Small change in the view. Field [The license] changed to [The License]. (mark the uppercase in the letter "l").
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I just tested your great How To to serve multiple licenses to different users.
All paramters of the current session but the database name is corrent recognized.
It seems that at DB_NAME(DBID) the result is allways "master".
None of my database names are accepted, only a database name = master.
We use SQL Server 2012 and NAV 2009 R2 Classic Client.
I Just tested only Classic Client.
Do you have some suggestions?
Thanks!
Torsten
DBID is the ID of your current DB. If you are in the master db, it will be the master DB. If you are in a DB xyz, it will be the ID of your DB xyz.
When the query is run from NAV, the current DB is your NAV DB and DBID returns the ID of your NAV DB.
AND DB_NAME() converts the id to the name.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Look at my three scenarios, using classic client 2009 R2, Database = KVA_TEST
using classic client 2009 R2, License B will be served. That's ok.
using classic client 2009 R2, License B will be served, although license database name for License A is the name of my used database.
using classic client 2009 R2, License A will be served, although license database name isn't the name of my used database.
Therefore my guess that the result of DBID is the ID of the master DB ...
Torsten
I have to admit that I never checked that, because I considered the default (with "License Database" = "License User Name" = '' and "License Version" = 0) license, the pre NAV2013 license. I needed that because I have pre NAV2013 and NAV2013 databases on the same server and didn't want to have a license per database.
I only diversified the license for NAV2013 and beyond.
And at the moment not even that is needed anymore because the NAV2013 (R2) license also works for pre NAV2013 databases now.
I don't see a way how to to make the diversification of the license possible for pre-NAV2013 databases with the classic client (Except with filtering with "License User Name" but that means the user will ALWAYS use that license in all databases where the record has "License Database"=blank).
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
"The same problem is at the customer site. The customer works with his license, but sometimes the partner needs to do some work on the database using a development license."
I don't understand the core problem - can't the developer just Change the licence to the developer licence, while the imported/uploaded licence is the customer one for all the other users, like in Classic?
-NAV2013 or NAV2013R2 at the customer site.
-You need to run some one-shot update to fix some dataproblem in the customer DB.
At the customer, you start the development client. Change the license to your developer license and start developing (Or even better: you import the object in the customer DB). Considering the object is a one-shot-fix-dataproblem object, the customer doesn't have it in their license!
When you run the object, it is NOT the development client that runs the object, BUT THE SERVICETIER. And the servicetier has still the customer license and that customer license has no permission to run the object.
If you UPLOAD your developer license to the server, it means that from now on the service tier (if restarted) will use your developer license. That is NOT good!
So with my system you can have the basic servicetier with the customers license and an extra servicetier with your partners license. When running the client, YOU need to connect to the second servicetier that is using YOUR license.
I hope this was clear.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I did not get it first, because I never dedicate separate object ranges to one-shot fixes, I always have a Customizations Setup Form (okay, Page now) and that has a Tools menu and then then these are put into that one. But I guess it could be very useful for those who want to fix the same problem at many sites as in those cases a separate object is meaningful.