RIS Utilities Reference

February 17, 2018 | Author: balajivangaru | Category: Command Line Interface, Oracle Database, Relational Model, Databases, Database Schema
Share Embed Donate


Short Description

rytr...

Description

Relational Interface System (RIS) Utilities Guide

Version 6.0 June 2011 DNA111760

Copyright Copyright © 1989-2011 Intergraph Corporation. All Rights Reserved. Including software, file formats, and audiovisual displays; may be used pursuant to applicable software license agreement; contains confidential and proprietary information of Intergraph and/or third parties which is protected by copyright law, trade secret law, and international treaty, and may not be provided or otherwise made available without proper authorization from Intergraph Corporation.

U.S. Government Restricted Rights Legend Use, duplication, or disclosure by the government is subject to restrictions as set forth below. For civilian agencies: This was developed at private expense and is "restricted computer software" submitted with restricted rights in accordance with subparagraphs (a) through (d) of the Commercial Computer Software - Restricted Rights clause at 52.227-19 of the Federal Acquisition Regulations ("FAR") and its successors, and is unpublished and all rights are reserved under the copyright laws of the United States. For units of the Department of Defense ("DoD"): This is "commercial computer software" as defined at DFARS 252.227-7014 and the rights of the Government are as specified at DFARS 227.7202-3. Unpublished - rights reserved under the copyright laws of the United States. Intergraph Corporation P.O. Box 240000 Huntsville, AL 35813

Terms of Use Use of this software product is subject to the End User License Agreement ("EULA") delivered with this software product unless the licensee has a valid signed license for this software product with Intergraph Corporation. If the licensee has a valid signed license for this software product with Intergraph Corporation, the valid signed license shall take precedence and govern the use of this software product. Subject to the terms contained within the applicable license agreement, Intergraph Corporation gives licensee permission to print a reasonable number of copies of the documentation as defined in the applicable license agreement and delivered with the software product for licensee's internal, non-commercial use. The documentation may not be printed for resale or redistribution.

Warranties and Liabilities All warranties given by Intergraph Corporation about equipment or software are set forth in the EULA provided with the software or applicable license for the software product signed by Intergraph Corporation, and nothing stated in, or implied by, this document or its contents shall be considered or deemed a modification or amendment of such warranties. Intergraph believes the information in this publication is accurate as of its publication date. The information and the software discussed in this document are subject to change without notice and are subject to applicable technical product descriptions. Intergraph Corporation is not responsible for any error that may appear in this document. The software discussed in this document is furnished under a license and may be used or copied only in accordance with the terms of this license. No responsibility is assumed by Intergraph for the use or reliability of software on equipment that is not supplied by Intergraph or its affiliated companies. THE USER OF THE SOFTWARE IS EXPECTED TO MAKE THE FINAL EVALUATION AS TO THE USEFULNESS OF THE SOFTWARE IN HIS OWN ENVIRONMENT. Intergraph is not responsible for the accuracy of delivered data including, but not limited to, catalog, reference and symbol data. Users should verify for themselves that the data is accurate and suitable for their project work.

Trademarks Intergraph, the Intergraph logo, PDS, SmartPlant, FrameWorks, I-Convert, I-Export, I-Sketch, SmartMarine, IntelliShip, INtools, ISOGEN, MARIAN, SmartSketch, SPOOLGEN, SupportManager, and SupportModeler are trademarks or registered trademarks of Intergraph Corporation or its subsidiaries in the United States and other countries. Microsoft and Windows are registered trademarks of Microsoft Corporation. Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation and/or its affiliates. MicroStation is a registered trademark of Bentley Systems Inc, all rights reserved. Other brands and product names are trademarks of their respective owners.

Contents Preface PDS ................................................................................................................................................. 7 Getting Started ............................................................................................................................................. 9 risbatch ....................................................................................................................................................... 11 risclnsr ........................................................................................................................................................ 13 risdcode ...................................................................................................................................................... 15 risdtype ....................................................................................................................................................... 17 risgui ........................................................................................................................................................... 19 Exiting the risgui Utility .......................................................................................................................... 20 Performing Queries in the risgui Utility ................................................................................................. 20 Options .................................................................................................................................................. 21 Utilities ................................................................................................................................................... 21 Restart ................................................................................................................................................... 21 Set ......................................................................................................................................................... 22 Show ..................................................................................................................................................... 22 rislod ........................................................................................................................................................... 23 The Log File .......................................................................................................................................... 26 The Bad File .......................................................................................................................................... 27 Loading Index, View, and Privilege Definitions ..................................................................................... 27 Using rislod with the Interactive Interface ............................................................................................. 28 Using rislod with the Command Line Interface ..................................................................................... 32 BNF Representation of rislod Command Line Syntax .......................................................................... 33 rismgr.......................................................................................................................................................... 35 RIS Schema Manager ........................................................................................................................... 36 Schema Definition ................................................................................................................................. 37 Displaying Schema Information ...................................................................................................... 38 Creating Schemas .......................................................................................................................... 39 Dropping Schemas ......................................................................................................................... 43 Granting/Revoking Access Privileges to Secure Schemas ............................................................ 43 Obtaining Dictionary Access .......................................................................................................... 45 Modifying Schema Passwords ....................................................................................................... 46 Modifying Node Information ........................................................................................................... 46 Displaying Table, View, and Index Information ..................................................................................... 48 Displaying Table Information .......................................................................................................... 49 Creating Tables .............................................................................................................................. 50 Dropping Tables ............................................................................................................................. 51 Appending Columns to Tables ....................................................................................................... 51 Including Tables, Views, and Indexes ............................................................................................ 52 Excluding Tables, Views, and Indexes ........................................................................................... 53

Relational Interface System (RIS) Utilities Guide

5

Contents Reviewing and Manipulating Schema Files .......................................................................................... 54 Locating RIS Client Processes ............................................................................................................. 55 Setting Modes and Enabling Databases ............................................................................................... 56 risplbck ....................................................................................................................................................... 59 risrecrd ....................................................................................................................................................... 61 risunlod....................................................................................................................................................... 63 Using risunlod with the Interactive Interface ......................................................................................... 65 Using rislod with the Command Line Interface ..................................................................................... 69 BNF Representation of risunlod Command Line Syntax ...................................................................... 70 Additional Information on RIS .................................................................................................................. 73 RDBMS Versions .................................................................................................................................. 73 UNION and UNION ALL Supported ...................................................................................................... 73 Objects of Different Owners within a Schema ...................................................................................... 73 Object Aliases ....................................................................................................................................... 74 Multi-user, Secure Schema................................................................................................................... 74 Shared Dictionaries ............................................................................................................................... 75 Dictionary Objects ................................................................................................................................. 75 Dictionary Views.................................................................................................................................... 75 Internationalization ................................................................................................................................ 76 File Formats for risunlod and rislod ........................................................................................................ 79 Format for Representing Schema Definitions ....................................................................................... 80 Format for Representing Table Definitions ........................................................................................... 81 Format for Representing Insert Into Statements ................................................................................... 81 Format for Representing Field Definitions ............................................................................................ 81 Format for Representing Table Data .................................................................................................... 83 Format for Representing Data File Specifications ................................................................................ 83 Format for Representing Index, View, and Privilege Definitions .......................................................... 84 File Format for Data Files ..................................................................................................................... 84 Use of Spaces and New Line Characters ............................................................................................. 84 BNF Representation of File Formats .................................................................................................... 85 Index ........................................................................................................................................................... 87

6

Relational Interface System (RIS) Utilities Guide

Preface PDS This document provides command reference information and procedural instructions for the Relational Interface System (RIS) RIS Utilities task.

List of PDS Documentation                             

DPDS3-PB-200003 - DesignReview Integrator (PD_Review) Reference Guide DPDS3-PB-200004 - Drawing Manager (PD_Draw) User's Guide DPDS3-PB-200005 - EE Raceway Modeling Reference Guide DPDS3-PB-200006 - Interference Checker/Manager (PD_Clash) User's Guide DPDS3-PB-200010 - PDS 3D Theory User's Guide DPDS3-PB-200013 - PDS EDEN Interface Reference Guide Volume I : Piping DPDS3-PB-200015 - PDS Equipment Modeling (PD_EQP) User's Guide DPDS3-PB-200017 - PDS ISOGEN Reference Guide, Vol. 1 DPDS3-PB-200022 - PDS Piping Component Data Reference Guide DPDS3-PB-200023 - PDS Project Setup Technical Reference DPDS3-PB-200025 - PDS Stress Analysis Interface (PD_Stress) User's Guide DPDS3-PB-200026 - Pipe Supports Modeler Reference Guide DPDS3-PB-200028 - Piping Design Graphics (PD_Design) Reference Guide DPDS3-PB-200030 - Project Administrator (PD_Project) Reference Guide DPDS3-PB-200033 - Project Engineer HVAC (PE-HVAC) Reference Guide DPDS3-PB-200034 - Reference Data Manager (PD_Data) Reference Guide DPDS3-PB-200035 - Report Manager (PD_Report) User's Guide DPDS3-PB-200041 - PDS EDEN Interface Reference Guide Volume 2 : Equipment DPDS3-PB-200042 - PDS EDEN Interface Reference Guide Volume 3 : Pipe Supports DPDS3-PE-200016 - PDS Express Project Creation Quick Start Guide DPDS3-PE-200052 - PDS Ortho Draw User's Guide DPDS3-PE-200029 - Piping Model Builder (PD_Model) Reference Guide DPDS3-PE-200031 - Project Engineer HVAC Getting Started Guide DPDS3-PE-200032 - Project Engineer HVAC Overview DPDS3-PE-200045 - PDS Label Library Merger Utility DPDS3-PE-200047 - PDS Reference Data Auditing Tool DPDS3-PE-200048 - Pipe Supports Explorer Utility DPDS3-PE-200050 - Batch Services Quick Start Guide DPDS3-PE-200051 - Batch Services User's Guide

Relational Interface System (RIS) Utilities Guide

7

Preface PDS

8

Relational Interface System (RIS) Utilities Guide

SECTION 1

Getting Started The Intergraph Relational Interface System (RIS) is a generic interface to relational database management systems (RDBMSs). RIS offers simultaneous connections to RDBMSs from many vendors on dissimilar hardware platforms using numerous protocols. RIS makes an entire network of databases available as if there were a single, local database. During installation. the RIS utilities path is added to the system path environment variable. By default, the utilities are loaded in c:\Program Files\Common Files\Intergraph\risNN.nn\bin.

RIS Utilities 1. RIS Batch (see "risbatch" on page 11) - risbatch Executes SQL statements in ASCII files. 2. RIS Clean Server (see "risclnsr" on page 13) - risclnsr Cleans up some of the RIS dictionary tables. 3. RIS Decode (see "risdcode" on page 15) - risdcode Prints the error message for a RIS error code. 4. RIS Data Types (see "risdtype" on page 17) - risdtype Instructs RIS to interpret a column's data type in a different manner. 5. RIS Interactive (see "risgui" on page 19) - risgui Interactively query databases using RIS. 6. Configure RIS Version - risintop Described in the RIS Installation Guide for 32-Bit Applications. 7. RIS Loader (see "rislod" on page 23) - rislod Transfers data from specially formatted files into new or existing schemas. 8. RIS Playback (see "risplbck" on page 59) - risplbck Reads and executes files containing RIS commands generated by applications and captured with the risrecrd utility. 9. RIS Record (see "risrecrd" on page 61) - risrecrd Records all SQL statements and timing data into specially formatted files. Useful for repeating long sequences when trying to uncover program problems. 10. RIS Unloader (see "risunlod" on page 63) - risunlod Extracts data from a schema and places it into specially formatted files. 11. Upgrade Utility - risupgrd Converts a schema (dictionary and schema file) from an earlier version of RIS to the current version.

Products Needed to Use the RIS Utilities Refer to the RIS Installation Guide for 32-Bit Applications for information concerning products needed to use the RIS Utilities.

Relational Interface System (RIS) Utilities Guide

9

Getting Started

10

Relational Interface System (RIS) Utilities Guide

SECTION 2

risbatch This utility is a simple, shell-callable program providing easy access to RIS and to underlying databases. The primary purpose of this utility is batch execution of SQL statements.  Any SQL statement can be specified in an input file, provided that you have the proper access.  All SQL statements must be terminated with a semicolon (;).  The RIS_PARAMETERS environment variable is used to specify the location of the parms file.  Output is directed to stdout when the -o option is not used. To start the risbatch utility, do one of the following:  Type risbatch in a Command Prompt window.  Choose RIS NN.nn from Start > Programs; then choose RIS Batch.

Usage risbatch [-?] [-V] [-i ] [-o ]

Flags - If you do not specify any command-line arguments, or if you start the utility by selecting its icon from the Program Manager, the utility runs interactively and prompts for the necessary information. -? - Display usage information and exit. -V - Display version information and exit. -i - Specify the input file containing the RIS SQL statements. The locate client command prompts for the client version. -o - Specify the output file where output is stored. Type help at the risbatch prompt to get a list of available non-SQL commands.

Examples In this example, risbatch is invoked with the input file input.sql and the output file output.sql: risbatch -i input.sql -o output.sql

Files c:\Program Files\Common Files\Intergraph\risNN.nn\bin\risbatch c:\Program Files\Common Files\Intergraph\risNN.nn\parms c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\ris.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\net.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\utl.msg

Status Returns 0 - Normal termination. other - Abnormal termination.

Relational Interface System (RIS) Utilities Guide

11

risbatch

12

Relational Interface System (RIS) Utilities Guide

SECTION 3

risclnsr This interactive utility deletes all nonessential records from the RIS dictionary tables. This utility is provided to clean up when the server process has not been able to do so. The server fails to clean up when it is killed or the machine is shutdown or rebooted. Do not run this utility while the schemas to be cleaned are being accessed. To start the risclnsr utility, do one of the following:  Type risclnsr in a Command Prompt window.  Choose RIS NN.nn from Start > Programs; then choose RIS Clean Server.  Choose RIS NN.nn from Start > Programs; then choose RIS Interactive. Choose the Utilities button from the RIS Interactive form; then choose the RIS Clean Server button from the Utilities form. If you use another utility within RIS Interactive, you must choose the Restart button before RIS Interactive is aware of any RIS parameter changes, or the creating or dropping of schemas.

Usage risclnsr [-?] [-V] schema[.password] [user[.password]] [osuser[.password]] The osuser[.password] option specifies the user and password for a secure schema. If the schema specified is a secure schema, risclnsr prompts for the osusername and osusername password (if one exists).

Flags - If you do not specify any command-line arguments, or if you start the utility by selecting its icon from the Program Manager, the utility runs interactively and prompts for the necessary information. -? - Display usage information and exit. -V - Display version information and exit.

Files c:\Program Files\Common Files\Intergraph\risNN.nn\bin\risclnsr c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\ris.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\net.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\utl.msg

Status Returns 0 - Normal termination. other - Abnormal termination.

Relational Interface System (RIS) Utilities Guide

13

risclnsr

14

Relational Interface System (RIS) Utilities Guide

SECTION 4

risdcode This utility prints error messages for RIS error codes. To start the risdcode utility, do one of the following:  Type risdcode in a Command Prompt window.  Choose RIS NN.nn from Start > Programsr; then choose RIS Decode.  Choose RIS NN.nn from Start > Programs; then choose RIS Interactive. Choose the Utilities button from the RIS Interactive form; then choose the RIS Decode button from the Utilities form. If you use another utility within RIS Interactive, you must choose the Restart button before RIS Interactive is aware of any RIS parameter changes, or the creating or dropping of schemas.

Usage risdcode [-?] [-V] []

Flags - If you do not specify any command-line arguments, or if you start the utility by selecting the utility from Start > Programs, the utility runs interactively and prompts for the necessary information. -? - Display usage information and exit. -V - Display version information and exit. - Decimal, octal, or hexadecimal error code.

Examples To get the error message corresponding to an error code of 100, key in one of the following: risdcode 100 (Using decimal.) risdcode Ox64 (Using hexadecimal.) risdcode 0144 (Using octal.) risdcode You are prompted to key in the value to be decoded. In this case, key in 100.

Files c:\Program Files\Common Files\Intergraph\risNN.nn\bin\risdcode c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\ris.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\net.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\utl.msg

Status Returns 0 - Always zero.

Relational Interface System (RIS) Utilities Guide

15

risdcode

16

Relational Interface System (RIS) Utilities Guide

SECTION 5

risdtype This interactive utility lets you instruct RIS to interpret the data type of a column differently and modify the size of a RIS_BLOB/RIS_TEXT data type. The variety of data types in database systems permits multiple mappings of database data types to ANSI standard data types. When a schema is created, or a table is included in a schema, RIS chooses one interpretation of a data type. This utility lets you instruct RIS to interpret the data type of a column differently by prompting you for the schema name, username (for secure schemas), password (if one exists), table names, column names, and new data types. The environment variable RIS_LANGUAGE specifies the language that RIS uses for parsing and error messages. The default is English. Consult the file c:\Program Files\Common Files\Intergraph\risNN.nn\config\langs for other values. To start the risdtype utility, do one of the following:  Type risdtype in a Command Prompt window.  Choose RIS NN.nn from Start > Programs; then choose RIS Data Types.  Choose RIS NN.nn from Start > Programs; then choose RIS Interactive. Choose the Utilities button from the RIS Interactive form; then choose the RIS Data Types button from the Utilities form. If you use another utility within RIS Interactive, you must choose the Restart button before RIS Interactive is aware of any RIS parameter changes, or the creating or dropping of schemas.

Example: c:\risdtype Enter a schema ( to exit):sch1 Enter a table or view name (or ? for a list of names): >blob_table Pos Column type type-string len prec scale Name 1 c1 15 ris_blob 0 null null

null YES

Do you wish to modify this column? >yes 0 Unsupported 1 Character 2 RIS_BLOB 6 RIS_TEXT Choose a data type from those listed (enter the number) >>2 Current maximum ris_blob length is:0 Current maximum ris_blob length is:10000 Current status for nullable is YES, nulls are allowed Are null values allowed? >>yes Column definitions modified for object sch1.blob_table: Pos Column Name type type-string len prec scale 1 c1 15 ris_blob 10000 null null

Relational Interface System (RIS) Utilities Guide

null YES

17

risdtype Is this correct? >>yes

Usage risdtype [-?] [-V]

Flags - If you do not specify any command-line arguments, or if you start the utility by selecting its icon from the Program Manager, the utility runs interactively and prompts for the necessary information. -? - Display usage information and exit. -V - Display version information and exit.

Files c:\Program Files\Common c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\ris.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\net.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\utl.msg

Status Returns 0 - Normal termination. 1 - Abnormal termination.

18

Relational Interface System (RIS) Utilities Guide

SECTION 6

risgui This utility lets you interactively perform RIS queries. To start the risgui utility, do one of the following:  Type risgui in a Command Prompt window.  Choose RIS NN.nn from Start > Programs; then choose RIS Data Types.

The RIS Interactive Utility form displays.

See Also Exiting the risgui Utility (on page 20) Performing Queries in the risgui Utility (on page 20) Options (on page 21) Utilities (on page 21) Restart (on page 21) Set (on page 22) Show (on page 22)

Relational Interface System (RIS) Utilities Guide

19

risgui

Exiting the risgui Utility To exit the risgui utility, select the Cancel button.

Performing Queries in the risgui Utility To perform a query in the risgui utility, follow these steps: 1. Select a default schema from the Default Schema field. 2. Key an SQL statement into the Query field.  You must terminate the SQL statement with a semicolon character (;).  The statement can wrap across several lines.  If you need to change the entry, select the Clear button to clear the Query field, and then enter the statement again. 3. Select the Execute button. The results appear in the Results field. If the query results do not completely fit in the Results field, the risgui utility can display a full screen at a time. For more information see Options (on page 21). Select the Continue button to display the next full screen, or select the Abort button to stop the query. 4. To save the query results in a file, select the Save Results button.

History File When you execute a query, the risgui utility saves the SQL statement in the history file. To determine the name of the history file, the ris utility uses the file: 1. Is specified by the RIS_HISTORY_FILE environment variable. 2. ris.his in the directory specified by the HOME environment variable, if the RIS_HISTORY_FILE environment variable is not defined. 3. ris.his in the directory from which you started the risgui utility, if the HOME environment variable is not defined. When risgui saves a query in the history file, you can go back to the same query later and execute it again, or edit the SQL statement to use it as the basis for a new query. Select the Previous or Next buttons to display the queries in the history file. Select the Search button to perform a search in the history file. 1. Key a search term into the Search String field. 2. Select a search direction (Up or Down). 3. Select the Find Next button.

The risgui utility highlights the next match.

Saving and Loading Queries   

20

To save the current query (shown in the Query field) to a file, select the Save button. To load a previously saved query, select the Open button. To save the results of the current query, select the Save Results button.

Relational Interface System (RIS) Utilities Guide

risgui

Options The Options button modifies the behavior of query results. 1. Select the Options button. 2. To specify the behavior for query results that do not fit in the Results field, select one of the following: Fetch by screenful (Append) - fetch one full screen of results. When you select the Continue button, append the next full screen to the results. Fetch by screenful (Overwrite) - fetch one full screen of results. When you select the Continue button, discard the results and get the next full screen. Fetch all rows - fetch all results without pausing. 3. Select the OK button to accept the settings or select the Cancel button to reject them.

Utilities The Utilities button lets you start the other RIS utilities from within the risgui utility. 1. Select the Utilities button. In Windows 95, only RIS Manager is available. 2. Select one of the following buttons to start a utility: RIS Manager - starts the rismgr utility (see "rismgr" on page 35). RIS Loader - starts the rislod utility (see "rislod" on page 23). RIS Unloader - starts the risunlod utility (see "risunlod" on page 63). RIS Record - starts the risrecrd utility (see "risrecrd" on page 61). RIS Playback - starts the risplbck utility (see "risplbck" on page 59). RIS Clean Server - starts the risclnsr utility (see "risclnsr" on page 13). RIS Clean Server - starts the risclnsr utility. RIS Data Types - starts the risdtype utility (see "risdtype" on page 17). RIS Decode - starts the risdcode utility (see "risdcode" on page 15).

Restart While you are running the RIS Interactive utility, you can run other RIS utilities; however, if you modify the RIS parameters with the other utilities, or create or drop a schema, the RIS Interactive utility is not aware of the changes. Select the Restart button to restart risgui and make it aware of your changes. Your selection of modes, enabled databases, and default schema is not altered.

Relational Interface System (RIS) Utilities Guide

21

risgui

Set The Set button sets RIS modes and enables the databases. 1. Select the Set button. 2. Select the modes for the risgui utility: ANSI Mode Verify Mode Autocommit Blank Strip Mode Autorename Refer to the RIS SQL User's Guide for 32-Bit Applications for more information on the RIS modes. 3. Select the databases to enable: ORACLE MSSQL

Show The Show button gives you additional information about RIS on your system. 1. Select the Show button. 2. Select one of the following buttons: Parameters - shows the settings in your parameters file. Transactions - shows the schemas in transaction. About - shows version and copyright information.

22

Relational Interface System (RIS) Utilities Guide

SECTION 7

rislod You must understand the risunlod utility before using the rislod utility. The rislod utility permits the transfer of schema information between external ASCII files and RIS schemas by loading schema information from external files into RIS schemas.

rislod 

Reads schema information from the main external file and data files (if any) and restores them in the form of RIS schemas.  Restores only user-requested schema information into RIS schemas.  Lets information about multiple schemas be stored in the same external main file.  May create two files to report the loading status: the log file reports successful loading and the bad file reports unsuccessful loading. The rislod and risunlod utilities are not designed for use as backup utilities. The following are some reasons for not using rislod and risunlod as backup utilities:  If a view was created in the database (not with RIS), RIS cannot unload the definition of the view.  If you drop a schema and then recreate the schema, and there were existing views, RIS cannot load the definition of the view because RIS lost the definition when you dropped the schema.  In certain cases data types are mapped slightly differently in ORACLE databases. ORACLE uses numeric data types, and RIS uses integer, smallint, real, and double. If you create a column of RIS data type real, it is mapped to a float(21) ORACLE data type. If you drop the schema, then recreate the schema, RIS maps the float(21) in ORACLE to a RIS double data type. For these and further reasons, you should use the database's utilities to back up data correctly.The environment variable RIS_LANGUAGE specifies the language that RIS uses for parsing and error messages.The default is English. Consult the file riscli\config\langs for other values. The representation of information must comply with the format defined in the section File Formats for risunlod and rislod (on page 79). The following figure represents the functional mechanisms of rislod and shows the input requirements and output generated.

Relational Interface System (RIS) Utilities Guide

23

rislod Data for ris_blob and ris_text columns cannot be loaded; however, you can have ris_blob and ris_text columns in a create table statement. To start the rislod utility, do one of the following:  Type rislod in a Command Prompt window.  Choose RIS NN.nn from Start > Programs; then choose RIS Loader icon:  Choose RIS NN.nn from Start > Programs; then choose RIS Interactive.Choose the Utilities button from the RIS Interactive form; then choose the RIS Loader button from the Utilities form. If you use another utility within RIS Interactive, you must choose the Restart button before RIS Interactive is aware of any RIS parameter changes, or the creating or dropping of schemas.

Usage rislod [-?] [-V] [-n] [-p] [-e ] [-m {}] [-i ] [-b ] [-d ] [-c ] [-s ] [-f ]

Flags - If you do not specify any command-line arguments, or if you start the utility by selecting its icon from the Program Manager, the utility runs interactively and prompts for the necessary information. -? - Display usage information and exit. -V - Display version information and exit. -n - Set ANSI mode off. ANSI mode is on by default. Refer to the set mode statement in the RIS SQL User's Guide for 32-Bit Applications for more information. -p - Preserve blanks. By default, rislod strips trailing blanks from character data. Refer to the set mode statement in the RIS SQL User's Guide for 32-Bit Applications for more information. -e - Enable the database specified in the . All databases are enabled by default. Refer to the set enable database statement in the RIS SQL User's Guide for 32-Bit Applications for more information. -m {} - Specify the file mode for output files. The w overwrites an existing file, the a appends to an existing file, and the e returns an error if an output file with the specified name exists. -I - Specify the main input ASCII file from which RIS schema information is loaded. The default main filename is ris.dmp. -l - Specify the log file into which RIS schema status information is recorded. The default log filename is ris.log. -b - Specify the bad file into which rejected RIS schema information is dumped. The default bad filename is ris.bad. -d - Specify the character for delimiting column values of character type while loading rows in a table. A single quotation mark (') is the default delimiter character. -c - Specify the commit interval value that informs the loader to commit after inserting number of rows for a table. The default value is 25. -s - Specify schema and schema-related information, such as tables, indexes, views, and grants. Alternatively, you can specify this information in a specification file. -f - Specify the name of the specification file for . This option cannot be used with the -s option. See the section Using rislod with the Command Line Interface (on page 32) for more detailed information.

24

Relational Interface System (RIS) Utilities Guide

rislod Files c:\Program Files\Common Files\Intergraph\risNN.nn\bin\rislod c:\Program Files\Common Files\Intergraph\risNN.nn\parms c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\ris.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\net.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\utl.msg

Status Returns 0 - Normal termination. 1 - Abnormal termination.

User-requested RIS Schema Objects rislod loads user-requested RIS schema objects (items) from external ASCII files into RIS schemas. rislod can:  Load schema definitions  Load table definitions  Load table data  Load index definitions  Load view definitions  Load privilege definitions  Load multiples of above items in a single run  Load items of one schema into any other existing schema  Load table definition only without table data  Load table data into existing table  Delete records from the table before loading table data from external file  Load table data from separate data file  Commit table data insertion after specific interval  Overwrite or append the log and bad files or return error if files exist

Enhanced features of rislod Setting the ANSI mode on/off - The ANSI mode can be turned on or off, depending upon your requirements, before starting the loading execution. Enabling specific databases - rislod lets you enable specific databases before starting the loading execution. Loading of any other existing schema - rislod permits information about a particular schema to be loaded into another existing schema using the rislod rename capability. You do not need to edit or correct the external main file to use this feature. Returning error and/or delete table records before loading - You can specify that rislod report errors while loading data into a table, if the table already exists. You can also specify that rislod load data into existing tables or delete data from existing tables before loading. Committing insertion at a specific interval - To improve execution performance, rislod commits table data insertions at specific intervals, rather than committing after each table insertion. By default, table data insertions are committed after 25 rows are inserted. Not imposing the order of information stored in the main external file - For an index, view, or privilege definition to be loaded successfully, all its references must exist. rislod does not

Relational Interface System (RIS) Utilities Guide

25

rislod impose a strict order on the information stored in the main file because it often postpones the loading of an index, view, or privilege until its references are loaded. There are three ways to interact with rislod: using the Interactive Interface, the Command Line Interface, or the Embedded Programming Function Interface. Interactive Interface - When rislod is invoked without any command line arguments, interactive prompts display. You are prompted for required inputs as the main external file is scanned. See the section Using rislod with the Interactive Interface (on page 28) for more information about the meanings of these prompts and the corresponding actions taken by rislod. Command Line Interface - When rislod is invoked with arguments, the rislod command line interface activates. This interface lets you specify, in a single command, the responses to various prompts that would have been generated if rislod had been invoked interactively. Errors encountered during parsing are not reported in the log or bad file, and rislod terminates abnormally. See the section Using rislod with the Command Line Interface (on page 32) for more information about the syntax for constructing a rislod command and the semantics of the command. Embedded Programming Function Interface - The RIS_loader function provides the functionality of rislod in an embedded program when you call the function and pass the appropriate structures. Refer to the RIS Programmer's Guide for 32-Bit Applications for more information.

See Also The Log File (on page 26) The Bad File (on page 27) Loading Index, View, and Privilege Definitions (on page 27) Using rislod with the Interactive Interface (on page 28) Using rislod with the Command Line Interface (on page 32) BNF Representation of rislod Command Line Syntax (on page 33)

The Log File When rislod begins execution, it creates a log file. The default log filename is ris.log. You can specify a different name for the log file. The log file can be opened in overwrite or append mode. If rislod cannot create a log file, execution terminates. The log file contains a detailed summary of the execution with several sections: Header File mode for the log and bad files Input main external filename Log filename Bad filename Commit interval for loading table data Schema Information Schema name Whether the schema loaded successfully or unsuccessfully Renamed schema name (if selected) Table section, containing: Table name Whether the table was created successfully or unsuccessfully Number of rows loaded successfully

26

Relational Interface System (RIS) Utilities Guide

rislod Number of rows loaded unsuccessfully Index section, containing: Table name Number of indexes loaded successfully for this table Number of indexes loaded unsuccessfully for this table View section, containing: View name Whether the view loaded successfully or unsuccessfully Grants Summary For each schema loaded: Schema name and table or view name Number of grants loaded successfully for this table or view Number of grants loaded unsuccessfully for this table or view Miscellaneous Date and time of the run Total elapsed time

The Bad File As it executes, rislod creates a file called the bad file. The bad file contains all schema item definition statements that rislod attempted to load but could not. These statements could be create schema, create table, insert, table field definition, create index, create view, or grant statements. The default name for the bad file is ris.bad, but you can specify a different name for the file. Statements that fail to load are dumped to the bad file with appropriate error codes and error messages. These error codes and messages are commented so the bad file can be used again, after it is edited or corrected, to load rejected schema information. For example, if rislod cannot load a schema statement, then all the schema information pertaining to this schema is dumped to the bad file; or, if the create table statement fails, and data are to be loaded in this table, then all table data statements such as create table, insert, table field definition, and data statements are dumped to the bad file. The error messages are ignored by rislod. Additionally, the status of each schema item being loaded is echoed to the screen in the interactive and command line interfaces. The bad file can be opened in overwrite or append mode.

Loading Index, View, and Privilege Definitions For an index to be loaded, the table it references must exist. Similarly, for a view to be successfully loaded, all the tables and views it references must exist. To successfully load a privilege definition (a grant statement), the grantee, relation, and access privileges referenced in the statement must also exist. To take away the burden of organizing information into a proper order for loading, rislod postpones the loading of the index, view, or privilege definition until its references have been loaded. When an index definition in a schema is fetched, rislod tries to load it. If rislod receives an error message from RIS stating that the table on which the index is created does not exist, the index

Relational Interface System (RIS) Utilities Guide

27

rislod definition is stored in a temporary file. After rislod has tried to load every statement in the schema once, it attempts to load the indexes from the temporary file again. The same thing happens to a view definition that could not be loaded the first time because its references did not exist. rislod continuously loads these views in the temporary file until all of them have been loaded or until no more views can be loaded successfully. When rislod fetches a privilege definition in a schema, it is broken down into several grant statements, one for each grantee specified. rislod tries to load each of the new grant statements If RIS notifies rislod that the statement could not be loaded, the grant statement is stored in a temporary file along with the information about the schema to which it belongs. After rislod tries to load every statement in the files at least once, rislod tries to load the grant statements in the temporary file again. rislod continuously loads these grant statements until either all of them have been loaded or no more grant statements can be loaded successfully. In this approach you may notice the breakdown of a grant statement and notice that some of the grant statements are loaded at the end of a rislod session.

Using rislod with the Interactive Interface Invoking rislod without any command line arguments displays interactive prompts. Accepting Default Values. Most prompts have default values indicated in square brackets. [ ]. Press the ENTER key to select these default values. Selecting Nondefault Values. To select a non-default value choose the character in parentheses corresponding to the option you want. Key in that character and press ENTER. Specifying Other Information. Some prompts ask you to enter information, such as filenames. Key in the information requested and press ENTER.

Interactive Prompt Details 1. Set mode ansi ON(y/n) :[y] > The default is set ANSI mode on. See the RIS SQL User's Guide for 32-Bit Applications for more information. Do one of the following:  Press ENTER to accept the default.  Select n to turn off ANSI mode. 2. Preserve blanks? (y/n) :[n] > This prompt lets you set the blank strip mode. By default rislod strips trailing blanks from character data. Do one of the following:  Press ENTER to accept the default if you do not want to preserve trailing blanks.  Select y if you want to preserve trailing blanks. 3. Set mode enable databases? l(a) specific(s) :[a] > This prompt lets you enable databases during the loading of a schema. Do one of the following:  Press ENTER to enable all RIS-supported databases.  Select s and rislod prompts you for a database type Enter DBMS type (ex. oracle) :[return] > Enter the RIS-supported database type, such as Oracle. This prompt repeats until you press ENTER without entering a database name.

28

Relational Interface System (RIS) Utilities Guide

rislod 4. File mode of all output files? overwrite(w) append(a) error out if exists(e) :[e] > This prompt lets you set the file mode for log and bad files. The file mode affects the log and bad files only. The default is e, error out mode. Do one of the following:  Press ENTER to accept the default; when you are prompted for the log and bad filenames, rislod prompts you to quit if the files you specify already exist.  Select w to overwrite the existing log and bad files.  Select a to append to the existing log and bad files. 5. Main file for loading :[ris.dmp] > This prompt lets you specify the name of the main file for loading. The default name for the main file is ris.dmp. Do one of the following:  Press ENTER to accept the default filename.  Enter another filename for the main file. 6. Log file :[ris.log] > This prompt lets you specify the name of the log file for loading. The default name for the log file is ris.log. Do one of the following:  Press ENTER to accept the default filename.  Enter another filename for the log file. If you selected e for error out mode at the prompt File mode of all output files?, and a file with the name you specify exists, the message Log File already exists is displayed. You are prompted: Quit risload? (y/n):[n] > Do one of the following:  Press ENTER to accept the default. You are again prompted to enter a name for the log file; key in a new filename.  Select y to quit rislod. 7. Bad file :[ris.bad] > This prompt lets you specify the name of the bad file for loading. The default name for the bad file is ris.bad. Do one of the following:  Press ENTER to accept the default filename.  Enter another filename for the bad file. If you selected e for error out mode at the prompt File mode of all output files?, and a file with the name you specify exists, the message Bad File already exists is displayed. You are prompted: Quit risload? (y/n):[n] > Do one of the following:  Press ENTER to accept the default. You are again prompted to enter a name for the bad file; key in a new filename.  Select y to quit rislod. 8. Enter delimitation used in the files for loading: ['] > This prompt lets you specify the delimiter to use for enclosing character values of variable lengths to use in the main and data files.

Relational Interface System (RIS) Utilities Guide

29

rislod You cannot use the space character as a delimiter. The files generated by risunlod use single quotation marks (') for delimitation. This feature of rislod lets you use files not prepared by risunlod for loading as long as the other parts of the files comply with the file format used by rislod. Do one of the following:  Press ENTER to accept the default.  Enter another delimitation character. 9. Enter commit interval :[25] > The commit interval lets you commit the insertion of rows in a table after the specified commit interval value. The default is 25 (commit after inserting 25 rows in a table). Do one of the following:  Press ENTER to accept the default.  Enter another commit interval. 10. Which schemas should be loaded? all(a) or prompted - optionally transfer into existing schema(p) :[a] > This prompt lets you choose between loading all the schemas or only selected schemas from the main file. The default is a for all schemas. Do one of the following:  Press ENTER to load all the schemas from the main file. Prompts let you choose how to load tables, indexes, views, and privilege definitions. These prompts appear once, after the prompt for the schema, if you choose to load all the schemas in the main file.  Select p and rislod generates a list of schemas and prompts you before loading each schema. (After each schema is selected, you are prompted for how to load tables, indexes, views, and privilege definitions for that schema.) Load schema (y/n) :[y] > Do one of the following:  Select y to load the specified schema. If you select p at the prompt Which schemas should be loaded? and you select y at this prompt, you are prompted to optionally load into another existing schema:  To Transfer 's items into another existing schema... Enter an existing schema name :[] Do one of the following:  Press ENTER if you do not want to use another existing schema; rislod loads the schema into the schema name specified in the main file.  Enter the name of an existing schema. rislod then prompts for the username, user password, and schema password, if necessary, for the specified schema  Select n if you do not want to load the specified schema. rislod lets you rename schemas only if the prompted (p) selection was made at the Which schemas should be loaded? prompt. If the schema is a secure schema, you are prompted for the database username, the database username password, the operating system username, and the operating system username password. If the schema has a password, you are prompted for the schema password. Passwords are not echoed to the screen. 11. Which tables should be loaded? all(a) prompted(p) none(n) :[a] >

30

Relational Interface System (RIS) Utilities Guide

rislod Do one of the following:  Press ENTER to accept the default and load all the tables in the schema.  Select p if you want to be prompted for each table.  Select n if you do not want to load any tables. If you select a or p at the prompt Which tables should be loaded? the following prompt appears next: Both definitions and data(b) definitions only(o):[b] > This prompt lets you decide whether to load both the definitions and data of the tables in the schema or load only the definitions. Do one of the following:  Press ENTER to accept the default and load both table definitions and data.  Select o to load table definitions only. rislod loads either fixed or variable formatted table data. If only the definitions exist for some or all of the tables in a schema, choosing to load both definitions and data does not cause any problem to rislod. These tables are created without data in them. Similarly, if both the definitions and data exist for some or all of the tables in a schema, choosing the second selection does not cause problems. These table data are discarded and the string only definitions is placed in the log file.  Select n if you do not want to load any tables. If you select b at the prompt Both definitions and data(b) definitions only(o) the following prompt appears: Continue loading into a table even though that table exists (y/n):[n] > When loading a table definition of a table that already exists, an error message is generated stating that a table/view with this name already exists. Whether or not the data is loaded into the existing table depends on the answer to this prompt. Do one of the following:  Press ENTER to accept the default and data are not loaded into an existing table.  Select y to load data into an existing table. If y is selected for the previous prompt, the following prompt is displayed: Clear existing data from table before loading(y/n) :[n] > Do one of the following:  Press ENTER to accept the default and keep existing data.  Select y to delete all rows from this table before loading data from the main file. 12. Which index definitions should be loaded? all(a) prompted(p) none(n): [a] > Do one of the following:  Press ENTER to accept the default and load all index definitions.  Select p and rislod generates a list of indexes and prompts for each index definition: Load definition (y/n):[y] > Do one of the following:  Press ENTER to load the specified definition.  Select n if you do not want to load the index definition.  Select n and no index definitions are loaded. 13. Which views should be loaded? all(a) prompted(p) none(n):[a] > Do one of the following:

Relational Interface System (RIS) Utilities Guide

31

rislod  

Press ENTER to accept the default and load all views. Select p and rislod prompts for each view: Load view (y/n):[y]: Do one of the following:  Press ENTER to load the specified view.  Select n and the specified view is not loaded.  Select n and no views are loaded. 14. Which privilege definitions should be loaded? all(a) prompted(p) none(n):[a] > Do one of the following:  Press ENTER to accept the default and load all privilege definitions.  Select p and rislod prompts for each table or view on which one or more privileges are defined: Load access privilege on (y/n):[y] Do one of the following:  Press ENTER to load the specified privilege definition.  Select n if you do not want to load the privilege definition.  Select n and no privilege definitions are loaded. If you selected p at the prompt Which table should be loaded? the following prompt is displayed. Load table (y/n):[y] Do one of the following:  Press ENTER to accept the default and load the specified table.  Select n and the specified table is not loaded. When all the necessary information has been specified, rislod processes the schema(s) selected.

Using rislod with the Command Line Interface The command line can be used to specify which schemas in the main file should be loaded. It can also be used to specify which information in the schemas should be loaded. The syntax for constructing a rislod command is almost the same as the syntax for constructing a risunlod command, except for a few additions and changes.

Examples rislod -i \dir1\dir2\mainfile -d\" -l load.log ..\dir3\specfile -n -mw -e rdb informix -c 15

-b load.bad-f

-i - Main filename. The default is ris.dmp. -d - Delimiter. The default is a single quotation mark ('). The delimiter in this example is a double quotation mark. The backslash before the delimiter causes the shell not to interpret the double quotation mark. -l - Log filename. The default is ris.log. -b - Bad filename. The default is ris.bad.The delimiter in this example is a double quotation mark. The back slash before the delimiter causes the shell not to interpret the double quotation mark.

32

Relational Interface System (RIS) Utilities Guide

rislod Additional Options -n - ANSI mode off. -e - Enable databases listed after this option. -m - Set the file mode (w, a, or e) for the outputfiles (such as log and bad files). -c - Commit interval. rislod -s sch1.create_sch_passwd1.user_passwd1 all -s sch2 .create_sch_passwd2 .user_passwd2 new table with data all -s sch3 clear table with data t1 t2 grant all -s sch4 rename sch5 .sch5pass table t1 index t2 view v1grant t2 v2 sch.t3 sch.v3 rislod lets you specify up to three passwords after a schema name (schema password, osuser password, and user password). Passwords are necessary if they are not already stored in the main file. For schema sch2, data is loaded only into newly created tables. For schema sch3, data is loaded into tables t1 and t2 after deleting previously inserted rows even if it already exists before loading. For schema sch4 all the following items are loaded into existing schema sch5. No data is loaded into table t1, but index definitions on table t1 and privilege definitions on table t1 and view view1 are loaded. The specification file format is the same for both rislod and risunlod.

BNF Representation of rislod Command Line Syntax Backus Naur form (BNF) is a method of describing the syntax of a language. It is used here to show the capabilities of the RIS command line interface. The following is the BNF representation of the syntax for constructing a command line. ::= rislod [-n] [-e ] [-m ] [-i ] [-b Programs; then choose RIS Schema Manager.  Choose RIS NN.nn from Start > Programs; then choose RIS Interactive. Choose the Utilities... button from the RIS Interactive form; then choose the RIS Manager... button from the Utilities form. If you use another utility within RIS Interactive, you must choose the Restart button before RIS Interactive is aware of any RIS parameter changes, or the creating or dropping of schemas.

Usage rismgr

Files c:\Program Files\Common Files\Intergraph\risNN.nn\bin\rismgr c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\forms\v5forms\* c:\Program Files\Common Files\Intergraph\risNN.nn\parms c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\ris.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\net.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\utl.msg

Status Returns 0 - Normal termination. 1 - Abnormal termination.

See Also RIS Schema Manager (on page 36) Schema Definition (on page 37) Displaying Table, View, and Index Information (on page 48) Reviewing and Manipulating Schema Files (on page 54) Locating RIS Client Processes (on page 55) Setting Modes and Enabling Databases (on page 56)

Relational Interface System (RIS) Utilities Guide

35

rismgr

RIS Schema Manager The RIS Schema Manager dialog box displays a three-column list showing all the schemas known to RIS, each schema type (standard or secure), and whether the schema's associated dictionary is owned or shared. Buttons corresponding to the actions of the Schema Manager are also on the dialog box. When you choose a button, you initiate that particular action, and the associated subordinate dialog box is displayed. When you choose one of the schemas from the list on the RIS Schema Manager dialog box, information about that schema is displayed on the subordinate dialog box.

Operating Sequence 1. Activate the RIS Schema Manager.

The RIS Schema Manager dialog box appears.

Choose the button from the RIS Schema Manager dialog box for the function you want to use. The RIS Schema Manager functions are described briefly in the following list. See the section listed for a complete description. Schema Definition - Provides additional functions and dialog boxes for defining schemas. See the section Schema Definition (on page 37). Data Definition - Provides additional functions and dialog boxes that manipulate tables, views, and indexes. See the section Displaying Table, View, and Index Information (on page 48). Schema File - Lets you review and manipulate schema files. See the section Reviewing and Manipulating Schema Files (on page 54). Locate Client - Lets you review and specify the location of a RIS client process. See the section Locating RIS Client Processes. Set - Lets you set ANSI, autocommit, autorename, blankstrip, and verify modes on or off and enable different databases. See the section Setting Modes and Enabling Databases (on page 56). 2. Do one of the following:  Choose the Reset button to erase the subordinate dialog boxes.  The RIS Schema Manager rereads the RIS schemas file.

36

Relational Interface System (RIS) Utilities Guide

rismgr  

Choose the Close button to end the RIS Schema Manager session. Choose the Help button to obtain RIS Schema Manager help.

Schema Definition The Schema Definition dialog box lets you initiate functions to display schema information, create and drop schemas, access secure schemas and dictionaries, and modify schema passwords, node information, and DB2 passwords.

Operating Sequence 1. Choose the Schema Definition button from the RIS Schema Manager dialog box.

The Schema Definition dialog box appears.

The dialog box has eight buttons, each letting you initiate a particular function. 2. Do one of the following:  Choose the button from the Schema Definition dialog box for the function you want to use. The Schema Definition functions are described briefly in the following list. See the section listed for a complete description. Schema Information - Displays information about a specified schema. See the section Displaying Schema Information (on page 38). Create Schema - Creates schemas. See the section Creating Schemas (on page 39). Drop Schema - Drops schemas. See the section Dropping Schemas (on page 43). Secure Schema Access - Grants and revokes access to a secure schema. See the section Granting/Revoking Access Privileges to Secure Schemas (on page 43). Dictionary Access - Grants and revokes dictionary access to a schema. See the section Obtaining Dictionary Access (on page 45). Modify Schema Password - Modifies the schema password. See the section Modifying Schema Passwords (on page 46). Modify Node Information - Modifies node information. See the section Modifying Node Information (on page 46). Modify DB2 Password - Modifies the DB2 password. See the section Modify DB2 Password Form  Choose the Reset button to dismiss the subordinate dialog boxes.  Choose the Close button to dismiss the Schema Definition dialog box.  Choose the Help button to obtain RIS Schema Definition help.

Relational Interface System (RIS) Utilities Guide

37

rismgr See Also Displaying Schema Information (on page 38) Creating Schemas (on page 39) Dropping Schemas (on page 43) Granting/Revoking Access Privileges to Secure Schemas (on page 43) Obtaining Dictionary Access (on page 45) Modifying Schema Passwords (on page 46) Modifying Node Information (on page 46) Modify DB2 Password Form

Displaying Schema Information The Schema Information dialog box displays information about a specified schema. You can key in a schema name or select a name from the Schema Name list on the RIS Schema Manager dialog box.

Operating Sequence 1. Choose the Schema Information button from the Schema Definition dialog box.

The Schema Information dialog box appears and displays information about the selected schema (if one has been selected from the RIS Schema Manager dialog box).

2. Do one of the following if the schema you want is not already the selected schema:  In the Schema Name box, type a schema name.  Select a schema from the Schema Name list on the RIS Schema Manager dialog box.

The schema information is displayed. The following information is displayed: Schema Name - Displays the schema name. Schema Type - Displays whether the schema is a standard or secure schema. Network Protocol - Displays the type of network protocol being used to communicate with the RIS data server. Nodename or Address - Displays a nodename, an Ethernet address (specified in the [lan.]address) dialog box, an Internet address, or an address appropriate for the protocol of the machine where the RIS data server is located. Database Username - Displays the database username. OS Type - Displays the operating system type on which the server is running (for example, Windows).

38

Relational Interface System (RIS) Utilities Guide

rismgr Dictionary Owner - Displays the user who owns the dictionary. Database Type - Displays the database type (for example, MSSQL or ORACLE). 3. To dismiss the Schema Information dialog box, click Close.

Creating Schemas The Create Schema dialog box creates new RIS schemas and corresponds directly to the RIS create schema statement. The database-specific information on the Create Schema dialog box can be entered in three ways:  By entering the information directly in the boxes. If the schema is being created on a database unknown to RIS, this is the only alternative.  By selecting an existing schema from the RIS Schema Manager dialog box. The database-specific information about that schema is entered into the Create Schema dialog box. This method is particularly convenient when creating additional schemas on a database.  By selecting the Display Databases button. A dialog box listing all the known RIS databases appears. Selecting one of these databases enters information about that database into the Create Schema dialog box.

Operating Sequence 1. Select the Create Schema button from the Schema Definition dialog box.

The Create Schema dialog box appears.

The Create Schema dialog box has two areas:  The DBMS-independent area  The DBMS-dependent area 2. Enter the appropriate values for the DBMS-independent section of the dialog box. The following list explains the DBMS-independent controls. Schema Name - Type a name for the schema you want to create. (Schema Name) Password - Enter a password for the schema. The No Echo/Echo button causes the password to not display (No Echo) or display (Echo) when it is entered. Schema Type - Click this button to toggle between Standard and Secure schemas. Network Protocol - Select the type of network protocol to use to communicate with the RIS data server. Only the top (#1) protocol is used in the create schema statement. When you select a protocol, it moves to the bottom (#4). ISO, XNS and DECNET are not currently supported. To change the order of the Network Protocol boxes, select one Network Protocol

Relational Interface System (RIS) Utilities Guide

39

rismgr box and its value is replaced with the value of the Network Protocol box below it. The value that was originally selected is moved to the bottom of the list. Nodename or Address - Specify a nodename, an Internet address, or an address appropriate for the protocol of the machine where the RIS data server is located. Enter a value or click the Get Client Address button. Get Client Address - Click this button to enter the addresses of the client machine in the Nodename or Address boxes. This is useful when the RIS client and the RIS data server are on the same machine. Database Username - Type the database username. (Database Username) Password - Type a password for the database username. The No Echo/Echo button causes the password to not display (No Echo) or display (Echo) when it is entered. Include Database User's Tables/Views - Click this button to toggle between Yes to include the database user's tables and views, or No not to include the database user's tables and views. OS Type - From the list, select the operating system type on which the RIS data server is running. Use Existing Dictionary - Click this button to toggle between No (the default) and Yes. You must already have permission from the dictionary owner to use an existing dictionary. Dictionary Owner - Type a user who owns a dictionary in the particular database. 3. Do one of the following:  Select a database type from the Database Type list. If the selected database type requires additional information, boxes to enter that information are displayed when you select the database type.





40

The supported RDBMSs are: ORACLE MSSQL The DBMS-dependent controls for each database type are explained in separate subsections following this section. To display databases known to RIS, select the Display Databases button.

Relational Interface System (RIS) Utilities Guide

rismgr The Databases dialog box appears.

Databases known to RIS are listed on this dialog box. Select a database from the dialog box. Controls containing information specific to the database selected are shown on the Create Schema dialog box. 4. See the section specific to the type of database on which you are creating the schema for instructions on filling in the DBMS-dependent boxes.

See Also Creating Schemas (ORACLE) (on page 41) Creating Schemas (Microsoft SQL Server) (on page 42)

Creating Schemas (ORACLE) When you select the ORACLE DBMS from the Database Type list on the Create Schema dialog box, the ORACLE-dependent controls appear on the dialog box.

Operating Sequence 1. Enter the appropriate values for the ORACLE-dependent controls. The following list explains these controls.  Database Name - Enter the system identifier (SID) of the ORACLE database. The SID should be in the correct format for ORACLE.  Database Management System Location - Enter the ORACLE home path (where ORACLE is installed).  OS Username - Enter a valid operating system log-in name on the server machine.  Password - Enter the operating system log-in password, if any.

Relational Interface System (RIS) Utilities Guide

41

rismgr For a given ORACLE SID, all schemas created using that SID must have the same operating system username and password combination. 2. Do one of the following:  To create the schema, click the Apply button.  To clear the form, click the Reset button.  To drop previously created RIS dictionary objects (such as RIS tables, views, indexes, and schema privileges) before creating the new schema, click the Force button.  To dismiss the form without creating a schema, click the Close button.

Creating Schemas (Microsoft SQL Server) When you select the SQL Server DBMS from the Database Type list on the Create Schema dialog box, the SQL Server-dependent controls appear on the dialog box.

Operating Sequence 1. Enter the appropriate values for the Microsoft SQL Server-dependent controls. The following list explains these controls.  Database Name - Enter the name of the database the schema accesses.  Database Management System Location - Enter the path where SQL Server is installed. See the README.TXT file delivered with the RISMSFDS product for more information. This information is not required for all servers.  OS Username - Enter a valid operating system log-in name on the server machine.  Password - Enter the operating system log-in password, if any. The No Echo/Echo button causes the password not to display (No Echo) or to display (Echo) when it is clicked.  DSQUERY - Currently this field is not used.  IFILE - Enter the name of the interfaces file for the schema. By default, RIS uses the SQL Server interfaces file named interfaces. This information is not required for all servers. 2. Do one of the following:  To create the schema, click the Apply button.  To clear the dialog box, click the Reset button.  To drop previously created RIS dictionary objects (such as RIS tables, views, indexes, and schema privileges) before creating the new schema, click the Force button.

42

Relational Interface System (RIS) Utilities Guide

rismgr 

To dismiss the dialog box without creating a schema, click the Close button.

Dropping Schemas The Drop Schema dialog box drops schemas using the information you specify and corresponds directly to the RIS drop schema statement.

Operating Sequence 1. Choose the Drop Schema button from the Schema Definition dialog box.

The Drop Schema dialog box appears and displays the name of the selected schema (if one has been selected from the RIS Schema Manager dialog box).

2. Do one of the following, if the schema you want to drop is not already the selected schema:  In the Schema Name box on the Drop Schema dialog box, type the schema name.  From the Schema Name list on the RIS Schema Manager dialog box, select a schema. If the schema is a secure schema, a dialog box appears. Enter the database username, database password, operating system username, and operating system password in the dialog box, if displayed. 3. Do one of the following:  To drop the schema, click the Apply button.  To drop previously created RIS dictionary objects (such as RIS tables, views, indexes, and schema privileges), click the Force button.  

The Force button removes the schema regardless of who is using it. To dismiss the Drop Schema dialog box without dropping the schema, click the Close button. Choose the Help button to obtain Drop Schema help.

Granting/Revoking Access Privileges to Secure Schemas The Secure Schema Access dialog box provides access privileges to a secure schema.

Operating Sequence 1. Select the Secure Schema Access button from the Schema Definition dialog box.

Relational Interface System (RIS) Utilities Guide

43

rismgr The Secure Schema Access dialog box appears.

2.

3. 4. 5.

6.

44

If a schema has already been selected from the RIS Schema Manager dialog box, this schema information appears on the Secure Schema Access dialog box. Do one of the following, if the schema you want is not already the active schema:  Select a schema from the Schema Name list on the RIS Schema Manager dialog box.  Enter a name into the Schema Name box to display information about a schema. A dialog box appears. Enter the database username, database password, operating system username, and operating system password in the dialog box. Click the Action button to toggle between granting and revoking secure schema access. Click the Privilege button to toggle between granting and revoking resource and connect privileges. Do one of the following:  Enter a username in the Selected User box.  Select a user from the Access Users list.  Select a user from the All Users list. Do one of the following:  To grant or revoke privileges to the secure schema, click the Apply button.  To dismiss the Secure Schema Access dialog box without altering schema access, click the Close button.  Choose the Help button to obtain help with granting and revoking schema access privileges.

Relational Interface System (RIS) Utilities Guide

rismgr

Obtaining Dictionary Access This dialog box grants and revokes access to a dictionary for a selected user.

Operating Sequence Select the Dictionary Access button from the Schema Definition dialog box.

The Dictionary Access dialog box appears.

1. Do one of the following, if the schema you want is not already the selected schema:  Select a schema from the Schema Name list on the RIS Schema Manager dialog box.  Type a name in the Schema Name box to display information about a schema. If the schema is a secure schema, a dialog box appears. Enter the database username, database password, operating system username, and operating system password in the dialog box, if necessary. 2. Click the Action button to toggle between granting and revoking access. 3. Do one of the following:  Enter the name of the user to be granted or revoked access in the Selected User box.  Select a name from the Access Users list.  Select a name from the All Users list. 4. Do one of the following:  To grant or revoke dictionary access, click the Apply button.  To dismiss the dialog box without granting or revoking dictionary access, click the Close button.  Choose the Help button to obtain help with granting and revoking dictionary access privileges.

Relational Interface System (RIS) Utilities Guide

45

rismgr

Modifying Schema Passwords This dialog box lets you modify the schema password.

Operating Sequence 1. Select the Modify Schema Password button from the Schema Definition dialog box.

The Modify Schema Password dialog box appears.

2. Do one of the following, if the schema you want is not already the selected schema:  Select a schema from the Schema Name list on the RIS Schema Manager dialog box.  Type a name in the Schema Name box to display information about a schema. 3. Type the new password into the New Password box. If the schema is a secure schema, the Username Password dialog box appears. Type the database username, database password, operating system username, and operating system password in the dialog box, if necessary. 4. Do one of the following:  To modify the schema password, click the Apply button. You must click the Apply button after each session to alter the schema.  To dismiss the dialog box without altering the schema, click the Close button.  To obtain help with modifying schema passwords, click the Help button.

Modifying Node Information This dialog box lets you modify node information.

Operating Sequence 1. Select the Modify Node Information button from the Schema Definition dialog box.

46

Relational Interface System (RIS) Utilities Guide

rismgr The Modify Node Information dialog box appears.

2. Select a schema from the Schema Name list on the RIS Schema Manager dialog box or type a schema name in the Schema Name box to display information about a schema, if there is no selected schema. 3. Choose the Modify Node button from the dialog box. The current addresses display in the Nodename or Address boxes. Type the new names or addresses in the boxes. This action can also be used to change the order of the protocols. 4. Choose the Modify DB User Password button. The database user associated with the schema appears in the DB Username box. This is a read-only box. 5. Type the database user password in the Password box. The No Echo/Echo button causes the password to not display (No Echo) or display (Echo) when it is entered. This action does not change the user's operating system account password. It changes only the RIS product copy of the user password. Typically, this command is executed after users change their operating system account passwords. Otherwise an error occurs. 6. Choose the Modify OS User & Password button. The operating system user associated with the schema appears in the OS Username box. Type a new username. 7. Type the operating system user password in the Password box. The No Echo/Echo button causes the password to not display (No Echo) or display (Echo) when it is entered. 8. Do one of the following:  To alter the schema, click the Apply button. You must select the Apply button after each session to alter the schema.  To dismiss the dialog box without altering the schema, click the Close button.  To obtain help with modifying node information, click the Help button.

Relational Interface System (RIS) Utilities Guide

47

rismgr

Displaying Table, View, and Index Information The Data Definition dialog box has six buttons that display information about the tables, views, and indexes defined for the specified schema, and let you make modifications. The Data Definition function performs six actions: 1. Displays table information 2. Creates tables 3. Drops tables 4. Adds a column to a table 5. Includes tables, views, and indexes from the in-memory data dictionary 6. Excludes tables, views, and indexes in the in-memory data dictionary When you click the button for one of these actions, a dialog box associated with that action appears. f the selected schema requires a password, or a database username/password and operating system username/password, the information must be entered before the dialog boxes can accept information.

Operating Sequence 1. Choose the Data Definition button from the RIS Schema Manager dialog box.

The Data Definition dialog box appears.

2. If the schema you want is not already the selected schema, do one of the following:  From the RIS Schema Manager dialog box, select a schema from the Schema Name list.  In the Schema Name box, type a name. 3. Do one of the following:  Click the button for the action you want to perform. See the section for the action chosen for further instructions.

48

Relational Interface System (RIS) Utilities Guide

rismgr  

Click the Close button to dismiss the Data Definition dialog box. Click the Help button to obtain further information about the Data Definition dialog box.

See Also Displaying Table Information (on page 49) Creating Tables (on page 50) Dropping Tables (on page 51) Appending Columns to Tables (on page 51) Excluding Tables, Views, and Indexes (on page 53)

Displaying Table Information The Table Information dialog box displays the definition of the specified table. For each column in the table, the list columns display information such as the column position, column name, DBMS column name, column type, and whether nulls are permitted in the column. Also, a box is provided to search for specific columns.

Operating Sequence 1. Choose the Table Info button from the Data Definition dialog box.

The Table Information dialog box appears.

2. To choose a table, type the table name in the Table Name box or select the table from the Type/Name list on the Data Definition dialog box.

The table information appears on the Table Information dialog box. 3. To dismiss the Table Information dialog box, click the Close button. 4. To obtain further information about the Table Information dialog box, click the Help button.

Relational Interface System (RIS) Utilities Guide

49

rismgr

Creating Tables The Create Table dialog box creates tables in the schema specified on the Data Definition dialog box. If the name of an existing table is typed in the Table Name box or selected from the Type/Name list on the Data Definition dialog box, the definition of that table is loaded into the Create Table dialog box. This can be useful when creating several similar tables. The Create Table dialog box creates new tables. It cannot be used to modify existing tables. The ability to load existing table definitions into the dialog box exists only to provide a template, or starting point, for new tables.

Operating Sequence 1. Choose the Create Table button from the Data Definition dialog box.

The Create Table dialog box appears.

2. The Create Table dialog box has two sets of control buttons. There is a set of dialog box control buttons across the bottom of the dialog box and a set of mode control buttons. The mode control buttons are used to execute and reset the different modes of the dialog box. The Create Table dialog box operates in three modes that are represented by three buttons: Insert Column - Click this button to add new columns to the table definition. If a column is selected in the Column Name list, the new column is inserted in front of the selected column. Otherwise, the new column is appended to the list. Click the mode Apply button to insert the column. Drop Column - Click this button to drop columns from the table definition. Choose the column to drop by clicking the column in the Column Name list. Click the mode Apply button to drop the column. Modify Column - Click this button to modify column definitions. Choose the column to modify by typing the column name in the Column Name Search box, or by clicking the column in the Column Name list. Click the mode Apply button to modify the column. Clicking the mode Cancel button clears the dialog box mode. 3. Type the table name in the Table Name box or select the table from the Type/Name list on the Data Definition dialog box. 4. Do one of the following:  To create the table, click the Apply button.  To clear the dialog box, click the Reset button.

50

Relational Interface System (RIS) Utilities Guide

rismgr  

To dismiss the dialog box without creating the table, click the Close button. To obtain further information about the Create Table dialog box, click the Help button.

Dropping Tables The Drop Table dialog box drops tables from the schema specified on the Data Definition dialog box. Dropping a table removes the table data, the table structure, and any associated indexes. Once a table has been dropped, it no longer exists in the database nor does it exist to RIS.

Operating Sequence 1. Click the Drop Table button on the Data Definition dialog box.

The Drop Table dialog box appears.

2. To choose the table to drop, type the table name in the Table Name box or select the table from the Type/Name list on the Data Definition dialog box. 3. Do one of the following:  To drop the table, click the Apply button.  To dismiss the dialog box without dropping the table, click the Close button.  To obtain further information about the Drop Table dialog box, click the Help button.

Appending Columns to Tables The Alter Table dialog box alters existing tables in the schema specified on the Data Definition dialog box. This dialog box corresponds to the RIS alter table command. You can append only one new column at a time to an existing table.

Operating Sequence 1. Click the Alter Table button on the Data Definition dialog box.

The Alter Table dialog box appears.

Relational Interface System (RIS) Utilities Guide

51

rismgr

2. If the table you want to alter is not already the selected table, do one of the following:  Type a table name in the Table Name box.  Select a table from the Type/Name list on the Data Definition dialog box. 3. Define the new column by entering the information in the controls of the Column Definition to Append to Table group box. The following list explains these controls. Column Name - Type the name for the new column. dbms Column Name - Type a column name for the underlying database. By default, this name is the same as Column Name, but you can specify another name. Column Type - Choose the data type for the column. Length - Choose the data length. This box remains inactive unless the data type you choose requires it. Nulls - Choose whether NULL values are allowed in the column. Toggle between yes to allow NULL values or no. 4. Do one of the following:  To append the column to the table, click the Apply button. Repeat from Step 2 to define another new column.  To clear the Alter Table dialog box, click the Reset button.  To dismiss the Alter Table dialog box, click the Close button.  To obtain further information about the Alter Table dialog box, click the Help button.

Including Tables, Views, and Indexes This dialog box includes tables, views, and indexes from the in-memory data dictionary.

Operating Sequence 1. Click the Include button on the Data Definition dialog box.

The Include dialog box appears.

52

Relational Interface System (RIS) Utilities Guide

rismgr

2. Do one of the following:  In the dbms Table Name box, type a name.  From the dbms Table Names list, select the name you want to include. 3. From the Type list, choose table, view, or index. 4. Do one of the following:  To alter the schema, click the Apply button. You must click the Apply button each time you include a table, view, or index.  To clear the dialog box, click the Reset button.  To dismiss the dialog box without altering the schema, click the Close button.  To obtain further information about the Include dialog box, click the Help button.

Excluding Tables, Views, and Indexes This dialog box excludes tables, views, and indexes from the in-memory data dictionary.

Operating Sequence 1. Choose the Exclude button from the Data Definition dialog box.

The Exclude dialog box appears.

2. Do one of the following:  In the Table Name box, type a name.  From the Table Names list, select the name you want to exclude. 3. From the Type list, choose table, view, or index. 4. Do one of the following:  To alter the schema, click the Apply button. You must click the Apply button after excluding each table, view, or index.

Relational Interface System (RIS) Utilities Guide

53

rismgr   

To clear the dialog box, click the Reset button. To dismiss the dialog box without altering the schema, click the Close button. To obtain further information about the Exclude dialog box, click the Help button.

Reviewing and Manipulating Schema Files The Schema File dialog box lets you review and manipulate schema files. By default, RIS maintains the schema file c:\Program Files\Common Files\Intergraph\risNN.nn\schemas, which tracks the schemas known to RIS.

Operating Sequence 1. Click the Schema File button on the RIS Schema Manager dialog box.

The Schema File dialog box appears.

2. Choose one of the buttons on the right side of the dialog box. If you click the Locate Schema File button, all the controls become active, letting you enter the appropriate values. The following list explains the buttons. Show Schema File Location - Produces read-only information on the specified schema file. Locate Schema File - Lets you rename your schema file or specify a different protocol. Checksum Schema File - Recomputes the checksum for the specified schema file. Checksum is a mechanism used to verify that the schema file has not been corrupted. If you manually edit the file (instead of making changes through the RIS Schema Manager), the checksum is no longer accurate. 3. Enter the appropriate values on the dialog box when the Locate Schema File button is clicked. The following list explains the controls on the Schema File form. Local, TCP - Choose a network protocol for your schema file from the check boxes. XNS and Decnet are not supported. Schema File Name - Type the name of a schema file. The full pathname for the schema file must be specified unless the RIS HOME directory (the default directory) is intended. Nodename or Address - Type the nodename or address where the schema file is located. If the complete path is not specified, the file is assumed to be located where RIS was installed. Username - Type a system user name that has access to the schema file.

54

Relational Interface System (RIS) Utilities Guide

rismgr A schema file must be readable by all users permitted to access the schemas. A schema file must be readable and writable by all users authorized to create, alter, or drop schemas. The users permitted to create, alter, and drop schemas must be able to create and delete files in the directory where the schema file is located. Password - Type a system password associated with Username. The No Echo/Echo button causes the password to not display (the default, No Echo) or display (Echo) when it is entered. 4. Do one of the following:  To locate the schema file, click the Apply button.  To dismiss the dialog box, click the Cancel button.  To obtain help with the Schema File dialog box, click the Help button.

Locating RIS Client Processes The Locate Client dialog box lets you review the location of a RIS client process or specify a new location. Use this process when there is a need to run RIS Client on a different machine.

Operating Sequence 1. Click the Locate Client button on the RIS Schema Manager dialog box.

The Locate Client dialog box appears.

2. Click the Show Client Location button to show the current location of the RIS Client process. OR Click the Locate Client button to specify a new location for the RIS Client process. 3. In the Nodename or Address box, type the nodename or address of the RIS Client machine. 4. In the Username box, type the name of the operating system user for the RIS Client machine. 5. In the Password box, type the user password, if any. The No Echo/Echo button causes the password to not display (No Echo) or display (Echo) when it is entered. 6. Choose the Local or TCP network protocol. XNS and Decnet are not supported. 7. Do one of the following:  To relocate the client, click the Apply button.

Relational Interface System (RIS) Utilities Guide

55

rismgr   

To clear the dialog box, click the Reset button. To dismiss the Locate Client dialog box without relocating the client, click the Close button. To obtain help with the Locate Client dialog box, click the Help button.

Setting Modes and Enabling Databases The Set dialog box sets the ANSI, Verify, Blank Strip, Autocommit, and Autorename modes on or off and enables various databases.

Operating Sequence 1. Click the Set button on the RIS Schema Manager dialog box.

The Set dialog box appears.

2. 3.

4. 5.

6.

56

Setting any of these functions affects only the remainder of the RIS Schema Manager session. To set modes and enable databases, click the OK button. Click ANSI Mode check box to set ANSI on or off. The default is on.  If you set ANSI Mode to on, schema, table, column, view, and index names are limited to 18 characters. Use this mode when creating names (for tables, columns, and so forth) that should be ANSI compliant (18 characters or fewer.)  If you set ANSI Mode to off, names can be up to 31 characters, based upon the underlying RDBMS. Remember, though, that these names may not be portable. If you set Blankstrip Mode to on, risunlod strips trailing blanks from character data. Set this mode to off if you want to preserve trailing blanks. If you set Verify Mode to on, table and view definitions retrieved from the database are validated against the definitions stored in the RIS dictionary tables. Setting Verify Mode to off retrieves definitions from the database only, omitting the validation. Omitting validation reduces the execution time when referencing a table or view for the first time; however, if an application dynamically creates tables and views, the definitions in the RIS dictionary tables and the DBMS may become inconsistent if Verify Mode is off. If you set Autocommit on, changes made to the Set form take effect immediately. If Autocommit is off, the changes take effect only when you select OK.

Relational Interface System (RIS) Utilities Guide

rismgr 7. If you set Autorename on, schema, table, column, view, and index names that are longer than the particular database limitation are automatically renamed to comply with the shorter length. The default is on. 8. Click the Enabled Databases check boxes to choose RDBMSs that can be used. Use this function when you want to create table or column names that conflict with the keywords of other databases. 9. Do one of the following:  To set modes and enable databases, click the OK button.  To void the process, click the Cancel button.

Relational Interface System (RIS) Utilities Guide

57

rismgr

58

Relational Interface System (RIS) Utilities Guide

SECTION 9

risplbck This utility reads a that contains a list of the RIS commands executed by an application and executes each of the RIS commands. The is generated with the risrecrd utility. RIS recording is controlled by the risrecrd utility. The risplbck utility reads a file generated by a RIS application that is executed while RIS recording is on. This file contains a list of all the RIS commands executed by the application. The risplbck utility executes each of the RIS commands and compares SQLCODEs and times. This utility is for debugging purposes only. The risplbck utility can only read files generated with the risrecrd utility of the same basic version. That is, if you generate a file with risrecrd Version 5.7, then you can play back the file only with risplbck Version 45. The risplbck utility compares the SQLCODEs of the recorded commands with the SQLCODEs of the playback commands and reports if they are different. If they are different, the action risplbck takes is specified in the action file. Each row of the action file has three fields separated by colons(:): 1) the recorded results; 2) the playback results; and 3) an action. Valid values for the two results fields are: SUCCESS - RIS command executed successfully. END_OF_DATA - RIS command returned end-of-data. ERROR - RIS command returned an error. Valid values for the action field are: STOP - Stop the playback execution. CONTINUE - Continue the playback with the next RIS command. RETRY - Retry the RIS command one time, if it fails, stop. Here is a sample row: SUCCESS:END_OF_DATA:CONTINUE The row indicates that if a command executed successfully at record time, but got an end-of-data during playback, continue with the playback anyway. By default, risplbck continues on all results. To start the risplbck utility, do one of the following:  Type risplbck in a Command Prompt window.  Choose RIS NN.nn from Start > Programs; then choose RIS Playback.  Choose RIS NN.nn from Start > Programs; then choose RIS Interactive. Choose the Utilities... button from the RIS Interactive form; then choose the RIS Playback... button from the Utilities form. If you use another utility within RIS Interactive, you must choose the Restart button before RIS Interactive is aware of any RIS parameter changes, or creating or dropping of schemas.

Usage risplbck [-?] [-V] [-n] [-i] [-c] [-d] [-t] [-f] [-v] [-o ] []

Relational Interface System (RIS) Utilities Guide

[-a ]

59

risplbck Flags - If you do not specify any command-line arguments, or if you start the utility by selecting its icon from the Program Manager, the utility runs interactively and prompts for the necessary information. -? - Display usage information and exit. -V - Display version information and exit. -n - No execute mode. Just read and validate the file. -i - Immediate playback mode. Ignore any delays. -c - Calculate command times. If command times were recorded, compare the playback command times and the recorded command times and report the difference. -d - Calculate delay times. If delay times were recorded, compare the playback delay times and the recorded delay times and report the difference. -t - Calculate total elapsed times. If elapsed times were recorded, compare the playback elapsed times and the recorded elapsed times and report the difference. -f - Fetch blob/text files into same files as recorded session. The default is to fetch blob/text files into temporary files. -v - Verbose mode. -a - Actions are defined in file . -o - Write all output to .

Examples To play back the RIS commands previously recorded in the command file load.rap and calculate command, delay, and total times, key in: risplbck -cdt -o load.out load.rap The risplbck output is written in the load.out file.

Files c:\Program Files\Common Files\Intergraph\risNN.nn\bin\risplbck c:\Program Files\Common Files\Intergraph\risNN.nn\parms c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\ris.msg c:\Program Files\CommonFiles\Intergraph\risNN.nn\config\english\messages\net.msg c:\Program Files\CommonFiles\Intergraph\risNN.nn\config\english\messages\utl.msg

Status Returns 0 - Normal termination. 1 - Abnormal termination.

60

Relational Interface System (RIS) Utilities Guide

SECTION 10

risrecrd This utility controls RIS recording for the current user. RIS recording can be turned on, turned off, and the status of recording can be queried with this utility. When RIS recording is on, any RIS command executed by any of the current users' applications are recorded and placed in . These commands can then be re-executed by the risplbck utility.  

This utility is for debugging purposes only. The risplbck utility can only read files generated with the risrecrd utility of the same basic version. That is, if you generate a file with risrecrd Version 5.7, then you can play back the file with risplbck Version 4.5.  The risrecrd utility affects only RIS applications executed by the current user. If an application is run by a user other than the current user, risrecrd has no effect.  When specifying the , the characters $$ have special meaning; they are replaced with the process ID of the RIS application. This produces unique output files every time the RIS application is run. To use the $$ characters, the name must be placed in single quotation marks; otherwise, the shell interprets the $$. For example, an name of 'risrap.$$' will generate filenames such as, risrap.1252, risrap.1323, and so forth. To start the risrecrd utility, do one of the following:  Type risrecrd in a Command Prompt window.  Choose RIS NN.nn from Start > Programs; then choose RIS Record.  Choose RIS NN.nn from Start > Programs; then choose RIS Interactive. Choose the Utilities... button from the RIS Interactive form; then choose the RIS Record... button from the Utilities form. If you use another utility within RIS Interactive, you must choose the Restart button before RIS Interactive is aware of any RIS parameter changes, or creating or dropping of schemas.

Usage risrecrd [-?] [-V] [on ] [-c] [-d] [-t] [-a] [off] [query]

Flags - If you do not specify any command-line arguments, or if you start the utility by selecting its icon from the Program Manager, the utility runs interactively and prompts for the necessary information. -? - Display usage information and exit. -V - Display version information and exit. on - Turn RIS recording on and place output in .If a full path is given for the output file, then all output is placed in the named file. If only a filename is specified, RIS stores the recorded output in a file by the directory name where the application (ris, risbatch, and so forth) was started. -c - Record command times. Store how long each RIS command took to execute.

Relational Interface System (RIS) Utilities Guide

61

risrecrd -d - Record delay times. Store the time between each RIS command. These values are used by risplbck to reproduce the commands in real time. -t - Record total elapsed time. Store the total elapsed time from the start of the application for each RIS command. -a - Append to the output file if it already exists. The default action is to overwrite the output file. off - Turn RIS recording off. query - Query the current status of RIS recording. The results are displayed on stdout.

Examples The following risrecrd command turns record on and places the output in c:\appl.rap. risrecrd -c on 'risrecrd.out'

Files c:\Program Files\Common Files\Intergraph\risNN.nn\bin\risrecrd

Status Returns 0 - Normal termination. 1 - Abnormal termination.

62

Relational Interface System (RIS) Utilities Guide

SECTION 11

risunlod This utility retrieves information about one or more RIS schemas and stores it in one or more external ASCII files. You can later reload the schemas from the ASCII files using the rislod utility. The risunlod utility is not designed for use as a backup utility. See the rislod section for more specific information. The environment variable RIS_LANGUAGE specifies the language that RIS uses for parsing and error messages. The default is English. Consult the file riscli\config\langs for other values. The representation of information must comply with the format defined in the section File Formats for risunlod and rislod (on page 79). The following figure represents the functional mechanisms of risunlod and shows the input requirements and output generated.

You cannot unload ris_blob and ris_text data; however, you can unload the table definition, which contains ris_blob or ris_text columns. To start the risunlod utility, do one of the following:  Type risunlod in a Command Prompt window.  Choose RIS NN.nn from Start > Programs; then choose RIS Unloader.  Choose RIS NN.nn from Start > Programs; then choose RIS Interactive. Choose the Utilities... button from the RIS Interactive form; then choose the RIS Unloader... button from the Utilities form. If you use another utility within RIS Interactive, you must choose the Restart button before RIS Interactive is aware of any RIS parameter changes, or creating or dropping of schemas.

Usage risunlod [-?] [-V] [-p] [-m {}] [-o ] [-s ] [-f ]

Flags - If you do not specify any command-line arguments, or if you start the utility by selecting its icon from the Program Manager, the utility runs interactively and prompts for the necessary information. -? - Display usage information and exit.

Relational Interface System (RIS) Utilities Guide

63

risunlod -V - Display version information and exit. -p - Preserve blanks. By default risunlod strips trailing blanks from character data. See the set mode statement in the RIS SQL User's Guide for 32-Bit Applications for more information. -m { } - Specify the file mode for output files. The w overwrites an existing file, the a appends to an existing file, and the e returns an error if an output file with the specified name exists. -o - Specify the main output ASCII file into which RIS schema information is to be unloaded. The default main filename is ris.dmp. -s - Specify schema and schema-related information, such as tables, indexes, views, and grants. Alternatively you can store this information in a specification file. -f - Specify the name of the specification file for . This option cannot be used with the -s option. See the section Using rislod with the CommandLine Interface (see "Using rislod with the Command Line Interface" on page 32) for more information.

Files c:\Program Files\Common Files\Intergraph\risNN.nn\bin\risunlod c:\Program Files\Common Files\Intergraph\risNN.nn\parms c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\ris.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\net.msg c:\Program Files\Common Files\Intergraph\risNN.nn\config\english\messages\utl.msg

Status Returns 0 - Normal termination. 1 - Abnormal termination. The risunlod utility unloads user-requested RIS schema objects (items) into external ASCII files from RIS schemas. The risunlod utility can unload:  Schema definitions  Table definitions  Table data  Partial table data using an extended where clause  Index definitions  View definitions The risunlod utility does not unload a view that has a NULL in the RIS_VIEW_DEFS column in the RIS_VIEWS dictionary view. This condition exists when a schema is created on a database that has an existing view in the underlying database. Views created in RIS are not NULL in the RIS_VIEW_DEFS column.  Privilege definitions  Multiple above items in a single run  Table definition only without table data  Table data in separate data file (one for each table)  Table data in either fixed or variable format. (See the section File Formats for risunlod and rislod (on page 79) for more information.) As discussed earlier, risunlod requires that all schema information be unloaded before starting the actual unloading. The schema information is unloaded into the main external file (the default is ris.dmp) and/or additional data files, if you want. Multiple schema information can be unloaded in the same main file during a single risunlod execution. Enhanced features of risunlod include:

64

Relational Interface System (RIS) Utilities Guide

risunlod 

You can open the external main file and data files in overwrite or append mode. An error is reported if files with the specified names already exist.  All the schema item statements (such as create schema, create table, insert table, table field definition, create index, create view, and grant) are unloaded into the main file. If the user wants, risunlod can unload the table data into separate data files, one for each table.  The risunlod utility provides a risunlod extended where clause to unload partial data from one table. The risunlod extended where clause has two parts:  A join clause that lets the user provide powerful selection criteria to unload partial data from one table while joining across different tables. The join clause is optional.  A sql-where clause. For example, the following risunlod extended where clause for table t1 unloads partial data from table t1 while joining across table t2. join t2 where t1.c1 = t2.c1 and t1.c2 > t2.c2 There are three ways to interact with risunlod: using the Interactive Interface, the Command Line Interface, or the Embedded Programming Function Interface. Interactive Interface. When risunlod is invoked without any command line arguments, interactive prompts display. You are prompted for the required inputs before any unloading is done. See the section Using risunlod with the Interactive Interface for more information about the meanings of these prompts and the corresponding actions taken by risunlod. Command Line Interface. When risunlod is invoked with arguments, the command line interface activates. This interface lets you specify, in a single command, the responses to various prompts that would have been generated if risunlod had been invoked interactively. See the section Using risunlod With the Command Line Interface for more information about the syntax for constructing a risunlod command and the semantics of the command. Embedded Programming Function Interface. The RIS_unloader function provides the functionality of risunlod in an embedded program when you call the function and pass the appropriate structures. Refer to the RIS Programmer's Guide for 32-Bit Applications for more information.

Using risunlod with the Interactive Interface Invoking risunlod without any command line arguments displays interactive prompts. Accepting Default Values - Most prompts have default values indicated in square brackets, [ ]. Press the ENTER key to select these default values. Selecting Nondefault Values - To select a nondefault value, choose the character in parentheses corresponding to the option you want. Key in that character and press ENTER. Specifying Other Information - Some prompts ask you to enter information, such as filenames. Key in the information requested and press ENTER.

Interactive Prompt Details 1. Preserve blanks? (y/n) :[n] > This prompt lets you set the blankstrip mode. By default risunlod strips trailing blanks from character data. Do one of the following:  Press ENTER to accept the default if you do not want to preserve trailing blanks.  Select y if you want to preserve trailing blanks.

Relational Interface System (RIS) Utilities Guide

65

risunlod 2. File mode of all output files? overwrite(w) append(a) error out if exists(e) :[e] > The file mode affects the main file and all the data files. By default risunlod returns an error if the specified main file or data files already exist. Do one of the following:  Press ENTER to accept the default.  Select w to overwrite the existing main file and data files.  Select a to append to the existing main file and data files. 3. Main file for unloading: [ris.dmp] > This prompt lets you specify the name of the main file for unloading. The default name for the main file is ris.dmp.  Press ENTER to accept the default filename.  Enter another filename for the main file. If you selected e (for error out if exists) at the File mode of all output files? prompt, and a main file already exists, risunlod prompts you to quit unloading or to key in another filename. Quit risunlod(y/n) :[n] > If you select n, risunlod prompts you for a new name for the main file. Specify a new filename at this prompt or key in y and risunlod exits. 4. Enter schema name ( after last schema): > This prompt lets you specify a schema for unloading. If a secure schema name is entered, the user is prompted for the database username and database username password, and the osusername and osusername password, if appropriate. If the schema has a password, the user is prompted for the schema password. Do not add the password at the end of the schema name. The schema and user passwords in a schema definition are not unloaded into the main file for security reasons. Instead, they are designated by a period immediately after the schema and user names. If the passwords are not added to the main file before loading, the user is prompted for them when loading the schema. Do one of the following:  Enter the name of the schema to unload. risunlod displays additional prompts to gather schema information, then returns to this prompt to let you specify another schema. You can unload multiple schemas during a risunlod session. Within a schema, data are unloaded in the following order: tables, indexes, views, and privilege definitions.  Press ENTER without entering another schema name when you have entered all the schema information you want to process. risunlod will process the entered schemas.  Press ENTER without entering any schema names, and risunlod terminates. 5. Which tables should be unloaded? all(a) prompted(p) entered by user(e) none(n):[a] > This prompt lets you specify which table(s) to unload from the specified schema. Do one of the following:  Press ENTER to unload all the tables in the current schema.  Select p and risunlod generates a list of tables and prompts you before unloading each table: Unload table (y/n): [y] > Select y to unload the specified table or select n if you do not want to unload the table.

66

Relational Interface System (RIS) Utilities Guide

risunlod 

Select e and risunlod prompts for a table name: Enter table for unloading:[] Enter the name of a table to unload.  Select n and risunlod does not unload any tables for the schema. If you selected a, p, or e at the Which tables should be unloaded? prompt, the following prompt appears: Both definitions and data(b) definitions only(o): [b] > This prompt lets you decide whether to unload both the table definitions and the data in the tables or only the table definitions. Do one of the following:  Select o to unload table definitions only.  Press ENTER to unload both table definitions and data and the following prompt appears: Definitions and data in the same file(s) data in a different file(d):[s] > Press ENTER to store both the definitions and data in the main file, or select d to store the definitions in the main file and the data in data files with one data file per table. The name of a data file is composed of the first three characters (or fewer) of a schema name, followed by the first three characters (or fewer) of a table name, followed by a number signifying the number of data files generated so far in a risunlod session. The name of a data file is terminated by .dmp. For example, the 100th data file generated for storing the data in table, tab1, of schema, sch1, has the name schtab100.dmp. All these files are placed in the current directory. On the first line of a data file, risunlod specifies the table and schema from which the data comes. If you selected a, p, or e at the prompt Which tables should be unloaded? and selected b to unload both definitions and data, risunlod prompts you for a fixed or variable data format for unloading table data. Data in fixed (f) or variable (v) format: [f]> Do one of the following:  Press ENTER to unload the table data in fixed format and data that does not fill the entire column is padded with spaces.  Select v and variable length data will be delimited by single quotation marks ('). This saves disk space, and lets you easily edit the data. If you selected p or e at the prompt Which tables should be unloaded?, you are also prompted for an extended where clause for each table to unload partial data. Enter where clause :[return] > Do one of the following:  Press ENTER to ignore the where clause prompt.  Enter a where clause. This where clause is an extended where clause. It lets you join across more than one table for powerful selection criteria. Examples of the where clause: Enter where clause: [return] > c1 = 100 and c2 not like 'john' ENTER Enter where clause: [return] > join t2 where t1.c1 = 100and t2.c2 not like 'john' and t1.c1 = t2.c1 ENTER The join clause permits additional tables to be specified for better selection criteria. In the previous example, the current table is joined with t2 using the join clause.

Relational Interface System (RIS) Utilities Guide

67

risunlod Partial data can be unloaded only from the current table, even when a join clause is specified. Use single quotation marks (') for character strings. 6. Which indexes should be unloaded for a table? all(a) prompted(p) entered by user(e) none(n):[a]> If you selected p or e at the prompt Which tables should be unloaded?, you should key in n at the prompt Which indexes should be unloaded for a table? unless indexes on additional tables are required. risunlod automatically unloads indexes created on the tables selected as p or e at the Which tables should be unloaded? prompt. Do one of the following:  Press ENTER to unload all the indexes created in the current schema.  Select p and risunlod prompts for each table that has indexes: Unload index on table (y/n):[y] > Press ENTER to unload the indexes of that table or key in n if you do not want to unload indexes.  Select e and risunlod prompts you to enter the table: Enter table for unloading index:[] > Enter a table name and press ENTER.  Select n, and risunlod will not unload any indexes. 7. Which views should be unloaded? all(a) prompted(p) entered by user(e) none(n):[a] > The prompt for unloading views in a schema comes after the prompt(s) for unloading the indexes. Do one of the following:  Press ENTER to unload all the views created in the current schema.  Select p, and risunlod prompts for each view: Unload view (y/n):[y] > Press ENTER to unload the view or key in n if you do not want to unload the view.  Select e and risunlod prompts you to enter a view name: Enter view for unloading:[] > Enter a view name and press ENTER.  Select n, and risunlod will not unload any views. 8. Which privileges should be unloaded? all(a) prompted(p) entered by user(e) none(n):[a] > The prompt for unloading privilege definitions comes after the prompt(s) for unloading views. As is the case with unloading indexes, risunlod automatically unloads privilege definitions granted on tables and/or views that were p or e selections to the Which tables should be unloaded? and/or Which views should be unloaded? prompts. Do one of the following:  Press ENTER to unload all the privileges created in the current schema.  Select p, and risunlod prompts for each table or view on which one or more privileges are defined: Unload access privilege on (y/n):[y] > Press ENTER to unload the access privileges or key in n if you do not want to unload the privileges.

68

Relational Interface System (RIS) Utilities Guide

risunlod 



Select e and risunlod prompts you to enter a table to unload all the privileges defined: Enter table or view for unloading access privilege:[] > Enter a table or view name and press ENTER. Select n, and risunlod will not unload any privileges. In a schema, privileges may be granted on a table or view owned by the schema or by another schema. Privileges granted on a table or view owned by another schema are illustrated in the following example. Schema sch1 grants select privilege on its table tab1 to another schema sch2 with grant option. Schema sch2 can then grant the select privilege on sch1.tab1 to yet another schema sch3. Thus in schema sch2, a privilege on the table (tab1) belonging to another schema (sch1) is defined. The following command line option illustrates the previous example: risunlod -s sch2 grant sch1.tab1 When specifying a table or view on which privileges have been granted, only the name of the relation is needed if it is owned by the current schema. Otherwise, the relation name must be preceded by a schema name in the form of ..

Using rislod with the Command Line Interface The command line can be used to specify which schemas in the main file should be loaded. It can also be used to specify which information in the schemas should be loaded. The syntax for constructing a rislod command is almost the same as the syntax for constructing a risunlod command, except for a few additions and changes.

Examples rislod -i \dir1\dir2\mainfile -d\" -l load.log ..\dir3\specfile -n -mw -e rdb informix -c 15

-b load.bad-f

-i - Main filename. The default is ris.dmp. -d - Delimiter. The default is a single quotation mark ('). The delimiter in this example is a double quotation mark. The backslash before the delimiter causes the shell not to interpret the double quotation mark. -l - Log filename. The default is ris.log. -b - Bad filename. The default is ris.bad.The delimiter in this example is a double quotation mark. The back slash before the delimiter causes the shell not to interpret the double quotation mark.

Additional Options -n - ANSI mode off. -e - Enable databases listed after this option. -m - Set the file mode (w, a, or e) for the outputfiles (such as log and bad files). -c - Commit interval. rislod -s sch1.create_sch_passwd1.user_passwd1 all -s sch2 .create_sch_passwd2 .user_passwd2 new table with data all -s sch3 clear table with data t1 t2 grant all -s sch4 rename sch5 .sch5pass table t1 index t2 view v1grant t2 v2 sch.t3 sch.v3

Relational Interface System (RIS) Utilities Guide

69

risunlod rislod lets you specify up to three passwords after a schema name (schema password, osuser password, and user password). Passwords are necessary if they are not already stored in the main file. For schema sch2, data is loaded only into newly created tables. For schema sch3, data is loaded into tables t1 and t2 after deleting previously inserted rows even if it already exists before loading. For schema sch4 all the following items are loaded into existing schema sch5. No data is loaded into table t1, but index definitions on table t1 and privilege definitions on table t1 and view view1 are loaded. The specification file format is the same for both rislod and risunlod.

BNF Representation of risunlod Command Line Syntax Backus Naur form (BNF) is a method of describing the syntax of a language. It is used here to show the capabilities of the RIS command line interface. The following is the BNF representation of the syntax for constructing a command line. ::= risunlod [-m ] [-o ] { { -s [.] [osuser [.]] [user [.]] [] } [ ...] | -f } ::= w | a | e w represents overwrite file mode a represents append file mode e represents return error ::= all | { [ { {| table with [var][dfile]data} } ] [view ] [index ] [grant ] } ::= all | {{ [] } [ ...] } ::= [join ] where "" ::= { [...] } ::= all | { [ ...] }

70

Relational Interface System (RIS) Utilities Guide

risunlod ::= all | { [ ... ] } ::= all | { {[.] | [. ] } [ ...] }

The following is the BNF representation of the format for a specification file. ::= {[.] }[;...]

Relational Interface System (RIS) Utilities Guide

71

risunlod

72

Relational Interface System (RIS) Utilities Guide

SECTION 12

Additional Information on RIS This section describes changes between RIS version 4 and RIS version 5.

RDBMS Versions For the most current information concerning RDBMS version compatibility for supported RIS platforms, see the readme.txt file.

UNION and UNION ALL Supported RIS Version 5 and higher supports UNION and UNION ALL operators with the select statement. For example: select * from t1 union select * from t2; select c1, c2 from t1 union all select c21, c22 from t2; UNION and UNION ALL are not supported in 'subqueries.' See the RIS SQL User's Guide for 32-Bit Applications for more information.

Objects of Different Owners within a Schema In RIS Version 5 and higher a schema can contain objects owned by multiple users. For example, schema S1, created by RDBMS user U1, can contain objects owned by RDBMS users U2 and U3, as well as those owned by U1. This capability:  Is a fundamental redefinition of a schema to be simply a named collection of objects in a database.  Lets data owned by privileged accounts be included without views or security violations.  Allows sharing of common objects among schemas. For example, table T1, created by user U1, can be shared by schemas S1, S2, and S3, where S1 was created by user U1, S2 by user U2, and S3 by user U3.  Lets applications easily create logical groupings of tables. Considerations when using this capability:  Since objects owned by different users can be included in the schema, the owner information is maintained in the RIS dictionary. The dbms_owner value applies to a table, view, or an index, and can be in upper or lowercase.  This capability cannot be accessed through RIS Version 4.  The access restrictions of the underlying RDBMS are encountered when using this capability.  Most databases let two different users create tables/views/indexes with the same name. However the names of tables/views/indexes within a schema are unique, regardless of the dbms_owner. If both T1 owned by U1, and T1 owned by U2 need to be included in a schema, one of the tables has to be aliased. See the section Object Aliases for more information.

Relational Interface System (RIS) Utilities Guide

73

Additional Information on RIS

Object Aliases With RIS Version 5 and higher, any column or table name can be given an alias. For example, table abc_123 with columns abc1, abc2, and abc3, can be included and referred to as EMPLOYEES with columns FIRST_NAME, GENDER, and DATE_OF_BIRTH, respectively. This capability:  Lets identically-named tables owned by different RDBMS users exist in a single schema. For example, suppose three different users create three different tables with the same name: DBMS: PROJ1.NAMES, PROJ2.NAMES, PROJ3.NAMES These tables must be aliased so that they have distinct names. SCHEMA1: NAMES1, NAMES2, NAMES3 Names in RIS can be longer than the underlying database supports. See the RIS SQL User's Guide for 32-Bit Applications for more information.  Object names and keyword conflicts can be worked around. For example, if a column name is a RIS keyword, such as t1(informix, oracle, db2), it can be included as t1(col1, col2, col3). Considerations when using this capability:  An exclude/include sequence loses all aliases.  This capability cannot be accessed through RIS Version 4.  Within RIS only the RIS names (aliases) are valid. The external/DBMS name is not valid.

Multi-user, Secure Schema In RIS Version 5 and higher two types of schemas are supported: the standard schema and the secure schema. The standard schema is a single-user schema and the information necessary for connecting to this schema is stored in the schema file (this is no different from a RIS Version 4 schema). The secure schema has no username/password combination stored for it. The RIS single user schema is the default. This multi-user/secure schema capability:  Allows no connection until a user provides a username/password combination.  Lets you use the same schema, but provide different RDBMS log-ins. Considerations when using this capability:  No password is stored in any form by RIS.  Individuals appear distinct to the RDBMS and are subject to RDBMS security tracking.  The declare schema statement lets you specify a schema name and password, and optionally, the user and password of the user who owns the schema, and the operating system user and password in the RIS in-memory data dictionary cache. This statement must be used to access secure schemas. It can also be used to access standard schemas. See the RIS SQL User's Guide for 32-Bit Applications for more information. This capability can be used by any site. It is most useful to those interested in high levels of security (usually DB2, ORACLE, and so on).  The schema administrator (user who creates the schema) controls authority to connect to a schema and to create tables on a schema, using: GRANT CONNECT TO ; REVOKE CONNECT FROM ; GRANT RESOURCE TO ;

74

Relational Interface System (RIS) Utilities Guide

Additional Information on RIS

 

REVOKE RESOURCE FROM ; A username/password combination should be provided before a schema is open. There is case-sensitivity of the RDBMS username (except in cases where some databases accept names in a particular case; then RIS does a conversion).

Shared Dictionaries In RIS Version 5 and higher when a schema s1 is created and creates the dictionary, schemas s2, s3, s4, and so on can be created using the dictionary created by schema s1. This capability:  Allows multiple schemas in databases that cannot have tables of the same name.  Requires minimal dictionary creation when there are many schemas.  Allows limited dictionary creation, administration, and ownership outside of RIS for Microsoft SQL Server. Considerations when using this capability:  The system administrator must grant and revoke an RDBMS user the authority to create a schema on a dictionary, using: GRANT SCHEMA TO ; REVOKE SCHEMA FROM ;  Creators of dictionaries cannot drop all their schemas while there are other schemas in the dictionary.

Dictionary Objects Dictionary objects in RIS Version 5 and higher are all renamed (ris5*). This capability:  Removes the distinction between ris* and ris_*.  Makes RIS dictionary objects now appear in the dictionary views. Considerations when using this capability:  Additional columns are needed to distinguish among schemas in shared dictionaries, to distinguish between user objects and dictionary objects, and for internal/external object names.  Names may need to be changed in queries.  New columns should be considered in queries.

Dictionary Views In RIS Version 5 and higher, the internal tables are not documented and information about them is not available in the dictionary. Only dictionary views can be accessed from an application. In RIS Version 5 and higher, since the base tables are not accessible from the applications, the views show both user objects and RIS objects. Considerations:  If only user objects need to be selected, the condition ris_object='N' should be used in the where clause.  This rule applies to the views ris5columns, ris5column_privs, ris5tables, and ris5table_privs.  In Version 5 and higher, the ris5dbms_tables view lists all the tables in the database, along with the user that owns the database. The ris5dbms_views view lists all the views in the database, along with the user that owns the database. The ris5dbms_indexes view lists all

Relational Interface System (RIS) Utilities Guide

75

Additional Information on RIS the indexes in the database, along with the user that owns the database. In some cases, these lists may include only those tables/views/indexes accessible to the current log-in/user of the database. These views are not recommended for use by applications. If used, the query should have some restrictive condition (specifically, WHERE). Using select * from these views can lead to significant performance degradation. Since this view is defined to show everything, it should be used with caution. In some cases these views are accessible only for the dictionary creator since some databases do not allow granting system privileges on catalogs (where these views are defined).

Internationalization RIS for 32-bit applications (Version 5.3.1 and later) support 16-bit or multi-byte languages. Most 16-bit languages are Asian. In the RIS documentation, the maximum size allowed for table names, view names, index names, schema names, column widths, and character data is specified as x characters, where x is an integer. For those using multi-byte languages, the maximum number of characters should be interpreted as the maximum size in bytes. RISMGR and RISGUI implement multi-byte character support. RIS limitations and guidelines:  RIS schema and user names can be internationalized, but not passwords.  Only alpha-numeric characters can be internationalized.  Setup is not fully internationalized.  RIS does not localize dialogs, gadgets and error messages.  RIS is internationalized on Windows only. The RIS application, RIS Client, and RIS Data Server must be on Windows to take advantage of the RIS internationalization.  The period (.) used between username and passwords must be 8-bit English.  All punctuation, keywords, column datatype definitions, timestamp data, statements must be 8-bit English.  Schemas, tables, views, columns, index names can be 8-bit or 16-bit English characters.  RIS data dictionary tables and views are created using 8-bit English characters. The following components of a create schema statement are 8-bit and 16-bit characters.

76

create schema

8-bit English

schema name

8-bit and 16-bit English

schema pass

8-bit English

db type

8-bit English

dbname

8-bit and 16-bit English

db dir

8-bit and 16-bit English

osuser

16-bit English

ospass

8-bit English

db user

8-bit and 16-bit English

remote clause

8-bit English

Relational Interface System (RIS) Utilities Guide

Additional Information on RIS Character columns are analyzed to make sure that they are wide enough to hold the data. For example, a 10 character name in a 16-bit language requires a char(20) column. The maximum number of 8-bit characters in a column is 240. The maximum number of 16-bit characters in a column is 120.

Relational Interface System (RIS) Utilities Guide

77

Additional Information on RIS

78

Relational Interface System (RIS) Utilities Guide

SECTION 13

File Formats for risunlod and rislod The risunlod and rislod utilities use two types of files: the main file and data files.  The main file contains the schema, table, index, view, and privilege definitions.  Table data, however, can be stored in either the main file or a data file. The representation of the information in a schema starts with one or two statements specifying the schema and ends with an end of schema indicator. In between, tables, views, and privilege definitions are represented. As far as rislod is concerned, there is no order of appearances defined for any two pieces of information in a schema. However, because risunlod unloads tables before views, and views before privilege definitions, information in a schema appears in that order ( if the main file is prepared by risunlod ). The information in a schema is represented in the main file by:  SQL Statements  Field Definitions  Lines of Data  Data File Specifications  Dend Indicators The following may apear in the main file: default schema - Specifies a schema create [secure schema] - Defines a schema create table - Defines a table insert into - Specifies a list of columns to be loaded with data field definition - Specifies where in the main file or a data file the values of each column of a table are located line of data - Represents one row of data in a table data file - Specifies the data filename specification end of table - Indicates where information from a indicator - table ends in the main file create index - Defines an index create view - Defines a view grant - Defines access privilege end of schema - Indicates where information from a indicator - schema ends in the main file Commented lines have two hyphens (--) as the first two characters in the line. The loader ignores commented lines. The default schema and create [secure] schema statements can appear by themselves or together. Their presence marks the beginning of a schema, represented in the main file. Because multiple schemas can exist in the main file, an end of schema indicator is used to mark the end of a schema: ***RIS*** End of Schema ***RIS*** The items from create table through the end of table indicator in the preceding list are used to represent tables. The order in the representation is:

Relational Interface System (RIS) Utilities Guide

79

File Formats for risunlod and rislod  create table statement  insert into statement  field definition  lines of data or a data files specification  end of table indicator Not all of the statements are needed to represent a table. The presence of these statements is defined by three rules: 1. The create table statement and an end of table indicator are required. 2. The insert into statement and a field definition are required only when data or a data file specification is present. 3. The insert into statement and a field definition are permitted even if data or a data file specification is not present. Rules 1 and 2 cover the situation where only the definition of a table is unloaded. Since both the insert into statement and field definition are needed for loading table data, Rule 2 covers situations where one or more rows of data are unloaded into either the main file or a data file. Rule 3 covers the situation where a table is empty, but risunlod is instructed to unload data from the table. The number of statements representing a table may vary. For rislod to correctly identify where the information of a table ends in the main file, an end of table indicator is necessary: ***RIS*** End of Table ***RIS*** The representation of index, view, and privilege definitions is much simpler than that of a table. The definitions are represented by the create index, create view, and grant statements, respectively.

See Also Format for Representing Schema Definitions (on page 80) Format for Representing Table Definitions (on page 81) Format for Representing Insert Into Statements (on page 81) Format for Representing Field Definitions (on page 81) Format for Representing Table Data (on page 83) Format for Representing Data File Specifications (on page 83) Format for Representing Index, View, and Privilege Definitions (on page 84) File Format for Data Files (on page 84) Use of Spaces and New Line Characters (on page 84) BNF Representation of File Formats (on page 85)

Format for Representing Schema Definitions When representing a schema that already exists, a default schema statement specifying that schema is sufficient. However, if a schema needs to be created during loading, a create [secure] schema statement defining the schema must be specified. This create schema statement should be preceded by a default schema statement, if the on database clause is not specified. In loading a create [secure] schema statement, if rislod finds that the schema specified already exists, the statement is transformed into a simple default schema statement. Then information is loaded into the existing schema. Since risunlod assumes that a schema does not exist before loading, it always unloads the complete definition of the schema. If the schema or user clause has a password associated with it, and you do not want to leave the password in the main file, the password should be designated by a period right after the name. In loading a default schema or create [secure] schema statement, when rislod finds a period alone after the schema or username, it prompts for the missing password. The

80

Relational Interface System (RIS) Utilities Guide

File Formats for risunlod and rislod password keyed in is not echoed on the screen. Note that rislod does not store either the schema or the user password in the main file. The following are some sample default schema and create [secure] schema statements that are accepted by rislod. Do not use a semicolon for termination. 1. default schema sch1 2. create [secure] schema sch2.passwd2 on database (oracle, dbname db2) user user2 3. default schema sch3 4. create schema sch4. user user4.passwd4

Format for Representing Table Definitions A table definition is represented by a create table statement. This statement is mandatory in representing a table. The following is an example of a create table statement accepted by rislod: create table tab1 (char_col1 char(10) not null, char_col2 char(10),int_col int, smallint_col smallint, double_col double, real_col real, decimal_col1 (10, 7), decimal_col2 (1,0),decimal_col3 (1,1))

Format for Representing Insert Into Statements The rislod utility uses an insert into statement as a template for loading each row of data into a table. This statement and a field definition are required only when data or a data file specification for the table are present in the main file.The following is an example of an insert into statement defined on table tab1, with seven columns, accepted by rislod: insert into tab1 (char_col1,char_col2, int_col, smallint_col,double_col, real_col, decimal_col1) values (?, ?, ?, ?, ?, ?, ?) You should specify only the columns that need to be loaded after the table name. The number of question marks in the values clause must match the number of columns being specified. The columns decimal_col2 and decimal_col3 of the table tab1 have been left out because only NULL values are loaded into these columns.

Format for Representing Field Definitions The rislod utility can load fixed or variable table data. rislod determines whether table data is fixed or variable by examining the line immediately following the insert into statement. This line is referred to as a field definition. If rislod detects ***variable*** as the first 14 characters in the field definition, it assumes that the table data following the field definition is in variable format. Otherwise, it assumes that the table data is in fixed format. For rislod to know where to get table data, table locations must be specified. rislod assumes that:  Data in a table are stored after their field definitions  Each row of data in the table occupies one line  Values of a column occupy the same positions on all the lines. Because of these assumptions, only the positions occupied by each column on a line need to be specified in the field definition. Thus, a field definition is typically made up of one or more components, one for each column, consisting of a column name and the starting and ending

Relational Interface System (RIS) Utilities Guide

81

File Formats for risunlod and rislod positions of the column data on a line. In rislod, the combination of a column name and its starting and ending positions is referred to as a field. The following is an example of a field definition for table tab1 accepted by rislod: char_col1 1 12 char_col2 14 23 int_col 25 35 smallint_col 37 42 double_real_col 44 66 real_col 68 81 decimal_col1 83 94 decimal_col2 95 109 

The starting and ending positions of a field are constrained by the following relation: 10,000 >= ending position >= starting position >= 1.

  

The starting and ending positions of a column should be separated by one or more spaces. risunlod uses a single blank to separate the starting and ending positions. The keyword var following a column name distinguishes a character column having variable-length values from a character column having fixed-length values.  The absence of the keyword var after a character column name signifies that the column values have the same length.  The values of a variable character column are represented differently from those of a fixed character column. A variable character column value is always enclosed by a delimitation, while the value of a fixed character column is assumed to occupy the entire field.  Because a character column supported by RIS can store values of different lengths, it is always unloaded as a variable character column.  The delimitations used by risunlod are two single quotation marks. The field definition for a table must include all the columns listed in the insert into statement of that table. However, columns that are not listed in the insert into statement may also appear in the field definition. The column decimal_col2 in this example was not specified in the insert into statement for table tab1. The conventions used by risunlod for determining the field width of a column are as follow: character - The column length plus two extra spaces for delimitation decimal - The precision plus two integer - 11 small integer - 6 double - 23 real - 14 risunlod can unload table data in variable format, and rislod can load the same variable formatted data. The variable table data is identified by the string ***variable*** in the field definition line. This string is sufficient to identify variable table data following it. Starting and ending position does not make sense in this format. The column data is separated (delimited) by a blank space, while the character data of a column is delimited by default single quotation marks ('). The following is an example of a field definition line and several rows of variable data. Notice the third row. The delimiter can be escaped from within the string by an extra delimiter preceding it. ***variable*** 1 'nyz' 23 'nyzabc' 246 'nyz''abc' ***RIS*** End of Table ***RIS***

82

Relational Interface System (RIS) Utilities Guide

File Formats for risunlod and rislod

Format for Representing Table Data In the main file or a data file, each row of table data occupies one line. The following is an example of a row of data for the table tab1: 'xxxx' yyyy -1234567890 -123.456 1.234567e+20 +123.4567890-1. This example is prepared according to the field definition for the table tabl1. In this example, the column char_col1 is a character column with variable-length values. Thus, its value, xxxx, is enclosed in a delimitation (two single quotation marks). The column char_col2 is a character column with fixed-length values. There is no delimitation surrounding its values, and these values are assumed to occupy the entire fields. In this example, the value for the column char_col2 is a string of four ys followed by six blanks. NULL value is not represented by the keyword NULL in the format. Instead, if a column value is NULL, the entire field for storing that value should be filled with blanks (not spaces). In this example, the value for smallint_col is NULL. Although in the previous example all the values begin at the first positions in their fields, a column value can actually start anywhere within its field. The following describes how rislod handles the values of different datatypes stored in a file. 1. In the field of a variable character column, the first and last nonspace characters must be delimiters. A delimiter is permitted among the character values. If there are more characters within a pair of delimiters than the size of the column (n), only the first n characters are loaded. 2. If the field width (m) is greater than the size of a fixed character column (n), only the first n characters in the field are loaded. Otherwise, all m characters are loaded with (m - n) trailing blanks. 3. A decimal value must have precision and scale no greater than that specified for the column. 4. For an integer or small integer value to be loaded correctly, it must fall within the ranges of -2,147,483,648 to 2,147,483,647 and -32,768 to 32,767, respectively. 5. Real and double values are rounded to precisions 7 and 15. 6. Values of timestamp type are also supported.

Format for Representing Data File Specifications A data file specification specifies the location of a data file. The following are some examples of data file specifications: ***RIS*** schtab100.dmp ***RIS*** ***RIS*** \sub_dir1\sub_dir2\schtab100.dmp ***RIS*** ***RIS*** ..\sub_dir2\schtab100.dmp ***RIS*** risunlod specifies the complete pathname of a data file in a data file specification. Note that a data file specification must start at the first column of a line.

Relational Interface System (RIS) Utilities Guide

83

File Formats for risunlod and rislod

Format for Representing Index, View, and Privilege Definitions An index, view, or privilege definition is represented by a create index, create view or grant statement. The following are some examples of index, view, and privilege definitions: create unique index indx1 on tab1 (char_col1, char_column2) create view view2 as select * from view1, tab2 where view1.coln = tab2.colm grant all on tab1 to sch2 with grant option grant select, insert on sch1.tab1 to sch3 grant select on view1 to sch2, sch3

File Format for Data Files A data file may begin with an informative header in the form of: ***RIS*** Data in Table of Schema ***RIS*** This header is optional. The header is followed by zero or more lines of data. The format for representing a line of data in a data file is the same as the format defined for the main file. The header must start at the first column of the first line.

Use of Spaces and New Line Characters rislod is tolerant of the number of spaces (a blank or tab character) used to separate two words or a word from a punctuation mark. In the BNF representation, when a blank is used to separate two adjacent entities on a line, the blank can be replaced by any number of spaces. This does not apply to a single blank used in the end of schema and end of table indicators. When no blank is used to separate two adjacent entities on a line of the BNF representation, then zero or more spaces can be used to separate the entities. End indicators, data file specifications, and data file headers must start at the first column of a line. Other types of statements and rows of data can start at any column on a line. A line must be terminated with a single new line character. A line containing a row of table data is terminated by a new line character. If the data line contains trailing blanks, these trailing blanks need not be specified. For instance, if a row of data contains only NULL values (represented by blanks in the entire field), the line where the row of data is stored may contain zero or more blanks terminated by a new line character. A space is not necessary to separate any two consecutive column values on a line.

Comments and Errors For example: --This is a comment. --This is another comment. These are also used to represent errors encountered during loading in the bad file. This bad file is reprocessable by rislod. For example:

84

Relational Interface System (RIS) Utilities Guide

File Formats for risunlod and rislod --risloder Error (-xxxx) --ssss --RIS Error (-xxxx) --ssss --DB Error (-xxxx) --ssss The xxxx represents the error value, and ssss represents the corresponding error message string.

BNF Representation of File Formats The format of the main file is defined by , and the format of a data file is defined by in the following BNF representation. ::= [...] ::= [][...] ::= |||| ::= | ::= default schema ::= |[.[]] ::= create [secure] schema [on database (...)] user ::= |[.[]] ::= ***RIS*** End of Schema ***RIS*** ::= | [|]

Relational Interface System (RIS) Utilities Guide

85

File Formats for risunlod and rislod ::= ***RIS*** End of Table ***RIS*** ::= create table ({ [not null]}[,...]) ::= insert into ([,...]) values (?[,...]) ::= { {[var ] }[ ...] ***variable*** } ::= { ||||| } [...] ::= ***RIS*** ***RIS*** ::= create [unique] index on ( [,...]) ::= create view [([,...])] as ::= grant [.] to [,...] [with grant option] ::= [][][...] ::= ***RIS*** Data in Table of Schema ****RIS*** ::= -- []

86

Relational Interface System (RIS) Utilities Guide

Index A Additional Information on RIS • 73 Appending Columns to Tables • 51

B BNF Representation of File Formats • 85 BNF Representation of rislod Command Line Syntax • 33 BNF Representation of risunlod Command Line Syntax • 70

C Creating Schemas • 39 Creating Schemas (Microsoft SQL Server) • 42 Creating Schemas (ORACLE) • 41 Creating Tables • 50

D Dictionary Objects • 75 Dictionary Views • 75 Displaying Schema Information • 38 Displaying Table Information • 49 Displaying Table, View, and Index Information • 48 Dropping Schemas • 43 Dropping Tables • 51

E Excluding Tables, Views, and Indexes • 53 Exiting the risgui Utility • 20

F File Format for Data Files • 84 File Formats for risunlod and rislod • 79 Format for Representing Data File Specifications • 83 Format for Representing Field Definitions • 81 Format for Representing Index, View, and Privilege Definitions • 84 Format for Representing Insert Into Statements • 81 Format for Representing Schema Definitions • 80

Relational Interface System (RIS) Utilities Guide

Format for Representing Table Data • 83 Format for Representing Table Definitions • 81

G Getting Started • 9 Granting/Revoking Access Privileges to Secure Schemas • 43

I Including Tables, Views, and Indexes • 52 Internationalization • 76

L Loading Index, View, and Privilege Definitions • 27 Locating RIS Client Processes • 55

M Modifying Node Information • 46 Modifying Schema Passwords • 46 Multi-user, Secure Schema • 74

O Object Aliases • 74 Objects of Different Owners within a Schema • 73 Obtaining Dictionary Access • 45 Options • 21

P Performing Queries in the risgui Utility • 20 Preface PDS • 7

R RDBMS Versions • 73 Restart • 21 Reviewing and Manipulating Schema Files • 54 RIS Schema Manager • 36 risbatch • 11 risclnsr • 13 risdcode • 15 risdtype • 17 risgui • 19

87

Index rislod • 23 rismgr • 35 risplbck • 59 risrecrd • 61 risunlod • 63

S Schema Definition • 37 Set • 22 Setting Modes and Enabling Databases • 56 Shared Dictionaries • 75 Show • 22

T The Bad File • 27 The Log File • 26

U UNION and UNION ALL Supported • 73 Use of Spaces and New Line Characters • 84 Using rislod with the Command Line Interface • 32, 69 Using rislod with the Interactive Interface • 28 Using risunlod with the Interactive Interface • 65 Utilities • 21

88

Relational Interface System (RIS) Utilities Guide

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF