当前位置:首页 >> 电力/水利 >>

Database


Database User Guide for Ovation 3.3.1 OW331_15
Version 1 July 2010

Copyright Notice Since the equipment explained in this document has a variety of uses, the user and those responsible for applying this equipment must satisfy themselves as to the acceptability of each application and use of the equipment. Under no circumstances will Emerson Process Management be responsible or liable for any damage, including indirect or consequential losses resulting from the use, misuse, or application of this equipment. The text, illustrations, charts, and examples included in this manual are intended solely to explain ? the use and application of the Ovation Unit. Due to the many variables associated with specific uses or applications, Emerson Process Management cannot assume responsibility or liability for actual use based upon the data provided in this manual. No patent liability is assumed by Emerson Process Management with respect to the use of circuits, information, equipment, or software described in this manual. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, including electronic, mechanical, photocopying, recording or otherwise without the prior express written permission of Emerson Process Management. The document is the property of and contains Proprietary Information owned by Emerson Process Management and/or its subcontractors and suppliers. It is transmitted in confidence and trust, and the user agrees to treat this document in strict accordance with the terms and conditions of the agreement under which it was provided. This manual is printed in the USA and is subject to change without notice. Ovation and WEStation are registered trademarks of Emerson Process Management. All other trademarks or registered trademarks are the property of their respective holders. Copyright ? Emerson Process Management Power & Water Solutions, Inc. All rights reserved. Emerson Process Management Power & Water Solutions 200 Beta Drive Pittsburgh, PA 15238 USA E-Mail: Technical.Communications@EmersonProcess.com Website: https://www.ovationusers.com

Contents
1
1.1 1.2 1.3 1.4 1.5 1.6

Introduction to the Ovation database

1

What is a Relational Database?.......................................................................................... 1 What are the types of Ovation Databases? ........................................................................ 2 How does the Database relate to other Ovation functions? ............................................... 3 Creating the Ovation Database........................................................................................... 3 Database terminology ......................................................................................................... 4 What is the organization of the Ovation database? ............................................................ 5 1.6.1 What is the Ovation Master Database schema?............................................... 5 1.6.2 What is the Ovation engineering tools audit schema?...................................... 5

2
2.1 2.2 2.3

Populating the Ovation database

7

2.4 2.5

Database tools .................................................................................................................... 7 What is the Database Initial Definition tool (DBID)? ........................................................... 8 Using the import function (OvPtImport)............................................................................... 8 2.3.1 Using the import format for Ovation Windows systems .................................. 11 2.3.2 Using the import format for Ovation 1.x systems ............................................ 14 Export (OvPtExport) .......................................................................................................... 15 2.4.1 Example of an OvPtExport file for SIS ............................................................ 16 Using the Oracle import and export utilities (imp and exp) ............................................... 17

3
3.1

Backing up and restoring the Ovation Database

19

3.2

Backing up the database files ........................................................................................... 19 3.1.1 To backup the complete database .................................................................. 19 3.1.2 To backup the partial database ....................................................................... 20 Restoring the database ..................................................................................................... 20 3.2.1 To restore a complete database...................................................................... 20 3.2.2 To restore a partial database .......................................................................... 21

Index

23

OW331_15

i

S

E C T I O N

1

Introduction to the Ovation database

IN THIS SECTION
What is a Relational Database?.......................................................................................... 1 What are the types of Ovation Databases? ........................................................................ 2 How does the Database relate to other Ovation functions? ............................................... 3 Creating the Ovation Database........................................................................................... 3 Database terminology ......................................................................................................... 4 What is the organization of the Ovation database? ............................................................ 5

1.1

What is a Relational Database?
The Ovation system uses the Relational Database Management System (RDBMS) philosophy. This philosophy consists of three major components: Common mechanism for performing similar actions. Sophisticated sharing of data. Interaction with a shared repository of data. A Relational Database Management System stores information in tables — rows and columns of data — and conducts searches by using data in specified columns of one table to find additional data in another table. In a relational database, the rows of a table represent records (collections of information about separate items) and the columns represent fields (particular attributes of a record). In conducting searches, a relational database matches information from a field in one table with information in a corresponding field of another table to produce a third table that combines requested data from both tables. Many pieces of information in the Ovation system, including system configuration, control algorithm information, and the process point database, are stored in the Ovation Database. The Ovation Database provides the capability to integrate and organize the massive amounts of raw data in the system to create meaningful and valuable information. All programming tools and user interfaces store their data in the Ovation Database, and then the information is transmitted to the control system. The Ovation Database allows the applications software and the control system to be easily accessed via third-party SQL (Structured Query Language) tools. This means that the Ovation process control system data is open and accessible. The Ovation Database is based on Oracle 9i. For computing environments, such as Ovation, that are connected via networks, Oracle combines the data physically located on different computers into one logical database that can be accessed by non-controller network nodes.

OW331_15

1

1.2 What are the types of Ovation Databases?

1.2

What are the types of Ovation Databases?
At the heart of the RDBMS is the Ovation Database which consists of a Master Database and is supported by various Distributed Databases. The Distributed Database contains subsets of information from the Master Database and is stored locally on a drop to allow that drop to operate if the Master Database is unavailable. A Distributed Database is present on each drop in the system and is continually updated as point information changes. The contents of these subsets depend on the system drops as defined below: Identification of Plant Mode Point (if applicable). Information used to retrieve process point data from the Ovation Network. For Operator Stations, this includes all system points updated via the Load function for originated and explicitly received points and the Distributed Database Propagation software for all other system points. For Controllers, this includes only originated and explicitly received points (updated via the Drop load function). (See Ovation Developer Studio User Guide.) Identification of primary/partner drop ID pairings for system drops. For Ovation Operator Stations, this includes all system drops updated via Distributed Database Propagation Software. For Controllers, this means only itself (if redundant) and any redundant drops which it explicitly receives points from (updated via the Load function). System Point Directory. This is for Ovation Operator Stations only. It is updated via the Distributed Database Propagation Software. MMI data for all System Points. This is for Ovation Operator Stations only. It is updated via the Distributed Database Propagation Software. Global Point Groups. This is for Ovation Operator Stations only. They are updated via the Distributed Database Propagation Software. The Distributed Database subsets are kept consistent with the contents of the Master Database. Database propagation provides the mechanism whereby the database contents at each distributed location are kept consistent with the contents of the Master Database. The propagation of all database changes is performed by an exchange of messages between a server process (db_xmit_server) which monitors the Master Database and client processes (db_xmit_client) which operate on each distributed station. Changes to the Master Database are performed using system editing functions such as those provided by the Ovation Developer Studio and the Ovation Control Builder. These changes are applied to the database through the business rules API functions. When a point modification is loaded to the originating drop(s) via the Load function, a record of the change is maintained in a table in the Master Database. Similarly, a change is recorded whenever Point Group objects are changed in the Ovation Developer Studio or Point Builder. The server monitors this table to identify when changes have been loaded to the system. Each change is identified by a unique sequence number which allows the server to ensure that changes are applied to the Distributed Databases in the same order that they were applied to the Master Database.

2

OW331_15

1.3 How does the Database relate to other Ovation functions? As changes are made/loaded, the server performs a multicast broadcast of applicable data for each change in sequence. Mechanisms exist whereby clients can detect if messages have been missed and establish a direct TCP connection with the server to quickly get “up-to-date.” The server also periodically broadcasts (via multicast) the Plant Mode Point Information, primary/partner drop information, drop mismatch information, and the current sequence number. Clients use the current sequence number to determine if they need to explicitly request an update.

1.3

How does the Database relate to other Ovation functions?
The Ovation Database is provided with the Ovation Windows System. The database consists of a relational database and supporting distributed databases. All the supporting pieces of information that are used by an Ovation system are contained in the database. This includes information such as process point information, drop configuration, process control sheets, and many other types of system data. Having all the pertinent system information in one database provides the flexibility and processing speed needed to ensure that Ovation is able to perform all its functions quickly and efficiently. The Ovation Database has a relationship with other Ovation functions as described below: Ovation Developer Studio — The Developer Studio provides a package of tools necessary to build and maintain a process control system. Using the tools available, you can build an entire system, import information from a previously created database into the Developer Studio, and edit and update attributes such as network configurations and point information. Ovation Control Builder — Algorithm and Control Builder default points are created, deleted, and modified with the Control Builder. Control program instructions and Boolean program instruction information are created and deleted with the Control Builder. The Load function of the Ovation Developer Studio is used to load the information to the originating drop(s).

1.4

Creating the Ovation Database
The creation of the Ovation Database is a product of a combined effort between customer design engineers and Emerson project engineers. Typically, the following process is used: 1. You determine the names and types of I/O points that are needed for your system. This information is based on the quantity and types of devices that need to be monitored in your control system. 2. You and/or Emerson enter these points into a database tool (such as DBID, Access, or Excel) along with the fields required for each point. 3. Emerson decides what Ovation I/O modules are needed in order to handle the proposed points. 4. Emerson determines how I/O modules should be mounted in the system cabinets so that the total of all the points can be partitioned accordingly. 5. You provide point information and that information is entered into DBID and then imported into the Master Database. 6. Point-by-point changes are done using the applicable point building tool. After the edits are completed, the file is imported into the Master Database again.

OW331_15

3

1.5 Database terminology

1.5

Database terminology
The following terms and descriptions will be helpful to your understanding of the Ovation database: Security terms
TERM API DEFINITION Database Application Programming Interface. Used to “talk” or interface to the system Relational Databases: Oracle (Master Database) or Raima (Distributed Database used by Operator Stations and populated from Oracle). Layer of software between Ovation applications and the database interface software. Contains a subset of the information stored on the Master Database. A Distributed Database is present on each drop in the system and is continually updated as point information changes. It contains an updatable system point directory and the MMI data fields of the process points (ED, SD, RS, and so forth) as well as the other fields not broadcast as part of a point’s static data. Continuously running daemon process on the Server drop which broadcasts, via multicast address, distributed database information to all system drops. It also supports a mode whereby clients can receive information by TCP connection if they are significantly out of date. Ovation utility that is run to copy data from the database to a text file.

Business Rules (Ovation) Distributed Database

Distributed Database Propagation Software Export (OvPtExport) function Import (OvPtImport) function Load function on the Ovation Developer Studio Master Database

Ovation utility that is run to put data into the database. This is done by means of a text file. Ovation function that is used to transfer data from the Master Database and distribute it to control drops and those drops that originate points.

Contains the entire process database. It is used for creating, modifying, and verifying control strategies and process points. At runtime, it supports queries of the process database, captures changes made to control and point attributes, and propagates those changes to the distributed database. Another term for drops on the Ovation Network. Oracle’s utility that is used to put data into the database and to backup the data in the database. However, this function is used for complete restoration of the entire database (structure and contents) following a catastrophic failure (disk crash, operating system reload, and so forth). This tool is NOT for saving and restoring database contents during an Ovation software upgrade. Part of the Master Database that is used when working with the system. This is where all interaction with the database takes place. This is the only part of the database that can be edited.

Network Nodes Oracle import/export function

Working Area

4

OW331_15

1.6 What is the organization of the Ovation database?

1.6

What is the organization of the Ovation database?
The Ovation database is based on an Oracle database. For computing environments, such as Ovation, that are connected via networks, Oracle combines the data physically located on different computers into one logical database that can be accessed by non-controller network nodes.

1.6.1 What is the Ovation Master Database schema?
The information in the Master Database is organized in a set of tables and related functions. This is called a schema. The Ovation Master Database schema is divided into two major sections: the user level and the system level. The user level consists of the following groups of tables (all of which are available for SQL read access): Point tables - represent the user-level attributes of points. They are populated via the import utility and through the Point Builder and Control Builder. Configuration tables - represent the configuration of the system. They are populated via the import utility, Admin Tool and I/O Builder. Reference tables - represent Ovation system constants, hardware module reference information and Ovation record type information and are populated at the time the database is created. Baseline tables - used to capture baselines of the user-level table contents. The system level consists of the following groups of tables: Ovation-specific tables - represent the process point database in a version/format similar to the process point fields. See Ovation Record Types Reference Manual. Dynamic tables - used by system-level processes to load originating drops and propagate the Distributed Database.

1.6.2 What is the Ovation engineering tools audit schema?
This schema consists of tables and functions dedicated to collecting information from the engineering tools audit function. The audit trail can be maintained and retained during full Ovation database imports. Audit Log tables - contains the actual auditable events Audit_Date: This field contains a time/stamp of the event. Audit_Level: This field is used to indicate the category or severity of th event. Action: This field indicates the specific operation being audited. Object_Type: When applicable, this field indicated the type of object being audited. Object_Name: This field indicates the name of the object being audited. Parameter: During low-level auditing, this item indicates the object's attribute which was altered. Old_Value: During low-level auditing, this item indicates the value of the object's attribute prior to its modification. New_Value: During low-level auditing, this item indicates the value of the object's attribute after its modification.

OW331_15

5

1.6 What is the organization of the Ovation database? OS_User: This field indicates the computer name from where the audited action was performed. Machine: This field indicates the computer name from where the audited action was performed. Data: This text-based field provided additional data for supplemental information as necessary. Configuration table - contains the auditing level currently in effect. Audit Archive - Maintains a record of the audit trails which have been archived.

6

OW331_15

S

E C T I O N

2

Populating the Ovation database

IN THIS SECTION
Database tools .................................................................................................................... 7 What is the Database Initial Definition tool (DBID)? ........................................................... 8 Using the import function (OvPtImport)............................................................................... 8 Export (OvPtExport) .......................................................................................................... 15 Using the Oracle import and export utilities (imp and exp) ............................................... 17

2.1

Database tools
The following table provides brief descriptions of the various database tools used to populate the Ovation database. Database tools and descriptions
TOOL DBID (see page 8) (Emerson Tool) OvPtImport (see page 8) (Ovation Tool) do_ptadmin_import (see page 20) (Ovation Tool) OvPtExport (see page 15) (Ovation Tool) imp (see page 17) (Oracle Tool) exp (see page 17) (Oracle Tool) Exports data from the Master Database and produces a text file. This file does not contain SIDs or a point's network interface information. Can be used to restore a database after a catastrophic failure (such as a disk crash). Operates on the binary file produced by exp. Not recommended. Can be used to backup a system. Produces a binary file. DESCRIPTION Microsoft Access graphical interface used to create points in a text (ASCII) file that can then be imported into the Master Database. Imports data from a text file (for example, a DBID produced file) into a Master Database. Can be used to restore the database (using data from a previous OvPtExport file). Restores the database from the backup that was created.

OW331_15

7

2.2 What is the Database Initial Definition tool (DBID)?

2.2

What is the Database Initial Definition tool (DBID)?
The Database has the potential to be a very large repository of data. A method was needed to perform mass data entry and to import data that had been defined in a format foreign to the Master Database. To facilitate the initial population of the Database, the Database Initial Definition tool (DBID) was created. Like the Ovation point building process in the Developer Studio, DBID provides a graphical user interface for creating, deleting, and modifying point data. The DBID also supports mass data entry and global edit/replace functions by allowing you to modify data directly in the point tables. DBID is based on the Microsoft Access database products along with other programs used for data checking. DBID is very similar to the Ovation point building program, since it contains forms for definitions and configuration of hardware in the system and for entry and editing of the point data. Data may be entered manually or point data may be loaded from a number of other sources such as DBASE or spreadsheet files. Some customer conversion may be required, depending on the structure of the external data. DBID generates a text file that can be imported (see page 8) by Emerson Process Management into the Ovation Database. Once information is entered in DBID, processed by Emerson Process Management, and imported into the Master Database, it can be modified through the Ovation point building process on a point-by-point basis. Note: It is beyond the scope of this document to further discuss DBID. For more information, refer to the DBID documentation.

2.3

Using the import function (OvPtImport)
Once an import file has been generated from the DBID tool (see page 8), the Import function (OvPtImport) is used to move data into the Master Database. It works in conjunction with the Export function (OvPtExport (see page 15)). The import process serves three purposes: Initial creation of the database. Modification of an existing database. Restoration of the database to a known state. The Import function supports two different import file formats. The first (version 1), is identical to that produced by the Ovation Solaris Export function (see page 14) and DBID. The second (version 2) has been defined to provide improved functionality and performance on the Ovation Windows (see page 11) systems. The OvPtImport utility is located in the C:\Ovation\OvationBase directory. To use OvPtImport, run the following command from a command prompt: ovptimport -u ptadmin/ptadmin@ptdb -s <systemName> <options>

8

OW331_15

2.3 Using the import function (OvPtImport) where <options> can be any one of the following: -h = Displays help messages. -c = Continue despite errors. -esi = Enables the import of safety items. You must specify this switch if there is Safety Instrumented System (SIS) content in the file. Note that you must have safety permissions to use this switch. -f = Full import. Replace existing contents. Note that the use of this option reassigns System IDs (SIDs). Graphics and Control Sheets must be reimported and recompiled following the use of this option. -id = Ignore defaults. -n = New objects only. -p = Parse the file(s). No database updates. -r = Check for presence of all required fields. -al = Automatically update auditing setting to recommended level. Note that after the import operation has completed, the auditing level will be restored to its previous state. -s <systemName> = For version 1 import files, specify the system name for a full import or specify the system to use, if an incremental import. <importfile1 importfile2 ...> = Files that contain the import data.

OW331_15

9

2.3 Using the import function (OvPtImport)

Note: The following Warning appears if your audit setting is not set to the recommended level. *** WARNING *** * * * * Current Engineering Tools Audit level is [3] ("Low-Level Auditing") Engineering Tool Audit entries will be created for all added/deleted/modified points and other database objects. The performance of the import operation may be greatly degraded.

The recommended auditing level is [1] ("High-Level Auditing") What do you want to do: C: Continue U: Update to the recommended level A: Abort the import operation CAUTION: Do NOT use the database import function (OvPtImport) if the Ovation Developer Studio or any Ovation engineering program that is accessed from the Studio (Control Builder, Graphics Builder, or the Holding Register Configuration UI) is in use anywhere in your system. Confirm that these programs are not being used before you perform a database import. The OvPtImport program temporarily disables certain Oracle triggers, which are required for proper operation of the Ovation Engineering Tools. If the OvPtImport program should fail to complete/exit naturally (for example, if the task was manually killed by the user), those triggers will not be restored. If this should occur, in order for the database to function properly, the applicable triggers must be re-enabled either by a subsequent OvPtImport operation (which runs to completion) or manually by using the following command: OvPtImport -u ptadmin/ptadmin@ptdb -Xrc Once data is imported into the Master Database, it must be loaded into the Controllers and drops that originate points. This is done with the Load function in the Ovation Developer Studio.(See Ovation Developer Studio User Guide.)

10

OW331_15

2.3 Using the import function (OvPtImport)

2.3.1 Using the import format for Ovation Windows systems
The format of the Import file for Ovation Windows systems is structured after the hierarchy defined in the Ovation Developer Studio. (See Ovation Developer Studio User Guide.) The Ovation Developer Studio provides an integrated package that allows you to quickly and easily perform configuration and engineering functions for a Windows-based Ovation System. Using the tools available, you can build an entire system, import information from a previously created database, and edit and update attributes such as network configurations and point information. Ovation Developer Studio functions are categorized in a hierarchical file structure or System Tree. Ovation configuration information is specified at appropriate levels of the system hierarchy. The highest level in the System Tree is the System, followed by the Network, Unit, Drop, and Point. Point objects are the lowest level of the system tree and open to reveal point records. Point records store the information that defines the attributes of the point. Ovation configuration settings and attributes changes made at the System level default down through the System tree but can be adjusted at each subsequent level.

OW331_15

11

2.3 Using the import function (OvPtImport) Example of import file for Ovation Windows systems As described previously, the format of the Import file mirrors the Developer Studio System Tree. Each line of the import file contains a statement of the following form: (TYPE=“<OBJECT_TYPE>” NAME=“<OBJECT_NAME>” [ <attributes> ] CAUTION: Any field not defined within the square brackets [ ] is set to the default value. Object definitions (optionally followed by attributes) are specified in descending order of the hierarchy and are delimited by parenthesis. Changes to an object’s attributes are delimited by square brackets [ ]. The lack of brackets indicates that the object is a placeholder to the next level of the hierarchy. No changes are made to this object during import. CAUTION: If square brackets are used in a statement, and nothing is shown inside, “[ ]”, this indicates that the object’s attributes should be deleted (that is, whatever the information was, change it to the default, since nothing is defined inside the square brackets). Use caution when using square brackets. For points, the list of applicable object attributes is the same as the field names used in version 1.x import files with the exclusion of NETWORK_ID, UNIT_ID, and DROP_ID. These attributes are implied based on the point’s position in the hierarchy. The following file example shows an import file where the System, Network, and Drop objects are used as placeholders (that is, no changes to existing data). The Unit object is being changed as well as the analog point “LA100.” Note that the first line of the file must be “OVPT_FORMAT=2.1” to specify that this import file was produced by an Ovation Windows system. OVPT_FORMAT=2.1 (TYPE=”System” NAME=”Ovation” (TYPE=”Network” NAME=”NET0” TYPE=”Unit” NAME=”UNIT1” [UNIT_NAME=”UNIT1” UNIT_VALUE=”1”] (TYPE=”Drop” NAME=”DROP1/DROP51”

12

OW331_15

2.3 Using the import function (OvPtImport) (TYPE=”AnalogPoint” NAME=”LA100” [DESCRIPTION=”Test Point” BROADCAST_FREQUENCY=”S” OPP_RATE=”S” CHARACTERISTICS=”-----” PERIODIC_SAVE=”0” TAGOUT=”0” UNCOMMISSIONED=”0” INITIAL_VALUE=”0” AUTO_RESET=”0” AUTO_ACKNOWLEDGE=”0” LOW_ALARM_PRIORITY_1=”1” LOW_ALARM_PRIORITY_2=”1” LOW_ALARM_PRIORITY_3=”1” LOW_ALARM_PRIORITY_4=”1” LOW_ALARM_PRIORITY_USER=”1” HIGH_ALARM_PRIORITY_1=”1” HIGH_ALARM_PRIORITY_2=”1” HIGH_ALARM_PRIORITY_3=”1” HIGH_ALARM_PRIORITY_4=”1” HIGH_ALARM_PRIORITY_USER=”1” TOP_OUTPUT_SCALE=”100” BOTTOM_OUTPUT_SCALE=”0” THERMOCOUPLE_UNITS=”F” CONVERSION_TYPE==”0” CONVERSION_COEFF_1=”0” CONVERSION_COEFF_2=”1.234” CONVERSION_COEFF_3=”1.234E+012” CONVERSION_COEFF_4=”0” CONVERSION_COEFF_5=”10000” CONVERSION_COEFF_6=”0” CJC_TEMPERATURE_UNITS=”F” DISPLAY_TYPE=”S” SIGNIFICANT_DIGITS=”2” IO_TASK_INDEX=”1” SECURITY_GROUP_1=””1” SECURITY_GROUP_2=”1” SECURITY_GROUP_3=”1” SECURITY_GROUP_4=”1” DEADBAND_ALGORITHM=”STANDARD” COLLECT_ENABLED=”0” EVENT_ENABLED=”0”]

OW331_15

13

2.3 Using the import function (OvPtImport)

2.3.2 Using the import format for Ovation 1.x systems
If you are upgrading from Ovation Solaris to Ovation Windows, the following import formats are applicable. Each line of the import file contains an action statement of the form: OBJECT=“<OBJECT_TYPE>” ACTION=“<ACTION_TYPE>” <attribute> <attribute> Note: This format is also applicable if you are importing from DBID. Terms used Valid OBJECT_TYPEs are POINT and TABLE. Under each OBJECT_TYPE, different ACTION_TYPEs are valid, as shown below: POINT — valid ACTION_TYPEs are: INSERT — used to insert a new point or modify specific fields of an existing point. Note that when importing into the Ovation database, this command is handled as RESET/REDEFINE. DELETE — used to remove a point. This command is not applicable when importing into the Ovation database in a Windows-based system. RESET (or REDEFINE) — used to assign a null value to every non-required field of an existing point and optionally modify specific fields of that point. An attempt to RESET a non-existent point is treated as an INSERT of that point. TABLE — valid ACTION_TYPES are: PURGE — results in the contents of the table being deleted. INSERT — inserts a new row in the table. Rules The following rules apply to the format of the import file. 1. OBJECT_TYPE and ACTION_TYPE must be specified for each action line. An action line may be split across multiple physical lines with new lines, but the breaks must occur between keyword pairs. 2. For points, the attributes are specified with the field name and field value separated with an equal sign. Attributes are separated by whitespace. Field values are enclosed in double quotes. For each definition, all required fields must be specified. Any number (including none) of the optional fields may be specified. Case is not significant for the field names, but is for the field values. Integer fields may be specified in base 10 or in base 16 if prefaced with 0x. 3. For tables, the table name is specified with the table attribute, and each of the columns is specified as <column_name>= “column value.” It is highly recommended that table commands always be preceded by a PURGE, followed by all of the insert statements necessary to populate the table. 4. Comments can be included by prefacing the comment with a “#” character. All text from the # character to the end of the line is ignored. Note that # characters with double quotes are not considered comments.

14

OW331_15

2.4 Export (OvPtExport) Examples The following examples are given to illustrate the import format: Inserting or modifying a point: OBJECT= “POINT” ACTION= “INSERT” point_name= “LD134INS001” record_type= “LD” network_id= “0” unit_id= “1” drop_id= “134” broadcast_frequency= “S” opp_rate= “S” low_alarm_priority_1= “2” high_alarm_priority_1= “3” Resetting a point and specifying a field: OBJECT= “POINT” ACTION= “RESET” point_name= “LD134INS001” network_id= “0” unit_id= “1” engineering_units= “Volts” Inserting into a table: OBJECT= “TABLE” ACTION= “INSERT” table= “drop_io_config” drop_id= “161” network_id= “0” unit_id= “1” pci_slot= “1” io_type= “1” Operations not supported The Import function does not support the following operations: Moving objects from one location to another. Changing I/O modules (hardware) via version 1 import files.

2.4

Export (OvPtExport)
The Export function (OvPtExport) is used to pull data out of the Master Database. It works in conjunction with the Import function (OvPtImport) (see page 8). You must have permissions to perform an export. The Export function (OvPtExport) produces a text file which contains the current configuration of the system (drops, hardware, security, and so forth), as well as user-level parameters defined for all points in the system. It does not contain SIDs and network information. The OvPtExport files can be used for revision control of the database. Since each OvPtExport file represents the user parameters of all objects in the database, they can be saved independently with a user-assigned revision number and used later to restore the database contents. The OvPtExport utility is located in the C:\Ovation\OvationBase directory. To use OvPtExport, run the following command from a shell tool window: ovptexport -u ptadmin/ptadmin@ptdb -o <outputfile> [-a -mm -nd -s <systemName> -h] where: -o <outputfile> = Output filename to receive the export. -a = Output all attribute definitions. -mm = Minimal module definitions. -nd = Do not export defaults. - oos = Output will only contain SIS information. Only users with permissions to access SIS configuration items will be able to use this switch.

OW331_15

15

2.4 Export (OvPtExport) -s <systemName> = Specify the system name to export. -h = Display help messages. Using OvPtExport to restore the database A means of restoring the working area of the database is required. This can be accomplished by one of two methods: restore the entire database using the Oracle import/export utilities (see page 17) or apply the contents of a previous OvPtExport. Depending on the circumstances and the customer’s needs, either one or both of these methods may be used. A less disruptive means of doing a restore is to apply the contents of a previous OvPtExport. Since they only affect the user-level parameters of the database, they can be applied (via OvPtImport) without requiring a clear and reload of all the drops in the system. There is one caution to this process: OvPtImport does not implicitly delete points. If an OvPtExport file were created, and new points were subsequently added to the database, an OvPtImport of the previous file will not remove those new points. Note: An OvPtExport file does not contain control information. Control sheets must be backed up separately. (See Ovation Control Builder User Guide.) It also does not contain the graphic source files themselves. These files must be backed up separately and imported via the Import function into the system from the Ovation Developer Studio after the restoration of the database via OvPtImport. (See Ovation Graphics Builder User Guide.)

2.4.1 Example of an OvPtExport file for SIS
OVPT_FORMAT=2.1 OVPT_CONTENT="SIS" (TYPE="System" NAME="OVATION" (TYPE="Network" NAME="NET0" (TYPE="SISNetwork" NAME="SIS-NET1" [SIS_NETWORK_NAME="SIS-NET1" SIS_NETWORK_RING_ID="0" TIMEZONE_NAME="UTC" UTC_OFFSET="0"] (TYPE="SISTplDataServer" NAME="ABC" [SIS_DATA_SERVER_NAME="ABC" SET_DATA_SERVER_PARTNER="0" SISDATA_SERVER_IP_ADDRESS="3.3.3.5" SISDATA_SERVER_ETHERS_ADDRESS="00:00:00:00:00:55" SISDATA_SERVER_PARTNER_ETHERS_ADDRESS="00:00:00:00:00: 00"] )

16

OW331_15

2.5 Using the Oracle import and export utilities (imp and exp)

2.5

Using the Oracle import and export utilities (imp and exp)
The Oracle utilities imp and exp are used to create and restore image backups of the entire database. They take a binary snapshot of both the database structure and contents, and can be used for a complete restoration of the entire database following a catastrophic failure (disk crash, operating system reload, and so forth). Following a restoration, the state of the database (structure and contents) is exactly what it was when the export was taken. These tools are not necessary (and typically should not be used) for restoring database contents during an Ovation software upgrade. The use of imp is not recommended. For information on the import of an Oracle binary database backup, see Restoring a Complete Database. (see page 20) For more information on the imp and exp functions, refer to the applicable Oracle documentation.

OW331_15

17

S

E C T I O N

3

Backing up and restoring the Ovation Database

IN THIS SECTION
Backing up the database files ........................................................................................... 19 Restoring the database ..................................................................................................... 20

3.1

Backing up the database files
Note: These programs may be used for backing up the database, but the recommended system backup procedures are described in the Ovation installation instructions (See Ovation Software Installation Manual.) There are two programs available for backing up the database: Oracle export program (exp (see page 19)). This tool saves the entire database, all of the structure, and all of the content; alternately, it can also be used to save selected portions. Existing point SIDs and network addressing assignments are retained. Following a restoration, the state of the database (structure and contents) is exactly what it was when the export was taken. This tool should be used to back up the database so that it could be completely restored in case there is a system disruption such as disk crash or operating system reload. This type of backup is generally not portable from one Ovation job to the next. It should not be used to copy a database between a Master Database and an External Database. For more information on the use of the Oracle export program, refer to the Oracle documentation that was supplied with your system. Ovation Export program (OvPtExport (see page 20)). This tool saves all of the database configuration and point information into an ASCII file. None of the database structure is saved. This tool should be used when an Ovation software upgrade of the server requires a complete reload of that drop. If necessary, the database schema is changed during a software upgrade procedure and no restore operations are needed. However, if for any reason the Database Server is completely reloaded, the database must be populated with the export file, re-execution of Control Builder scripts (to load control sheet information into the database), and a re-import of all the custom diagrams.

3.1.1 To backup the complete database
1. Export the contents of the Oracle database with the following command: exp USERID=’sys/wdpf as sysdba’ FILE=<exportfile> FULL=Y COMPRESS=N LOG=<logfile>

OW331_15

19

3.2 Restoring the database where: <exportfile> = <logfile> = User-defined filename for the backup file. This will create a file named <exportfile>. User-defined filename for the log file. This will create a file named <logfile>.

2. Compress the file using any of the various compress programs available on Windows (such as WinZip or another third-party package may be used). See applicable operating system documentation. 3. Save the backup file using some type of backup medium (tape, CD, and so forth). See applicable operating system documentation.

3.1.2 To backup the partial database
1. Run the OvPtExport program: OvPtExport -u ptadmin/ptadmin@ptdb -o <exportfile> where: <exportfile> = User-defined filename for the backup file. This will create a file named <exportfile>.

2. Compress the file using any of the various compress programs available on Windows (such as WinZip or another third-party package may be used). See applicable operating system documentation. 3. Save the backup file using some type of backup medium (tape, CD, and so forth). See applicable operating system documentation.

3.2

Restoring the database
There are two methods available for restoring the database files: Restoring from an Oracle database backup (see page 20). Restoring from an Ovation export file (see page 21).

3.2.1 To restore a complete database
Use the following procedure to restore the complete database (including structure) from the backup that was created (see page 19). An example of when this would be necessary include recovery from a catastrophic failure (such as a hard disk failure). 1. If the Software Server functions must be restored, refer to the Ovation software installation instructions. (See Ovation Software Installation Manual.) Procedures are dependent on individual systems and cannot all be described in this manual. 2. Insert the database backup tape/CD into the appropriate drive. 3. Uncompress the tape/CD. 4. Enter the following batch command to restore the backup (it can be executed from any directory): do_ptadmin_import.bat <exportfile> OR do_ptadmin_import.bat <exportfile> AUDIT

20

OW331_15

3.2 Restoring the database to include audit information from the backup file. 5. Remove the backup file from the system to conserve space. 6. Reboot the Database Server drop. 7. Using the Ovation Developer Studio, import custom graphic files and Control Builder sheets. (See Ovation Graphics Builder User Guide and Ovation Control Builder User Guide.)

3.2.2 To restore a partial database
Use the following procedure to restore the partial database (none of the structure) from the backup that was created (see page 20). 1. If the Software Server functions must be restored, refer to the Ovation software installation instructions. (See Ovation Software Installation Manual.) Procedures are dependent on individual systems and cannot all be described in this manual. 2. Run the import program: OvPtImport -u ptadmin/ptadmin@ptdb -f <exportfile> 3. Restore the custom graphic files and Control Builder sheets via the Import function on the Ovation Developer Studio. (See Ovation Graphics Builder User Guide and Ovation Control Builder User Guide.) 4. Clear and reload each drop in the system with the Load function. A clear and reload of each drop in the system is required when the -f option is used in the import operation (see Step 2). If the -f option is not used, simply reload each drop. (See Ovation Developer Studio User Guide.)

OW331_15

21

Index
A
audit schema ? 5

B
Backing up and restoring the Ovation Database ? 19 backup the complete database ? 19 backup the partial database ? 20

C
Copyright Notice ? 2

D
database files backup ? 19 Database Initial Definition tool (DBID) ? 8 Database relate to other Ovation functions? ?3 Database terminology ? 4 Database tools ? 7 Databases types ? 2

E
Example of an OvPtExport file for SIS ? 16 Export (OvPtExport) ? 15

I
import and export utilities (imp and exp) ? 17 import file for Ovation Windows systems ? 12 import format for Ovation 1.x systems ? 14 import format for Ovation Windows systems ? 11 import function (OvPtImport) ? 8 Introduction to the Ovation database ? 1

O
organization of the Ovation database ? 5 Ovation Database (creating) ? 3 Ovation Master Database schema ? 5

P
Populating the Ovation database ? 7

R
Relational Database definition ? 1 restore a complete database ? 20 restore a partial database ? 21 Restoring the database ? 20

OW331_15

23


相关文章:
CAdoDataBase
CAdoDataBase_计算机软件及应用_IT/计算机_专业资料。用ado封装的一个对数据库进行操作的类暂时处理access、mssql、msql 请下载相对应的驱动...
CDatabase类的用法简介
CDatabase类的用法简介 - 要建立与数据源的连接, 首先应构造一个 CDatabase 对象, 然后再调用 CDatabase 的 Open 成员函数. Open 函数负责建立连接,其声...
initial catalog与database的区别
data source 和 initial catalog initial catalog 与 database 的区别是什么 Initial Catalog: DataBase: 两者没有任何区别只是名称不一样,就好像是人类的真实姓名...
Database Link 简单介绍
Database Link 简单介绍_计算机软件及应用_IT/计算机_专业资料。Database Link(数据库链接)定义从一个Oracle数据库到另一个数据库的单行通信通道。在做分布式数据库...
database_图文
database - 北京邮电大学 数据库综合实验 数据库原理及应用实验报告 班姓学序日 级: 2010211122 名: 号: 号: 期: 叶南阳 10210810 22 201...
database挂载
检查警告日志,也证实了这一点,系统异常 解决: 察看报警日至文件:错误如下: LTER DATABASE MOUNT Mon Apr 12 13:57:29 2010 scumnt: failed to lock /data...
database link是用来做什么的_图文
database link是用来做什么的 - 是用来做什么的? database link 是用来做什么的? database link,它是用来更方便的一个数据库中访问另一个数据库(包括 本地...
DROP DATABASE
DROP DATABASE - SQL Server 2005 联机丛书 DROP DATABASE (Transact-SQL) 发送反馈 请参阅 全部折叠全部展开 语言筛选器: 全部...
使用duplicate database 创建物理standby database
使用duplicate database 创建物理standby database_IT/计算机_专业资料。使用 duplicate database 创建物理 standby database 作者:hxl 环境: OS:Red Hat Linux As ...
Oracle database 安装,EM管理开启方法
Oracle database 安装,EM管理开启方法_计算机软件及应用_IT/计算机_专业资料。Oracle database 安装 教程,以及网上的部分资料, 对于新手很有帮助,这也是笔者实测的...
更多相关标签: