I just created a new database. I just called it Database34.
And watch what I can do. I can import
the definition of
a database that already exists. This is a database
that I had exported previously
and by doing this, as you can
see when we're finished, we have a complete duplicate
of what we saw earlier. This is that,
this is an earlier version of the database that I've been
working with for the CBT. So, we
have the capability to export what's in a database and then import
that into another database. And this is great for,
of course, moving it from a Production System or from a
Staging System into a Production System or vice-versa,
and, and also sharing individual Elements. But there are
some tricks to it, so let's go ahead and go over that.
I'm going to go ahead and delete this current database
and go back and take a look at the
one I've been working with so far. Here, here's my database.
In order to export this entire database it doesn't matter where
you're selected within this
sel...the hierarchy here. It doesn't really matter where
you select it. If you choose File and then Export
that's going to export the entire database.
Now that's the one way that you
can do this where it doesn't matter what you've selected.
If, on the other hand, you wanted to export just
a single Element and move that from one system to another,
we would Select the Item
that we want and do a right mouse-click. And, at that
point we can choose Export, and as you can tell
by the name here, this is simply going to export the
Properties of that Mixing Tank.
So again, if -- same place, I've
selected the same thing. If I choose File, Export here,
as you can see just by the naming convention, you
can see we're exporting the entire
AF Database at that point.
Now let's go ahead and do some Exports and we'll explain some things along
the way. Now when I choose File, Export,
I'm going to export everything. So a couple, a couple of the options
that you see here aren't really going to be that useful.
For example, Include All Referenced Objects. That's
really an option that's only useful if you decide
that you're going to be exporting just singular Elements.
Like for example, if I do a right click here
and choose Export, it's just going to export the Mixing
Tank. If I choose that it's going to export the Mixing Tank
plus the Mixing Tank Template. Now,
remember, when I choose File, Export from
here, we're going to export the whole database anyway, so we're going to be
including all the Referenced Objects as well.
As you might guess, if you choose the
Security Settings, that's simply going to export all
the security that's associated, you know, all the different
security options that are associated with your AF Objects.
And that will take longer. I suppose it would
be something useful if you want to make an exact duplicate including
the security settings, but if you are moving this from one
server to another, you can omit that. It would speed up the
export and the import, and then you could set whatever security
settings you'd want for the destination. Now, Default Values
gives you a chance to , to export
every single thing that's in
this AF Database, including those things that
have not changed from the defaults that are established
in the templates. Now typically, that's going to swell
the size of this AF Export.
It's exporting to this file here. It's going to
swell the size of that without really adding much
in terms of content because, when you import
without the defaults and we simply
create those objects with the defaults, so,
you know, if you create an object it has a Default Value of
5. Let me give you an example from here, from our
Mixing Tank. Now my Mixing
Tank, if I take a look at the Library
for the Mixing Tank,
that Mixing Tank has a default of
3 meters for the Diameter, 5 meters for the Height.
In the case of Mixing Tank 1,
I actually have a Diameter of 4 meters, not 3
meters. So, if you choose --
whether you choose the Default Values or not,
we are going to export the Diameter
because it's different than the Default. Now if we take a look at Mixing
Tank 2, it
has the Default Values for Diameter and Height.
So if you choose to clear that
field, if you leave that, or uncheck
that option, if you uncheck
the Default Values Option, then if you've left
that unchecked you will not see a Value for Diameter
up here in that XML file. But that's
actually okay because when you import this, wherever you import this,
as long as you are importing the Element
Template, then we will put that Default Value
in there. So what's the purpose of this if it, if the effect is
the same? Well, the purpose is if you
would like to have, you know, an absolute
record, including all of the
defaults of what's in your system, you would choose
that option, and that would insure that everything,
including Default Values, has been exported.
For example, that would be very useful if you were taking this to
some external system. You know, you're going to use some transform
file to bring this into some other system, you want the Default Values
as well, because their default behavior may not be the same as ours.
So, you know, we want that option,
but typically this is going to be something that you clear.
You would clear this Default Values,
clear that check-box, so that it keeps the file size
small, so we don't export things that we really don't need.
And finally, we have this Unique ID's.
What Unique ID's allows you to do is specify that a
unique identifier is associated with the
object, and in that way you can
change the name of the object since the name is
no longer going to be required for, you know, for providing uniqueness.
So, you, you would only choose that option
if you did want to do some kind of an export
in which you're going to go through this exported
file and, by hand, change those,
those Object Names. So if you were, you were
really interested in doing some kind of a renaming
that exploits doing this into, in a
nice editor here, then you can do that and then
specify Unique ID's and that gives you a mechanism to
rename these things as you like. And
finally, if you aren't making use of our Event Tracking,
using Event Frames, then you can export
what those Event Cases are. So you just
select here and specify how much you want to export.
In this class, we're really not looking at Event, Event Frames.
We do have some Learning Labs from our User Conferences
in which you can take a look at Event Frames and how they work.
And also from our VCampus
Learning Labs we have Event Frames
Examples if you're really interested in that.
So I'm going to go ahead and do an Export and just include all my
Referenced Objects. Not really necessary because it's
going to export the entire database in this
case. I think what I'd like to do here is
give this a -- this is just my own preference -- I'll give
this a Date. So, right now,
it's the 10th year,
the 10th month, the 11th day.
So I'll just give it that name,
and we've now
exported that. And, if we take a look at
where I exported this -- and this just can, can just go to any place you
choose to export. , there's my export.
It's as of the current date, and I just gave it this unique
name so that I'll remember what date this was from. So,
what's the benefit of that? Well, you know, if, if I get things
really messed up in here, I start making
deletions that I regret --
oh, okay, I've deleted that. I've accidentally deleted my,
some of my templates or my
Enumeration Sets -- any of those things --
, if these things have been deleted,
or in somehow, some other way I made
a mistake here, I can always go in
and import this back. Now, when I do an Import,
you will notice that when you import, you have the choice
to either Import to
Overwrite or Import to merely Edit.
I'll go ahead and demonstrate. I'll choose File, Import.
, as you can see, we
can choose that we, to allow creation of
New Objects, or not. And, if we --
for example, if we're only editing, making edits to
existing objects, we would delete that or we would
uncheck that. We can allow Updating of
Objects if the Objects already exist.
Actually, in this case, I'd like to turn that off,
because all I'm trying to do is restore what was there before. I'm not
really going to be updating anything. And, normally we
suggest you choose Automatic Check In. That's just going to go ahead and
it's got a little leaner footprint on memory
during the import. It just automates the Check
In so you don't have to go in there and do that. And then, finally,
if you recall when we define Data References to
PI Points, we can specify that
Tag Creation is set for those PI Points.
So, let me show you an example,
if I haven't deleted it yet. If we look at our
Storage Tank -- , here it is.
Under Storage Tank,
there is an Option
here called LabPoint, and that LabPoint
was defined to have Tag Creation turned on. Now, only
if Tag Creation is turned on for
your Data Reference, only if that is the case, when we
do an import, and if you've checked that we
allow Point Creation, we will go ahead and create those Points.
I think I will go ahead and allow it to Create and Update
and -- I'll go ahead and allow it to Create
any Points. Those Points should already be there, but I'll just go ahead and
specify this so I get a Full Restore. I'll go ahead and say OK.
It's gone out. It's found everything
that was exported and brought it back in.
So, if we take a look at this now, our
Enumeration Sets are back. The Templates
that I deleted are back. All the Elements
that I deleted are now back as well. So that's an example
of using our Export and Import.
Now, one common gotcha when you're
working with this is that, if you've made any changes
that are specific to your site for Unit of Measure,
you've added your own Unit, Units of Measure, and you made
use of those in your Library or in your Elements --
well, that's something that is not exported with the rest
of the AF Export that we just did. So,
what we would suggest your do, and the order in which you would do this
is you would export your Unit of Measure first, and
import that first before you import your
AF Export, and then, in that
way any Units of Measure that that AF Import
requires will be there already. So,
what we'd have to do is do a Select Unit of Measure,
choose File, and then Export.
And you'll notice just with the naming convention here,
we're specifying that this is going to be for the Unit of Measure Database.
Now, so
that would be something -- I'll, I'll go ahead and export my Units of Measure
if there are any custom Units of Measure.
In that way, if I do it -- go ahead and create a brand
new database -- , here's
a brand new database, you know, or actually more
to the point, if I'm moving this from one machine
to another, you know on that second machine you may not
find those units of measure available.
So, you know, with this database here, Database 35,
if it's on a different machine the first thing I would do,
go into Units of Measure, do a File Import,
and then after I do that, go into the
actual, this New Database and do a File Import
of the, the actual AF Database
Structure.