An attempt has been made to create a database that already exists. The database path should be changed to point to a different location.
Can not defrag a database in LonMaker.
While opening an LNS database or explicitly defragmenting a database using the CompactDb method of the Network and ObjectServer objects or the Defragment Database function in LonMaker it is possible to receive:
Error opening LCA database. The database already exists. (Subsystem: LNS, #21)[DB #-2035].
The error indicates that a prior attempt to defragment the database was not complete. This is likely to happen when an application is killed using Task Manager during the defrag process.
To resolve the error, first delete the objects.reo file from the database directory and defragment again. Larger databases may take minutes to defragment and may leave a single threaded application unresponsive during the process.
Database directory by default is c:\lm\db\< NetworkName > Therefore, if your network name was "MyNetwork," then look for c:\lm\db\MyNetwork\objects.reo
Do not kill the application. It is possible to use the Task Manager as an indicator. While defragmenting, watch the CPU utilization indicator to identify completion of the defrag operation if the software performing this call does not return a completion message to your screen.