So now I've jumped back to my
virtual machine, my machine running SQL server.
I'm going to run the AF Client Install.
Now the AF Client does require that you have the PI SDK
installed, and it would be a good idea with this
PI SDK installed that you've made sure that it's
defaulting to the PI Server that you're going to be using
AF with.
So let's go ahead and proceed, and we'll see
what's already installed and what is not installed -- whether we're going to be
installing the SDK or not. I believe that's already on this machine,
but I still want to verify that it's pointing to the right
PI Server.
, here we go. What this is telling us is,
of the required components,
let's see, some Runtime
Distributables are already there. , here we go.
The PI Software Development Kit,
now that's going to be the 32-bit version, and we also have a
64-bit version that's not required in this case 'cause we're using
32-bit in this case. It says it's installed.
I'm not going to trust that it's installed properly
there, so what I'm going to do is just double-check. I'll go
into the PI System here, under
SMT -- or PI SMT, or actually About
PI SDK. That will tell us
what our current connections are, are
pointing us to in terms of PI Servers, so
I'll go into PI SDK, About PI SDK.
Let's take a look at the connections. , currently,
this is not, this is not configured to
connect to any specific PI Server.
So, what I'm going to do is just make sure
that we are configured to go to a specific PI
Server. I'll go ahead and Add a New PI Server.
Now you might not have to do this of course. If you've got a
copy of the SDK then
you -- chances are it's already pointing to the right
Server. If not, then during the Install
you're going to be asked to configure a Server. So, point
yourself to the PI Server that you're going to be connecting to.
Now, in this case, I'm connect to, connecting to
a Server that I know mostly
by its IP Address. This is
an Internal IP Address, of course. And,
my Default User Name I'm going to choose is pidemo,
or I can,
alternately I can choose to connect
as a, as a regular PI User with Normal
Security settings. PI Demo is a demo account
that we use in training.
Okay, so as you can see, I was able to connect
as pidemo, so what I've got now is a
properly configured connection
using the PI SDK, and I'm
ready to go ahead and proceed. As I said, if the SDK had not
been installed, that would be an installation that you would have to do
at that point. If it is already installed, just make sure it's pointing
to the right Server, like I just did. I'll go ahead and continue.
This is going to install that PI
AF Client. Now it's going to be asking me
what the name of my AF Server
is. Remember, I'm not on the AF Server now. I'm back
on that virtual machine, that SQL Server Box.
So, at some point it's going to ask me that. Let me go ahead and
acknowledge that as the Default
Directory. And so, here's where we specify
the name of the AF Server. Now, in this case,
the name of the AF Server is-- well, in this case it's
the name of that computer,
nickgx280. That was the name
of my AF Server. That's going to be the Default
Node for my AF Server.
I'm going to go ahead and do a typical installation.
You'll notice, though, if you do choose Custom,
not much to it really. You just have the choice between putting the
documentation on or not. I'll just go ahead and choose Typical,
and I'll go ahead and do the install.
Now I put in nickgx280 as
my Default AF Server. That's the AF Server, remember, not
the PI Server. I'm sorry these, you know, we've got Servers coming out
the ears here. But the AF Server is,
that's where I inser...I just installed,
with the AF Server install, you know, the,
what we're calling the AF Server which is
kind of the overlay, the Asset Database. The PI
Server's where the actual data is stored.
So, and, you know, the two are different, so, and we'll
illustrate that as we go through. So, it looks like that worked
properly. Now the true finish to this,
or the big finish to this, is to go out and start the PI AF Explorer
and see if everything works properly.
I'll go into PI System, or excuse me, the PI System
Explorer. It's not called the AF Explorer. The PI System
Explorer should allow me to connect to the
AF Server that I just specified. As you can see,
it knows what the name of that AF Server is,
nickgx280. It's looking for the default
database, and it's not there. I, I do need
to provide some credentials. These are going to be Windows credentials.
So, I'll go ahead and put in my username and password.
[typing]
But, it's, it's trying to, to connect to my Default Database
but there is no Default Database,
and that's normal. So, it's one of the few times you'll
see something like this, you know, was not found, and
it's all good news. That, that simply means that this is a brand
new AF Database. I need to select a Default Server,
or a Default Database. There is no Default
Database that I can select other than the one
that we reserved for Configuration, so, at this
point, what you should do, the proper thing to do is just create
a new database. Now, this is,
you know, this is going to be -- I suppose the database,
if, if this is a Production System, then think carefully what you
name this. This is what people are going to be connecting to for the
next few years. In this case, I'm going to call this
a database that we're using in this class.
And in this class
what we do, typically, when we meet
for real in a regular classroom, is we just call it Student
and then put a Student Number. Student01
Database, for example. So, that's going to be the name of
my database. Now,
of course, in, I just want to warn you, in some
of the, some of the things that
you'll ha...you'll see the screen prints and some of the videos,
you may see a system with many, many different
AF Databases. You know, this, this configuration
is just kind of like a reserved one that we use
for a lot of configuration purposes. But this is the
actual AF Database. I, I don't think it's really typical
to see a customer who's got many different AF
Databases. It's typically just one AF Database that you use
to represent the assets in your organization.
But, you'll see sometimes in, in our examples, we have many, many
different ones we use for different testing purposes and examples.
So, once I am enabled to do
that -- there we go. Looks like we've got a, a new AF
Database. I can start creating Elements or
adding to the Library, etc. There's an optional
part of this exercise, and that is to change the Security that's
happening over on the AF Server. Let's go back to the AF
Server. I've just switched out of my SQL Server
computer, and I'm back on my AF Server. If you look at the
Services Applet -- this is a little Services Applet
that shows us the PI AF Server
Application itself, or the PI
AF Server Service. If we look at its
Properties, it's currently logging on using
this Network Service Security.
And, let's just say in our
situation we don't allow that. We would prefer that
somebody log on as a Domain User. That's how,
you know, that we, we don't permit using
connections across the Network that are not using
domain credentials. So, if we want to do that, there's
some changes that we need to make in a couple of places. Let's go back,
take a look at our SQL Server first. I'm back on our SQL
Server machine now.
And I'll, first I'll just close out of the PI
System Explorer. We don't need to be looking at this right now.
And, I'll go into Administrative Tools under
Computer Management. I'm going to be going after the User Groups.
And so under here, under Local Users and
Groups, what I'm looking for is the
Group that was created called
AFServer. That was actually created during the AF Install.
[typing]
Now as you can see, the only member
of this Group right now is not a User at all.
It's a computer. It's the AF Server.
And, I don't want that. We don't want to grant access based on the
name of the computer. We want access based on a
domain user. So, I'm going to go ahead and remove that.
By the way, this is
probably a good time to remind you if this is not
your policy, if it's not your policy to disallow
all but, you know, domain credentials
from making connections across computers, please don't
do this. The only reason we're doing this -- I've cleared this out --
is to demonstrate how to do it. And,
and this is the type of training where you're basically going to --
I'm just -- show you how to do something that you would only,only do once
at a site, so this isn't something you typically have
to do, if you're even going to do it at all. So,
the next thing we have to do -- so, with that said, let's go through
and do some more of these obscure things. Let's go back
and let's go into the SQL Server Management Studio
and get rid of a couple of Security Profiles
that are defined there. I'm going to go ahead and
log in now. The, the name of the SQL Server is this
AFCLASSVMNICKD as I said. I'll
go ahead and connect. It's going to be using Windows Authentication,
so since I'm logged in as a Windows User, this should
go smoothly. Once I'm logged
in, well, first of all, let me make this a little
smaller so we can see everything on one screen.
, here's our SQL Server
Management Studio Options.
The Option we're looking for is under Databases.
We're looking for this Database right here. That's called
PIFD. That's the database that's created when we
install AF. And, what we're going to do
from here is we're going to basically undo what the Install
did by adding a Security Schema
that allowed this NT
Authentication. , there we go. Notice, one of the,
one of the Authentication Methods here is this NT
Authentication Network Service, and that's what we don't want,
so I'm going to right click on that, delete it,
you'll see this disappears
and we'll just go ahead and say Yes. We'll confirm that delete.
Okay, next up. Let's go back up to
the, basically the Instance,
this AFCLASSMD, and under there,
there is a -- not under Databases. We were just there.
Under there there's a Security, under Security there's a Log Ins.
What we need to do is choose, again,
this NT Authority Network Service, and
I'll choose that, choose the Properties,
and under User Mapping
we need to clear this Field
right here, this PIFD.
So, as you can see, that's yet another place in which
we're undoing most -- undoing the install,
and disallowing that connection.
So, we're almost finished now that we've updated
SQL Server on here.
Let's go back to our AF Server.
On the AF Server we need to change that Service so that
it tries to log on as a Windows User.
I'll go ahead and bring up my
AF Server, and on the AF
Server I'm in the Services Applet.
I'll go into Properties. Under Log On
this is where we're going to be specifying a User
and a Password.
And this is going to be a Domain User, so I'll go
ahead and use my domain credentials,
make sure I type in my
Password correctly. I'll go ahead
and Apply.
There we go. And, it, it even warns you. What
the step you'll see in the instructions is at this point we do have to
stop and restart the Service. Now, if it restarts
properly -- let me go ahead and stop it.
If it restarts properly and makes the connection
and we don't see any error, then we
have some success. What we should be able to see
is -- well, this is successfully
connected to the, the Server,
that AF, or SQL Server, in the other Box.