Control System Studio Training - Infrastructure: JMS, RDB

6
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS [email protected] 2011, October 17-21 at CEA Saclay, France Control System Studio Training - Infrastructure: JMS, RDB

description

Control System Studio Training - Infrastructure: JMS, RDB. Kay Kasemir ORNL/SNS [email protected] 2011, October 17-21 at CEA Saclay, France. Relational Database. Required for archive, alarm system, message log Dialects: MySQL, PostgreSQL, Oracle - PowerPoint PPT Presentation

Transcript of Control System Studio Training - Infrastructure: JMS, RDB

Page 1: Control System Studio Training - Infrastructure: JMS, RDB

Managed by UT-Battellefor the Department of Energy

Kay Kasemir

ORNL/SNS

[email protected]

2011, October 17-21 at CEA Saclay, France

Control System Studio Training

-Infrastructure: JMS,

RDB

Page 2: Control System Studio Training - Infrastructure: JMS, RDB

2 Managed by UT-Battellefor the Department of Energy

Relational Database

Required for archive, alarm system, message log

Dialects: MySQL, PostgreSQL, Oracle

Details far beyond this training, but need to– Maybe start/stop RDB

– Connect as administrator to create tables

– Create user for archive, alarm system, …

– Connect as user “archive” or “alarm”

Page 3: Control System Studio Training - Infrastructure: JMS, RDB

3 Managed by UT-Battellefor the Department of Energy

Starting, Stopping MySQL Server

… is really beyond this training session, but…

Start on Linux, Mac OS X, as root/usr/local/mysql/bin/mysqld_safe –user=mysql &

Stop, as any user/usr/local/mysql/bin/mysqladmin -u root -p shutdown

Page 4: Control System Studio Training - Infrastructure: JMS, RDB

4 Managed by UT-Battellefor the Department of Energy

Start MySQL Shell Connect as administrator

mysql -u root –p

Will prompt for password entry.Can also include password in comand line:

mysql -u root –p’$root’

Note: Space after “-u” but no space for “–p”

Connect as archive user to archive database, prompting for passwordmysql –u archive –p archive

Include password on command line:

mysql –u archive –p’$archive’ archive

Page 5: Control System Studio Training - Infrastructure: JMS, RDB

5 Managed by UT-Battellefor the Department of Energy

MySQL Connection from CSS URL

jdbc:mysql://localhost/archive

User, passwordWhat we set when creating the user, e.g. “archive”, “$archive”

SchemaWas added to support MySQL, Oracle and Postgres.

For MySQL, has to be emptySchema

Example plugin_customization.ini:org.csstudio.archive.rdb/url=jdbc:mysql://localhost/archive

org.csstudio.archive.rdb/user=archive

org.csstudio.archive.rdb/password=$archive

org.csstudio.archive.rdb/schema=

Page 6: Control System Studio Training - Infrastructure: JMS, RDB

6 Managed by UT-Battellefor the Department of Energy

Java Message Server, JMS

Specifically: Apache ActiveMQ

Startcd [activemq_install_dir]

bin/activemq

URL for CSS clientsfailover:(tcp://localhost:61616)