risutil

March 22, 2018 | Author: Ram Murty | Category: Command Line Interface, Oracle Database, Bracket, Databases, Sql
Share Embed Donate


Short Description

Access...

Description

RIS Utilities Guide for 32-Bit Applications August 1996 DNA111760 Version 5.4

Warranties and Liabilities All warranties given by Intergraph Corporation about equipment or software are set forth in your purchase contract, and nothing stated in, or implied by, this document or its contents shall be considered or deemed a modification or amendment of such warranties. The information and the software discussed in this document are subject to change without notice and should not be considered commitments by Intergraph Corporation. Intergraph Corporation assumes no responsibility 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.

Trademarks InterAct, Intergraph, and RIS are registered trademarks of Intergraph Corporation. DIALOG, InterServe, and TD1 are trademarks of Intergraph Corporation. All other brands and product names are trademarks of their respective owners.

Copyright  1996 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 and trade secret law and may not be provided or otherwise made available without proper authorization. RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure by the government is subject to restrictions as set forth in subparagraph (c) (1) (ii) of The Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of Commercial Computer Software — Restricted Rights at 48 CFR 52.227-19, as applicable. Unpublished — rights reserved under the copyright laws of the United States. Intergraph Corporation Huntsville, Alabama 35894-0001

Table of Contents

__________________________________________________________________________________________________________________________________________________

Table of Contents

__________________________________________________________________________________________________________________________________________________

1.

Before You Begin ..................................................................................................

1-3

1.1 1.2 1.3 1.4 1.5 1.6 1.7

Document Purpose ....................................................................................... Audience ....................................................................................................... Document Prerequisites .............................................................................. Related Documentation ............................................................................... Additional Information ................................................................................ Document Conventions ................................................................................ Using On-line Help ......................................................................................

1-3 1-3 1-3 1-3 1-4 1-4 1-6

1.7.1

Parts of the Help Window ................................................................

1-6

Getting Started .....................................................................................................

2-3

2.1

Products Needed to Use the RIS Utilities ...................................................

2-4

3.

risbatch .................................................................................................................

3-3

4.

risclnsr ..................................................................................................................

4-3

5.

risdcode .................................................................................................................

5-3

6.

risdtype .................................................................................................................

6-3

7.

risgui .....................................................................................................................

7-3

7.1 7.2 7.3 7.4 7.5 7.6 7.7

Exiting the risgui Utility ............................................................................. Performing Queries in the risgui Utility ..................................................... Options... ...................................................................................................... Utilities... ...................................................................................................... Restart .......................................................................................................... Set... .............................................................................................................. Show... ..........................................................................................................

7-4 7-4 7-6 7-7 7-7 7-8 7-9

rislod ......................................................................................................................

8-3

2.

8.

8.1 8.2 8.3 8.4 8.5 8.6

The Log File ................................................................................................. The Bad File ................................................................................................. Loading Index, View, and Privilege Definitions ......................................... Using rislod with the Interactive Interface ................................................ Using rislod with the Command Line Interface ......................................... BNF Representation of rislod Command Line Syntax ...............................

8-8 8-9 8 - 10 8 - 10 8 - 17 8 - 18

9.

rismgr ....................................................................................................................

9-3

9.1 9.2

9-5 9-7

RIS Schema Manager .................................................................................. Schema Definition ........................................................................................ 9.2.1 9.2.2

Displaying Schema Information ...................................................... Creating Schemas .............................................................................

9-9 9 - 11

9.2.2.1 9.2.2.2 9.2.2.3 9.2.2.4 9.2.2.5

Creating Schemas (INFORMIX) ....................................... Creating Schemas (ORACLE) ........................................... Creating Schemas (DB2) ................................................... Creating Schemas (SYBASE) ............................................ Creating Schemas (Microsoft SQL Server) .......................

9 - 15 9 - 17 9 - 19 9 - 22 9 - 24

Dropping Schemas ............................................................................ Granting/Revoking Access Privileges to Secure Schemas .............. Obtaining Dictionary Access ............................................................ Modifying Schema Passwords .......................................................... Modifying Node Information ............................................................ Modify DB2 Password Form ............................................................

9 - 26 9 - 28 9 - 30 9 - 32 9 - 33 9 - 35

Displaying Table, View, and Index Information .........................................

9 - 37

9.3.1 9.3.2 9.3.3 9.3.4 9.3.5 9.3.6

Displaying Table Information .......................................................... Creating Tables ................................................................................ Dropping Tables ............................................................................... Appending Columns to Tables ......................................................... Including Tables, Views, and Indexes ............................................. Excluding Tables, Views, and Indexes ............................................

9 - 39 9 - 40 9 - 42 9 - 43 9 - 45 9 - 47

Reviewing and Manipulating Schema Files ............................................... Locating RIS Client Processes ..................................................................... Setting Modes and Enabling Databases .....................................................

9 - 48 9 - 50 9 - 52

10.

risplbck ................................................................................................................

10 - 3

11.

risrecrd ................................................................................................................

11 - 3

12.

risunlod ...............................................................................................................

12 - 3

9.2.3 9.2.4 9.2.5 9.2.6 9.2.7 9.2.8 9.3

9.4 9.5 9.6

12.1 12.2 12.3

Using risunlod with the Interactive Interface ........................................ Using risunlod With the Command Line Interface ................................ BNF Representation of risunlod Command Line Syntax .......................

Appendix A: A.1 A.2 A.3 A.4

12 - 7 12 - 13 12 - 16

Changes to This Version of RIS ..........................................................

A-3

RDBMS Versions ............................................................................................... UNION and UNION ALL Supported ................................................................ Objects of Different Owners Within a Schema ................................................. Object Aliases .....................................................................................................

A-3 A-3 A-3 A-4

A.5 A.6 A.7 A.8 A.9 A.10 A.11 A.12 A.13 A.14

Multi-User/Secure Schemas .............................................................................. Shared Dictionaries ........................................................................................... Dictionary Objects .............................................................................................. Dictionary Views ................................................................................................ RIS_BLOB/RIS_TEXT ....................................................................................... Interoperability ................................................................................................ Upgrade Utility ................................................................................................ Utilities ............................................................................................................. Parameters ....................................................................................................... Internationalization .........................................................................................

Appendix B:

A-5 A-6 A-6 A-7 A-8 A - 11 A - 12 A - 12 A - 13 A - 13

File Formats for risunlod and rislod ...................................................

B-3

Format for Representing Schema Definitions .................................................. Format for Representing Table Definitions ...................................................... Format for Representing ‘‘Insert Into’’ Statements .......................................... Format for Representing Field Definitions ....................................................... Format for Representing Table Data ................................................................ Format for Representing Data File Specifications ........................................... Format for Representing Index, View, and Privilege Definitions .................... File Format for Data Files ................................................................................. Use of Spaces and New Line Characters .......................................................... BNF Representation of File Formats ..............................................................

B-5 B-6 B-6 B-6 B-8 B-9 B - 10 B - 10 B - 10 B - 11

Glossary .......................................................................................................................

GL - 3

Index ............................................................................................................................

IN - 3

B.1 B.2 B.3 B.4 B.5 B.6 B.7 B.8 B.9 B.10

Before You Begin 1 - 1

Before You Begin

__________________________________________________________________________________________________________________________________________________

1-2

Before You Begin

Before You Begin 1 - 3

1.

__________________________________________________________________________________________________________________________________________________

Before You Begin 1.1 Document Purpose The RIS Utilities Guide for 32-Bit Applications describes the RIS utilities.

1.2 Audience This document was written for application users, application designers, and computer software specialists.

1.3 Document Prerequisites This document assumes a basic understanding of your operating system, RDBMS software, and RIS.

1.4 Related Documentation DNA1151 DNA1116 DNA1003 DNA1119 DNA1009

RIS Installation Guide for 32-Bit Applications RIS SQL User’s Guide for 32-Bit Applications RIS SQL Commands Quick Reference RIS Programmer’s Guide for 32-Bit Applications RIS Programmer’s Quick Reference

For information about SQL terms and database structure, refer to documents related to specific relational database management systems (INFORMIX, ORACLE, DB2, SYBASE, or Microsoft SQL Server).

1-4

Before You Begin

1.5 Additional Information For additional information about RIS, see the following files delivered with the RIS software. The default location for these files is the c:\Program Files\risdp directory. README

Provides product information and describes changes and additions to the product since the last release.

product.def

Lists all dependencies and related parts for the product.

MANIFEST.TXT

Lists all files delivered with the product.

1.6 Document Conventions Filenames and directory paths appear in italic typeface. However, the italic typeface is also used for emphasis of new words or important phrases. For example: c:\windows Command names, menu names, tools, system prompts and messages, and keys may appear in boldface type. For example: File menu — OR — Press Enter The word mouse refers to the 2-button or 3-button mouse. The word select means to select a command by pressing the left mouse button over a menu command or by pressing the Alt key and the underlined character simultaneously. The word choose means to choose a button or icon by pressing the left mouse button over a Toolbar button, or application icon. The word reset means to terminate a command initiated with the mouse. Reset by pressing the right mouse button. The word identify means to define an area or place graphic elements in a graphics file. For PCs, identify with the left mouse button. The phrase key in generally means to enter data into a field on a dialog box. To advance to the next field, use the Tab key.

Before You Begin 1 - 5

System key-ins, keywords, and programming code segments, appear in monospaced type. For example: main ( )

— OR — commit In actual usage, keywords can be in either upper or lowercase. Words that appear in angle brackets, < >, are identifiers or names that you must supply, or dynamic information that can change for each error message. For example: ERROR: Error opening the file Phrases in square brackets, [ ], are optional phrases. Curly braces contain several options (used in conjunction with a logical OR symbol ( | ) or phrases that can be repeated (used in conjunction with [, ...]). A comma followed by a series of three periods in square brackets ([, ...]) indicates that the last phrase contained within curly braces ({}), or the last item, can be repeated numerous times (separated by commas). For example: { } [, ...] means that numerous column names and associated data types can be specified (separated by commas). The logical or symbol ( | ) separates phrases or keywords within curly braces ({}) that can be used alone but not together. For example: { user | database } means that either the user keyword or the database keyword can be specified, but not both. This symbol notes important information.

This symbol cautions about operations that can cause limited damage.

This symbol warns about operations that can cause severe damage.

1-6

Before You Begin

1.7 Using On-line Help On-line Help is an on-line reference tool accessible at any time the application is in use. The on-line Help contains a description for each command and tool and step-by-step procedures for common tasks. For example, if you need to perform a certain task, search and display the topic. You can move or resize your application and Help windows so that they are next to each other. This lets you follow the procedures without having to search for the pages in the documentation.

Before You Begin 1 - 7

1.7.1 Parts of the Help Window To view the on-line Help, select Contents from the Help menu. To get more specific information, select one of the major topics or perform a search on a specific topic.

1-8

Before You Begin

Use

To

Contents

Display a listing of the table of contents for the on-line Help file.

Search

Locate information about a certain topic that you enter in the Search box.

Back

Take you back to the previous Help topics you have already viewed.

History

Display a sequential list of every Help topic you have viewed during your current Windows session.

Find

Display a dialog box used to retrieve partial or full text strings in the help file. Use the Hints button for information on constructing your search query.

>

View the next topic in a series of related topics. The button is dimmed when you reach the last topic in the series. If the graphics in the on-line Help appear distorted, check your graphics driver. If you are using an Intergraph TD1 machine, the S3 1024x768 256 color (Large Font) distorts the graphics slightly. Changing to the (Small Font) version corrects the display. If you are using other drivers, check with your PC manual for information about available graphics drivers.

Getting Started 2 - 1

Getting Started

__________________________________________________________________________________________________________________________________________________

2-2

Getting Started

Getting Started 2 - 3

2.

__________________________________________________________________________________________________________________________________________________

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\ris05.nn\bin. RIS Utilities: 1.

RIS Batch – risbatch Executes SQL statements in ASCII files.

2.

RIS Clean Server – risclnsr Cleans up some of the RIS dictionary tables.

3.

RIS Decode – risdcode Prints the error message for a RIS error code.

4.

RIS Data Types – risdtype Instructs RIS to interpret a column’s data type in a different manner.

5.

RIS Interactive – risgui Interactively query databases using RIS.

6.

Configure RIS Version – risintop Described in the RIS Installation Guide for 32-Bit Applications.

7.

RIS Loader – rislod Transfers data from specially formatted files into new or existing schemas.

8.

RIS Playback – risplbck Reads and executes files containing RIS commands generated by applications and captured with the risrecrd utility.

2-4

9.

Getting Started

RIS Record – 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 – 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 RIS Version 4 to RIS Version 5.

2.1 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.

risbatch 3 - 1

risbatch

__________________________________________________________________________________________________________________________________________________

3-2

risbatch

risbatch 3 - 3

3.

__________________________________________________________________________________________________________________________________________________

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 the RIS 05.nn icon from Program Manager; then choose the RIS Batch icon:

3-4

risbatch

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\ris05.nn\bin\risbatch c:\Program Files\Common Files\Intergraph\ris05.nn\parms c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\ris.msg c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\net.msg c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\utl.msg Status Returns ______________ 0 other

Normal termination. Abnormal termination.

risclnsr 4 - 1

risclnsr

__________________________________________________________________________________________________________________________________________________

4-2

risclnsr

risclnsr 4 - 3

4.

__________________________________________________________________________________________________________________________________________________

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 the RIS 05.nn icon from Program Manager; then choose the RIS Clean Server icon:

4-4

risclnsr

Choose the RIS 05.nn icon from the Program Manager; then choose the RIS Interactive icon. 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 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\ris05.nn\bin\risclnsr c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\ris.msg c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\net.msg c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\utl.msg Status Returns ______________ 0 1

Normal termination. Abnormal termination.

risdcode 5 - 1

risdcode

__________________________________________________________________________________________________________________________________________________

5-2

risdcode

risdcode 5 - 3

5.

__________________________________________________________________________________________________________________________________________________

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 the RIS 05.nn icon from Program Manager; then choose the RIS Decode icon:

5-4

risdcode

Choose the RIS 05.nn icon from the Program Manager; then choose the RIS Interactive icon. 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 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 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.



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.

risdcode 5 - 5

Files _____ c:\Program Files\Common Files\Intergraph\ris05.nn\bin\risdcode c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\ris.msg c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\net.msg c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\utl.msg Status Returns ______________ 0

Always zero.

5-6

risdcode

risdtype 6 - 1

risdtype

__________________________________________________________________________________________________________________________________________________

6-2

risdtype

risdtype 6 - 3

6.

__________________________________________________________________________________________________________________________________________________

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\ris05.nn\config\langs for other values. To start the risdtype utility, do one of the following: Type risdtype in a Command Prompt window.

Choose the RIS 05.nn icon from Program Manager; then choose the RIS Data Types icon:

6-4

risdtype

Choose the RIS 05.nn icon from the Program Manager; then choose the RIS Interactive icon. 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 creating or dropping of schemas. Example: c:\risdtype Enter schema ( to exit):sch1 Enter a table or view name (or ? for a list of names): >blob_table Pos Column Name —- —————— —- ———– 1 c1

type type-string len prec scale null —- —- —— —15 ris_blob 0 null null YES

Do you wish to modify this column? >yes 0 1 2 6

UNSUPPORTED CHARACTER RIS_BLOB 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:

risdtype 6 - 5

Pos ——– YES

Column Name —- —- —— —- 1

type

type-string c1

len prec scale null —- —————— —- — 15 ris_blob 10000 null null

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 Files\Intergraph\ris05.nn\bin\risdtype c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\ris.msg c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\net.msg c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\utl.msg Status Returns ______________ 0 1

Normal termination. Abnormal termination.

6-6

risdtype

risgui 7 - 1

risgui

__________________________________________________________________________________________________________________________________________________

7-2

risgui

risgui 7 - 3

7.

__________________________________________________________________________________________________________________________________________________

risgui The risgui 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 the RIS 05.nn icon from Program Manager; then choose the RIS Interactive icon.

7-4

risgui

The RIS Interactive Utility form is displayed.

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

7.2 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, 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 screenful at a time. For more information see the section Options.... Select the Continue button to display the next screenful, or the Abort button to stop the query.

risgui 7 - 5

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.

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).

7-6

risgui

3.

Select the Find Next button. The risgui utility highlights the next match.

Saving and Loading Queries 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.

7.3 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 screenful of results. When you select the Continue button, append the next screenful to the results. — Fetch by screenful (Overwrite) – fetch one screenful of results. When you select the Continue button, discard the results and get the next screenful. — 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.

risgui 7 - 7

7.4 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. — RIS Loader... – starts the rislod utility. — RIS Unloader... – starts the risunlod utility. — RIS Record... – starts the risrecrd utility. — RIS Playback... – starts the risplbck utility. — RIS Clean Server... – starts the risclnsr utility. — RIS Data Types... – starts the risdtype utility. — RIS Decode... – starts the risdcode utility.

7.5 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.

7-8

risgui

7.6 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 more information on the RIS modes.

3.

Select the databases to enable: — Informix — Ingres — Rdb — ORACLE — DB2 — SYBASE — MSSQL

risgui 7 - 9

7.7 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.

7 - 10

risgui

About... shows version and copyright information.

rislod 8 - 1

rislod

__________________________________________________________________________________________________________________________________________________

8-2

rislod

rislod 8 - 3

8.

__________________________________________________________________________________________________________________________________________________

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 c:\Program Files\Common Files\Intergraph\ris05.nn\config\langs for other values.

8-4

rislod

The representation of information must comply with the format defined in the section File Formats for risunlod and rislod. The following figure represents the functional mechanisms of rislod and shows the input requirements and output generated.

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 the RIS 05.nn icon from Program Manager; then choose the RIS Loader icon:

rislod 8 - 5

Choose the RIS 05.nn icon from the Program Manager; then choose the RIS Interactive icon. 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 creating or dropping of schemas. Usage ______ rislod [-?] [-V] [-n] [-p] [-e ] [-m {w|a|e}] [-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.

8-6

rislod

-m {w|a|e}

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 for more detailed information. Files _____ c:\Program Files\Common Files\Intergraph\ris05.nn\bin\rislod c:\Program Files\Common Files\Intergraph\ris05.nn\parms c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\ris.msg c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\net.msg c:\Program Files\Common Files\Intergraph\ris05.nn\config\english\messages\utl.msg Status Returns ______________ 0 1

Normal termination. Abnormal termination.

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

rislod 8 - 7

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 include the following: 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.

8-8

rislod

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 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. 1.

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 for more information about the meanings of these prompts and the corresponding actions taken by rislod.

2.

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 for more information about the syntax for constructing a rislod command and the semantics of the command.

3.

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 more information.

8.1 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: Section . . .

Contains . . .

Header

File mode for the log and bad files Input main external filename Log filename Bad filename Commit interval for loading table data

rislod 8 - 9

Schema Information

Schema section, containing: 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 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

8.2 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.

8 - 10

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.

8.3 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 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.

8.4 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 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.

rislod 8 - 11

The following list discusses the interactive prompts in detail. 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 blankstrip 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? all(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. informix) :[return] > Enter the RIS-supported database type, such as informix, ingres, or oracle. This prompt repeats until you press ENTER without entering a database name.

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.

8 - 12

rislod

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.

rislod 8 - 13

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. 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) 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.

8 - 14

rislod

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] > Do one of the following:

rislod 8 - 15

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.

8 - 16

rislod

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: 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.

rislod 8 - 17

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.

8.5 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 -b load.bad -f ..\dir3\specfile -n -mw -e rdb informix -c 15

Option

Specifies

8 - 18

rislod

-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 not used in the example are: Option

Specifies

-n

ANSI mode off.

-e

Enable databases listed after this option.

-m

Set the file mode (w, a, or e) for the output files (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 v1 grant 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.

8.6 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 8 - 19

::= rislod [-n] [-e ] [-m ] [-i ] [-b t2.c2 There are three ways to interact with risunlod: using the Interactive Interface, the Command Line Interface, or the Embedded Programming Function Interface. 1.

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.

2.

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.

3.

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 more information.

12.1 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.

12 - 8

risunlod

The following list discusses the interactive prompts in detail. 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.

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.

risunlod 12 - 9

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. Select e and risunlod prompts for a table name: Enter table for unloading:[] Enter the name of a table to unload.

12 - 10

risunlod

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 risunlod’s extended where clause for each table to unload partial data.

risunlod 12 - 11

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 risunlod’s 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 = 100 and 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. 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:

12 - 12

risunlod

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 ENTERto 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] >

risunlod 12 - 13

Press ENTER to unload the access privileges or key in n if you do not want to unload the privileges. 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 ..

12.2 Using risunlod With the Command Line Interface The schemas to be unloaded and the places for storing them can be specified to risunlod in a command line: c:\Program Files\Common Files\Intergraph\ris05.nn\bin\risunlod [-?] [-V] [-p] [-m {w|a|e}] [-o ] [-s ] [-f ]

In a command line, information is specified in four levels: 1.

Level One [-m{w|a|e}] The -m option specifies the file mode of the output main and data files. The valid characters suffixing this option are w, a or e representing overwrite, append, or return error mode, respectively.

12 - 14

risunlod

If the main file or data files exist, and if the -me option is used, risunlod exits.

[-o ] The -o option specifies the name to use for the main file. The absence of this option causes the default main filename, ris.dmp, to be used. [-s ] The -s option is used to specify which schema and which information in the schema is to be unloaded. More than one -s option can be used for multiple schemas. [-f ] The command line interface permits information specified by -s options to be stored in a specification file. The -f option is used to specify a specification file. The -s and -f options are mutually exclusive.

For secure schemas, the clause user [/ must be specified after the schema name. The following examples show commands containing Level One information. risunlod -mw -o \dir1\dir2\mainfile -f ..\dir3\specfile risunlod -s sch1 .sch1_passwd
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF