Campbell Scientific LNDB User Manual

LNDB
Revision: 7/10
Copyright © 2010
Campbell Scientific, Inc.

License for Use

This software is protected by United States copyright law and international copyright treaty provisions. The installation and use of this software constitutes an agreement to abide by the provisions of this license agreement.
Campbell Scientific grants you a non-exclusive license to use this software in accordance with the following:
(1) The purchase of this software allows you to install and use the software on
one computer only.
(2) This software cannot be loaded on a network server for the purposes of
distribution or for access to the software by multiple operators. If the software can be used from any computer other than the computer on which it is installed, you must license a copy of the software for each additional computer from which the software may be accessed.
(3) If this copy of the software is an upgrade from a previous version, you
must possess a valid license for the earlier version of software. You may continue to use the earlier copy of software only if the upgrade copy and earlier version are installed and used on the same computer. The earlier version of software may not be installed and used on a separate computer or transferred to another party.
(4) This software package is licensed as a single product. Its component parts
may not be separated for use on more than one computer.
(5) You may make one (1) backup copy of this software onto media similar to
the original distribution, to protect your investment in the software in case of damage or loss. This backup copy can be used only to replace an unusable copy of the original installation media.
This software may not be sold, included or redistributed in any other software, or altered in any way without prior written permission from Campbell Scientific. All copyright notices and labeling must be left intact.

Limited Warranty

The following warranties are in effect for ninety (90) days from the date of shipment of the original purchase. These warranties are not extended by the installation of upgrades or patches offered free of charge.
Campbell Scientific warrants that the installation media on which the software is recorded and the documentation provided with it are free from physical defects in materials and workmanship under normal use. The warranty does not cover any installation media that has been damaged, lost, or abused. You are urged to make a backup copy (as set forth above) to protect your investment. Damaged or lost media is the sole responsibility of the licensee and will not be replaced by Campbell Scientific.
Campbell Scientific warrants that the software itself will perform substantially in accordance with the specifications set forth in the instruction manual when properly installed and used in a manner consistent with the published recommendations, including recommended system requirements. Campbell Scientific does not warrant that the software will meet licensee’s requirements for use, or that the software or documentation are error free, or that the operation of the software will be uninterrupted.
Campbell Scientific will either replace or correct any software that does not perform substantially according to the specifications set forth in the instruction manual with a corrected copy of the software or corrective code. In the case of significant error in the installation media or documentation, Campbell Scientific will correct errors without charge by providing new media, addenda, or substitute pages. If Campbell Scientific is unable to replace defective media or documentation, or if it is unable to provide corrected software or corrected documentation within a reasonable time, it will either replace the software with a functionally similar program or refund the purchase price paid for the software.
All warranties of merchantability and fitness for a particular purpose are disclaimed and excluded. Campbell Scientific shall not in any case be liable for special, incidental, consequential, indirect, or other similar damages even if Campbell Scientific has been advised of the possibility of such damages. Campbell Scientific is not responsible for any costs incurred as a result of lost profits or revenue, loss of use of the software, loss of data, cost of re-creating lost data, the cost of any substitute program, telecommunication access costs, claims by any party other than licensee, or for other similar costs.
This warranty does not cover any software that has been altered or changed in any way by anyone other than Campbell Scientific. Campbell Scientific is not responsible for problems caused by computer hardware, computer operating systems, or the use of Campbell Scientific’s software with non-Campbell Scientific software.
Licensee’s sole and exclusive remedy is set forth in this limited warranty. Campbell Scientific’s aggregate liability arising from or relating to this agreement or the software or documentation (regardless of the form of action; e.g., contract, tort, computer malpractice, fraud and/or otherwise) is limited to the purchase price paid by the licensee.
LNDB Table of Contents
PDF viewers note: These page numbers refer to the printed version of this document. Use the Adobe Acrobat® bookmarks tab for links to specific sections.
1. Introduction..................................................................1
1.1 Supported Databases.................................................................................1
1.2 Supported Operating Systems...................................................................1
2. Getting Started.............................................................2
2.1 Installing and Starting the LNDB Service ................................................2
2.2 Selecting a LoggerNet Server...................................................................4
2.3 Selecting a Database .................................................................................5
2.3.1 SQL Server Compact ......................................................................5
2.3.2 SQL Server .....................................................................................6
2.3.3 MySQL ...........................................................................................7
2.3.4 Remember and Automatically Login..............................................7
3. Selecting Datalogger Tables....................................... 8
3.1 Station Setup.............................................................................................9
3.2 Table Setup .............................................................................................10
4. Options .......................................................................11
5. Resolving a Conflict .................................................. 12
5.1 Archive Database Table..........................................................................13
5.2 Modify Database Table...........................................................................14
6. Checking Status and Reviewing Data......................15
6.1 Status Tab ...............................................................................................15
6.2 Data Review Tab ....................................................................................16
6.2.1 Deleting or Archiving Tables........................................................17
6.3 Significant Events Tab............................................................................17
6.4 Status Messages Tab...............................................................................18
6.5 Log Files.................................................................................................19
6.6 Status Bar................................................................................................19
7. Importing Data ...........................................................20
7.1 Database Selection..................................................................................20
7.2 Import From............................................................................................21
7.3 Import Into..............................................................................................21
7.4 Data File Columns vs. Database Table Columns....................................21
7.5 Import Requirements ..............................................................................21
7.6 Import .....................................................................................................21
i
LNDB Table of Contents
8. Exporting Data ...........................................................22
9. QuickReports .............................................................29
10. Troubleshooting.......................................................36
Appendices
8.1 Database Selection ................................................................................. 23
8.2 Export From........................................................................................... 23
8.3 Export Into ............................................................................................. 24
8.4 Check for Missing Records.................................................................... 25
8.5 Export..................................................................................................... 26
8.6 Select Columns ...................................................................................... 27
8.7 Array Compatible CSV Options ............................................................ 28
8.8 Representation of NULL values ............................................................ 29
9.1 Database Selection ................................................................................. 29
9.2 QuickReports Setup ............................................................................... 32
9.3 Customizing Your Report ...................................................................... 34
9.4 Generating Your Report......................................................................... 35
A. Data Type Mapping.................................................. A-1
B. SQL Commands ...................................................... B-1
ii

LNDB

1. Introduction

LNDB moves data from one LoggerNet server into a single database. The two main components of LNDB are LNDB Manager and LNDB Engine. LNDB Manager is used to set up a database and select the datalogger data tables that will be stored in the database. It also provides tools to monitor the LNDB Engine and to review the database data. LNDB Engine runs as a service and sends the selected data from the LoggerNet data cache to the database. LNDB also includes utilities for importing and exporting data.
NOTE
LNDB works with only one LoggerNet server and a single database. Only one copy of LNDB can be running on a computer. If you need to work with multiple LoggerNet servers, you will need multiple copies of LNDB running on separate computers. Each will also need its own separate database.

1.1 Supported Databases

LNDB has been tested and shown to work with the following databases:
Microsoft® SQL Server® 2005 Express
Microsoft® SQL Server® 2008 Express
Microsoft® SQL Server® Compact 3.5
MySQL 5.0 and MySQL 5.1 (with MySQL 3.51.27 or 5.1.6 ODBC database driver, note that earlier versions of 5.x ODBC database drivers have known issues)
NOTES
LNDB may work with other versions of these databases.
An SQL Server Compact database is limited to 4 GB in size. If you anticipate the need for a larger database, a SQL Server or MySQL database should be used.
Using a server-based database such as SQL Server or MySQL will be more robust and may give better performance.
MySQL does not support sub-second data.

1.2 Supported Operating Systems

LNDB runs on Windows® XP, Windows® Vista, or Windows® 7.
1
LNDB

2. Getting Started

2.1 Installing and Starting the LNDB Service

The first time you open LNDB, the following error message will occur indicating that the LNDB Engine Service is not running.
Once you press OK, the LNDB Engine Service Manager will open. This utility is used to install LNDB as a service and to enable/disable that service as required.
NOTE
You must have administrative rights on your computer in order to run the Service Manager. If you do not have administrative rights, an error message will be displayed when the Service Manager tries to open.
Press the Install button to install LNDB as a service. You will then be asked what account to install the service under.
2
LNDB
You can choose to install the service under the Local System account or under a User account. Note that a User account is most likely necessary if you are using Windows Authentication in SQL Server. In most other cases, the Local System account can be used. If User account is chosen, you will be asked to provide a username and password.
Once the application is installed as a service, press the Start button on the LNDB Engine Service Manager window to start the service.
3
LNDB
You can then press the Close button to close the LNDB Engine Service Manager.
Once LNDB is installed as a service, you can open the LNDB Engine Service Manager from the File | Configure LNDB Engine Service menu item or by double-clicking on the LNDB Engine Status Label on the Status Bar.

2.2 Selecting a LoggerNet Server

The Login to LoggerNet Server dialog box comes up automatically after LNDB is installed. It can be opened at any time from the File | Select LoggerNet Server menu item or by double-clicking on the LN Connection Status Label on the Status Bar.
This dialog box allows you to specify the computer running the LoggerNet server to which LNDB should connect. The dialog box has the following fields:
Server Address - This is the TCP/IP address of the computer running the LoggerNet server to which you are trying to connect. This must be the valid name of an existing computer or a TCP/IP address (in the form ###.###.###.### consisting of the IP network number, ###.###.###, and the host number, ###). If the software server resides on the same computer as the client, you can simply type in LocalHost for the server name.
NOTE
If you have used a command line argument to change LoggerNet’s default port number, you must specify this alternate port number when entering the Server Address (e.g., LocalHost:6700 or 192.168.7.123:6700).
Username - Your username on the software server.
4
Password - Your password for the software server.
LNDB
The User Name and Password fields are required only if your server administrator has set up security on your system.
Each time you start the client, you will be prompted to enter this information. However, you can save the login information by selecting the Remember username and password check box, or you can select the Automatically login to this server check box to skip this window and use the information from the last session.
NOTE
All information must be saved for the LNDB Engine. The
Remember username and password check box and the Automatically login to this server check box apply only to the
LNDB Manager.

2.3 Selecting a Database

The Select Database dialog box comes up automatically the first time LNDB is opened once the service is installed and started and the server is selected. At other times, it can be opened from the File | Select Database menu item or by double-clicking on the DB Connection Status Label on the Status Bar. LNDB supports SQL Server Compact, SQL Server, and MySQL databases. Once you select a database, fill in the necessary information, and click OK, a connection attempt will be made. If the connection succeeds, the database dialog will be closed and the connection will be used for the application. If the connection fails, a message will be shown and the Select Database dialog will continue to be shown.
2.3.1 SQL Server Compact
5
LNDB
SQL Server Compact is an embedded database that just requires the selection of a filename. The default location of the database will be <working directory>\LNDB.sdf. LNDB does not support any encryption or security options on the SQL Server Compact database. When selecting the database within the LNDB Manager, the database will be created when the OK button is pressed.
2.3.2 SQL Server
To configure a connection to SQL Server you must select a SQL Server instance. The list of published SQL Server instances is shown in the Data Source combo box. You can also type into the Data Source combo box, because the desired server might not be published. Windows Authentication or SQL Server Authentication can be selected. Windows Authentication does not require a username and password, but rather uses Windows user accounts to authenticate valid users. SQL Server Authentication requires a login ID and Password and is independent of Windows user accounts. You can select the <default> database or select a specific database from the Database combo box.
6
2.3.3 MySQL
LNDB
The MySQL connection is an ODBC connection. You must use the Windows ODBC Data Source Administrator to configure the database connection. Currently only system data sources are supported and show in the Data Source combo box. The Login ID and Password may be optional. They will be set to blank in the connection string. It has been found that when set to blank, the login id and password configured in the system data source are used. You can select the <default> database (default as configured in the data source) or select a different database.
2.3.4 Remember and Automatically Login
If you select the Remember and Automatically Login check box, the Login ID and Password will be remembered and the next time the application starts an attempt will be made to login without showing the dialog again. Regardless of whether this check box is selected, all other information (Database Type, Data Source, etc.) will be remembered for all databases.
If you do not check the Remember and Automatically Login check box, the username and password are still saved so the LNDB Engine can connect to the database. However, in this case, the username and password are not automatically filled in on the login dialog box.
7
LNDB

3. Selecting Datalogger Tables

The first tab on the main screen is Setup. From this screen, you select the datalogger tables for which you would like to move data into the database. The right side of the screen changes depending upon whether a station or a table is highlighted in the left tree as described below.
If you check a station in the left tree, all final storage tables for the station are selected. This includes all tables except Public, Status, ports_and_flags, and __inlocs__. If a table has a conflict and is enabled for storage, its icon and its parent station’s icon are overlaid with an error icon.
The toolbar at the top of the Setup tab can be used to Select All Final Storage Tables for all stations or to Deselect All Tables for all stations.
If a change is made to the setup, the Apply and Cancel buttons are enabled. Press Apply to save the pending edits and restart the engine. Press Cancel to undo the pending edits.
NOTE
If a station, table or column that is enabled for storage has an invalid name (i.e., contains ', ", or `), an icon and text indicating such is placed at the top of the screen. The issue can be resolved by changing the station name in LoggerNet's Setup Screen or by changing the table or column name in the CRBasic program.
8

3.1 Station Setup

When a station is highlighted in the left tree, the Station Setup screen is shown. On the Station Setup screen, tables can be enabled/disabled for storage by selecting/deselecting the check boxes next to the table names.
A conflict exists for a table when datalogger columns do not match database columns.
If in "Stop Storing Data" mode (see Section 4.0 Options) and conflicts exist, an icon is placed next to the table with the conflict. Also a larger icon with bold text stating there are conflicts is placed at the top of the station setup screen. To resolve a conflict, right-click on the table name on the right side of the screen and select Resolve. This brings up the Resolve Table dialog box which allows you to resolve the conflict. (For more information on resolving a conflict, see Section 5.)
LNDB
9
Loading...
+ 33 hidden pages