I'm going to show you how to obtain and apply a
new license file. But first what is a license file?
It's a file called pilicense.dat
provided by OSIsoft that
allows your PI Data Archive to function properly. This
file is specifically generated for the Server on which your
PI Data Archive will run and won't work on any
other computer. So when do you need a new license
file? Whenever you install or upgrade
a PI Data Archive. If you are looking for instructions
on how to generate a license for a new PI Data Archive
installation, please check out our PI Server installation video.
You also need a new license file
when you make changes to your license. For example if you
increase the number of PI Points for which you are
licensed. You also need a new license file if you make significant
changes to your Server. By that we need
significant hardware or network configuration changes.
This of course includes scenarios
when you are moving your PI Data Archive to a new
Server. As we mentioned,
the pilicense.dat file is specifically
generated for the Server on which your PI Data Archive runs.
When you make changes to your server,
you might cause a mismatch between the license and the server.
This will cause license machine mismatch
errors to show up in your PI Message Logs and in your
Windows Application Logs. This will also
prevent your PI Data Archive from being able to
start properly. These are the
steps for applying a new license file.
First you need to generate a machine signature
file or MSF which contains information
about the server. You then need to upload
this file to the tech support website at which
point you'll be able to download the pilicense.dat
file. You then need to replace the existing
pilicense.dat file on your PI Data Archive
Server. I'm going to walk you through these steps.
I have logged into my PI Data Archive
Server where I have recently made
hardware and network configuration changes.
I tried starting up my PI Data Archive
using the PI Server Start batch file.
You can see in the window here that the
start process has stalled and the last
Subsystem that was started successfully was the PI
License Manager. If we check the
PI Message Logs we see that the PI License
Manager posted the license machine mismatch error.
So we know that we need a new license
file. The first step is to open a command prompt as
administrator. So go to your start menu,
type cmd and make sure to start this command prompt
as administrator by right clicking and selecting
run as administrator. We are going to use a
command to generate the machine signature file.
We won't be making any changes to the PI
Data Archive. First we need to navigate
to the right directory so please type the following
cd /d
%PIServer%
Adm. Now we'll
generate the MSF file. The command is
pidiag
- host -
file and then we'll want to put the name of our
machine signature file. Typically we use the name of the
server and then append .msf.
So I'll put my server name
PISVR1.MSF
and just hit enter.
Now we can open up this directory by
using the command start .
In this directory
we now can locate our machine
signature file that we generated. This is
the file that we need to upload to the tech support
website. It's possible that your PI Data Archive Server
doesn't have internet access. If that's the case you
simply have to copy paste this file onto a
computer that does have internet access. That's what I'm going to do
now.
I have now copy pasted my machine signature file onto a computer
with internet access. So let's open up our
browser where I've already loaded the tech support website
and I've signed in. To generate a license file,
just click the generate license file link on the frontpage.
Here you want to make sure
to select the correct site for which you want to
generate the license. Then you can click
on the generate license button.
Now scroll down to step five
and you can click the browse button to select
your machine signature file. Then you
can go ahead and click the generate license activation file
button. After reading the license
agreement, you can go ahead and click the I agree
button at the bottom. And then you can download the
activation file.
Once again since I'm not on my PI Data
Archive Server right now, I'll have to copy
paste this pilicense.zip file to my
PI Data Archive Server. So I'm going to do that now.
So I've now copied over my pilicense.zip
file over to the PI Data Archive Server.
So I'm ready to extract it. Just right click
and select extract all.
You'll find three files
in this zip folder, the manifest which
contains specific information about your license,
the readme which contains instructions
and the pilicense.dat which is the file that we are looking for.
So just select this file and copy it.
You can hit control C. Now you'll want to
navigate to the PI Server DAT
folder and the easiest way to do this is to click on the
bar at the top of your Windows
Explorer and type
%PIServer% and then open up the
DAT folder. Before pasting our
pilicense.dat file, we just want to make sure
to rename our old file in case we need
it. So just right click on the old
file, hit rename and then just rename it
to something for example _old at the end.
And then you are ready to paste
your new pilicense.dat file into this folder.
So here is my new file.
The
PI License Subsystem will scan this folder every five
minutes for a new license. However keep in mind
that other Subsystems may take longer to recognize the new
license. So if you want to apply this license right
away, the fastest way to do it is to restart the PI Data Archive.
If not it can take up to an hour for the changes
to be recognized. In my case however my PI Data
was not able to start successfully.
So now that I've replaced my license file, I can go
ahead and restart my PI Data Archive once
again. To do this I'll go back to the PI
folder, navigate to the ADM directory
and find the PI Server start bash file
and I will run it as administrator
by right clicking and selecting run as administrator.
So it looks like all of
my Subsystems started successfully, so
let's go check PI System Management Tools.
I'll refresh my logs
and I see that I no longer have my
licensing error. One last thing that I can
check is the current percent match between my license and my server.
To do this I'm going to navigate
to operation and then licensing.
I can expand
the usage section and I see that I have an attribute
called current percent match which is showing
me that the match is now 100%. So I
have successfully applied my new
pilicense.dat file and my PI Data Archive
can once again function properly.