Moving network databases – Echelon LNS User Manual
Page 270
LNS Programmer's Guide
256
3. Close the system. This detaches the Object Server from the network and
shuts down the LNS Object Server.
MySystem.Close()
4. Close the network. This closes the network database.
MyNetwork.Close()
5. Call
Remove()
on the
Networks
collection to delete the network. The
Remove()
method deletes the network database directory, the network
database, and the reference to the network within the global database:
MyNetworks.Remove(MyNetwork.Name)
Moving Network Databases
Sometimes, you may need to move a network database from the PC it was created and
maintained with. This may be because the LNS Server PC is due for a hardware
upgrade, or the integration work continues with the installation phase on site when
installing a network using the engineered system installation scenario, or a network
database needs to be moved into a data archive for retrieval at a future time.
Moving a LNS network database is a 2-step process. First, you need to remove the
database from its original location, and then you need to connect to that database from
its new location.
To remove the links to the network database without interrupting operation on the
network itself, and without destroying the network database itself, follow these steps:
1. Close the related System and Network objects, if open:
MySystem.Close()
MyNetwork.Close()
2. Call
RemoveEx()
on the
Networks
collection to delete the network. When
you use the
RemoveEx()
method, you can specify whether the network
database is to be deleted. If you do not delete the network database, you
can restore the network later, without having to re-create the database.
The following code removes the network, but leaves the database files
intact for use on a different location.
MyNetworks.RemoveEx(MyNetwork.Name, -
lcaNetworkRemovalFlagLeaveFiles)
NOTE: In this scenario, you will not decommission any devices in the
network before removing the network from the Networks collection, as
you will want the network to be functional when you finish moving the
database and restore it.
The next step is to move the network database to its new PC. When you move a network
database, you should include the entire contents of the network database directory,
including all subdirectories. You should also include any files from other directories that
are referenced in the database such as any download image files (.APB extension),
external interface files (.XIF, .XFB, and .XFO extensions), LonMark Resource files (.TYP,
.FPT and .FMT extensions), any language resource files with extensions such as .ENG,
.ENU, .FRA, etc), any user-defined resource files, icon files (.ICO extension), bitmap files