Download Mimer SQL embedded in healthcare industry equipment

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Entity–attribute–value model wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Serializability wikipedia , lookup

DBase wikipedia , lookup

Tandem Computers wikipedia , lookup

Functional Database Model wikipedia , lookup

IMDb wikipedia , lookup

Team Foundation Server wikipedia , lookup

Microsoft Access wikipedia , lookup

Oracle Database wikipedia , lookup

Ingres (database) wikipedia , lookup

Btrieve wikipedia , lookup

Concurrency control wikipedia , lookup

Database wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Database model wikipedia , lookup

Relational model wikipedia , lookup

SQL wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Clusterpoint wikipedia , lookup

ContactPoint wikipedia , lookup

PL/SQL wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Transcript
1(6)
Mimer SQL 10.0.3c, BETA version
Usage Guide
Lineo Embedded Linux
MIPS/TX4938
June 19, 2008
Mimer Information Technology AB, Uppsala, Sweden
Phone: +46 18 780 92 00, Email: [email protected], Web: www.mimer.com
3(6)
1. Introduction
This guide is describing how to use Mimer SQL on the TX4938/MIPS board running Lineo
Embedded Linux. The product is not yet in a production state and this document should
be regarded as preliminary.
This delivery of Mimer SQL is a subset of an ordinary Mimer SQL Engine distribution for
Linux, including only the most necessary parts for execution on a device. Please note that
this is not reflected in the documentation. Thus, the documentation set may contain areas
that are not applicable here. In addition, there may be areas concerning installation and
administration that are slightly different here. The intention is that these activities
should be described in this document.
2. Delivered items
The following programs are delivered:
bsql
Mimer SQL command line tool for ad-hoc SQL queries and batch
execution.
dbc
Used to verify Mimer SQL databank files.
dbopen
Used to open all Mimer SQL databanks in a system (mainly to
trig possible implicit databank verifications).
dbserver
The database server program. The only program that is actually
needed in runtime on the device.
esql
Embedded SQL Pre-processor for SQL embedded in the C
language.
exload
Used to load the Mimer SQL example database. (For details on
the example database, please see the developer site article
http://developer.mimer.se/features/feature_19.htm).
mimcontrol
Used to control the database server program.
mimhosts
Used to install and manage the Mimer SQL database
registration file, /etc/sqlhosts. Not needed in runtime
miminfo
Used to monitor the database server program.
mimlicense
Used to install and manage the Mimer SQL License key file,
/etc/mimerkey.
mimload
Used to transfer data to and from a Mimer SQL database.
mimversion
Used simply to display the Mimer SQL version identification.
osql
Sample program based on ODBC providing a command line tool
for ad-hoc SQL queries.
sdbgen
Used to generate initial system databanks.
Mimer Information Technology AB, Uppsala, Sweden
Phone: +46 18 780 92 00, Email: [email protected], Web: www.mimer.com
4(6)
The following libraries are delivered:
libmimdbi.so
Link library for Embedded SQL based applications.
libmimdbs.so
Link library that is used automatically when accessing a
database in single-user mode, i.e. when the database server
program is not running for a database.
libmimer.so
Link library for Mimer SQL application in general, includes
both the ODBC and Embedded SQL database APIs.
libmimodbc2.so
Link library for ODBC based applications when the ODBC
client is presuming the SQLWCHAR datatype being 2 bytes.
libmimodbc4.so
Link library for ODBC based applications when the ODBC
client is presuming the SQLWCHAR datatype being 4 bytes.
The following general documentation files are delivered:
mimsqlen.pdf
Mimer SQL 10.0 Documentation Set.
relnoten.pdf
Mimer SQL 10.0 Release Notes
The following other files are delivered:
mimerkey_beta.mcfg
dsql.ec
dsql.h
dsqlsamp.c
osql.c
sqlext.h
sql.h
sqltypes.h
sqlucode.h
Beta test version key for distribution.
ESQL sample source
ESQL/ODBC sample source
ESQL/ODBC sample source
ODBC sample source
ODBC sample source
ODBC sample source
ODBC sample source
ODBC sample source
3. Installation notes
Setup PATH to include a reference to the directory named “bin” of the distribution.
Mimer Information Technology AB, Uppsala, Sweden
Phone: +46 18 780 92 00, Email: [email protected], Web: www.mimer.com
5(6)
Setup LD_LIBRARY_PATH to include a reference to the directory named “lib” of the
distribution.
Install the license key in /etc/mimerkey using the following command from the directory
named “misc” of the distribution:
mimlicense –f
mimerkey_beta.mcfg
Select a name for your first Mimer SQL database, herein we will use the name “mimdb”.
In addition, decide a directory where to locate the database, herein we will use
/usr/local/mimersql/mimdb, and create that directory:
mkdir /usr/local/mimersql
mkdir /usr/local/mimersql/mimdb
Setup MIMER_DATABASE to hold the database name:
export MIMER_DATABASE=mimdb
Register, and create the registration file /etc/sqlhosts, by using the following command:
mimhosts –l
mimdb
/usr/local/mimersql/mimdb
Set the database as the default database:
mimhosts –d
mimdb
The initial database consists of the system databanks. When creating them the SYSADM
password should be selected. Herein we will use SYSPW as the SYSADM password.
Create the system databanks by using the following command:
cd /usr/local/mimersql/mimdb
sdbgen –p SYSPW
The sdbgen program can be executed without any arguments and will in that case prompt
for information needed.
Generate the default configuration file (multidefs) for the database server by using the
following command:
mimcontrol –g
mimdb
The multidefs file will reside in the database home directory, i.e.
/usr/local/mimersql/mimdb. It may be a good idea to review the default setting together
with the Mimer SQL Support department. For example, it is most likely that the number
of database server threads should be decreased and to run client/server the ‘TCPPort’
value should be changed to ‘1360’ (the port dedicated for Mimer SQL use).
Start the database server program for the database:
mimcontrol –s
mimdb
For details on the mimcontrol command, please see the System Management Handbook.
Please note that it is also possible to start the database server without using the
mimcontrol program by executing the following commands:
Mimer Information Technology AB, Uppsala, Sweden
Phone: +46 18 780 92 00, Email: [email protected], Web: www.mimer.com
6(6)
cd /usr/local/mimersql/mimdb
dbserver mimdb >> mimer.log 2>&1 &
To stop the database server program, use the following command:
mimcontrol –t
mimdb
Please note that it is also possible to stop the database server by sending the SIGTERM
signal to the dbserver process.
Now the database server is ready to use. If following the description above, the default
database is “mimdb” (which can be overridden by setting MIMER_DATABASE). Now, try
to connect to the database with the following command (login with SYSADM/SYSPW):
bsql
To populate the database with some sample data, the following command can be used:
exload
4. Sample applications
Some source samples are provided.
The following sessions builds the osql program that is ODBC based:
/opt/codesourcery/bin/mips-linux-gnu-gcc-4.2.0 -c -I. -DNDEBUG -Os –fPIC
-D_REENTRANT -D_XOPEN_SOURCE=500 -D_SVID_SOURCE
-D_LARGEFILE64_SOURCE -D_POSIX_C_SOURCE=199506L
-D__NO_STRING_INLINES -Wall -mips2 --sysroot=/root/elite/tx4938/devel
-DLINUX_BASED dsqlsamp.c osql.c
/opt/codesourcery/bin/mips-linux-gnu-gcc-4.2.0 -ldl -rdynamic -mips2
--sysroot=/root/elite/tx4938/devel -L/mimer/v1003/dist/lib -Wl,-M -Wl,--cref -Wl,Map
-Wl,'osql.lis' -o osql \
dsqlsamp.o osql.o \
-lpthread -lmimodbc2
The ESQL sample file is first pre-processed according to the following session:
# esql -c dsql.ec
Mimer SQL Embedded SQL Preprocessor Version 10.0.3B Beta Test
Copyright (C) Mimer Information Technology AB. All rights reserved.
dsql.ec
#
Then the created dsql.c program is linked together with the dsqlsamp.c program in a way
that corresponds to the one for ODBC above, using the libmimdbi.so library instead of the
ODBC one.
Please be in touch with Mimer SQL Support if there are any problems.
Mimer Information Technology AB, Uppsala, Sweden
Phone: +46 18 780 92 00, Email: [email protected], Web: www.mimer.com