2.6. WIS Link

Information regarding the link to WIS. WIS is the Water Information System. It uses an ORACLE backend. BMFO interacts with WIS in both directions:

In order to create a database link to the WIS database, tnsnames.ora should contain configuration statements like the following:

WIS =
	  (DESCRIPTION =
	    (ADDRESS_LIST =
	      (ADDRESS = (PROTOCOL = TCP)(HOST = wisserver)(PORT = 1521))
	    )
	    (CONNECT_DATA =
	      (SID = ORCL)
	    )
	  )

The SQL statement to create the link from the BMFO database (ORACLE backend) to the WIS database looks like this:

create database link wislink connect to username 
  identified by password using 'wis';

A script to create the meters from WIS is available in script/wis2bmfo.sql.

On the WIS side, the BMFO_METER_VIEW is required. This can be created using script/create_wis_views.sql.

Deletion of existing Meter, OperationaArea and AdministrativeArea together with the insertion of new values is done through script/wis2bmfo.sql.

The following commandline statement should be scheduled to run every night:

sqlplus user/password@bmfo @wis2bmfo.sql