Escolar Documentos
Profissional Documentos
Cultura Documentos
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.
2.
3.
1-3
1.1
1.2
1.3
1.4
1.5
1-3
1-3
1-3
1-3
1-6
1.5.1
1-6
2-3
2.1
2.2
2.3
2.4
2.5
2.6
2-3
2-4
2-4
2-4
2-5
2-5
3-3
3.1
Databases .....................................................................................................
3-3
3.1.1
3-3
3-4
3-5
3.3.1
3.3.2
3.3.3
3.3.4
3.3.5
3.3.6
3-5
3-6
3-7
3-8
3-8
3-9
Tables ...........................................................................................................
3 - 10
3.4.1
3 - 11
3.4.1.1
3.4.1.2
3.4.1.3
3 - 11
3 - 13
3 - 13
3.2
3.3
3.4
3.4.2
3.4.3
3.4.4
3.4.5
3.4.6
3 - 14
3 - 14
3 - 15
3 - 15
3 - 17
3.4.6.1
3.4.6.2
3 - 17
3 - 18
3 - 18
3 - 19
Views ............................................................................................................
3 - 19
3.5.1
3.5.2
3.5.3
3 - 20
3 - 20
3 - 21
3.5.3.1
3.5.3.2
3.5.3.3
3 - 21
3 - 22
3 - 23
Privileges ......................................................................................................
3 - 23
3.6.1
3.6.2
3.6.3
3 - 23
3 - 23
3 - 24
3.6.3.1
3.6.3.2
3.6.3.3
3.6.3.4
3 - 24
3 - 25
3 - 25
3 - 26
3 - 27
Transactions .................................................................................................
3 - 28
3.7.1
3.7.2
3.7.3
3.7.4
3.7.5
3.7.6
3.7.7
3.7.8
3.7.9
3 - 29
3 - 29
3 - 30
3 - 30
3 - 30
3 - 31
3 - 32
3 - 34
3 - 35
3 - 35
3 - 36
3 - 37
3.4.7
3.4.8
3.5
3.6
3.6.4
3.7
3.10.1
3.10.2
3.10.3
4.
3 - 37
3 - 39
3 - 39
4-3
4.1
4.2
4-3
4-6
4-7
4 - 10
4 - 12
4 - 13
4 - 15
4 - 17
4.2.6.1
4.2.6.2
4.2.6.3
4.2.6.4
4.2.6.5
4 - 21
4 - 24
4 - 26
4 - 29
4 - 31
4 - 33
4 - 35
4 - 37
4 - 40
4 - 42
4 - 44
4 - 45
4 - 47
4 - 48
4 - 50
4 - 51
4 - 52
4 - 54
4.2.19.1
4.2.19.2
4.2.20
4.2.21
4.2.22
4.2.23
4.2.24
4.2.25
4 - 55
4 - 57
insert ...............................................................................................
lock tables .......................................................................................
open schema ....................................................................................
revoke ..............................................................................................
4 - 59
4 - 61
4 - 63
4 - 65
4.2.23.1
4.2.23.2
4 - 66
4 - 68
rollback ...........................................................................................
select ...............................................................................................
4 - 70
4 - 72
4.2.26
4.2.27
4.2.28
4.2.29
4.2.30
4.2.31
4.2.32
4.2.33
4.2.34
4.2.35
4 - 74
4 - 75
4 - 77
4 - 80
4 - 81
4 - 82
4 - 83
4 - 84
4 - 86
4 - 88
4 - 92
4 - 94
Troubleshooting ....................................................................................................
5-3
4.3
4.4
5.
Appendix A:
A.1
A.2
A.3
A.4
A.5
A.6
A-3
A-3
A-5
A-5
A-9
A - 11
A - 12
Appendix B:
B-3
Appendix C:
C-3
C-4
C.1
C.1.1
C.1.2
C.1.3
C.1.4
C.1.5
C.1.6
C.1.7
C.1.8
C.1.9
C.1.10
C.1.11
C.1.12
C.1.13
C.1.14
C.1.15
C.1.16
C.2
RIS5COLUMN_PRIVS ..........................................................................
RIS5COLUMNS .....................................................................................
RIS5DBMS_COLUMNS ........................................................................
RIS5DBMS_INDEXES ..........................................................................
RIS5DBMS_TABLES ............................................................................
RIS5DBMS_USERS ...............................................................................
RIS5DBMS_VIEWS ...............................................................................
RIS5DBS ................................................................................................
RIS5INDEX_COLUMNS .......................................................................
RIS5INDEXES .....................................................................................
RIS5SCHEMAS ...................................................................................
RIS5SCHPRIV .....................................................................................
RIS5TABLE_PRIVS ............................................................................
RIS5TABLES .......................................................................................
RIS5USERS .........................................................................................
RIS5VIEWS ..........................................................................................
C-4
C-5
C-7
C-8
C-9
C-9
C - 10
C - 11
C - 14
C - 15
C - 16
C - 17
C - 17
C - 18
C - 19
C - 20
C - 22
Appendix D:
D-3
D-3
D.1.1
D-4
DB2 .....................................................................................................................
D-5
D.2.1
D.2.2
D-5
D-6
INFORMIX .........................................................................................................
D-7
D.3.1
D.3.2
D.3.3
D.3.4
D.3.5
D-7
D-7
D-7
D-8
D-8
ORACLE .............................................................................................................
D-9
D.4.1
D.4.2
D-9
D-9
SYBASE .............................................................................................................
D - 11
D.5.1
D.5.2
D - 11
D - 12
MSSQL ...............................................................................................................
D - 13
D.6.1
D.6.2
D - 13
D - 14
Appendix E:
E-3
Appendix F:
F-3
SHARED_MEMORY ..........................................................................................
MAX_LOCAL_SERVERS ..................................................................................
MAX_ROWS .......................................................................................................
MAX_BUFFER_SIZE .........................................................................................
MAX_STATIC_STMTS ......................................................................................
MAX_USER_STMTS ..........................................................................................
MAX_SECONDARY_SCHEMAS ......................................................................
MAX_TRANSACTIONS .....................................................................................
MAX_TABLES_IN_MEM ..................................................................................
Network Verification Parameters ...................................................................
Schema Definition File Location .....................................................................
LOCK_FILE_RETRY .......................................................................................
F-5
F-6
F-6
F-6
F-7
F-7
F-7
F-7
F-8
F-8
F - 10
F - 11
D.1
D.2
D.3
D.4
D.5
D.6
F.1
F.2
F.3
F.4
F.5
F.6
F.7
F.8
F.9
F.10
F.11
F.12
F.13
Appendix G:
F - 11
G-3
H-3
Appendix I:
I-3
I-3
I-3
I-3
I-4
I-5
I-6
I-6
I-7
I-8
I - 11
I - 12
I - 12
I - 12
I - 13
Glossary .......................................................................................................................
GL - 3
Index ............................................................................................................................
IN - 3
I.1
I.2
I.3
I.4
I.5
I.6
I.7
I.8
I.9
I.10
I.11
I.12
I.13
I.14
__________________________________________________________________________________________________________________________________________________
1-2
1.
__________________________________________________________________________________________________________________________________________________
1.2 Audience
This document was written for application users, application designers, and computer
software specialists.
For information on SQL terms and database structure, refer to documents related to specific
relational database management systems (INFORMIX, ORACLE, DB2, SYBASE, or
Microsoft SQL Server).
For a description of relational theory and implementation, refer to a textbook and/or user and
reference manuals for the vendor database management system. The following is a list of
references:
1-4
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.
Do not use the Enter key to advance to the next field. This key is mostly
used as the default key to accept a dialog box instead of pressing the OK
button.
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 <filename>
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: { <column> <data type> } [, ...] 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
Additional Information
For additional information on RIS, see the file called README.TXT delivered with the RIS
software. The default location for this file is in the c:\Program Files\Common
Files\Intergraph\ris05.nn directory. The README.TXT file provides product information
and describes changes and additions to the product since the last release.
There is also a PROD.INI file delivered in the same directory that lists all dependencies and
related parts for the product.
There is also a MANIFEST.TXT file delivered in the same directory that contains a list of all
the files delivered with the product.
1-8
Use
To
Contents
Search
Back
History
Find
<<
>>
Introduction to RIS 2 - 1
Introduction to RIS
__________________________________________________________________________________________________________________________________________________
2-2
Introduction to RIS
Introduction to RIS 2 - 3
2.
__________________________________________________________________________________________________________________________________________________
Introduction to RIS
RIS is an acronym for Relational Interface System. RIS is Intergraph Corporations generic
relational database interface. It isolates applications and users from the differences in
specific vendors relational database management systems (RDBMSs). It also permits
network access to popular RDBMSs using various network protocols.
With the availability of numerous relational database management systems on Intergraph
machines, application developers are faced with the choice of which RDBMS to use with their
application. RIS is a good long-term solution for any group requiring relational database
flexibility. It provides a low cost interface to popular RDBMSs, while freeing the user from
the details of supporting and understanding the subtle and not so subtle differences in each
of these systems.
RIS Version 5.3.1 and later support 16-bit or multi-byte languages. (Most 16bit 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 bytes, where x is an integer. For those using
multibyte languages, the maximum number of characters should be interpreted
as the maximum size in bytes. Therefore, the normal maximum of 18
characters translates into 9 16-bit characters.
2-4
Introduction to RIS
2.4 Performance
As with any additional software layer, there is some performance degradation when using
RIS. RIS stores some dictionary information in memory, resulting in some initialization
overhead. This overhead varies directly with the number of relational database tables used
in the application. SQL statement processing is slightly slower than when directly issuing
the SQL statement on the vendor database. However, by storing and precompiling the SQL
statements, RIS minimizes the amount of SQL statement degradation. Typical query
degradation is less than five percent (5%).
Introduction to RIS 2 - 5
2-6
Introduction to RIS
DBMS
RISINFDS, RISINFNS
INFORMIX
RISORADS, RISORANS
ORACLE
RISDB2DS
IBM,DB2
RISSYBDS
SYBASE System
10
RISMSFDS
Microsoft SQL
Server
The RIS**NET products include all the functionality of the non-NET products and
additional networking capability for communicating with databases residing on nonIntergraph platforms (in conjunction with additional software DBMS).
RIS Overview 3 - 1
RIS Overview
__________________________________________________________________________________________________________________________________________________
3-2
RIS Overview
RIS Overview 3 - 3
3.
__________________________________________________________________________________________________________________________________________________
RIS Overview
The following sections provide an overview of RIS and database concepts.
3.1 Databases
RIS lets applications build and manipulate a body of information specific to the application.
This body of information is called a database. A database is actually a collection of data
which may or may not be related. The data is usually stored in one or more data files or disk
partitions in such a way that it can be recalled at any time in a variety of ways. Databases
are usually created immediately after the installation of the RDBMS.
The software that performs the organization, storage, and manipulation of data in a
database is called a Database Management System (DBMS). DBMSs differ in many ways,
the most important of which is in the way the data is organized. One of the most popular
DBMSs is the Relational Database Management System (RDBMS).
As its name implies, RIS is an interface to RDBMSs. RIS uses ANSI Standard SQL as its
interface language to the relational database systems.
3-4
RIS Overview
In the following figure, database A has two users defined on it: Joe and Sally.
The concept of a user is not always the same to the different vendor RDBMSs.
For example, a user in an INFORMIX database must also be a valid operating
system user; this is not necessary for ORACLE.
A dictionary that is associated with only one schema is called an exclusive dictionary. In this
case, there is a RIS dictionary for each schema. Shared dictionaries and exclusive
dictionaries can be used on the same database (as long as the underlying RDBMS lets
different users have tables of the same name).
All RIS users must have a RIS schema and all RIS schemas must have access to a RIS
dictionary created for the database they want to manipulate. The figure following shows two
dictionaries created on a database. Dictionary1 is a shared dictionary and Dictionary2 is an
exclusive dictionary. Note that UserC both owns one dictionary and shares another through
different schemas.
RIS Overview 3 - 5
Before a dictionary can be shared, the dictionary owner must grant adequate privileges to
valid database users.
The grant schema statement grants all the necessary database level privileges on the
dictionary tables to let the grantee share the dictionary. Users with schema privilege can
create other schemas that can share the same RIS dictionary.
A shared dictionary minimizes table creation in environments where there are many
schemas.
3.3 Schemas
As defined by the ANSI SQL standard, a schema is a collection (or group) of tables, views,
and privileges. However, most RDBMSs do not implement schemas at all.
RIS defines a schema as a named collection of tables, views, and indexes on a particular
database associated with a RIS dictionary. There are two types of RIS schemas, a standard
schema and a secure schema. Information about schemas is maintained in the RIS
dictionary.
3-6
RIS Overview
created within, or by, RIS. However, the RDBMS is aware of the tables and views that
constitute the RIS dictionary.
In the following figure, the database has four users, UserA, UserB, UserC, and UserD. All
four schemas are standard schemas since there is one user per schema. Schema1, Schema2,
and Schema3, share the dictionary owned by UserA. Schema4 has an exclusive dictionary.
RIS Overview 3 - 7
Incorrect because...
_schema1
1_schema
schema-1
3-8
RIS Overview
This statement associates the user john with the schema my_secure so that a subsequent
default schema statement cannot use this information to open the schema. The declare
schema statement specifies schema parameters before the schema is created or opened. This
is valid for both standard and secure schemas, although it is only required for secure
schemas.
RIS Overview 3 - 9
The create schema statement associates existing databases with new schema definitions.
The database can be local (on the same machine as the application using RIS) or remote (on
an Intergraph system, a VAX/VMS machine, a Sun SPARC or SUNOS, an HP, an ISMP, or
on an IBM mainframe).
In this document, the terms local and remote refer to the location of the server
with respect to the client.
For example, to create a new schema, issue the following statements:
create schema new_schema
on database
( oracle, dbname ORCL, dir c:\orant,
osuser Ed [.passwd], ostype nt, remote (tcp oracnode) )
user Ed.pass [.passwd];
This statement creates a schema, local_stuff, on an ORACLE database on the local node.
The following statement creates a schema with access to a remote database named ORA7:
create schema good_stuff
on database
( oracle, dbname ORA7, dir /usr/oracle,
osuser Harper.passwd, ostype unix, remote (tcp stuffnode) )
user bonnie.pass;
This statement creates a new schema, good_stuff, on an ORACLE database named
lots_o_stuff and is located on the node stuffnode.
See the create schema statement description for more information on creating schemas
and the various options.
Multiple schemas can be created, opened, and accessed concurrently from an
application, but only one schema can be accessed within a single SQL
statement.
3 - 10
RIS Overview
For Example:
Whenever a schema is successfully created, the default schema is set to the schema created.
Any tables or views created are created in that schema, and any tables or views referenced in
other SQL statements reference tables or views in that schema. For example: if there are
two schemas, schema1 and schema2 which both have a table, table1, in them and the default
schema is set to schema1, any select, insert, update, delete, or drop statement
referencing table1 refers to schema1.table1. Schema2.table1 is not affected.
If Table1 in both schemas refers to the same table in the underlying database,
then the changes to Schema1.Table1 would affect Schema2.Table1.
3.4 Tables
The basic unit in which RDBMSs group information and the basic result of many SQL
statements is the table, also referred to as a relation. The table is a collection of rows and
columns of data. Each row represents a unit of related information sometimes referred to as
a record or tuple. Each row is made up of one or more columns representing a part of the
record. The columns are sometimes referred to as fields or attributes.
For example, a table could consist of names and phone numbers. The rows would be the
name and number combination associated with each person represented. Also, the table
would consist of two columns: name and phone. The following figure shows the table phones
with some sample data.
At the level of the RDBMS, a user creates a table in a database. The user then owns the
table, and access to that table by other users is restricted. The following figure shows the
users, Joe and Sally, on database A each with several relations. The RDBMS considers the
relations to be owned by the users who created them.
RIS Overview 3 - 11
Certain SQL statements let users work with tables. These statements include create, alter,
drop, select, insert, update, and delete.
3 - 12
RIS Overview
Description
char[acter](n)
int[eger]
smallint
double [precision]
real
timestamp
decimal
ris_blob(n)
ris_text(n)
RIS Overview 3 - 13
create table phone (name char(25) not null, phone char(12) not null )
extern tab1 (col1, col2);
In this statement, phone is a RIS table name, and name and phone are RIS column names.
The external names are tab1 for the table and col1 and col2 for the columns.
3 - 14
RIS Overview
The not null clause in an alter table statement can only be used if the table does not
contain any data at the time the statement is issued.
RIS Overview 3 - 15
A select statement to extract the row containing the name John is as follows:
select * from phones where name = John;
The asterisk (*) specifies that all columns from the phones table should be included in the
result. The selection criteria appears in the where clause. Any row in which the name
column contains John should be included in the result. Since only one row in the phones
table matches the criteria, the result table appears as follows:
3 - 16
RIS Overview
For example: Suppose the phones and addresses tables contained the following data:
To join the two tables and relate the rows containing the same name, you would specify a
select statement similar to the following:
select * from phones, addresses where phones.name = addresses.name;
The select condition is phones.name = addresses.name. This condition relates the
names in the phones table (and the corresponding phone numbers) to the names in the
addresses table (and the corresponding address). The resulting table contains the following
data:
Notice that the resulting table contains two name columns. In the previous select statement,
the column list is specified as an asterisk (*). This specifies that all columns from each of the
tables be included. To select only specific columns, the select statement could be changed
similar to this:
select phones.name, phones.phone, addresses.address where ...
RIS Overview 3 - 17
This specifies that both columns from the phones table and only the address column from the
addresses table be included. The resulting table would appear as follows:
Notice that no column list is specified in the previous example. The list is not necessary
because the number of columns in the phones table is equal to the number of values in the
values list, and they are in the same order. The phones table now contains the following
rows and columns:
3 - 18
RIS Overview
If the ordering of the values is not the same as the ordering of the columns, a column list
must be specified. The column list must specify a column name for each value and must be
in the same order as the values.
insert into phones (phone, name) values (555-5000, Joe) ;
RIS lets you insert multiple rows. In the previous example, if the where clause is left out, the
select statement would return all the names from the phones table and insert them into
the addresses table.
insert into addresses (name)
select name from phones;
RIS Overview 3 - 19
The addresses table now contains the following rows and columns:
The phones table now contains the following rows and columns:
3.5 Views
A view is a window into tables and is sometimes called a virtual table. Through the view,
you can select data to look at or to perform other operations. When a table appears in a view,
the view is said to reference the table. A view can reference one or more tables and can
reference all or selected columns from each table.
There are two uses for views:
1.
Views can be used to logically combine tables to make them appear as one.
2.
Views can be used to limit the columns selected from one or more tables to restrict
access to sensitive data.
3 - 20
RIS Overview
RIS Overview 3 - 21
The insert, update, and delete statements can be issued only on views that
reference one table. If a view references more than one table, the data referenced by
the view cannot be changed through the view.
2.
The insert, update, and delete statements cannot be issued on views that contain
an order by, a group by, a having clause, or a nested query in the view definition.
3.
If the table that a view references contains a column defined with the not null
clause, and the view does not reference that column, there is no way to insert a record
through that view. This is due to the fact that, through the view, no value can be
specified for the column defined as not null and therefore, a valid record cannot be
inserted.
3 - 22
RIS Overview
The following statement inserts a car number and model into the cars table through the
models view:
insert into models (number,model) values ( 10145, Badcar LX );
The cars table now contains the following data:
RIS Overview 3 - 23
3.6 Privileges
All database privileges are dependent upon the privileges granted to the underlying users. If
the user is not the owner of the database, then the owner of the database has to grant
privileges for the user to create a RIS schema. Privileges you have are the same as the
schema privileges. There are two types of database privileges: database privileges and
relation privileges.
The connect privilege lets you access, connect to, or log in to a database and issue
Data Manipulation Language (DML) statements. You must have at least connect
privilege in order to create a schema using a shared dictionary.
2.
The resource privilege lets a user issue Data Definition Language (DDL)
statements. This privilege adds the capability to create, alter, and drop relations. As a
part of creating a schema, RIS needs to create tables; therefore, you must have at least
resource privilege in order to create a schema and a dictionary.
3.
The dba privilege is the highest database privilege. DBA is an acronym for
database administrator. A user with database administrator privileges has access to all
statements and to the entire database. This user usually has the responsibility of
performing administrative duties.
You must set up database privileges in the underlying RDBMS, not through
RIS.
For a complete list of DML and DDL statements, see the sections Data Definition Language
(DDL) Statements and Data Manipulation Language (DML) Statements.
3 - 24
RIS Overview
which must be used alone. Likewise, these privileges can be revoked in any combination
using the revoke statement.
There are five relation privileges:
1.
The delete privilege lets a schema execute the delete statement on the target
relation.
2.
The insert privilege lets a schema execute the insert statement on the target
relation, thus adding rows to the relation.
3.
The select privilege lets a schema execute the select statement on the target
relation.
4.
The update privilege lets a schema execute the update statement on the target
relation, thus modifying existing rows.
5.
The all relation privilege grants or revokes all of the other relation privileges.
RIS Overview 3 - 25
Set the default schema back to p_admin since the previous statement set the default
schema to p_maint.
default schema p_admin;
2.
Now p_maint schema can select, insert, update and delete from the table employee_info. In
addition, it can create and manage relations of its own.
3 - 26
RIS Overview
Also, there could be a need for supervisors to create and maintain some relations. To allow
for this, the user (of supervisor schema) must be given resource access.
1.
2.
3.
Set the default schema back to p_admin since the previous statement set it to the new
schema.
default schema p_admin;
4.
The new view is called super_view and references the name, id, position, wage, location, and
ext columns of the employee_info table.
The new schema is called p_super. This schema can only select from the view super_view,
but can create and maintain relations of its own.
Create a view on the employee database that lets employees see the name, id, location,
and ext columns.
create view employ_view ( name, id, location, ext )
as select name, id, location, ext from employee_info;
2.
RIS Overview 3 - 27
3.
Set the default schema back to p_admin because the previous statement set it to the
new schema.
default schema p_admin;
4.
The new view is named employ_view and references the name, id, location, and ext columns
of the employee_info table.
The new schema is named p_employ and can select from the employ_view view. In addition,
it can create and manage relations of its own.
Privileges granted by a schema that has been granted that privilege (along with the grant
option) can be revoked from a schema by any schema before it in the chain. This creates a
cascading effect of revoking the privilege from all schemas in the chain after the schema
which executed the revoke.
For example, Schema B grants insert, update, and select privileges to Schema C. If Schema
A revokes the update privilege from Schema B, then it is also revoked from Schema C.
3 - 28
RIS Overview
3.7 Transactions
Transactions let you group a set of one or more SQL statements as a single logical unit of
work. The transaction mechanism provided by RIS lets the set of one or more SQL
statements be:
1.
An atomic unit: either all or none of the SQL statements of a transaction affect the
database permanently.
2.
A consistent unit: simultaneous queries and data updates from different transactions do
not interfere with each other.
The transaction-related commands in RIS include commit, rollback, lock tables, and
set transaction.
The commit statement makes all the changes in a transaction permanent in the database
and the rollback statement makes none of its changes present in the database. The lock
tables statement prevents other transactions from reading or overwriting the partial
changes or the temporary results of this transaction. So, the commit statement and the
rollback statement guarantee the atomicity property of a transaction and the lock
tables statement ensures the consistency property.
The set transaction autocommit statement controls transaction autocommit mode. If
the transaction autocommit mode is enabled (by default), a transaction consists of only one
statement and RIS issues a commit statement implicitly after each SQL statement.
Otherwise, a transaction may have more than one SQL statements and a commit statement
or a rollback statement is required to end the transaction.
A transaction in RIS allows access to the tables within only one schema. To enhance the
distributed and parallel processing abilities, RIS lets users work simultaneously on multiple
transactions on different schemas in one program or one interactive session. This ability of
the multiple transactions is specified by the parameter MAX_TRANSACTIONS in the parms
file. The parameter specifies the maximum number of transactions a user can work on
concurrently in one program or one interactive session.
To completely understand transactions and multiple transactions, you must understand that
there are three categories of statements in ANSI SQL:
RIS Overview 3 - 29
1.
2.
3.
Miscellaneous statements
alter table
create table
drop schema
grant
create index
create view
drop table
revoke
insert
update
select
3 - 30
RIS Overview
commit
declare view
open schema
set mode
undeclare table
set network
declare schema
default schema
rollback
set transaction autocommit
undeclare view
2.
If an error occurs during the execution of any DML statement, RIS issues a
rollback statement to prevent the corruption of data.
RIS Overview 3 - 31
2.
The transaction autocommit mode is switched to enabled from disabled (the transaction
is committed).
OR
3.
Termination of a user process (the transaction is ended with the rollback statement).
After one transaction ends, the next SQL statement automatically starts the next
transaction.
The following statement enables normal transaction processing by setting the transaction
autocommit mode to off.
set transaction autocommit off;
The transaction that issues the updates sees the results immediately. With
most database systems, another transaction (selecting from that relation) does
not see the results until a commit statement is issued by the transaction that
issued the updates. INFORMIX-SE, however, posts all changes to the database
immediately and then reverses those changes if a rollback statement is
3 - 32
RIS Overview
issued. Before the rollback statement is invoked, other transactions can read
the partial results from the update transaction. The solution to prevent from
reading the uncommitted updates is to use the lock tables statement.
The following select statement from another transaction indicates that the updates have
not been performed on the table, if it is invoked before the commit is issued for the first
transaction A.
select * from phones; /* the statement in transaction B */
If a commit statement is issued, however, its update can be read by other transactions. The
following select statement from transaction B is executed after the transaction A is
committed.
select * from phones; /* the statement in transaction B */
RIS Overview 3 - 33
When a rollback statement is issued, all cursors are closed and all locked
tables are released. For more information on cursors, see the RIS
Programmers Guide. For more information on table locking, see the section
Tables in this document or the lock tables statement description.
Consider the phones table again which now appears as follows:
If the transaction autocommit mode is disabled and the following update statements and
select statement are issued (for a transaction), the select statement results from the
phones table appear as follows:
/* the
update
update
select
statements in transaction A */
phones set ext = 407 where name = John;
phones set ext = 683 where name = Jerry;
* from phones;
3 - 34
RIS Overview
If a rollback statement is issued, the transaction is ended and the table once again
appears as follows:
Examples
lock tables sch1.tab1, sch1.tab2 in exclusive mode;
lock tables tab1, tab2 in share mode tab3, tab4 in default mode;
lock tables sch1.tab1 in share mode
sch1.tab2 in exclusive mode sch1.tab3 in default mode;
RIS Overview 3 - 35
Examples
default schema sch1;
insert into t1 values (1, Jack, 20);
insert into sch2.t1 values (1, Jack, 20);
commit for sch1;
commit for sch2;
In the previous example, the first insert statement belongs to the transaction for the
schema sch1, and the second insert statement belongs to the transaction for the schema
sch2. The first commit statement ends the transaction for schema sch1 and the second ends
the transaction for schema sch2.
3 - 36
RIS Overview
A set network verification statement also can specify the alarm timestamp
mechanism for any opened schema. For example, the following statement sets up the
mechanism to ask the RIS server associated with the schema sch1 to send a timestamp at
ten second intervals:
set network verification timestamp interval 10 for sch1;
For more information, see the section Set Network Verification.
3.9 Indexes
The time required to search a column of a table or view for a matching value can be reduced
by creating an index on that column. An index is a sorted list of the values in that column.
Since the list is sorted, the DBMS can use faster techniques to search for matching values.
The speed gained by indexing a column is greater for larger numbers of values, therefore it is
not advantageous to create an index on a table that contains few values.
One disadvantage of indexes is that they require more disk space to maintain. Also, the time
required to insert a value into an indexed column is greater due to the overhead of
maintaining the index.
Bulk data loading should be done without indexes in existence.
Indexes are created with the create index statement. For example, the following
statement creates an index on the name column of the phones table:
create index name_index on phones (name);
The extern clause can be added to the create index statement to specify an external
name for the index. For example:
create index name_index on phones (name)
extern ind1;
Indexes can be created on several columns. If an index is created on
more than one column, the indexes of the columns are searched from
left to right in the order they are specified in the create
index statement. For example, the following statement creates
an index on the phone number and ext columns of the
addresses table:
create index phone_index on addresses ( phone, ext );
When you search for a phone number and extension, the DBMS attempts to match the phone
number first and, if a match is found, attempts to match the extension number.
RIS Overview 3 - 37
The unique keyword can be used to specify that no duplicate values are allowed in the
column or columns on which the index is created. The DBMS reports an error on an attempt
to create a unique index on a column that contains duplicate data. Likewise, the DBMS
reports an error on an attempt to insert duplicate data into a column for which a unique
index has been created.
The following statement creates a unique index on the name column of the phones table:
create unique index name_index on phones ( name );
3.10 Examples
3.10.1 Using a Secure Schema
As an example of using a secure schema, consider the ORACLE database corp_data that
manages various types of corporate and project data in a company.
Some of the users on this database are king, tom, amy, pat, raj and lee, having different
levels of privileges. A secure schema is created on this database by user king using the
statement:
King becomes the schema owner (or administrator) of this schema. In addition, king is the
dictionary owner of the RIS dictionary created along with this schema (project_data).
Project_data becomes the default schema with the user king connected to it.
King can now create the following table in this schema :
King can let other users connect to his schema. Tom, amy, pat, and raj need to be able to
connect to the schema project_data and also manipulate the table projects. Additionally, pat
and raj need to be able to create their own tables and views.
3 - 38
RIS Overview
The database level privileges for these users to access the table projects are granted in the
underlying ORACLE database.
The schema access is granted by king to the previous users through RIS. Assuming this is
done in a new RIS session, king needs to connect to the secure schema using the following
statements :
Since ORACLE is not case sensitive with respect to user names, both of these statements
work. (AMY is entered in upper case letters.)
Pat and raj are granted resource privilege using :
Now, pat can connect to this schema and create his tables and views :
If pat does not grant DBMS level privileges on this table to other users, for example tom,
tom will not be able to access this table even though he can connect to the schema and see
the table listed in the RIS dictionary.
Tom and amy can connect to the schema in a similar fashion but all they can do is
manipulate the projects table.
RIS Overview 3 - 39
The using clause in the previous statement causes the information about this schema to be
stored in the dictionary created along with the schema project_data.
Though the facilities schema and the project_data schema share the dictionary, lee cannot
access the projects schema.
Since the schema facilities is a standard schema, all connections to it are made as user lee.
Access to this schema by other users can be controlled by having a separate schema file or by
passwording the schema.
3 - 40
RIS Overview
If all users of the schema project_data should have access to this view, this can be achieved
through the statement:
Since project_data is a secure schema, it needs to be declared with a valid user identification.
The alter schema statement is a DDL statement requiring resource privilege. Hence the
schema should be declared with king, pat or raj as the user. Note that the user payroll need
not have any access to the schema project_data.
__________________________________________________________________________________________________________________________________________________
4-2
4.
__________________________________________________________________________________________________________________________________________________
Description
<boolean>
<char col>
<column-list>
<column>
<comparison-op>
<conditions>
A where clause.
<data type>
<db_desc>
<dbname>
<dir>
A valid directory.
<expr>
<index>
<m>
An integer value.
4-4
<n>
An integer value.
<nested-query>
<node>
<num>
An integer value.
<ostype>
<osuser>
<passwd>
A password.
<rel-privileges>
<protocol>
<rdbms_name>
A database username.
<relation-list>
<relation>
<ris...>
The ris prefix identifies a RIS name in statements where both the
RIS name and the underlying database name (DBMS) occur.
<riscolumn>
<risindex>
<ristable>
<risview>
<dbms...>
<dbmscolumn>
<dbmsindex>
<dbmstable>
<dbmsview>
<schema>
<schema-list>
<select-statement>
<table>
<username>
<value>
<values-list>
<view>
<wildcard-string>
4-6
4.2
__________________________________________________________________________________________________________________________________________________
4.2.1
__________________________________________________________________________________________________________________________________________________
alter schema
The alter schema command modifies a RIS schema definition.
alter schema <schema>[.<passwd>]
{
to secure|
modify schema password <passwd> |
modify [user password <passwd>]
[, osuser <osuser>[.<passwd>]
[, remote ( {<protocol> <node> } [, ...] )] |
modify db2 password from <passwd> to <passwd> [ using mode <mode> ] |
include { table [<dbmsuser>.]<dbmstable> [as <ristable>
[(riscolumn> [,...])]|
view [<dbmsuser>.]<dbmsview> [as <risview>
[(riscolumn> [,...])]|
index [<dbmsuser>.]<dbmsindex> [as <risindex>]} |
exclude { table <ristable>|
view <risview>|
index <risindex>
};
RIS Version 5.3.1 and later support 16-bit or multi-byte languages. (Most 16bit 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 bytes, where x is an integer. For those using
multibyte languages, the maximum number of characters should be interpreted
as the maximum size in bytes. Therefore, the normal maximum of 18
characters translates into 9 16-bit characters.
Notes
_ ____
You must alter a schema if the RIS schema definition becomes inconsistent with the
database. For example, if passwords and network nodes are changed, you can update the
RIS schema definition to reflect these changes. You must issue an alter schema
statement to update the RIS schema definition. Additionally, you can include or exclude RIS
objects from the RIS schema definition (dictionary).
The <schema> identifier is the name of the schema you want to modify.
You can specify only one of the following clauses at a time.
The to secure clause changes a standard schema to a secure schema, thus allowing
multiple users on the same schema.
A secure schema cannot be changed back to a standard schema. Also, the
connection to a secure schema requires that the schema be declared before it is
opened.
4-8
The modify user password clause and modify remote clause can be used in a single
modify clause to change the user password and nodename, respectively.
For INFORMIX, SYBASE, and Microsoft SQL Server, the user password must
be changed in the operating system before changing it in RIS. For ORACLE,
the user password must be changed in sqldba before changing it in RIS.
The modify schema password clause changes the password of the schema. You must
specify the current schema password (if any) to modify the schema password unless the
password has been specified in a preceding declare schema statement. The <passwd>
identifier specifies the new schema password.
The modify user password clause changes the password of the user associated with the
schema. The <passwd> identifier specifies the new user password. This modifies the
password only within RIS (this option does not update the password in the vendor DBMS or
the operating system).
The modify osuser clause changes the name and password of the operating system user
associated with the schema. The <osuser> identifier specifies the new operating system
username. The <passwd> identifier specifies the new operating system user password. The
osuser clause lets an operating system user be specified so that the RIS server is not
necessarily started as root.
The modify remote clause changes the node on which the database exists. This is useful
when the hardware address of the machine changes. The <node> identifier can be a
nodename, or an Internet address. Note that modify remote and modify user
password can be done simultaneously. The current value for protocol is: TCP.
The modify db2 password clause performs the same function as the modify user
password clause, except that the user password is also updated on the IBM host system.
This option works only for IBM systems using an external security manager with CICS, such
as RACF, and only for CICS systems supporting the CICS CESN transaction as provided by
IBM. Your IBM security administrator may not allow the use of this function. The CICS
system may require the use of a mode for this function that is different from the one
specified in the create schema command.
The include table/view/index clause includes a table, view, or index from the
underlying vendor DBMS into a RIS schema definition (RIS dictionary). This object is then
known to the schema. If the data type of any column of the table and/or view to be included
is not a RIS supported data type, it is defined as an UNSUPPORTED data type and the
column is not accessible.
The optional <dbmsuser> qualifier lets a table, view, or index owned by a user other than
the schema user be included in the schema.
The as clause permits an alias to be specified. After the as clause is used, RIS knows that
table/view/index by the alias and not by the underlying RDBMS name. Once an alias is
established within RIS, the alias must be used in all subsequent statements. If column
names are given aliases, the number of columns specified in the as clause must match exactly
the number of columns in the original table or view. Note that the column names for the
original table or view are not specified in the include clause.
The RIS_VIEW_DEFS column, in the RIS dictionary view RIS_VIEWS, is made null
on a view that already exists in the database when a schema is created. Because the
RIS_VIEW_DEFS column is NULL, you cannot use the risunlod utility to unload
the view definition.
The exclude table/view/index clause excludes a table, view, or index from the RIS
schema definition (RIS dictionary). RIS does not drop and/or delete the object from the
vendor DBMSs dictionary.
The alter schema statement does not cause any changes to occur in the
vendor DBMS. Only the schema definition within the RIS dictionary is
modified.
If there are other parts of the schema definition you need to alter, it is necessary to
drop the schema and re-create it. However, dropping the schema removes any
privileges granted to or by the schema.
4 - 10
4.2.2
__________________________________________________________________________________________________________________________________________________
alter table
The alter table statement adds a column to an existing table in the default schema.
alter table <table> add <riscolumn> <data type> [not null]
[ extern <dbmscolumn> ];
RIS Version 5.3.1 and later support 16-bit or multi-byte languages. (Most 16bit 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 bytes, where x is an integer. For those using
multibyte languages, the maximum number of characters should be interpreted
as the maximum size in bytes. Therefore, the normal maximum of 18
characters translates into 9 16-bit characters.
Notes
_ ____
Currently, the only change you can make to tables is the addition of columns. This is
accomplished with the alter table statement which adds a single column to a table. If
you want to add more than one column, the statement must be issued once for each column.
The alter table statement requires the table name and the name of the column you want
to add. You can use the not null clause to specify that RIS not permit null values in the
column.
The <table> identifier is the name of the target table. The table must exist in the default
schema.
The <riscolumn> identifier is a column name that is unique to the target table.
The <data type> identifier is an SQL data type.
Valid SQL data types and the mapping of SQL data types to vendors data types
are described in the section RIS Data Types.
The not null keywords form an optional phrase specifying whether or not
null values are allowed in the column. You use not null only when the
alter table statement is applied to a table that does not contain any data.
The optional extern keyword and <dbmscolumn> identifier form an optional phrase
specifying a column name for the underlying database different from the RIS column name.
This clause creates an alias (<riscolumn>) for the column name (<dbmscolumn>).
When a table is altered, DB2 defines default values for existing data. DB2 has
a default value only when not null is specified.
Examples
_________
alter table table1 add col4 integer not null
extern dbtab1;
Existing views cannot access the new columns even if the view statement used
a wildcard (*) to select all columns.
See
Also
________
create table
drop table
4 - 12
4.2.3
__________________________________________________________________________________________________________________________________________________
close schema
The close schema statement deactivates a RIS database server process for a schema.
close schema { <schema> [, ...] | all };
Notes
_ ____
The <schema> identifier is the name of the schema. Do not give the schema password.
The close schema all closes all opened schemas.
An implicit commit is issued if autocommit is off.
If you try to close a schema that is not open, you do not get an error message.
If the default schema is closed, another default schema statement must be
executed before any other SQL statements can be executed.
A schema must be opened before it can be referenced. Schemas can be opened
explicitly with the open schema statement or implicitly by any reference to
the schema.
You do not need any privileges to close a schema.
For more information about schemas, see the section Schemas.
Examples
_________
close schema all;
close schema jim;
close schema jim, joe, fred;
See
Also
________
create schema
default schema
open schema
4.2.4
__________________________________________________________________________________________________________________________________________________
commit
The commit statement ends a transaction, or group of SQL statements, making permanent
the effects of all statements in the group.
commit [ work ] [ for <schema> ];
Notes
_ ____
By default, the autocommit mode is on and RIS automatically issues a commit statement
after every SQL statement. Setting the autocommit mode to off enables normal transaction
processing. You can use the set transaction autocommit statement to enable or
disable the autocommit mode. The commit statement is not necessary in autocommit mode
but can still be used.
For more information about transactions and the use of the commit, rollback, and set
transaction autocommit statements, see the rollback and set transaction
autocommit statement descriptions.
The work keyword can be specified to conform to the SQL standard. It is optional and
serves no other function.
The for <schema> clause lets the user specify which transaction to commit (RIS supports
multiple transactions, up to one transaction per schema). The maximum number of multiple
transactions is specified by MAX_TRANSACTIONS in the parms file. If the for <schema>
clause is not specified, the transaction associated to the current default schema is committed
(however, if MAX_TRANSACTIONS is assigned the value 1, the command commits any
transaction, whether or not it is associated with the default schema). If the for <schema>
clause is specified, the transaction associated to the schema name is committed (however,
the schema may not be a default schema).
The vendor DBMSs implement transactions in different ways that determine
when the effects of the statements in a transaction are posted to the physical
database.
When a commit or rollback statement is executed, all cursors are closed and
all locked tables are released.
4 - 14
If an error occurs during the execution of a DML statement that updates the database,
a rollback command is executed automatically.
If RIS is terminated within a transaction, a rollback statement is issued
automatically.
Examples
_________
commit;
commit for sch1;
See
Also
________
rollback
set transaction
4.2.5
__________________________________________________________________________________________________________________________________________________
create index
The create index statement creates an index on one or more columns in a table in the
default schema.
create [ unique ]index<risindex>
extern <dbmsindex> on <ristable> (<riscolumn> [, ...]);
RIS Version 5.3.1 and later support 16-bit or multi-byte languages. (Most 16bit 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 bytes, where x is an integer. For those using
multibyte languages, the maximum number of characters should be interpreted
as the maximum size in bytes. Therefore, the normal maximum of 18
characters translates into 9 16-bit characters.
Notes
_ ____
The time required to search a column of a table or view for a matching value can be reduced
by creating an index on that column. An index is a sorted list of the values in that column.
Since the list is sorted, the DBMS can use faster techniques to search for matching values.
The speed gained by indexing a column in a table is greater for a large number of rows; there
is no real advantage in creating an index on a table that contains few rows.
A disadvantage of indexing is that indexed tables and views require more disk space to
maintain. Also, the time required to insert a value into an indexed column is greater due to
the overhead of maintaining the index.
Indexes are dropped when the table on which they are created is dropped.
The <index> identifier is the name of the new index. In general, index names must be
unique within a schema.
INFORMIX does not let multiple users in one database have an index of the
same name. Therefore, if more than one schema is defined on one INFORMIX
database, index names must be unique to all of those schemas.
In contrast to INFORMIX, ORACLE let multiple users within the same
ORACLE database have an index of the same name.
The <table> identifier is the table name. The table must exist in the default schema.
The <column> identifier is the name of the column on which to create the index. Creating
an index on more than one column results in an ordering of the row by the columns from left
to right in the column list. An index with multiple columns is called a composite index.
4 - 16
The unique keyword indicates whether duplicate values should be allowed for the indexed
column.
The maximum number of columns that can be specified for an index is eight. The total width
(number of bytes) of a composite index must be 120. For information about how to
calculate the number of bytes in an index, see the section RIS Limits.
In the optional extern clause, the <dbmsindex> must be a valid index name for the
underlying database. With this clause, the index name in the underlying database
(dbmsindex) can be given an alias (risindex) that is used by RIS and RIS-based applications.
Indexes add some storage overhead and also degrade insertion and deletion
time.
Bulk data loading should be done before the creation of indexes.
Examples
_________
create unique index t1c1 on table1(column1);
create index t1c1c2 on table1(column1, column2);
create index t1c3 extern t1c3 on table1(column1, column2);
See
Also
________
alter table
create table
drop index
drop table
4.2.6
__________________________________________________________________________________________________________________________________________________
create schema
A schema is a named collection of tables, views, indexes, and privileges owned by a user on a
database. Within RIS, the tables, views, indexes, and privileges are contained in, created by,
and owned by the schema.
When the schema is successfully created, the new schema is opened and becomes the default
schema. After the schema has been created, you should use the schema name to refer to the
database/user combination.
If you attempt to create a schema on a database, and a RIS dictionary already
exists for that schema, but there is no entry for the schema in the schema file,
RIS creates an entry in the schema file and does not modify the DBMS.
4 - 18
Notes
_ ____
The schema created has the same authorization as the user. If any particular database user
is not the owner of the database, the owner of the database has to grant privileges to the user
to be able to create a RIS schema
The on database clause specifies the database environment (vendor, location, name, and
other information) on which the schema is created. It is valid to use the on database
clause when creating subsequent schemas on a database. If the on database clause is not
used, then the new schema is created on the same database as the default schema. The
remote clause is part of the on database clause and must be specified if the data server is
on another node or if you need to specify how the database should be accessed remotely (from
another machine). This is necessary to set up the communication information.
Generally, the remote data server and database are on the same node.
However, for INFORMIX, and ORACLE databases accessed by RIS**NET data
servers, the remote clause must specify the location of the RIS**NET data
server rather than the location of the database.
The <protocol> identifier specifies the type of network protocol to use to communicate
with the remote site. The communication protocol currently supported is TCP (TCP/IP). The
valid value is TCP. The <node> identifier can be either a nodename as defined by the
protocol, or an Internet address. Currently three protocols can be listed at one time. The
first protocol that is supported between the client and server nodes found by searching the
list top to bottom is used.
VAX servers allow two protocols: DECNET and DEC TCP/IP. Intergraph
Intel-based systems support only 1 protocol: TCP/IP.
The user clause can be omitted if it has been specified in a previous declare schema
statement. Otherwise, it is mandatory. The <username> identifier must be known to the
vendor DBMS. Database users must be created before RIS schemas can be created. The
length of the <username> and user <password> is dependent on the operating system and
vendor database.
The different vendor DBMSs have different concepts of a user. For example: on INFORMIX,
the <username> in the user clause must be a valid, existing, operating system log-in on the
machine where the database resides. On SYBASE, the database user has to be a SYBASE
system log-in. On Microsoft SQL Server, the database user has to be a Microsoft SQL Server
system log-in. On ORACLE, the <username> does not have to be an operating system log-in
(maxlen for ORACLE is 30). In the user clause, the <username> and <passwd> identifiers
must be valid ORACLE user names and passwords. The <passwd> identifier is required for
ORACLE databases. For DB2, the <username> must be a valid (user authorization) on the
IBM machine. For databases that are case sensitive for usernames, the username has to be
entered in the correct case. When the database is not case sensitive, RIS performs any
necessary case conversion.
For INFORMIX, ORACLE, and DB2, RIS internally converts some nonstandard
data types to data types it supports. Any other unsupported data types are
identified as unsupported. As long as RIS describes the columns as
unsupported, the unsupported columns cannot be used in any statement. A
program called risdtype lets you redefine the column to RIS. You are warned
that these changes are not standard and can result in corrupt data.
Unsupported columns cannot be used in any statement. See the RIS Utilities
Guide for 32-Bit Applications for more information.
When a schema is created, information on how to access it is stored in the schema file in the
directory where RIS was loaded on the client machine (usually /usr/ip32/ris for UNIX or
c:\Program Files\Common Files\Intergraph\ris05.nn\ for Windows NT where nn.nn is the
product version number). On all subsequent runs of an application, RIS checks this file to
see where the schema is located. The schema file may exist or be shared on all client nodes
that use RIS. The locate schema command updates the parms file in /usr/ip32/ris (for
UNIX) or c:\Program Files\Common Files\Intergraph\ris05.nn\ (for Windows NT) with the
location of the schema file. These files and directories are the defaults and can be changed.
The locate schema command is not applicable on a VAX server. See the sections
Parameters and Schema Definition File for more information.
The following clauses: user, using, server version, include |
exclude, and force are position sensitive. They must appear in the create
schema statement in the same position as they appear in the documentation.
The using option specifies a vaild DBMS user and enables the sharing of the dictionary
owned by the specified user. The user attempting to share the dictionary must already have
schema privileges granted by the user specified in the using clause.
The server version clause accommodates future features releases after
version 5.0 and can be ignored for 5.0.n releases. (A default value of 0.0 will be
entered in the schema file.)
The server version clause lets you specify the version of RIS for which the schema is
being created. The <maj> identifier must be 5 or higher and the <.feature> identifier
specifies the features release, for example, .1 or .2.
The include | exclude option is used to load or not load the schema with information on
the existing tables/views/indexes of the user. Include is the default.
The force option drops previously created RIS dictionary objects such as RIS tables, views,
indexes, and privileges of the schema before creating the new schema. This option is useful
for corrupt schemas.
Do not edit the schemas file unless absolutely necessary. Doing so could cause RIS to
fail. You may execute the command checksum schema file to correct the damage.
See the RIS Utilities Guide for 32-Bit Applications for more information.
The RIS_VIEW_DEFS column, in the RIS dictionary view RIS_VIEWS, is made null
on a view that already exists in the database when a schema is created. Because the
RIS_VIEW_DEFS column is NULL, you cannot use the risunlod utility to unload
the view definition.
4 - 20
4.2.6.1
__________________________________________________________________________________________________________________________________________________
Notes
_ ____
If the RISINFxS data server is on a UNIX node:
For the INFORMIX Standard Engine product, the <dbname> must be a full
pathname. On UNIX systems, the filename portion cannot be longer than ten
characters because INFORMIX adds a DBS suffix to it.
For the INFORMIX OnLine Engine product, the <dbname> needs only to be the
database name.
If the RISINFxS data server is on a Windows NT node:
For the INFORMIX Standard Engine product, the <dbname> must be a full
pathname and must also include the INFORMIX server name with the @ separator:
</c=/dbs/dbname@servername>
For all references to a database use a forward slash with a equal sign. For example:
/c=/dbs/database
For references to a directory use a backward slash and a colon. For example:
c:\dbs\database
For the INFORMIX OnLine Engine product, the <dbname> must include only the
INFORMIX server name with the @ separator:
dbname@servername
The ostype clause specifies the type of operating system the RIS server machine is
running. The <ostype> identifier is the type of operating system. Currently the acceptable
values are UNIX and NT.
The dir clause is mandatory. The dir clause must be used to provide RIS with the
location for the INFORMIX software. The dir clause should contain the value of the
environment variable INFORMIXDIR on the target system.
4 - 22
The sqlexec needs to be set if both INFORMIX Standard Engine and INFORMIX-OnLine
Engine products exist on the machine. For the UNIX INFORMIX Database Management
System located in $INFORMIXDIR:
If using INFORMIX OnLine Engine, enter
$INFORMIXDIR/lib/sqlturbo
DBTEMP specifies where INFORMIX creates temporary files. The tbconfig specifies a
configuration file for OnLine only. For example:
On a UNIX node
SQLEXEC=/usr/informix/lib/sqlturbo
DBTEMP=/usr/tmp
TBCONFIG=myconfig
On a Windows NT node
SQLEXEC=C:\win32app\informix\bin\sqlturbo.exe
DBTEMP=C:\TEMP
TBCONFIG=C:\win32app\informix\etc\onconfig
For more information on data types and conversions, see the section Vendor-Specific
Information.
Examples
_________
The following example creates the schema called joe_schema, on the existing INFORMIX
Standard Engine database, on the local machine in /usr2/my_db.dbs. The username joe
specifies an existing operating system log-in and also an INFORMIX username. The
operating system type is UNIX.
create schema joe_schema
on database (informix, dbname my_db, dir /usr3/informix, ostype UNIX)
user joe;
The following example creates the schema called joe_schema, on the existing INFORMIX
Standard Engine database, on the local machine in c:\dbs\my_db.dbs, where the
INFORMIX server name is my_server. The username joe specifies an existing operating
system log-in and also an INFORMIX username. The operating system type is NT.
create schema joe_schema
on database (informix, dbname /c=/dbs/my_db@my_server, dir
c:\win32app\informix, ostype NT)
user joe;
The following example creates the schema jim_schema with the password jim_passwd in the
INFORMIX online database on the remote node rnode using the UNIX log-in: jim.pass1 in
the directory /usr2/my_db.dbs. The communication protocol is TCP. Since INFORMIX was
not loaded into /usr/informix on the remote node, the dir keyword is used to specify that it
was loaded into /usr3/informix. The operating system type is unix.
create schema jim_schema.jim_passwd
on database
(informix, dbname my_db,
ostype unix, dir /usr3/informix,
remote (tcp rnode))
user jim.pass1;
In the case where the schema accesses a database through a RIS**NET data
server, the remote clause refers to the location of the data server rather than
the database.
This example adds a schema for the user joan to the database with the name joan_schema.
There is no need to specify the database information. The schema is created on the same
database as the default schema.
create schema joan_schema user joan;
See
Also
________
create schema
close schema
default schema
drop schema
open schema
4 - 24
4.2.6.2
__________________________________________________________________________________________________________________________________________________
The following example creates the schema jim_schema with the password jim_passwd on an
ORACLE database on the remote node my_ws with a database log-in of jim.pass1. The
communication protocol is TCP. The dir clause indicates that ORACLE is loaded in
/usr2/oracle and the dbname clause specifies a system ID of 1. The osuser is smith with
password ospass, and the ostype is UNIX.
create schema jim_schema.jim_passwd
on database
(oracle, dir /usr2/oracle, dbname 1, osuser smith.ospass,
ostype UNIX,
remote (tcp my_ws))
user jim.pass1;
The following adds the user joan to the database with the schema joan_schema. There is no
need to specify the database information. The schema is created on the same database as the
default schema.
create schema joan_schema user joan.mypass;
Note that the dir clause in both examples is dbms_net which it must be for
all RISORANS connections. Also, The osuser clause must be an osuser for
both client and server systems.
See
Also
________
create schema
close schema
default schema
drop schema
open schema
declare schema
4 - 26
4.2.6.3
__________________________________________________________________________________________________________________________________________________
The net_protocol is the network protocol that RIS uses to get to the IBM machine that
the DBMS resides on. This value is case sensitive with a valid value of LU6.2 or TCP/IP.
For
LU6.2
__________
The host_program is the name the IBM System Administrator called the RIS
transaction processor when it was installed on the IBM; the CICS transaction name.
This value is case sensitive.
The ris_lu and the host_lu are the names the System Administrator assigned to
the logical units that allow communication to the RIS transaction processor on the
IBM machine. There are two logical units, one on the data server machine, the
ris_lu, and the other on the IBM machine, the host_lu. The lu names are generated
when the LU 6.2 network is configured. These values are case sensitive.
On Windows NT, the ris_lu name can be specified but is not used. The ris_lu
value on Windows NT is determined by the default outgoing LU defined for the user
or system.
On Windows NT, the host_lu must match a LU that has been configured for the
connection to the IBM mainframe.
The mode is the name the System Administrator assigned to the mode that allows
communication to the RIS transaction processor on the IBM machine. On Windows
NT, this name must match the modename specified in the partnering of the RIS and
host LUs. This name also corresponds to the IBM definition of the VTAM mode
entry. The mode assigns attributes to the connection and must be predefined by the
System Administrator. The modename is generated when the LU 6.2 network is
configured. This value is case sensitive.
For more information on data types, see the sections RIS Data Types and Vendor-Specific
Information.
Examples
_________
The following example creates the schema called joe, on an existing database DSNDB04.
The user is executing the statement on a machine that is directly connected to the IBM
network. The values for architecture, os, and environment are default values. Notice that
the values for most of the arguments are in uppercase. The IBM environment does most of
its work in uppercase. Always make sure that you get the case sensitive values from your
System Administrators for each of the arguments.
create schema joe
on database (db2, dbname DSNDB04,
osuser smith, ostype nt,
gateway (net_protocol=lu6.2,
host_program=RISX,
ris_lu=HSV1.L620100,
host_lu=HSV1.A01CICSA,
mode=IGRLU62P) )
user JOE.PASSWD;
4 - 28
The following example creates the schema dave on an existing database DSNDB04. The user
is executing the statement on a machine that is not directly connected to the IBM network.
Therefore, we need to specify the remote clause, as well as the gateway clause.
create schema dave
on database (db2, dbname DSNDB04,
remote (tcp ris),
osuser smith.spass, ostype nt,
gateway (arch=s370,
os=mvs,
env=cics,
net_protocol=lu6.2,
host_program=RISX,
ris_lu=HSV1.L620100,
host_lu=HSV1.A01CICSA,
mode=IGRLU62P))
user DAVE.PASSWD;
See Also
________
create schema
close schema
default schema
drop schema
open schema
declare schema
4.2.6.4
__________________________________________________________________________________________________________________________________________________
Notes
_ ____
The dir clause specifies the directory in which the SYBASE interfaces file is located.
The dbname clause specifies the name of a SYBASE database associated with the schema.
The osuser clause specifies the name and password of the operating system user associated
with the schema. The <osuser> identifier is the name of the operating system user. The
<passwd> identifier is the password of the operating system user. The osuser clause lets
an operating system user be specified so that the RIS server is not necessarily started as
root. The osuser clause enhances RISs ability to start server processes as appropriate for
the operating system being used. The osuser clause can be omitted here if it has been
specified in a previous declare schema statement. This is true if the operating system is
NT.
The ostype clause specifies the type of operating system the RIS server machine is
running. The <ostype> identifier is the type of operating system. Currently the acceptable
values are NT and UNIX.
The dsquery specifies the name of the SYBASE server used for the schema. By default, RIS
uses the SYBASE server named as SYBASE.
The filename specifies the name of the SYBASE interfaces file for the schema. By default,
RIS uses the SYBASE interfaces file named interfaces for UNIX and SQL.INI for NT.
In the user clause, the <username> and <passwd> identifiers must be valid SYBASE user
names and passwords. The <passwd> identifier is required for SYBASE databases.
You must be granted create procedure privileges before you can create shared schemas.
4 - 30
Examples
_________
The following example creates the schema called joe_schema, on the existing SYBASE
database on the local machine. The existing database user joe with a password of pass1
accesses the database through this schema. The dir clause indicates that the SYBASE
interfaces file is located in /usr/sybase. The dbname is risdb1, the osuser is smith, and
the ostype is UNIX.
create schema joe_schema
on database
(sybase, dir /usr/sybase, dbname risdb1, osuser smith, ostype unix)
user joe.pass1;
The dbname is risdb1, the osuser is smith, and the ostype is NT.
create schema joe_schema
on database
(sybase, dir c:\sql10, dbname risdb1, osuser smith, ostype NT)
user joe.pass1;
The following example creates the schema jim_schema with the password jim_passwd on a
SYBASE database on the remote node my_sun with a database log-in of jim.pass1. The
communication protocol is TCP. The dir clause indicates that the SYBASE interfaces file
named masterfile is located in /usr2/sybase, the dbname clause specifies the name as risdb1
and SYBASE server is named RISSYB. The osuser is smith, and the ostype is UNIX.
create schema jim_schema.jim_passwd
on database
(sybase, dir /usr2/sybase, dbname risdb1, osuser smith,
ostype unix, option (dsquery=RISSYB,filename=masterfile),
remote (tcp my_sun))
user jim.pass1;
See
Also
________
create schema
close schema
default schema
drop schema
open schema
declare schema
4.2.6.5
__________________________________________________________________________________________________________________________________________________
Notes
_ ____
The dbname clause specifies the name of a SQL Server database associated with the schema.
The ostype clause specifies the type of operating system the RIS server machine is
running. The <ostype> identifier is the type of operating system. Currently the acceptable
value is NT.
The ostype clause specifies the type of operating system the RIS server machine is
running. The ostype identifier is the type of operating system. Currently, the acceptable
values are NT and UNIX.
The dsquery specifies the name of the SQL Server used for the schema. By default, RIS
uses the SQL Server name as the server/node name.
In the user clause, the <username> and <passwd> identifiers must be valid SQL Server
user names and passwords. The <passwd> identifier is required for SQL Server databases.
Examples
_________
The following example creates the schema called joe_schema, on the existing SQL Server
database on the local machine. The existing database user joe with a password of pass1
accesses the database through this schema. The dbname is risdb1, the osuser is smith,
and the ostype is NT.
create schema joe_schema
on database (mssql, dbname risdb1, ostype nt)
user joe.pass1;
4 - 32
The following example creates the schema jim_schema with the password jim_passwd on a
SQL Server database on the remote node my_nt with a database log-in of jim.pass1. The
communication protocol is TCP. The dbname clause specifies the name as risdb1 and
DSQUERY is set to the nodename/SQL Server name of RISMSQ. The osuser is smith, and
the ostype is NT.
create schema jim_schema.jim_passwd
on database
(mssql, dbname risdb1,
ostype nt, option (dsquery=RISMSQ),
remote (tcp my_nt))
user jim.pass1;
See
Also
________
create schema
close schema
default schema
drop schema
open schema
declare schema
4.2.7
__________________________________________________________________________________________________________________________________________________
create table
The create table statement creates a table in the default schema.
create table <ristable> ({ <riscolumn> <datatype>[not null] } [, ...]);
[extern <dbmstable> [<dbmscolumn>[,...])]];
RIS Version 5.3.1 and later support 16-bit or multi-byte languages. (Most 16bit 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 bytes, where x is an integer. For those using
multibyte languages, the maximum number of characters should be interpreted
as the maximum size in bytes. Therefore, the normal maximum of 18
characters translates into 9 16-bit characters.
Notes
_ ____
The <ristable> identifier is the table name. The table name must be unique within the
schema in which it is created. The maximum length of the table name is dependent on ANSI
mode. If ANSI mode is on, the maximum length is 18 characters. Otherwise, the
maximum length is 31 characters based on the underlying RDBMS.
The <riscolumn> identifier is a column name. The length of the column is also dependent on
ANSI mode. The number of columns allowed in a table is 100 to be compatible with all
supported databases. This limit is temporarily increased to 254. For more information on
table limits, see the section RIS Limits.
The <data type> identifier is an SQL data type. The valid RIS data types are: character,
integer, smallint, double precision, real, timestamp, decimal, ris_blob, and ris_text. Valid
SQL data types and the mapping of SQL data types to other vendors data types and to C
language data types are listed in the section Data Types.
In the optional extern clause, the <dbmstable> and <dbmscolumn> must be a valid table
name and column names for the underlying database. With this clause, the table name
(dbmstable) and column names (riscolumn) in the underlying database can be given aliases
(ristable and riscolumn) that can be used by RIS and RIS-based applications.
The not null keyword phrase is an optional phrase specifying whether or not null values
are allowed in the column.
4 - 34
4.2.8
__________________________________________________________________________________________________________________________________________________
create view
The create view statement creates a virtual table consisting of one or more actual tables
or other views. The purpose of a view is to provide another way of viewing data other than
the physical table. Views are useful for logically combining tables to make them appear as
one or to restrict access to columns containing sensitive data.
create view <risview> [ (<column-list>) ]
[extern <dbmsview>[ (<dbmscolumn-list>) ]
as <select-statement>;
RIS Version 5.3.1 and later support 16-bit or multi-byte languages. (Most 16bit 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 bytes, where x is an integer. For those using
multibyte languages, the maximum number of characters should be interpreted
as the maximum size in bytes. Therefore, the normal maximum of 18
characters translates into 9 16-bit characters.
Notes
_ ____
The <risview> identifier is the name of the RIS view to be created. View names must be
unique to a schema. The length of table name is dependent on ANSI mode. If ANSI mode
is on, the length is 18 characters. Otherwise, the length is 31 characters.
The <column-list> identifier is an optional list of virtual column names for the view. The
length of the column is also dependent on ANSI mode. If the <column-list> is given, the
number of columns must match the number of columns returned by the <selectstatement> clause. If the <column-list> identifier is specified, the columns can no longer be
referred to by the original names when selecting from this view. However, this has no effect
on the table.
The <column-list> is required when duplicate column names exist or an expression
exists in the select list.
In the optional extern clause, the <dbmsview> and <dbmscolumn> must be a valid view
name and column names for the underlying database. With this clause, the view names and
column names in the underlying database can be given aliases (synonyms) that are used by
RIS and RIS-based applications.
The <select-statement> clause is any valid RIS select statement and indicates the columns
and data selected for the view. However, the order by clause cannot be used.
4 - 36
If a view is composed of more than one table, or if the view definition <select-statement>
phrase contains an expression, the view can only be selected from. If the view is composed of
only one table and does not contain any expressions in the <select-statement> clause, the
view can also be used in the <relation> identifiers of the insert, update, and delete
statements. These operations are not virtual; however, since they affect the data in the table
composing the view. Tables and views used in the view definition must be owned by the
default schema.
Views are subject to the same restrictions as tables.
Drop dependent views that reference a table before you drop the table itself.
Depending upon the underlying DBMS, dependent views might not be deleted,
but remain as invalid views.
Table and column names cannot be the same as RIS or DBMS reserved words.
See the section set database. RIS does not let applications create views on RIS
dictionary objects.
Examples
_________
create view view1
as select * from tab1;
create view view2(var1)
as select col1 from tab1;
create view view3
as select tab1.col1, tab2.col2 from tab1, tab2
where tab1.col1 = tab2.col1;
create view view4(v1,v2,v3)
as select c1,avg(c1),c2 from table tab1;
create view view5(v1,v2,v3)
extern xtvw5(exv1,exv2,exv3)
as select c1,c2,c3 from table tab1;
In ANSI mode, names must not exceed 18 characters. Otherwise, depending on
the database, names must not exceed 31 characters.
See the section set mode for more information about ANSI mode.
See
Also
________
create table
delete
drop table
drop view
insert
select
update
set database
set mode
4.2.9
__________________________________________________________________________________________________________________________________________________
declare schema
The declare schema statement lets you specify a schema name and password. Optionally,
you can specify 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.
Potential conflicts with this statement and other SQL statements are discussed in the
following Notes.
declare schema <schema>[.<passwd>]
[user <username>[.<passwd]]
[osuser <osusername>[.<passwd]];
Notes
_ ____
The <schema> identifier is the schema name.
The optional <passwd> identifier is the password for the schema.
The optional user clause specifies a valid RDBMS user and a password (optional) schema.
This user must already be a valid schema user.
The optional osuser clause specifies a valid operating system user and password (optional).
The following explains the possible conflicts between the declare schema statement and
other SQL statements:
1.
The statements which are impacted by the schema name and password in a declare
schema statement include: alter schema, create schema, default schema
and drop schema.
a.
If any of these statements specifies a password with the schema name and the
preceding declare schema statement also specifies a password with the schema
name, then the two passwords must be the same, otherwise an error occurs.
b.
If any of these statements specifies a password with the schema name and the
preceding declare schema does not specify a password with the schema name,
an error occurs.
c.
If any of these statements does not specify a password with the schema name and
the preceding declare schema statement specifies a password with the schema
name, then the schema password in the declare schema statement is used as
the password for the statement.
4 - 38
2.
3.
4.
d.
If any of these statements and the preceding declare schema statement do not
specify a schema password, then a NULL password is assumed for the statement.
e.
The user password in a declare schema statement impacts the create schema
statement as follows:
a.
If the create schema statement specifies a user clause and the preceding
declare schema statement also specifies a user clause, then the user and
password in both user clauses must be the same.
b.
If the create schema statement specifies a user clause and the preceding
declare schema statement does not specify a user clause, then the user
password in the user clause of the create schema statement is used as the
user password.
c.
If the create schema statement does not specify a user clause and the
preceding declare schema statement specifies a user clause, then the user
password in the declare schema statement is used as the user password for the
schema.
d.
If neither the create schema statement nor the declare schema statement
specify a user clause, an error occurs.
The statements which need to open an existing schema and are impacted by the user
password in the declare schema statement include: alter schema, default
schema, open schema, and drop schema.
a.
b.
c.
The OS user password in a declare schema statement impacts the create schema
statement for SYBASE, Microsoft SQL Server, DB2, or ORACLE as follows:
a.
If the create schema statement specifies an osuser clause and the preceding
declare schema statement also specifies an osuser clause, then the user and
password in both user clauses must be the same. Otherwise, an error occurs.
b.
If the create schema statement specifies an osuser clause and the preceding
declare schema statement does not specify an osuser clause, then the osuser
password in the osuser clause of the create schema statement is used as the
osuser password.
5.
c.
If the create schema statement does not specify an osuser clause and the
preceding declare schema statement specifies an osuser clause, then the
osuser password in the declare schema statement is used as the osuser
password in the create schema statement.
d.
If neither the create schema statement nor the declare schema statement
specify an osuser clause, then an error occurs.
b.
c.
Examples
_________
declare schema t1.john;
declare schema sch2.mary
user jones.mary
osuser jones.mary
See
Also
________
create schema
undeclare schema
alter schema
default schema
drop schema
4 - 40
4.2.10
__________________________________________________________________________________________________________________________________________________
declare table
The declare table statement lets you define a RIS table in the RIS in-memory data
dictionary cache.
declare table [<schema>.]<table> ({<riscolumn> <data type> [not null]}[,...])
[extern [<dbmsuser>.<dbmstable> [ (dbmscolumn> [,...])]]
[with [partial] verify option];
Notes
_ ____
The <table> identifier is the table name.
The optional <schema> identifier is the schema in which the table exists. The schema
identifier must be specified if the table exists in a schema other than the default schema. No
privileges are required to declare a table that exists in a schema other than the default
schema.
Valid RIS SQL data types, the ones used in create table statements, are listed in the
section RIS Data Types. However, unsupported data types can also be used in declare
table statements. See the section RIS Data Types for more information.
The optional extern clause and <dbmstable> and <dbmscolumn> identifiers specify the
names of the tables and columns in the underlying RDBMS. The <dbmsuser> identifier can
be used to qualify the RDBMS table name with the owner.
The declare table statement lets you define a table in RISs in-memory data dictionary
cache. This eliminates the delay encountered while referencing a table for the first time
(with the no verify option). The verify option validates the table definition specified in the
declare table statement against the definition stored in the RIS dictionary and against
the definition stored in the underlying DBMS dictionary. The keyword partial tells RIS to
validate against the underlying database only. If verify is specified without the partial
keyword, the table definition of the declare table statement is verified against the RISdictionary definition and against the underlying database definition. This is also called the
full verify option. This is similar to the set mode statement and the verify on/off option.
For example, the declare table statement with the verify option is equivalent to the
set verify on statement, and the declare table statement without the verify
option is equivalent to the set verify off statement.
This statement fails if the table definition already exists in memory, or due to a mismatch in
attributes definition.
This statement must be used carefully. An incorrect table definition may cause RIS
to behave unpredictably.
Examples
_________
declare table t1 (c1 int, c2 char(12));
declare table sch2.t2 (c1 int, c2 char(12)) with verify option;
declare table t3 (c1 int, c2 unsupported, c3 char(3))
extern dview1 (dvc1, dvc2, dvc3);
See Also
________
create table
create view
declare view
set mode
undeclare table
undeclare view
4 - 42
4.2.11
__________________________________________________________________________________________________________________________________________________
declare view
The declare view statement lets you define a view in the RIS in-memory data dictionary
cache.
declare view [<schema>.]<view> ({<riscolumn> <data type> [not null]}[,...])
[extern [<dbmsuser>.]<dbmsview>[(<dbmscolumn>[,...])]]
[with [partial] verify option];
Notes
_ ____
The <view> identifier is the view name.
The optional <schema> identifier is the schema in which the view exists. The schema
identifier must be specified if the view exists in a schema other than the default schema. No
privileges are required to declare a view that exists in a schema other than the default
schema.
The view is declared using the create view statement syntax. The <riscolumn> identifier
represents the virtual column names described in <column-list> of create view syntax.
The optional extern clause and <dbmsview> and <dbmscolumn> identifiers specify the
names of the tables and columns in the underlying RDBMS. The <dbmsuser> identifier can
be used to qualify the RDBMS view name with the owner.
The declare view statement lets you define a view in RISs in-memory data dictionary
cache. This eliminates the delay encountered while referencing a view for the first time (with
the no verify option). The verify option validates the view definition specified in the
declare view statement against the definition stored in the RIS dictionary and against the
definition stored in the underlying DBMS dictionary. The keyword partial tells RIS to
validate against the underlying database only. If verify is specified without the partial
keyword, the view definition of the declare view statement is verified against the RISdictionary definition and against the underlying database definition. This is also called the
full verify option. This is similar to the set mode statement and the verify on/off option.
For example, the declare view statement with the verify option is equivalent to the
set verify on statement, and the declare view statement without the verify option
is equivalent to the set verify off statement.
This statement fails if the view definition already exists in memory, or due to a mismatch in
attributes definition.
This statement must be used carefully. An incorrect view definition may cause RIS
to behave unpredictably.
Examples
_________
declare view v1 (c1 int, c2 char(12));
declare view sch2.v2 (c1 int, c2 char(12)) with verify option;
declare table t3 (c1 int, c2 unsupported, c3 char(3))
extern bob.dv1(dvc1, dvc2, dvc3);
See Also
________
create table
create view
declare table
set mode
undeclare table
undeclare view
4 - 44
4.2.12
__________________________________________________________________________________________________________________________________________________
default schema
The default schema statement sets the schema (database/user combination) in which
tables and views are created, dropped, and searched for, by default. This statement also
opens the schema.
default schema <schema>[.<passwd>];
Notes
_ ____
The <schema> identifier is the name of the schema.
The <passwd> identifier is the password to the schema specified with the create schema
statement. This is only needed if a password exists for the schema and the password has not
been provided by a preceding declare schema statement.
The default schema statement does not implicitly cause a commit.
The default schema can be changed at any time without affecting transactions
in progress.
For more information about schemas, see the section Schemas.
Examples
_________
default schema jim;
default schema jim.passwd;
See
Also
________
create schema
close schema
drop schema
open schema
declare schema
4.2.13
__________________________________________________________________________________________________________________________________________________
delete
The delete statement removes rows of data from a table.
delete from [<schema>.]<relation>[where <conditions>];
Notes
_ ____
The <relation> identifier is the name of a table or view from which to remove rows.
The optional <schema> identifier is the schema in which the relation exists. This identifier
must be specified if the relation exists in a schema other than the default schema. A period
(.) must separate the schema name and the relation name.
The where clause can optionally be used to restrict which rows are to be removed. If the
where clause is not specified, all rows are removed from the table. For a description of the
syntax for the where clause, see the where clause description.
If no rows are deleted, SQLCODE is set to END_OF_DATA.
If an error occurs during a delete or any DML statement, a rollback
statement is automatically issued. For more information about the effects of
errors on transactions, see the section Transactions.
For more information, see the sections on Tables and Views.
Examples
_________
delete from table1;
delete from table1 where column1 = 5;
delete from table1 where column1 between 5 and 7;
4 - 46
See
Also
________
alter table
create table
create view
drop table
drop view
insert
update
where
4.2.14
__________________________________________________________________________________________________________________________________________________
drop index
The drop index statement removes an index from the default schema. It does not remove
the data associated with the index.
drop index <index>;
Notes
_ ____
The <index> identifier is the name of the index to be dropped.
If the user currently connected to the schema is not the owner of the index, the
underlying DBMS normally causes this statement to fail. This can happen when
using a secure schema or when an external index is included in the schema.
Examples
_________
drop index t1c1;
See
Also
________
create index
4 - 48
4.2.15
__________________________________________________________________________________________________________________________________________________
drop schema
The drop schema statement removes a schema from RIS.
drop schema <schema>[.<passwd>][force];
Notes
_ ____
The <schema> identifier is the name of the schema to be removed. When the dictionary
containing the schema is not shared by any other schema, the RIS dictionary tables and
views are dropped along with the schema. If other schemas are present, the RIS dictionary
tables and views remain. Only the information about the schema is deleted. In either case,
all user tables and views still exist.
If the database is not up, RIS only removes the information from the schema
file. An error message is not returned. The RIS dictionary tables still exist.
If the schema is owned by the dictionary owner and all other schemas in the dictionary are
owned by others, then the schema is not dropped because the dictionary itself could not be
dropped later.
The <passwd>, if one exists, must also be keyed in, unless the password has been provided in
a preceding declare schema statement.
The force option causes the schema to be dropped even if other users have it open, or if it
has been corrupted.
When a schema is dropped, other schemas in the schema file may be opened to
remove any references to the schema being dropped.
RIS does not re-generate the ris_view_def string for a RIS-generated view when
the schema has been dropped and then re-created. This affects schemas for the
following databases: INFORMIX, ORACLE, SYBASE, and Microsoft SQL
Server.
For more information about schemas, see the section Schemas.
Examples
_________
drop schema jim;
drop schema joe.passwd;
drop schema jane force;
See
Also
________
create schema
default schema
declare schema
grant (to schema)
4 - 50
4.2.16
__________________________________________________________________________________________________________________________________________________
drop table
The drop table command removes a table definition from the default schema, deleting all
data in the table and any associated indexes. Once a table has been dropped, it no longer
exists in the database, nor does it exist to RIS.
drop table <table>;
Notes
_ ____
During the lifetime of a database, tables sometimes become useless and should be removed.
Dropping a table removes the table data, the table structure, and any associated indexes.
The <table> identifier is the name of the table to be dropped. The table must exist in the
default schema.
Drop dependent views that reference a table before you drop the table itself.
Depending upon the underlying DBMS, dependent views might not be deleted,
but remain as invalid views.
If the user currently connected to the schema is not the owner of the table, the
underlying DBMS normally causes this statement to fail. This can happen when
using a secure schema or when an external table is included in the schema.
For more information about tables, see the section Tables.
Examples
_________
drop table tab1;
See
Also
________
alter table
create table
create view
drop view
4.2.17
__________________________________________________________________________________________________________________________________________________
drop view
The drop view statement removes a view definition from the default schema. It does not
remove any data in the referenced tables.
drop view <view>;
Notes
_ ____
The <view> identifier is the name of the view definition to be removed. The view must exist
in the default schema.
If any existing views reference the view, those views may be deleted or they
may be left around, invalid. This behavior is dependent on the underlying
DBMS. To avoid this, drop dependent views that reference the view before
dropping the view.
If the user currently connected to the schema is not the owner of the view, the
underlying DBMS normally causes this statement to fail. This can happen when
using a secure schema or when an external view is included in the schema.
Examples
_________
drop view view1;
See
Also
________
create table
create view
drop table
4 - 52
4.2.18
__________________________________________________________________________________________________________________________________________________
exec
The exec statement executes a vendor database-specific statement on the database
associated with the default schema. This statement is useful for situations where access to
the vendor-specific SQL is required.
exec <database-type> <string>;
Notes
_ ____
The <database-type> identifier is the type of database associated with the default schema.
Either informix, db2, oracle, sybase, or mssql must be specified. The database type
is checked to ensure that it matches the database type of the default schema. If it does not,
RIS reports an error and does not execute the given statement.
The <string> identifier is the vendor SQL statement. RIS does not check for any errors on
this statement. If there is an error in the statement, it is only recognized by the vendor
DBMS. RIS reports any error returned by the vendor DBMS.
This command should be used with extreme caution. Using this statement defeats the
purpose of RIS and renders the application nonportable. Certain statements can also
cause inconsistencies between RIS and the vendor DBMS data definitions. Therefore,
this command should only be used by individuals who understand the potential
problems.
Also, there is no assurance that any of the vendor DBMS SQL statements work
through this interface. No statements that require structured input or output data
area definitions (sqlda) work through this interface.
RIS ensures that the statement is processed within a single transaction. This
means that if you try to create a transaction, and issue several statements, (even
with autocommit off), it creates a separate transaction for each exec <dbms>
statement.
Examples
_________
exec informix create table publisher (pub_name char(40),
pub_address char(30),
city char(25),
country char(20),
post_code char(15));
See
Also
________
create schema
drop schema
4 - 54
4.2.19
__________________________________________________________________________________________________________________________________________________
grant
The grant statements grant privileges to schemas or users. The syntax is different for each
type of grant statement. The keywords delete, insert, select, update after the
grant statement indicate privileges granted to schemas. Refer to the section grant (to
schema) for the syntax associated with these statements. The keywords schema,
connect, and resource after the grant statement indicate privileges granted to users.
Refer to the section grant (to user) for the syntax associated with these statements.
4.2.19.1
__________________________________________________________________________________________________________________________________________________
4 - 56
See
Also
________
revoke
4.2.19.2
__________________________________________________________________________________________________________________________________________________
Notes
_ ____
The <rdbmsuser-privilege> identifier specifies privileges to be granted to a database user. It
can consist of one of the following keywords: schema, resource, or connect.
A user with connect privilege can connect to a schema, access and modify data, but not issue
DDL statements.
A user with resource privilege assumes connect privilege and can also issue DDL statements.
Connect and resource are applicable only to a secure schema and can be granted only by the
schema owner.
A user with schema privilege can create another schema using the dictionary of the user that
granted the privilege. (The using keyword in a create schema statement is how the
schema privilege is exercised.) Only the owner of the dictionary, when connected to the
schema, can grant the schema privilege.
Granting the previous privileges to a user through RIS results in RDBMS level
privileges on the RIS dictionary tables and views.
The <rdbmsuser> identifier specifies a valid RDBMS user. Be sure to follow the case rules
for the underlying database when entering the <rdbmsuser>. For example, if your RDBMS is
case sensitive joe does not equal JOE.
4 - 58
Examples
_________
grant schema to joan;
grant resource to jim;
grant connect to joe;
See Also
________
revoke
4.2.20
__________________________________________________________________________________________________________________________________________________
insert
The insert statement inserts new rows of data into a table or view.
insert into [<schema>.]<relation> [ (<column-list>) ]values (<values-list>);
OR
insert into [<schema>.]<relation> [ (<column-list>) ]<select-statement>;
Notes
_ ____
The insert statement inserts a new row of data into a relation. It cannot be used to
change existing rows. The update statement must be used to change existing data in a
table.
The <relation> identifier is the name of a table or view into which the data is inserted.
Inserting into views is subject to some restrictions. For a complete list of these
restrictions, see the section Views.
The optional <schema> identifier is the schema in which the relation exists. This identifier
must be specified if the relation exists in a schema other than the default schema. A period
(.) must separate the schema name and the relation name.
The <column-list> identifier is an optional list of columns for which data values are specified.
The column list is needed if the number of values does not match the number of columns in
the table or view, or if the ordering of the values does not match the ordering of the columns
(in the create table or create view statement used to create this table or view).
Otherwise, it is optional.
The <values-list> clause can be used to provide a list of values to be inserted into the
relation.
If the <column-list> identifier is specified, one value must be specified for each
column in the list. Any columns not in the list are set to NULL. In that case, if
the column was created with the not null keyword phrase, an error occurs.
If the <column-list> identifier is not specified, one value must be specified for
each column in the table.
4 - 60
The <select-statement> identifier can be used to provide a list of values to insert which were
selected from other relations. For the proper syntax for the <select-statement> identifier, see
the select statement description.
Executing the insert statement using the values clause causes one row to be inserted
into the table or view, while using the <select-statement> identifier causes zero or more rows
to be inserted into the table or view.
The <select-statement> cannot contain any references to the table or view being
inserted into.
If no rows are inserted, SQLCODE is set to END_OF_DATA.
If an error occurs during an insert or any Data Manipulation Language
(DML) statement, a rollback statement is automatically issued.
For more information about the effects of errors on transactions, see the section Tables.
Examples
_________
insert into table1 values (1, abcd, 2.0);
insert into table1 (col1, col3) values (1, 2.0);
insert into table1 (col1, col3) select co1, col3 from table2;
See
Also
________
alter table
create view
drop table
drop view
delete
update
4.2.21
__________________________________________________________________________________________________________________________________________________
lock tables
The lock tables statement locks one or more tables, preventing other users from
changing them while the lock is in effect. It is also used to prevent other users from having
full access to perform their normal operations on any table named in the statement.
Table locks are automatically removed when a commit or rollback statement is issued.
lock tables [ {[<schema>.]<table>}[,...] in share mode]
[ {[<schema>.]<table>}[,...] in exclusive mode]
[ {[<schema>.]<table>}[,...] in default mode];
Notes
_ ____
The <table> identifiers are the names of the tables to lock.
The optional <schema> identifiers are the schemas in which the tables exist. The schema
identifiers must be specified if the tables exist in a schema other than the default schema. A
period (.) must separate the schema name and the table name.
All tables in the lock tables statement should refer to the same schema.
Two keywords are available with the lock tables command. You can choose either
keyword, depending on how you want to restrict access to the table. These keywords are
share and exclusive.
The share keyword indicates that multiple users may access the locked table for reading
only. No inserts, deletes, or updates may be performed in the table.
The exclusive keyword does not perform in the same manner with all RDBMSs:
For INFORMIX, the exclusive keyword restricts other users from having any access to
the locked table.
For ORACLE, the exclusive keyword prevents other locks from being performed on the
table, but does not restrict users from querying the table.
4 - 62
The default mode corresponds to the default locking strategy/mechanism of the underlying
DBMS. At least one locking mode must be specified in the lock tables statement. The
default mode does not lock any tables. The default mode is provided because if any table is
locked, all tables referenced in the transaction must be locked. The lock tables
statement lets different tables be locked using different modes in a single transaction. Use
the default for all tables that do not require a special lock.
At least one locking mode must be specified in the lock tables statement.
The functionality of the lock tables statement is affected by the set
database statement. If Rdb is not enabled, then you do not need to specify all
tables. (Remember this also makes it non-portable.)
The lock tables statement must be the first statement in a transaction.
Therefore all tables to be referenced in a transaction must be included in the lock
tables statement.
Table locks are automatically removed when a commit or rollback statement is
executed (implicitly or explicitly.) Therefore, if autocommit mode is on, the lock
tables statement has no effect because a commit has issued immediately after the
lock tables statement. If an error occurs during a lock tables statement or
any DML statement that updates the database, a rollback statement is
automatically issued.
For more information about tables, transactions, and the commit and rollback
statements, see the sections Transactions.
Examples
_________
lock tables sch1.tab1, sch1.tab2 in exclusive mode;
lock tables tab1, tab2 in share mode tab3, tab4 in default mode;
lock tables sch1.tab1 in share mode
sch1.tab2 in exclusive mode sch1.tab3 in default mode;
See
Also
________
commit
rollback
set database
4.2.22
__________________________________________________________________________________________________________________________________________________
open schema
The open schema statement activates and starts a RIS database server for schemas.
Schemas are automatically opened when they are referenced.
open schema <schema>[.<passwd>] [, ...];
Notes
_ ____
The <schema> identifier is the name of the schema. You can also specify the names of one or
more schemas, separated by commas that you want opened.
The <passwd> identifier is the password to the schema specified with the create schema
statement. This is only needed if a password exists for the schema and the password has not
been provided by a preceding declare schema statement.
This statement is useful if the application needs to ensure that there are no additional delays
in time-critical codes.
The default schema statement opens a schema and makes it the default
schema. The create schema statement creates a new schema, opens it, and
makes it the default schema. The open schema statement does not change
the default schema.
RIS limits the total number of database servers to 24 and the number of local
servers to the value of MAX_LOCAL_SERVERS in the c:\Program
Files\Common Files\Intergraph\ris<maj>.<min>\parms file.
However, the number of local schemas which can be open may be less,
depending on the number of semaphores RIS can get from the operating system.
For more information on this and other operating parameters, see the section
Parameters.
If RIS cannot open a server locally, it attempts to open it remotely.
4 - 64
Examples
_________
open schema jim;
open schema jim, joe, fred;
See
Also
________
close schema
create schema
default schema
drop schema
declare schema
4.2.23
__________________________________________________________________________________________________________________________________________________
revoke
The revoke statements revoke privileges from schemas or users. The syntax is different for
each type of revoke statement. The keywords delete, insert, select, update after
the revoke statement indicate privileges revoked from schemas. Refer to the section
revoke (from schema) for the syntax associated with these statements. The keywords
schema, connect, and resource after the revoke statement indicate privileges
revoked from users. Refer to the section revoke (from user) for the syntax associated with
these statements.
4 - 66
4.2.23.1
__________________________________________________________________________________________________________________________________________________
See
Also
________
grant (to schema)
4 - 68
4.2.23.2
__________________________________________________________________________________________________________________________________________________
Notes
_ ____
The <rdbmsuser-privilege> identifier specifies privileges to be revoked from a database user.
It can consist of one of the following keywords: schema, resource, or connect.
A user with connect privilege can connect to a schema, access and modify data, but not issue
DDL statements.
A user with resource privilege assumes connect privilege and can also issue DDL statements.
The connect and resource privileges are only applicable to secure schemas and can only be
issued by the schema owner.
A user with schema privilege can create another schema using the dictionary of the user that
revoked the privilege. (Issuing a create schema statement with the using keyword is
how the schema privilege is exercised.)
The revoke statement can only be issued by the dictionary owner when connected to his
schema.
Revoking privileges from a user through RIS may lead to RDBMS revoke
statements on the RIS dictionary tables and views.
The <username> identifier specifies a valid database user.
Examples
_________
The following examples show use of the revoke statement:
See Also
________
grant
4 - 70
4.2.24
__________________________________________________________________________________________________________________________________________________
rollback
The rollback statement cancels the effects of all statements within a transaction.
rollback [ work ] [ for <schema> ];
Notes
_ ____
The rollback statement ends a transaction; canceling the effects of the statements in the
transaction. The rollback statement does not issue any error messages and is only useful
when the transaction autocommit mode is off.
The work keyword can be specified to conform to the SQL standard. It is optional and
serves no other function.
The for <schema> clause lets you specify which transaction to rollback (RIS supports
multiple transactions, up to one transaction per schema). If the for <schema> clause is not
specified, the transaction that is associated to the current default schema is rollbacked. If the
for <schema> clause is specified, the transaction that is associated to the schema name is
rollbacked (however, the schema may not be a default schema).
For more information about transactions and the transaction autocommit mode, see the
section Transactions.
The vendor DBMSs implement transactions in different ways that determine
when the effects of the statements in a transaction are posted to the physical
database.
Whenever a commit or rollback statement is executed, all cursors are closed
and all locked tables are released.
If an error occurs during the execution of a DML statement that updates the database,
a rollback command is executed automatically.
If RIS is terminated within a transaction, a rollback statement is issued
automatically.
Examples
_________
rollback;
rollback for sch1;
See
Also
________
commit
set transaction
4 - 72
4.2.25
__________________________________________________________________________________________________________________________________________________
select
The select statement retrieves data from a table or view.
select [ all | distinct ] <column-list> from <relation-list>
[ where <conditions> ]
[ group by { <column> } [, ...] ]
[ having <conditions> ]
[ order by { <column> | <num> [{ asc | desc }]} [, ...]];
Notes
_ ____
The <column-list> identifier is an asterisk (*), or a comma-separated list of columns or
expressions. An asterisk (*) specifies that all columns should be retrieved.
The distinct keyword specifies that only unique rows should be retrieved. The all
keyword specifies that all rows matching the selection criteria should be included in the
select and is the default.
If any column in the <column-list> identifier exists in more than one table in the <relationlist> identifier, that column must be identified by prefixing it with the table name and a
period (.). For example: tablename.colname.
The <relation-list> identifier is a comma-separated list of tables or views with optional
correlation names. Correlation names (also known as alias names or table labels) are used to
distinguish between multiple users of a table in one query, particularly when performing a
self join. A correlation name is another name given to a relation and is defined by specifying
the correlation name after the relation name, separated by a space.
If a relation exists in a schema other than the default schema, the schema name must be
specified, followed by a period (.), followed by the relation name.
The optional where clause places restrictions on which data is retrieved. For more
information, see the where clause section.
The group by clause groups the rows by the values in the given columns. Only distinct
values for the columns given are returned. The columns to group by can be specified by
column name (the <column> identifier) or by column position (the <num> identifier) as in the
order by clause. If the group by clause is not specified, each row is considered a group.
The group by limit is the same as the index limit.
The having clause is used to apply conditions to a group. The only valid conditions on a
group are conditions that can be applied to all rows of the group, such as an SQL function.
The order by clause, if used, must be the last clause. It causes the resulting rows to be
placed in ascending or descending order (specified with the asc and desc keywords,
respectively) of the values of the given columns. If neither of the asc or desc keywords is
specified, the ordering defaults to ascending order. The columns to order by can be specified
by column name or by column position in the select list. The column name corresponds to the
<column> identifier and the column number corresponds to the <num> identifier. If multiple
columns are specified in the <column-list> identifier of the order by clause, the rows are
first sorted by the first column. If there are any duplicate values in the first column, the
second column is used for ordering.
The order by limit is the same as the index limit.
For more information about selecting from tables and views, see the sections Tables and
Views.
Examples
_________
select * from tab1;
select * from tab1 where col1 = 5;
select * from tab1 where col1 = 5 and col2 = abcd;
select col1, col3 from tab1;
select * from tab1, tab2;
select * from tab1, tab2 where tab1.col1 = tab2.col2;
select tab1.col1, tab2.col2 from tab1, tab2;
select col1, col2 from tab1 order by col1, 2;
select * from tab1 correlation1, tab1 correlation2
where correlation1.col1 = correlation1.col2;
select col1 from tab1 group by col2;
select col1 from tab1 group by col2 having sum(col2) > 5;
The select syntax select * from tab2 where exists (select col1,
col2 from tab3 where ......); is invalid in RIS because several
underlying databases do not support it. Instead, use an * in the second select
statement: select * from tab2 where exists (select * from tab3
where ......);
See
Also
________
where
4 - 74
4.2.26
__________________________________________________________________________________________________________________________________________________
set database
The set database statement lets you specify the brands or types of underlying databases
you can use. It also causes the user-supplied names to be verified against the reserved words
of the specified RIS-supported databases.
This statement affects the functionality of the lock tables statement.
4.2.27
__________________________________________________________________________________________________________________________________________________
set mode
The set mode statement lets you toggle the ANSI, verify, and blank strip modes on or off.
set mode [ ansi {on|off} ] [ verify {on|off} ]
[blank strip {on|off} ];
Notes
_ ____
The set mode ANSI on statement restricts user-supplied names for schemas, tables,
columns, views, and indexes to a maximum of 18 characters in length while creating
schemas, tables, views and indexes or altering tables. This statement does effect the existing
schema, table, view, or index names. When ANSI mode is off, the limit is extended to 31
characters.
For more information, see the section Vendor-Specific Information.
Because the underlying DBMSs have their own maximum limits to these usersupplied names, the set mode ANSI off statement should be executed with care.
This statement makes the application non-portable.
The set mode verify on statement validates table and view definitions that are
retrieved from the underlying database against the definitions stored in the RIS dictionary
tables. The set mode verify off statement retrieves the definitions from the
underlying databases only, omitting the validation phase. By omitting the validation phase,
the execution time when referencing a table or view for the first time is reduced.
It is recommended that the set mode verify off statement not be executed by
applications that dynamically create tables and views, because without verification,
the definitions in the RIS dictionary tables and the underlying DBMS dictionary
may become inconsistent.
Because of ambiguity in the mapping of underlying DBMS data types to RIS data
types, columns in tables can have different data types with verify on or off.
Verify off should not be used unless table and view definitions are explicitly
declared with the declare table and declare view statements. For more
information, see the section Vendor-Specific Information.
The set mode blank strip on statement causes RIS to strip the trailing blanks from
character data. The set mode blank strip off statement causes RIS to not strip the
trailing blanks from character data.
4 - 76
Examples
_________
set mode ansi on;
set mode ansi off verify off;
set mode blank strip on verify off;
See
Also
________
alter table
create index
create schema
create table
create view
declare table
declare view
4.2.28
__________________________________________________________________________________________________________________________________________________
4 - 78
The <value> in the timestamp tolerance clause specifies the maximum tolerable
difference between the number of timestamps the RIS client is expected to receive, and the
number of timestamps the RIS client actually receives. If the difference is larger than the
tolerance, the RIS client reports that the RIS server has died.
Network traffic, heavy site load, and the synchronization error of timers may cause the RIS
client to count less timestamps than expected. A small timestamp tolerance may cause RIS
to terminate unnecessarily.
The <value> in the buffer full size clause specifies the maximum buffer size that the
network software can use. RIS uses this value to determine the maximum number of
timestamps that can be written in the network buffer without the possibility of the network
buffer becoming full.
After the RIS client has read the number of timestamps from the buffer, it takes the effect of
buffer full into account if it received less timestamps than expected, in other words, an
additional delay of timestamps is tolerable due to the buffer full effect.
The <value> in the buffer full timeout clause specifies the longest time period for
which the RIS client can wait to receive the next alarm timestamp from the RIS server after
the RIS client has read more than the buffer full size of timestamps. In other words,
if the RIS client cannot receive a new timestamp within the period, and the received
timestamps is less than expected, the RIS client reports that RIS server has died.
The <value> in the response interval clause specifies the actual time period of
timestamps that the RIS server sends out to the RIS client, while the timestamp interval is
the time period of timestamps in which the RIS client expects the RIS server to have sent
timestamps. If the value is negative, the RIS server dies immediately after a statement is
sent to the server. If the value is much larger than that specified in timestamp interval
clause, RIS waits and then reports that the server has died after a statement is sent.
The response interval clause is specially designed for RIS testing
purposes. The clause is usually used with the timestamp interval clause to
simulate an asynchronization situation in which the RIS server is much slower
than expected, or has died.
The <schema> specifies the schema on which the set command takes effect. The schema
should be defined in the RIS schema file. If the schema has not been opened, the set
command opens the schema. Note that if the for <schema> clause is not specified, the
set command is effective only for the schema that is opened after the set command is
issued.
All five of these parameters are basically independent of each other. However, the different
combinations of these parameters may have different effects on RISs behavior. Consider a
subtle combination such as the following:
If BUFFER_FULL_TIMEOUT > TIMESTAMP_INTERVAL*TIMESTAMP_TOLERANCE
then the buffer full timeout dominates the timestamp tolerance. That is, the RIS
client reports that the server died only after the buffer full timeout has elapsed in
buffer full case.
Otherwise, the buffer full timeout does not dominate the timestamp tolerance
when the RIS server has sent all ideal timestamps, on time, at the buffer full moment.
This is because the RIS client is able to wait TIMESTAMP_INTERVAL*TIMESTAMP
_TOLERANCE seconds for the tolerance test.
In the current version, only the RIS ORACLE and the RIS INFORMIX servers
on UNIX workstations and the RIS ORACLE server on Windows NT support
the set network command.
Examples
_________
set network verification timestamp interval 0;
set network verification timestamp interval 20 for inf1, inf2, inf3;
set network verification timestamp interval 12, initial timeout 15,
timestamp tolerance 20, buffer full size 64, buffer full timeout 20;
set network verification response interval 1000, timestamp interval 10 for inf1;
set network verification response interval -30, timestamp interval 10 for inf1;
See
Also
________
create schema
open schema
default schema
4 - 80
4.2.29
__________________________________________________________________________________________________________________________________________________
set transaction
The set transaction statement sets the transaction state.
set transaction autocommit { on | off };
Notes
_ ____
The on keyword enables the transaction autocommit mode. When the autocommit mode is
on, RIS automatically issues a commit statement after every SQL statement.
The off keyword enables normal transaction processing.
By default, the transaction autocommit state is set to on.
Autocommit on causes a commit to occur when closing a cursor. Embedded
SQL open and fetch does not cause a commit, only close causes a commit. See
the RIS Programmers Guide.
The following rules provide you with some degree of safety.
1.
2.
If an error occurs during the execution of any DML statement, RIS issues a
rollback statement to prevent the corruption of data.
4.2.30
__________________________________________________________________________________________________________________________________________________
undeclare schema
The undeclare schema statement lets you undefine or remove declared schemas from the
RIS in-memory data dictionary cache.
undeclare schema [ALL | <schname1, schname2, ...>]
Notes
_ ____
The ALL identifier removes all schemas from the cache or schema names can be listed
individually.
Examples
_________
undeclare schema all;
undeclare schema john, jones;
See
Also
________
declare schema
create schema
open schema
default schema
drop schema
alter schema
4 - 82
4.2.31
__________________________________________________________________________________________________________________________________________________
undeclare table
The undeclare table statement lets you undefine or remove a RIS table from the RIS inmemory data dictionary cache.
undeclare table [<schema>.]<table>;
Notes
_ ____
The <table> identifier is the table name.
The optional <schema> identifier is the schema in which the table exists. The schema
identifier must be specified if the table exists in a schema other than the default schema. No
privileges are required to undeclare a table that exists in a schema other than the default
schema.
The undeclare table statement lets the user remove a table from the RIS in-memory
data dictionary cache. This frees up memory, thus avoiding out of memory problems.
RIS automatically attempts to remove table definitions if the user definable limit
MAX_TABLES_IN_MEM is exceeded. For more information, see the section Parameters.
This statement fails if the table definition is not in memory or is currently being
used by some other statement.
Examples
_________
undeclare table t1;
undeclare table sch2.t2;
See
Also
________
declare table
4.2.32
__________________________________________________________________________________________________________________________________________________
undeclare view
The undeclare view statement lets you undefine or remove a RIS view from the RIS inmemory data dictionary cache.
undeclare view [<schema>.]<view>;
Notes
_ ____
The <view> identifier is the view name.
The optional <schema> identifier is the schema in which the view exists. The schema
identifier must be specified if the view exists in a schema other than the default schema. No
privileges are required to undeclare a view that exists in a schema other than the default
schema.
The undeclare view statement lets you remove a view from the RIS in-memory data
dictionary cache. This frees up memory, thus avoiding out of memory problems.
RIS automatically attempts to remove view definitions if the user definable limit
MAX_TABLES_IN_MEM is exceeded. For more information, see the section Parameters.
This statement fails if the view definition is not in memory or is currently being
used by some other statement.
Examples
_________
undeclare view v1;
undeclare view sch2.t2;
See
Also
________
declare table
declare view
4 - 84
4.2.33
__________________________________________________________________________________________________________________________________________________
union
The union operator lets you combine two or more select statements into a single query.
<select-statement> union [all] <select-statement>
[union [all] <select-statement] [...];
Notes
_ ____
The union keyword selects all rows from two select queries, removes duplicates, and
returns what is left. All the select statements preceding the union keyword are treated like a
single statement.
The <select-statement> identifier represents a valid SQL statement. The all optional
keyword leaves the duplicates.
The following restrictions apply to queries connected by union operators:
1.
The number of columns in the select-list of each select statement must be the same,
and the corresponding columns in each select-list must have compatible data types.
2.
3.
If you use an order by clause, it must follow the last select-statement. In other
words, it is not valid to use the order by clause in a select statement that precedes a
union operator.
4.
b.
The union operator may not appear within a create view statement, an insertselect statement, a subquery, or a nested query.
For more information about selecting from tables and views, see the sections select and
where.
Examples
_________
select * from t1 union select from t1;
select c1, c2 from t1 union all select c21, c22 from t2;
See
Also
________
where
select
4 - 86
4.2.34
__________________________________________________________________________________________________________________________________________________
update
The update statement updates or modifies values that already exist in a table. The updates
change data in the table specified in the update statement or the table referenced by the
view specified in the update statement.
update [<schema>.]<relation> set { <column> = <value> } [, ...][ where <conditions> ];
Notes
_ ____
The <relation> is the name of the relation to be updated. This can be the name of a table or
view.
The optional <schema> identifier is the schema in which the relation exists. This identifier
must be specified if the relation exists in a schema other than the default schema. A period
(.) must separate the schema name and the relation name.
The <column> identifier is the column name in that relation to be updated.
The <value> identifier is the value to be assigned to that column.
The where clause can be used to restrict the rows to be updated. If a where clause is not
specified, all rows in the table are updated. For more information, see the where clause
description.
If no rows are updated, SQLCODE is set to END_OF_DATA.
If an error occurs during an update or any DML statement, a rollback
statement is automatically issued.
For more information about the effects of errors on transactions, see the section
Transactions. For more information about tables and views, see the sections Tables and
Views.
Examples
_________
update tab1 set col1=2, col2=defg, col3=3.0;
update tab1 set col1=2, col2=defg, col3=3.0 where col1=1;
update tab1 set col1=2, col2=defg, col3=3.0
where col1=1 and col2=abcd;
See
Also
________
alter table
create table
create view
delete
drop table
drop view
insert
where
4 - 88
4.2.35
__________________________________________________________________________________________________________________________________________________
where
The where clause restricts the rows of a relation that are selected, updated, or deleted.
where <condition>
Notes
_ ____
The <condition> identifier can consist of one of the following:
<condition> <boolean> <condition>
not <condition>
<expr> <comparison-op> <expr>
<expr> [not] between <expr> and <expr>
<expr> [not] in ( <value-list> )
<column> is [not] null
<char column> [not] like <wildcard-string>
<nested-query>
The <expr> identifier can be a column name, a value, or an arithmetic expression involving
column names and/or values. It can consist of the following:
{ <column> | <value> } [ <arithmetic op> { <column> | <value> } ] [, ...]
2.
4 - 90
The and keyword performs the logical and operation on the results of two conditions and the
or keyword performs the logical or operation on the results of the two conditions. The not
keyword can be used to logically negate a condition. The order of precedence is: not, and,
or.
The between clause checks the left expression against a range of values resulting from the
two right expressions. After all three expressions have been evaluated, the result of the left
expression is tested to determine if it falls between the resulting values of the two right
expressions, inclusively. If so, the condition is TRUE. The not keyword can be used to
logically negate the condition.
The between clause is equivalent to (<expr> >= <first expr> and <expr> <=
<second expr>). The first expression (to the left of the and keyword) must
evaluate to a smaller value than the second expression (to the right of the and
keyword).
The in clause specifies that the set of values in the <value-list> identifier should be checked
for the inclusion of the left expression. The <value-list> identifier is a comma-separated list
of values. If the value resulting from the left expression is in the set of values resulting from
the expressions in the <value-list> identifier, the condition is TRUE. The not keyword can
be used to logically negate the condition.
The is null clause specifies that the column should be tested for a NULL value. If the
value in the column is NULL, the condition is TRUE. The not keyword can be used to
logically negate the condition.
The like clause specifies that the character column be compared to the <wildcard-string>
identifier.
The <wildcard-string> identifier is a string that may contain wildcard characters. The
wildcard characters which are supported are the underscore character ( _ ) and the percent
character (%). The underscore character matches any single character while the percent
character matches zero or more occurrences of any characters. If the value resulting from
the left expression matches the <wildcard-string> identifier, the condition is TRUE. The
not keyword can be used to logically negate the condition.
There is no escape mechanism available to let you literally find the underscore
character (_) or the percent character (%).
See the nested query description for a complete description of the <nested-query> identifier.
Examples
_________
... where column1 < column2 + column3;
... where column1 <> 1 + 2;
... where not column1 = column2;
... where column1 between column2 + 3 and 5;
... where column1 in (1, 2, 3);
4 - 92
4.3
__________________________________________________________________________________________________________________________________________________
Nested Query
Nested queries let you specify a set of values, to be compared to another value or column in a
where clause, by using a select statement. The values retrieved by the select
statement are compared to the specified value or column. This can be used as the condition
of a where clause.
<expr> <comparison-op> all ( <select-statement> )
<expr> <comparison-op> any ( <select-statement> )
<expr> <comparison-op> some ( <select-statement> )
[not] exists ( <select-statement> )
<expr> [not] in ( <select-statement> )
Notes
_ ____
The <expr> identifier can be a column name, a value, or an arithmetic expression involving
column names and/or values. For more information on arithmetic expressions, see the where
clause description.
The <comparison-op> identifier specifies a comparison operation to perform on two
expressions. If the result of the comparison operation is a TRUE condition, the rows in
question are included in the select, update, or delete statement. Otherwise, they are
excluded. For more information on the comparison operators, see the where clause
description.
The <select-statement> identifier is any valid select statement. For more information, see
the select statement description.
The all clause specifies that the value resulting from the left expression be compared to the
values resulting from the select statement. If the comparison operation results in a TRUE
condition for all values, the nested query is TRUE.
The any clause specifies that the value resulting from the left expression be compared to the
values resulting from the select statement. If the comparison operation results in a TRUE
condition for any of the values, the nested query is TRUE.
The some keyword is a synonym for the any keyword.
The exists clause results in a TRUE condition if one or more values are returned by the
select statement. The not keyword can be used to logically negate the condition.
The in clause specifies that the value resulting from the left expression be compared to the
values resulting from the select statement. If the left value is equal to at least one right
value, the where clause is TRUE. The not keyword can be used to logically negate the
condition.
Examples
_________
... where column1 = any (select col1 from tab2);
... where column1 >all (select col1 from tab2);
... where column1 <>some(select col1 from tab2);
... where column1 in (select col1 from tab2);
... where exists (select * from tab2 where ...);
= all is not supported by Microsoft SQL Server.
See Also
________
select
where
4 - 94
4.4
__________________________________________________________________________________________________________________________________________________
SQL Functions
The SQL functions provide operations commonly used on sets of data.
count( * )
OR
{ avg | max | min | sum | count } ( distinct <column> )
OR
{ avg | max | min | sum } ( [ all ] <expr> )
OR
user
OR
current_timestamp
Notes
_ ____
The SQL functions, like avg, count, max, min, and sum let you get summary information
about groups of rows in database tables. These functions can be used within the select
statement (with column list) and in the having clause.
The count function returns the total number of rows if the asterisk (*) is specified, or the
number of unique rows if the distinct clause is specified.
The distinct keyword causes any duplicate values to be removed before performing the
function, and can only be used with columns. If the distinct keyword is not used, the
argument to the function can be an expression and the function is applied to all the values.
The all keyword is optional in this case.
The <column> identifier is the name of the column on which the operation would take place.
The <expr> identifier can be a column name, a value, or an arithmetic expression involving
column names and/or values. For more information on the arithmetic operators, see the
where clause description.
The avg function computes the average value of all (or all distinct) values in the column or
expression.
The max function returns the maximum value of all (or all distinct) values in the column or
expression.
The min function returns the minimum value of all (or all distinct) values in the column or
expression.
The sum function computes the sum of all (or all distinct) values in the column or expression.
The current_timestamp returns the current timestamp from the database. This is a year,
month, day, hour, minute, second value. If the database resides on a machine in another
time zone, the time is different than local time on the system.
The user returns the name of the default schema.
The current_timestamp (current system date and time) and user (current default
schema name) can appear anywhere a literal is valid.
NULL values have different effects depending on the function. The count(*)
phrase counts all rows, regardless of the presence of NULLs. The count
distinct phrase and the avg, max, min, and sum functions ignore NULL
values, unless there are only NULL values. In this case, the count distinct
phrase returns the number of rows and the avg, max, min, and sum functions
returns NULL.
If no rows are selected, NULL is returned.
In most cases, you may not select both summary information returned by SQL
functions and individual values of columns in one select query. For example,
select name, avg(salary) from tab1;
is invalid. The one exception to this rule is when a group by clause is used on
the columns from which the individual values are selected. For example,
select dept_no, avg(salary) from tab1 group by dept_no;
is valid.
The values returned by functions may differ depending on the underlying
DBMS. For more information refer to the specific DBMS reference manual.
Examples
_________
select count(*) from tab1;
select avg(col1) from tab1;
select avg(distinct col1) from tab1;
select user from tabl;
4 - 96
Troubleshooting 5 - 1
Troubleshooting
__________________________________________________________________________________________________________________________________________________
5-2
Troubleshooting
Troubleshooting 5 - 3
5.
__________________________________________________________________________________________________________________________________________________
Troubleshooting
This section describes some of the problems, causes, and recoveries for some commonly
encountered RIS error messages.
Recovery 1:
Problem 2:
Cause 2:
Recovery 2:
Problem 3:
Cause 3:
Recovery 3:
Problem 4:
5-4
Troubleshooting
Cause 4:
Recovery 4:
Problem 2:
Recovery 2:
Problem 3:
Recovery 3:
Troubleshooting 5 - 5
Recovery 1:
Problem 2:
Cause 2:
Recovery 2:
Problem 3:
Cause 3:
Recovery 3:
Solution 1:
5-6
Troubleshooting
Cause:
Recovery:
Cause:
Recovery:
Problem 2:
Cause 2:
Recovery 2:
Troubleshooting 5 - 7
Recovery:
Recovery 1:
Problem 2:
Cause 2:
5-8
Troubleshooting
Recovery 2:
Recovery:
Problem 2:
Cause 2:
Recovery 2:
Problem 3:
Cause 3:
Recovery 3:
Problem 4:
Cause 4:
Recovery 4:
Problem 5:
Cause 5:
Recovery 5:
Troubleshooting 5 - 9
Problem 6:
Cause 6:
Recovery 6:
Problem 7:
Cause 7:
Revcovery:
Problem 8:
Cause8:
Recovery:
5 - 10
Troubleshooting
Recovery 1:
Recovery 2:
Problem 2:
Cause 2:
Recovery 2:
Cause:
Troubleshooting 5 - 11
Recovery:
Cause:
Recovery:
5 - 12
Troubleshooting
Recovery 1:
Problem 2:
Cause 2:
Recovery 2:
Cause:
recovery:
Troubleshooting 5 - 13
Recovery:
Problem 2:
Cause 2:
Recovery 2:
Problem 3:
Cause 3:
Recovery 3:
5 - 14
Troubleshooting
test visit to server nodename, log in, test visit back to client,
log in.
Test fmu to server.
Verify XNSINGR is installed.
TCP
Verify TCPIP is installed.
Test ping to server.
Test telnet to server nodename, log in, test telnet back to
client, log in.
Test ftp to server.
Check the /etc/services file to ensure there is a ristcpsrv
entry (#180) and that it is correct. Do this on client and
server. Newprod the RIS product to put the entry in the file.
Check the /etc/inetd.conf file to ensure the ristcpsrv entry
is correct. Do this on the client and the server. Newprod the
RIS product to put the entry in the file.
The inet daemon may not have run, do a TCPIP stop and a
TCPIP start commands.
Problem 4:
Cause 4:
Recovery 4:
Problem 5:
Cause 5:
Recovery 5:
Problem 6:
Cause 6:
Recovery 6:
Troubleshooting 5 - 15
Problem 7:
Cause 7:
Recovery 7:
Problem 8:
Cause 8:
Recovery 8:
Recovery:
Recovery:
5 - 16
Troubleshooting
Appendix A
__________________________________________________________________________________________________________________________________________________
A-2
Appendix A
__________________________________________________________________________________________________________________________________________________
db2
dbname
dec
decimal
declare
default
define
delete
desc
describe
descriptor
dir
distinct
dnp
double
drop
else
enable
end
endif
env
error
exclude
exclusive
exec
execute
exists
extern
fetch
float
for
force
found
from
full
gateway
go
goto
grant
group
having
host_lu
host_program
ifdef
ifndef
immediate
in
include
index
indicator
informix
ingres
initial
input
insert
int
integer
interval
into
is
like
lock
long
max
min
mode
modify
net_protocol
network
node
A-4
not
nt
null
off
on
only
open
option
or
oracle
order
os
os400
ostype
osuser
output
partial
password
port
precision
prepare
primary
privilege
privileges
public
rdb
real
redeclare
register
remote
replace
report
resource
response
revoke
ris_blob
ris_lu
ris_text
rollback
schema
secondary
section
secure
select
server
set
share
short
signed
size
smallint
some
sql
sqlcode
sqlda
sqlds
sqlerror
static
strip
struct
sum
superschema
swap
sybase
table
tables
tcp
test
timeout
timestamp
to
tolerance
transaction
undeclare
undef
union
unix
unique
unsigned
unsupported
update
user
using
values
verify
version
view
virtual
vms
volatile
wait
whenever
where
with
work
xns
fieldproc
for
from
go
goto
grant
group
having
immediate
in
index
insert
into
is
key
like
locksize
not
null
numparts
of
on
or
order
part
plan
priqty
privileges
secqty
select
set
some
stogroup
synonym
table
tablespace
to
union
update
user
using
validproc
values
vcat
view
volumes
where
with
ascending
ascii
at
attribute
attributes
audit
auto
autonext
average
avg
background
before
begin
beginning
bell
between
black
blanks
blink
blue
bold
border
bottom
buffered
by
byte
call
case
char
character
A-6
check
clear
clipped
close
cluster
col
color
colors
column
columns
command
comment
comments
commit
committed
composites
compress
connect
constant
constraint
construct
continue
convert
count
create
current
cursor
cyan
database
date
date_type
datetime
day
dba
debug
dec
dec_t
decimal
decimal_type
declare
default
defaults
defer
define
delete
delimiter
delimiters
desc
descending
describe
descriptor
dim
dirty
display
displayonly
distinct
do
dominant
double
down
downshift
drop
dtime
dtime_t
editadd
editupdate
else
end
endif
ending
error
escape
every
exclusive
exec
execute
exists
exit
exitnow
exits
explain
extend
extent
extern
external
false
fetch
field
file
finish
first
fixchar
float
flush
for
foreach
form
format
formonly
found
fraction
free
from
function
globals
go
goto
grant
green
group
having
header
headings
help
hold
hour
identified
if
ifdef
ifndef
immediate
in
include
index
indicator
infield
info
initialize
input
insert
instructions
int
integer
interrupt
intersect
interval
into
intrvl_t
inverse
invisible
is
isam
isolation
join
joining
key
lable
last
left
len
length
let
like
line
lineno
lines
load
loc_t
locator
lock
log
long
long_float
long_integer
lookup
loop
magenta
main
margin
master
matches
max
mdy
memory
menu
message
min
minus
minute
mod
mode
modify
module
money
month
name
natural
need
new
next
nextfield
no
nocr
noentry
normal
not
notfound
noupdate
now
null
numeric
of
off
on
open
option
options
or
order
otherwise
out
outer
output
package
page
pageno
param
pause
percent
perform
picture
pipe
positive
precision
prepare
previous
print
printer
prior
privilege
privileges
program
prompt
public
put
query
queryclear
quit
raise
range
read
readonly
real
record
recover
red
register
relative
remove
rename
repair
repeatable
report
required
resource
return
returning
reverse
revoke
right
rollback
rollforward
row
rowid
rows
run
savepoint
screen
scroll
second
section
select
serial
serial_type
set
share
shift
short
short_float
short_integer
sitename
size
skip
sleep
smallfloat
smallint
some
space
spaces
sql
sqlca
sqlchar_type
sqlda
sqldecimal_type
sqlerr
sqlerror
sqlfloat_type
sqlint_type
sqlmoney_type
sqlsmfloat_type
sqlsmint_type
sqlwarning
stability
start
startlog
static
A-8
statistics
status
stdv
step
stop
string
struct
subtract
subtype
sum
synonym
systables
table
temp
text
then
through
thru
time
tiny_integer
to
today
top
total
trailer
trailing
true
type
typedef
undef
underline
union
unique
units
unload
unlock
up
update
upshift
user
using
validate
values
varchar
variable
vc_t
verify
view
wait
waiting
warning
weekday
when
whenever
where
while
white
window
with
without
wordwrap
work
wrap
year
yellow
yes
zerofill
current
cursor
cycle
database
datafile
date
dba
dec
decimal
declare
default
delete
desc
disable
dismount
distinct
double
drop
dump
each
else
enable
end
escape
events
except
exceptions
exclusive
exec
execute
exists
explain
extent
externally
fetch
file
float
flush
for
force
foreign
fortran
found
freelist
freelists
from
function
go
goto
grant
graphic
group
groups
having
identified
if
immediate
in
including
increment
index
indicator
initial
initrans
insert
instance
int
integer
intersect
into
is
key
language
layer
level
like
link
lists
lock
logfile
long
manage
manual
max
maxdatafiles
maxextents
maxinstances
maxlogfiles
maxloghistory
maxlogmembers
maxtrans
maxvalue
min
minextents
minus
minvalue
mode
modify
A - 10
module
mount
new
next
noarchivelog
noaudit
nocache
nocompress
nocycle
nomaxvalue
nominvalue
none
noorder
noresetlogs
normal
nosort
not
nowait
null
number
numeric
of
off
offline
old
on
online
only
open
optimal
option
or
order
own
package
parallel
pascal
pctfree
pctincrease
pctused
pl1
pli
plan
precision
primary
prior
private
privileges
procedure
profile
public
raw
read
real
recover
references
referencing
release
rename
resetlogs
resource
restricted
reuse
revoke
role
roles
rollback
row
rowid
rowlabel
rownum
rows
savepoint
schema
scn
section
segment
select
sequence
session
set
share
shared
size
smallint
snapshot
some
sort
specified
sql
sqlcode
sqlerror
start
statement
statement_id
statistics
stop
storage
successful
sum
switch
synonym
sysdate
system
table
tables
tablespace
temporary
then
thread
time
to
tracing
transaction
trigger
triggers
truncate
uid
under
unlimited
union
unique
until
update
use
user
using
validate
values
varchar
varchar2
vargraphic
view
when
whenever
where
with
work
write
create
curindex
cursqlindex
database
datalength
datename
datepart
datetime
dbcc
declare
default
define
delete
desc
disconnect
disk
distinct
drop
dummy
dump
else
end
enter
entry
errlvl
errorexit
except
exec
execute
exists
exit
exitform
exp
false
fetchsql
field
fillfactor
float
for
foreach
form
from
goto
grant
group
having
hidden
holdlock
if
image
in
index
insert
int
interruptsql
intersect
into
is
kill
like
lineno
list
load
log
lower
max
mchoice
menu
menubar
min
mirrorexit
money
nextquery
nomsg
nonclustered
not
null
off
offset
on
once
opensql
or
order
over
parentname
perform
perm
permanent
plan
positionform
post
prepare
print
printform
proc
procedure
processexit
A - 12
public
raiserror
rchoice
readtext
reconfigure
reset
return
revoke
rollback
rowcount
rule
save
schoice
scroll
select
set
setuser
shared
shutdown
smallint
sqlbegin
sqlend
sqlexpr
sqlrow
statistics
submit
substring
sum
switch
switchend
syb_terminate
system
tab
table
tape
temp
temporary
text
textport
textsize
tinyint
to
trace
tran
transaction
transfer
trigger
trim
true
truncate
tsequal
union
unique
update
upper
use
useform
values
variable
view
waitfor
where
while
with
writetext
clustered
commit
compute
confirm
constraint
continue
controlrow
convert
count
create
current
cursor
data_pgs
database
dbcc
deallocate
declare
default
delete
desc
disk
distinct
double
drop
dummy
dump
else
end
endtran
errlvl
errorexit
escape
except
exec
execute
exists
exit
fetch
fillfactor
for
foreign
from
goto
grant
group
having
holdlock
identity
identity_insert
if
in
index
insert
intersect
into
is
isolation
key
kill
level
like
lineno
load
max
min
mirror
mirrorexit
national
noholdlock
nonclustered
not
null
numeric_transaction
of
off
offsets
on
only
open
option
or
order
over
perm
permanent
plan
precision
prepare
primary
print
privileges
proc
procedure
processexit
public
raiserror
read
readtext
reconfigure
references
replace
reserved_pgs
return
revoke
role
rollback
rowcnt
rowcount
rows
rule
save
schema
select
set
setuser
shared
shutdown
some
statistics
stripe
sum
syb_identity
syb_restree
table
temp
temporary
textsize
to
tran
transaction
trigger
truncate
tsequal
union
unique
update
user
user_option
using
values
varying
view
waitfor
where
while
with
work
writetext
A - 14
Appendix B
__________________________________________________________________________________________________________________________________________________
B-2
Appendix B
__________________________________________________________________________________________________________________________________________________
SQL code
Description
char[acter](n)
CHARACTER
int[eger]
INTEGER
smallint
SMALLINT
double [precision]
DOUBLE
real
REAL
decimal[(p[, s])]
DECIMAL
timestamp
TIMESTAMP
ris_blob(n)
RIS_BLOB
B-4
ris_text(n)
RIS_TEXT
The SQL string is used within SQL statements where a data type is required (for example:
in the create table statement).
The following examples illustrate the use of the SQL code form of the timestamp.
select * from table1 where
timecolumn > timestamp 1994-04-01:00:00:00;
update table1 set (time.column)=current_timestamp;
The SQL code is used in the sqltype field in the dynamic sqlvar structure.
Appendix C
__________________________________________________________________________________________________________________________________________________
C-2
Appendix C
__________________________________________________________________________________________________________________________________________________
C-4
C.1
__________________________________________________________________________________________________________________________________________________
C.1.1
RIS5COLUMN_PRIVS
This view lists all privileges granted on the columns in the tables and views of a schema.
Column
Type
Description
Case
schema_name
table_name
upper_table_name
column_name
upper_column_name
grantor
grantee
ris_privileges
ris_object
char(31)
char(31)
char(31)
char(31)
char(31)
char(31)
char(31)
char(7)
char(1)
not null
not null
not null
not null
not null
not null
not null
not null
not null
lower
lower
UPPER
lower
UPPER
lower
lower (or PUBLIC)
either
UPPER
schema_name
table_name
upper_table_name
column_name
upper_column_name
grantor
grantee
ris_privileges
C.1.2
RIS5COLUMNS
This view contains all information known about the columns in the tables and views of a
schema. It does not include information about any RIS dictionary table or view.
The columns of tables and views maintained by RIS have two names: the internal or RIS
name and the external or DBMS name. Columns can be renamed using the extern clause in
the create table/view statement and the as clause in the include table/view statement. In
the view below, column_name refers to the RIS (internal) name and ext_column_name refers
to the DBMS (external) name.
Column
Type
Description
Case
schema_name
table_name
upper_table_name
column_name
ext_column_name
upper_column_name
position
ris_type
ris_type_string
dbms_type_string
char_max_length
prec
scale
nullable
ris_object
char(31)
char(31)
char(31)
char(31)
char(31)
char(31)
integer
integer
char(11)
char(31)
integer
integer
integer
char(3)
char(1)
not null
not null
not null
not null
not null
not null
not null
not null
not null
not null
lower
lower
UPPER
lower
As DBMS
UPPER
N/A
N/A
lower
lower
N/A
N/A
N/A
lower
UPPER
not null
not null
C-6
schema_name
table_name
upper_table_name
column_name
ext_column_name
upper_column_name
position
ris_type
ris_type_string
dbms_type_string
char_max_length
prec
scale
nullable
ris_object
C.1.3
RIS5DBMS_COLUMNS
This view lists the owner of the database and the columns of all the tables and views in the
database including the RIS tables and views. In some cases, this list may include only those
tables and views accessible to the current log-in/user of the database.
Some databases do not let privileges be granted on views defined on system
catalogs (this is such a view). As a result, this view may be accessible only to
the dictionary owner.
This view is not recommended for use by the applications. This is provided for use by
the Schema Manager only. If used at all, the query should have some restrictive
condition. A select * statement from this view can lead to a significant
performance degradation. For example, the Schema Manager queries this view for a
specific table/owner combination.
Column
Type
Description
Case
table_name
dbms_owner
column_name
position
char(31)
char(31)
char(31)
integer
not null
not null
not null
not null
As DBMS
As DBMS
As DBMS
N/A
C-8
table_name
dbms_owner
column_name
position
C.1.4
RIS5DBMS_INDEXES
This view lists the owner of the database and all the indexes in the underlying database,
except the RIS dictionary indexes. In some cases, this list may include only those indexes
accessible to the current log-in/user of the database.
Some databases do not let privileges be granted on views defined on system
catalogs (this is such a view). As a result, this view may be accessible only to
the dictionary owner.
This view is not recommended for use by the applications. This is provided for use by
the Schema Manager only. If used at all, the query should have some restrictive
condition. A select * statement from this view can lead to a significant
performance degradation.
Column
Type
Description
Case
table_name
dbms_owner
index_name
char(31)
char(31)
char(31)
not null
not null
not null
As DBMS
As DBMS
As DBMS
table_name
This is the name of the table. This comes directly from the
underlying database system. It may be in uppercase or
lowercase, depending on how the underlying RDBMS stores
the information.
dbms_owner
index_name
C.1.5
RIS5DBMS_TABLES
This view lists the user that owns the database and all the table names in the underlying
database, except the RIS dictionary tables.
Some databases do not let privileges be granted on views defined on system
catalogs (this is such a view). As a result, this view may be accessible only to
the dictionary owner.
This view is not recommended for use by the applications. This is provided for use by
the Schema Manager only. If used at all, the query should have some restrictive
condition. A select * statement from this view can lead to a significant
performance degradation.
Column
Type
Description
Case
table_name
dbms_owner
char(31)
char(31)
not null
not null
As DBMS
As DBMS
table_name
This is the name of the table. This comes directly from the
underlying database system. It may be in uppercase or
lowercase, depending on how the underlying RDBMS stores
the information.
dbms_owner
C.1.6
RIS5DBMS_USERS
This view lists all the users in the underlying database. In some databases, such as Sybase,
the user XYZ who logs in to the database system can have an alias ABC on a database. This
users objects are referred to as ABC.t1 and not XYZ.t1. However, if XYZ is the owner of the
database, all the objects are referred to as dbo.t1, dbo.t2, etc.
Some databases do not let privileges be granted on views defined on system
catalogs (this is such a view). As a result, this view may be accessible only to
the dictionary owner.
This view is not recommended for use by the applications. This is provided for use by
the Schema Manager only.
C - 10
Column
Type
Description
Case
user_name
dbms_owner
char(31)
char(31)
not null
not null
As DBMS
As DBMS
user_name
dbms_owner
C.1.7
RIS5DBMS_VIEWS
This view lists the owner of the underlying database and all the view names in the
underlying database, except the RIS dictionary views. In some cases, this list may include
only those views accessible to the current log-in/user of the database.
Some databases do not let privileges be granted on views defined on system
catalogs (this is such a view). As a result, this view may be accessible only to
the dictionary owner.
This view is not recommended for use by the applications. This is provided for use by
the Schema Manager only. If used at all, the query should have some restrictive
condition. A select * statement from this view can lead to a significant
performance degradation.
Column
Type
Description
Case
view_name
dbms_owner
char(31)
char(31)
not null
not null
As DBMS
As DBMS
view_name
This is the name of the view. This comes directly from the
underlying database system. It may be in uppercase or
lowercase, depending on how the underlying RDBMS stores
the information.
dbms_owner
C.1.8
RIS5DBS
This view is a relational representation of the database information in the schema file. The
data in this table is transient and is not available for access through database-specific
utilities.
The data required for a database definition varies widely from one database system to
another. In order to make the information available, this table includes several generic
columns where the meaning differs depending on the database type for the record.
Column
Type
Description
Case
database_id
database_type
database_name
protocol_1
net_address_1
protocol_2
net_address_2
protocol_3
net_address_3
protocol_4
net_address_4
long_parameter_1
long_parameter_2
long_parameter_3
short_parameter_1
short_parameter_2
short_parameter_3
short_parameter_4
short_parameter_5
short_parameter_6
short_parameter_7
short_parameter_8
srvid
smallint
char(1)
char(240)
char(1)
char(28)
char(1)
char(28)
char(1)
char(28)
char(1)
char(28)
char(240)
char(240)
char(240)
char(31)
char(31)
char(31)
char(31)
char(31)
char(31)
char(31)
char(31)
integer
not null
not null
not null
N/A
UPPER
lower
lower
lower
lower
lower
lower
lower
lower
lower
lower
lower
lower
lower
lower
lower
lower
lower
lower
lower
lower
N/A
not null
database_id
database_type
C - 12
database_name
protocol_1
net_address_1
protocol_2
net_address_2
protocol_3
net_address_3
protocol_4
net_address_4
long_parameter_1
long_parameter_2
long_parameter_3
short_parameter_1
short_parameter_2
short_parameter_3
short_parameter_4
short_parameter_5
C - 14
short_parameter_6
short_parameter_7
short_parameter_8
srvid
C.1.9
RIS5INDEX_COLUMNS
This view lists columns that are indexed, along with the name of the index and the table on
which it exists. It excludes columns of tables and views of the RIS dictionary.
Column
Type
Description
Case
schema_name
index_name
upper_index_name
table_name
upper_table_name
column_name
upper_column_name
position
char(31)
char(31)
char(31)
char(31)
char(31)
char(31)
char(31)
integer
not null
not null
not null
not null
not null
not null
not null
not null
lower
lower
UPPER
lower
UPPER
lower
UPPER
N/A
schema_name
index_name
upper_index_name
table_name
upper_table_name
column_name
upper_column_name
position
C.1.10 RIS5INDEXES
This view lists all indexes known to RIS, excluding those on RIS dictionary tables and views.
The indexes maintained by RIS have two names: the internal or RIS name and the external
or DBMS name. In the following view, index_name refers to the RIS (internal) name and
ext_index_name refers to the DBMS (external) name.
Most RDBMS vendors let two indexes with the same name owned by different users. The
dbms_owner is the owner of the index in the underlying database. While the index_name is
unique within the schema, the combination of dbms_owner and ext_index_name is unique
within the database.
Column
Type
Description
Case
schema_name
index_name
dbms_owner
ext_index_name
upper_index_name
table_name
upper_table_name
index_type
char(31)
char(31)
char(31)
char(31)
char(31)
char(31)
char(31)
char(1)
not null
not null
not null
not null
not null
not null
not null
not null
lower
lower
As DBMS
As DBMS
UPPER
lower
UPPER
UPPER
schema_name
index_name
dbms_owner
C - 16
ext_index_name
upper_index_name
table_name
upper_table_name
index_type
C.1.11 RIS5SCHEMAS
This view is a relational representation of the schema information in the schema file. The
data in this table is transient and is not available through database-specific utilities.
Column
Type
Description
Case
schema_name
schema_owner
database_id
schema_type
dictionary_owner
srvid
char(31)
char(31)
smallint
smallint
char(31)
integer
not null
not null
not null
not null
not null
not null
lower
As input
N/A
N/A
As input
N/A
schema_name
schema_owner
This is the schema owner/administrator. (The databasespecific log-in that owns the schema.) For standard
schemas, this is the log-in that will be used for connecting to
the database.
database_id
schema_type
dictionary_owner
srvid
C.1.12 RIS5SCHPRIV
This view lists all the users who have the privilege to create a schema using the dictionary in
which the schema (that is being queried) resides. The user_privilege is D for the dictionary
administrator and S for others.
Column
Type
Description
Case
user_name
user_privilege
char(31)
char(1)
not null
not null
Rule 1
UPPER
user_name
This is the name of a RIS user. This comes directly from the
underlying database system. It may be in uppercase or
lowercase, depending on how the underlying RDBMS stores
the information.
user_privilege
C.1.13 RIS5TABLE_PRIVS
This view lists all privileges granted on tables and views in the schema. It does not include
column privileges.
Column
Type
Description
Case
schema_name
table_name
upper_table_name
grantor
grantee
ris_privileges
ris_object
char(31)
char(31)
char(31)
char(31)
char(31)
char(7)
char(1)
not null
not null
not null
not null
not null
not null
not null
lower
lower
UPPER
lower
lower (or PUBLIC)
either
UPPER
schema_name
table_name
C - 18
upper_table_name
grantor
grantee
ris_privileges
C.1.14 RIS5TABLES
This view lists all tables and views included in the schema. (The base tables of the RIS
dictionary are not included in this list.)
The tables/views maintained by RIS have two names: the internal or RIS name and the
external or DBMS name. In the following view, table_name refers to the RIS (internal) name
and ext_table_name refers to the DBMS (external) name.
Most RDBMS vendors let two tables/views with the same name owned by different users.
The dbms_owner is the owner of the table/view in the underlying database. While the table
name is unique within the schema, the combination of dbms_owner and ext_table_name is
unique within the database.
A view is also a table in the context of RIS5TABLES, RIS5COLUMNS,
RIS5TABLE_PRIVS, and RIS5COLUMN_PRIVS.
Column
Type
Description
Case
schema_name
table_name
dbms_owner
ext_table_name
upper_table_name
table_type
date_entered
date_modified
ris_object
char(31)
char(31)
char(31)
char(31)
char(31)
char(1)
timestamp
timestamp
char(1)
not null
not null
not null
not null
not null
not null
not null
not null
not null
lower
lower
As DBMS
As DBMS
UPPER
UPPER
N/A
N/A
UPPER
schema_name
table_name
dbms_owner
ext_table_name
upper_table_name
table_type
date_entered
The date when the table was first created or included in the
schema.
date_modified
The date when the table definition was last modified with
the alter table add <col> statement.
ris_object
C.1.15 RIS5USERS
(This view returns nothing for a standard schema.) This view lists all the RIS users in a
secure (multiuser) schema.
Column
Type
Description
Case
schema_name
user_name
user_privilege
char(31)
char(31)
char(1)
not null
not null
not null
lower
Rule 1
UPPER
C - 20
schema_name
user_name
This is the name of a RIS user. This comes directly from the
underlying database system. It may be in uppercase or
lowercase, depending on how the underlying RDBMS stores
the information.
user_privilege
C.1.16 RIS5VIEWS
This view lists all information known about views owned by the schema (excluding the RIS
dictionary views). The "create view" strings can be quite long, so there is usually multiple
records for each view. Each record has just one piece of the string.
The dbms_owner and the ext_view_name have the same meaning as RIS5TABLES. Since a
view is also a table, this information is also in RIS5TABLES. They are shown in this view
for convenience.
Column
Type
Description
Case
schema_name
view_name
dbms_owner
ext_view_name
upper_view_name
ris_view_def
dbms_view_def
sequence_id
char(31)
char(31)
char(31)
char(31)
char(31)
char(64)
char(64)
integer
not null
not null
not null
not null
not null
lower
lower
As DBMS
As DBMS
UPPER
lower
lower
N/A
not null
schema_name
view_name
dbms_owner
ext_view_name
upper_view_name
ris_view_def
dbms_view_def
sequence_id
C - 22
C.2
__________________________________________________________________________________________________________________________________________________
In the absence of any of the previous options, the utility uses the current schema file and
upgrades all the schemas. If a specific schema can not be converted, the utility writes this
schema to the V4 format schema file (the copy), displays a message about the action taken
and continues with the next schema.
Schema information in the schema files has the following new entries:
SERVER_VERSION
SECURE
DICTOWNER
For example, for a schema named sch1, schema entries in a Version 4 schema are:
SCHNAME=sch1
USER=rc01
USRPASS=
BEGIN_GRANTEES
END_GRANTEES
DBID=13
The corresponding Version 5 schema entries are:
SCHNAME=sch1
SERVER_VERSION=0.0
SECURE=0
DICTOWNER=rc01
SCHOWNER=rc01
SCHOWNPASS=
BEGIN_GRANTEES
END_GRANTEES
DBID=13
When a schema file is specified, the utility copies and renames the V4 schema file so that the
Version 4 client can continue to use the file. After the utility is run, the original schema file
and the Version 5 schema file contain the same entries except that the Version 5 schema file
contains 3 new items per schema.
Environments using both Version 4 and Version 5 clients have to take care to specify
the correct schema file name with the locate schema file command. Version 4 clients
cannot use Version 5 schema files and Version 5 clients cannot use Version 4 schema
files.
The upgrade utility does not provide a way to convert Version 4.n schemas to
SECURE schemas. This can be done with an alter schema statement.
Examples
_________
This example turns debug mode on and uses the current schema file.
risupgrd -g
C - 24
This example turns debug mode on and lists two schemas and their passwords.
risupgrd -g -s "sch1.sch1pass sch2.sch2pass"
This example lists a single schema. The double quotations are unnecessary.
risupgrd -s sch1
Appendix D
__________________________________________________________________________________________________________________________________________________
Vendor-Specific Information
D-2
Appendix D
__________________________________________________________________________________________________________________________________________________
Vendor-Specific Information
This section contains information on vendor-specific data types.
D-4
Meaning
Unambiguous mapping.
INFORMIX
ORACLE
DB2
SYBASE
MSSQL
D.2
__________________________________________________________________________________________________________________________________________________
DB2
DB2
CHARACTER(x)
DECIMAL(p,s)
DOUBLE
INTEGER
REAL
SMALLINT
TIMESTAMP
RIS_BLOB
RIS_TEXT
varchar(x)
decimal(p,s)
float
integer
real
smallint
timestamp
unsupported
unsupported
D-6
RIS
RISCOLUMNS.dbms_type_string
char(x),x<=240
char(x),241<=x
date
decimal(p,s)
float
float(x),x<=21
float(x),22<=x
graphic
integer
long varchar
long vargraphic
real
smallint
time
timestamp
varchar(x), x<=240
varchar(x), 241<=x
vargraphic
CHARACTER(x)
UNSUPPORTED
UNSUPPORTED
DECIMAL(p,s)
DOUBLE
REAL
DOUBLE
UNSUPPORTED
INTEGER
UNSUPPORTED
UNSUPPORTED
REAL
SMALLINT
UNSUPPORTED
TIMESTAMP
CHARACTER(x)
UNSUPPORTED
UNSUPPORTED
char
char
date
decimal
float
float
float
graphic
integer
longvarchar
longgraphic
float
smallint
time
timestamp
varchar
varchar
graphic
In DB2 you cannot compare a decimal column with a parameterized value that
is larger than the maximum column value.
D.3
__________________________________________________________________________________________________________________________________________________
INFORMIX
D.3.2 Transactions
INFORMIX immediately posts the effects of statements issued within a transaction as
opposed to waiting for a commit. If a rollback is issued, INFORMIX restores the data to
its state at the beginning of the transaction.
For example, if schemaA inserts a record in schemaA.table1 within a transaction but does
not commit the transaction, schemaB can see the new record if it selects it from
schemaA.table1.
The concept of a transaction suggests that statements do not take effect until a commit
statement is issued, therefore, it is necessary to consider the INFORMIX implementation.
D-8
INFORMIX
CHARACTER(x)
DECIMAL(p,s)
DOUBLE
INTEGER
REAL
SMALLINT
TIMESTAMP
RIS_BLOB
char(x)
decimal(p,s)
float
integer
real
smallint
datetime year to second
byte (supported only in INFORMIXOnLine)
text (supported only in INFORMIXOnLine)
RIS_TEXT
RIS
RISCOLUMNS.dbms_type_string
RIS_BLOB
CHARACTER(x)
UNSUPPORTED
UNSUPPORTED
UNSUPPORTED
TIMESTAMP
REAL
DOUBLE
DOUBLE
UNSUPPORTED
DOUBLE
INTEGER
UNSUPPORTED
REAL
UNSUPPORTED
SMALLINT
RIS_TEXT
CHARACTER(x)
UNSUPPORTED
byte
char
char
date
datetime
datetime
decimal
decimal
decimal
decimal
float
integer
interval
smallfloat
serial
smallint
text
varchar
varchar
D.4
__________________________________________________________________________________________________________________________________________________
ORACLE
Oracle maps all numeric data types to one internal type. If a double type field is created
through RIS, the schema is dropped, then re-created, and the field is no longer defined as a
float.
ORACLE
CHARACTER(x)
DECIMAL(p,s)
DOUBLE
INTEGER
REAL
SMALLINT
TIMESTAMP
RIS_BLOB
RIS_TEXT
char(x)
number(p,s)
number
number(10,0)
float(21)
number(5,0)
date
long raw (1byte-2Gb)
long (1byte-2Gb)
RIS
RISCOLUMNS.dbms_type_string
varchar(x)
varchar(2)
char(x), x <= 240
char(x), 241 <=x
date
long (1byte-2Gb)
long raw(1byte-2Gb)
number(p,s)
raw(x)
rowid
CHARACTER(x)
CHARACTER(x)
CHARACTER(x)
UNSUPPORTED
TIMESTAMP
RIS_BLOB
RIS_TEXT
see full details that follow
UNSUPPORTED
UNSUPPORTED
char
char
char
char
date
long
long raw
number
raw
rowid
D - 10
* DOUBLE
case (p != 0)
p is never negative
subcase (s<=0)
1
6
11
16
<=
<=
<=
<=
p <= 5
p <= 10
p <= 15
p
?
?
?
*
SMALLINT
INTEGER
DOUBLE
DOUBLE
subcase (s>0)
subsubcase (s>p) note that the value is floating point
1 <= p <= 7
8 <= p
* REAL
* DOUBLE
subsubcase (s<=p)
p <= 15
p > 15
- DECIMAL(p,s)
- DOUBLE
Syntactic variations:
long varchar
decimal(p)
number(p)
number(*,s)
decimal(p,s)
number
varchar
===
===
===
===
===
===
long
number(p)
number(p,0)
decimal(*,s) === number(38,s)
number(p,s)
real, float, float(*), float(b), double precision,
number(*)
=== char
D.5
__________________________________________________________________________________________________________________________________________________
SYBASE
SYBASE does not support the operator =all.
SYBASE
CHARACTER(x)
DECIMAL(p,s)
DOUBLE
INTEGER
REAL
SMALLINT
TIMESTAMP
RIS_BLOB
RIS_TEXT
char(x)
decimal
float
integer
real
smallint
datetime
unsupported
unsupported
D - 12
RIS
RISCOLUMNS.dbms_type_string
binary(n)
bit
char(x),x<=240
char(x),241<=x
datetime
float
image
int
money
real
smalldatetime
smallint
smallmoney
text
timestamp
tinyint
varbinary(n)
varchar(x), x<=240
varchar(x), 241<=x
UNSUPPORTED
UNSUPPORTED
CHARACTER(x)
UNSUPPORTED
TIMESTAMP
DOUBLE
UNSUPPORTED
INTEGER
UNSUPPORTED
REAL
UNSUPPORTED
SMALLINT
UNSUPPORTED
UNSUPPORTED
UNSUPPORTED
UNSUPPORTED
UNSUPPORTED
CHARACTER(x)
UNSUPPORTED
binary
bit
char
char
timestamp
float
image
integer
money
real
smalldatetime
smallint
smallmoney
text
timestamp
tinyint
varbinary
varchar
varchar
D.6
__________________________________________________________________________________________________________________________________________________
MSSQL
MSSQL refers to Microsoft SQL Server.
MSSQL
CHARACTER(x)
DECIMAL(p,s)
DOUBLE
INTEGER
REAL
SMALLINT
TIMESTAMP
RIS_BLOB
RIS_TEXT
varchar(x)
float
float
integer
real
smallint
datetime
unsupported
unsupported
D - 14
RIS
RISCOLUMNS.dbms_type_string
binary(n)
bit
char(x),x<=240
char(x),241<=x
datetime
float
image
int
money
real
smalldatetime
smallint
smallmoney
text
timestamp
tinyint
varbinary(n)
varchar(x), x<=240
varchar(x), 241<=x
UNSUPPORTED
UNSUPPORTED
CHARACTER(x)
UNSUPPORTED
TIMESTAMP
DOUBLE
UNSUPPORTED
INTEGER
UNSUPPORTED
REAL
UNSUPPORTED
SMALLINT
UNSUPPORTED
UNSUPPORTED
UNSUPPORTED
UNSUPPORTED
UNSUPPORTED
CHARACTER(x)
UNSUPPORTED
binary
bit
char
char
timestamp
float
image
integer
money
real
smalldatetime
smallint
smallmoney
text
timestamp
tinyint
varbinary
varchar
varchar
Appendix E
__________________________________________________________________________________________________________________________________________________
RIS Limits
E-2
Appendix E
__________________________________________________________________________________________________________________________________________________
RIS Limits
RIS enforces several limits that help ensure that applications written using RIS work with
any of the supported database management systems. Some of these limits have been
temporarily increased to values greater than shown in the following list. The expanded limits
are documented at the end of this section.
RIS Version 5.3.1 and later support 16-bit or multi-byte languages. (Most 16bit 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 bytes, where x is an integer. For those using
multibyte languages, the maximum number of characters should be interpreted
as the maximum size in bytes. Therefore, the normal maximum of 18
characters translates into 9 16-bit characters.
These RIS limits are:
1.
2.
3.
4.
The length of a row in a table or view cannot exceed 2000 when computed using the
sum of the following items:
Twice the number of columns in the table or view
The sum of the lengths of all character fields in a row
The sum of the precisions of all numeric fields in a row where the precisions are:
INTEGER
SMALLINT
REAL
DOUBLE
DECIMAL
TIMESTAMP
10
5
7
15
user specified <= 15
24
E-4
5.
6.
The total length of all the columns involved in an index cannot exceed 120.
7.
8.
The total length of all the columns involved in a group by clause cannot exceed 120.
9.
10.
The total length of all the columns involved in an order by clause cannot exceed 120.
11.
The maximum length for schema, table, view, index, and column names is 18
characters in ANSI mode. If not in ANSI mode, the length cannot exceed 31, though
some RDBMSs do not support names of this size.
12.
13.
14.
15.
16.
17.
18.
19.
20.
The limits for an ORACLE double data type are 1.0e+130 to 1.0e-130 and -1.0e+130 to
-1.0e-130. ORACLE returns values of 0 or MAX_DOUBLE when out of range.
21.
22.
23.
24.
25.
26.
27.
The size of the database parameters string in the schema file cannot exceed 512.
28.
The number of schemas that can be defined for a database cannot exceed 300.
29.
30.
The number of network protocols that can be specified for a schema cannot exceed 4.
31.
32.
The number of table definitions RIS can store in memory cannot exceed 100.
33.
34.
35.
The increased RIS limits that you can currently use are:
1.
2.
The length of a row in a table or view cannot exceed 8192. (For SYBASE and Microsoft
SQL Server the maximum row length is 1962 bytes.)
3.
4.
5.
The total length of all the columns involved in a group by clause cannot exceed 2008.
6.
7.
The total length of all the columns involved in an order by clause cannot exceed
2008.
E-6
Appendix F
__________________________________________________________________________________________________________________________________________________
Parameters File
F-2
Appendix F
__________________________________________________________________________________________________________________________________________________
Parameters File
The parameters, or parms, file contains operational parameters, the location of the client,
and the location of the schema definition file for access to all schemas from the RIS client.
The parms file is generated the first time RIS is invoked. The parms file defines a default
schema definition file specification, referencing the file schemas in the directory where RIS
was installed. You can change the default setting by using the locate schema file
command in the interactive utility or RIS Schema Manager to put the appropriate entry in
the parms file or the function RISlocate_schema_file can be used in an embedded program.
The file RISnn.nn\parms on the client machine must contain the location of the schema
definition file. The parms file describes the network address and filename of the schema
definition file. (nn.nn refers to the RIS version number.)
If a network address is not provided, the schema definition file is created or used on the local
machine.
If the filename is not a full pathname, RIS looks for the file in the directory where RIS was
installed on the machine. This is seen by issuing the command:
start regedt32
2.
3.
4.
F-4
Before using RIS, you may need to change some of the RIS operating parameters. These
parameters are located in the file parms in the directory in which RIS was installed. If the
environment variable RIS_PARAMETERS is defined, RIS looks for the file it indicates. This
file is read by RIS whenever an application issues its first SQL statement.
The parms file is in ASCII format, so you can use any text editor (such as vi or EDIT) to
modify it. You specify a parameter value by the parameter name followed by a value. All
parameter names must begin in the first column. Also, you can include comments by placing
the pound character (#) in column one of a comment line. The following is a list of supported
parameters:
1.
SHARED_MEMORY
2.
MAX_LOCAL_SERVERS
3.
MAX_ROWS
4.
MAX_BUFFER_SIZE
5.
MAX_STATIC_STMTS
6.
MAX_USER_STMTS
7.
MAX_SECONDARY_SCHEMAS
8.
MAX_TRANSACTIONS
9.
MAX_TABLES_IN_MEM
10.
11.
12.
LOCK_FILE_RETRY
13.
F.1 SHARED_MEMORY
SHARED_MEMORY is the size of the shared memory segment allocated by RIS. Using a
large shared memory region does not alter RIS memory usage and does not affect system
performance. SHARED_MEMORY is simply the maximum amount of shared memory that
RIS can use. The size of the shared memory does affect swap space requirements. If your
system is running out of swap space on a regular basis, you may want to reduce the size of
this parameter.
The SHARED_MEMORY maximum value is subject to system limitations.
SHARED_MEMORY must be a hex number.
SHARED_MEMORY minimum:
SHARED_MEMORY maximum:
SHARED_MEMORY default:
0x50000
0x400000
0x200000
F-6
F.2 MAX_LOCAL_SERVERS
MAX_LOCAL_SERVERS is the maximum number of local servers each RIS client
(application) can start. A local server is started for each schema opened on a local database.
MAX_LOCAL_SERVERS affects the number of UNIX semaphores RIS uses because RIS
allocates MAX_LOCAL_SERVERS semaphores for each RIS client process (application).
Note the MAX_LOCAL_SERVERS maximum value is subject to system limitations on
number semaphores per ID and per system.
MAX_LOCAL_SERVERS minimum:
MAX_LOCAL_SERVERS maximum:
MAX_LOCAL_SERVERS default:
0
24
8
F.3 MAX_ROWS
MAX_ROWS is the maximum number of rows of data RIS fetchs into the communication
buffer with local and remote servers when a fetch request is made. Larger values are more
efficient when many rows are returned by a query and fetched by the user. Smaller values
are more efficient when many rows are returned by a query but the user may not actually
use all those rows. Note that the actual maximum value possible for MAX_ROWS is most
likely much less than the theoretical max value given in the following table. This is due to
the amount of shared memory available to RIS, the number of contiguous bytes of memory
that RIS can allocate, and the total communication buffer size being representable by an
unsigned long integer.
MAX_ROWS minimum:
MAX_ROWS maximum:
MAX_ROWS default:
1
8388606
100
F.4 MAX_BUFFER_SIZE
MAX_BUFFER_SIZE is the maximum size of buffer that RIS uses to hold results from a
fetch request. If MAX_ROWS rows of data does not fit in a buffer of MAX_BUFFER_SIZE
then only the number of complete rows that fit in the buffer are fetched. The buffer is made
large enough to hold 1 row of data, even if this results in a buffer of size greater than
MAX_BUFFER_SIZE.
MAX_BUFFER_SIZE minimum:
MAX_BUFFER_SIZE maximum:
MAX_BUFFER_SIZE minimum
default:
66552
67108848
66552
F.5 MAX_STATIC_STMTS
MAX_STATIC_STMTS is the maximum number of static statements that RIS attempts to
keep prepared. This only applies to static data manipulation statements except for select.
By keeping these statements prepared, RIS improves the performance of static statements
that are executed multiple times. When the MAX_STATIC_STMTS limit or the total
statement limit is reached, RIS clears the least recently used static statement. If
MAX_STATIC_STMTS is set to 0, then each static statement is cleared immediately after it
is executed.
MAX_STATIC_STMTS minimum:
MAX_STATIC_STMTS maximum:
MAX_STATIC_STMTS default:
0
512
10
F.6 MAX_USER_STMTS
MAX_USER_STMTS is the maximum number of statements that RIS will attempt to keep
prepared.
MAX_USER_STMTS minimum:
MAX_USER_STMTS maximum:
MAX_USER_STMTS default:
1
512
40
F.7 MAX_SECONDARY_SCHEMAS
MAX_SECONDARY_SCHEMAS is the maximum number of secondary schemas that RIS
allows per super schema.
MAX_SECONDARY_SCHEMAS
minimum:
MAX_SECONDARY_SCHEMAS
maximum:
MAX_SECONDARY_SCHEMAS
default:
0
9
0
F.8 MAX_TRANSACTIONS
MAX_TRANSACTIONS is the maximum number of transactions that RIS runs at a time.
MAX_TRANSACTIONS minimum:
MAX_TRANSACTIONS maximum:
MAX_TRANSACTIONS default:
1
40
1
F-8
F.9 MAX_TABLES_IN_MEM
MAX_TABLES_IN_MEM is the maximum number of tables that RIS stores in memory.
Through this limiting factor, memory usage is optimized. Once the MAX_TABLES_IN_MEM
limit is reached, RIS clears the least recently used table. A high limiting value results in
larger memory usage if the number of tables referenced during a session is high. If the value
is set low, less memory is used, but the overhead of purging is increased.
MAX_TABLES_IN_MEM minimum:
MAX_TABLES_IN_MEM maximum:
MAX_TABLES_IN_MEM default:
1
1024
50
Network verification parameters include a set of alarm timestamp parameters and network
buffer parameters. They are:
1.
TIMESTAMP_INTERVAL
TIMESTAMP_INTERVAL is the time period of timestamps that RIS server sends out
presumptively to RIS client. These timestamps help RIS client to determine the status
of RIS server which is executing an opcode from RIS client. Generally, the smaller the
timestamp interval is, the quicker RIS client is to correctly response the status change
of RIS server. A too small timestamp interval, however, may increase network traffic,
which may limit the quickness consequently.
TIMESTAMP_INTERVAL minimum:
TIMESTAMP_INTERVAL maximum:
TIMESTAMP_INTERVAL default:
2.
0
100000
0
INITIAL_TIMEOUT
INITIAL_TIMEOUT is the longest time period for which RIS client can wait to get an
acknowledgement from RIS server for an opcode execution request. The round
transmission of send-ack helps RIS client to synchronize its time counter with RIS
servers. Two synchronized time counters in both sides enable RIS client to correctly
estimate the status of RIS server through counting received timestamps. The smaller
the initial timeout, the closer the two time counters. A too small initial timeout,
however, may increase the chance of unexpected terminating of RIS.
INITIAL_TIMEOUT minimum:
INITIAL_TIMEOUT maximum:
INITIAL_TIMEOUT default:
3.
0
100000
12
TIMESTAMP_TOLERANCE
TIMESTAMP_TOLERANCE is the maximum number of timestamps by which RIS
client is allowed to be behind to count received timestamps. Network traffic, heavy site
load and difference of time counters prevent RIS client from counting exact number of
timestamps that is supposed to be sent by RIS server. A small timestamp tolerance may
incur RIS to terminate itself unnecessarily.
TIMESTAMP_TOLERANCE minimum:
TIMESTAMP_TOLERANCE maximum:
TIMESTAMP_TOLERANCE default:
4.
0
1000
5
BUFFER_FULL_SIZE
BUFFER_FULL_SIZE is used to specify the maximum size of buffer that the network
software can use. RIS will use this value to determine the maximum number of
timestamps that can be written in the network buffer without the possibility of the
network buffer becoming full.
BUFFER_FULL_SIZE minimum:
BUFFER_FULL_SIZE maximum:
BUFFER_FULL_SIZE default:
5.
8
8000
64
BUFFER_FULL_TIMEOUT
BUFFER_FULL_TIMEOUT is the longest time period for which RIS client can wait to
receive next alarm timestamp from RIS server after RIS client has read more than
BUFFER_FULL_SIZE of timestamp data.
BUFFER_FULL_TIMEOUT minimum:
BUFFER_FULL_TIMEOUT maximum:
BUFFER_FULL_TIMEOUT default:
0
100000
12
All above five parameters are basically independent of each other. However, the different
combination of these parameters may have different effects on RIS. Consider a subtle
combination as following.
If BUFFER_FULL_TIMEOUT > TIMESTAMP_INTERVAL*TIMESTAMP_TOLERANCE,
then the buffer full timeout dominates the timestamp tolerance. That is, RIS client reports
server died only after the buffer full timeout has elapsed in buffer full case. Otherwise, the
buffer full timeout dominates the timestamp tolerance when RIS server has sent all ideal
timestamps on time at buffer full moment. This is because RIS client is able to wait
TIMESTAMP_INTERVAL*TIMESTAMP _TOLERANCE seconds for tolerance test.
F - 10
SCHEMA_FILE_PROTOCOL
xns:
tcp/ip:
decnet:
memory(local):
X
T
D
M
All of the protocols, except memory, require that you specify an address, username, and
password. A password is needed only if the username has a password. The format of
the address varies according to the protocol used.
2.
SCHEMA_FILE_ADDRESS
xns:
tcp/ip:
decnet:
memory(local):
3.
name or XXXXXXXX.XX-XX-XX-XX-XX-XX
name or XXX.XXX.XXX.XXX
name or XX.XXXX
n/a
SCHEMA_FILE_USERNAME
example:
bob
The username specified must be a valid user on the node specified in the address and
have read access to the schema file.
4.
SCHEMA_FILE_PASSWORD
example:
XP,Zh+&;PVQiU)w)mE6x
SCHEMA_FILE_NAME
UNIX example:
Windows NT example:
/usr/bob/risschema
c:\users\bob\risschema
SCHEMA_FILE_PROTOCOL default:
SCHEMA_FILE_ADDRESS default:
SCHEMA_FILE_USERNAME default:
SCHEMA_FILE_PASSWORD default:
SCHEMA_FILE_NAME default:
schemas
Regardless of the protocol used, you must specify a name for the schema definition file.
The schema definition file must be located in a directory to which the user can read and
write. If the memory protocol is specified, the directory must be readable and writable
by the user running RIS. If the filename is not prepended with a path, then it is
assumed to be in the directory where RIS is installed. Write access is required only
when the user that is using RIS tries to create, alter, or drop a schema.
F.12 LOCK_FILE_RETRY
LOCK_FILE_RETRY is the number of times RIS attempts to remove the schema lock file,
risschema.LCK. After RIS attempts to remove the schema lock file the specified number of
times, it takes one of two actions, depending if LOCK_FILE_RETRY is positive or negative.
If LOCK_FILE_RETRY is positive, RIS assumes a process has terminated without replacing
the lock file and continue processing. If LOCK_FILE_RETRY is negative, RIS stops
processing and returns an error.
The schema lock file stops multiple processes from writing to the schema file at the same
time. When a process attempts to write to the schema file, it removes the schema lock file,
indicating to other processes the schema file is locked. Once done writing to the schema file,
it replaces the lock file, indicating other processes can now write to the schema file.
LOCK_FILE_RETRY default:
25
0.0
The CLIENT_VERSION parameter is set to 0.0 by default, meaning that the application will
connect to a compatible client. This parameter is set to m.n where m is the major version
and n is the minor version of the client product that will used when multiple versiona of the
client are available at the client location.
F - 12
Appendix G
__________________________________________________________________________________________________________________________________________________
G-2
Appendix G
__________________________________________________________________________________________________________________________________________________
Access to the schema definition file is controlled by the presence of another file, the schema
lock file. The name of the schema lock file is the same as the schema definition file with the
addition of the .LCK extension. The schema definition file is accessible only if the schema
lock file exists. If the schema lock file does not exist, then the schema definition file is in use.
If the schema definition file is in use, the action RIS takes is specified by the
LOCK_FILE_RETRY parameter in the RIS parms file. Sometimes, when RIS is abnormally
terminated, the schema lock file is not replaced. In these cases, the schema lock file must be
replaced manually.
The schema definition file consists of database and schema entries that are associated by a
DBID (database ID) key value. There can be multiple schema entries for each database
entry. A blank line separates entries. The following is a description of the fields in the
schema definition file:
G-4
Field
Description
DBID
DTYPE
DBNAME
OSPASS
OSTYPE
OSUSER
PROTOCOL
NETADDR
SCHNAME
SERVER_VERSION
SECURE
DICTOWNER
SCHOWNER
SCHOWNPASS
BEGIN_GRANTEES
and END_GRANTEES
DIR
DBTEMP
TBCONFIG
OS
ENV
NET_PROTOCOL
HOST_PROGRAM
RIS_LU or HOST_LU
MODE
GROUP
Currently unused.
G-6
FILENAME
FILENAME
TIMESTAMP
The 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. 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.
The following is a sample schema definition file. This includes sections for the INFORMIX,
ORACLE, SYBASE, Microsoft SQL Server, and DB2 databases.
Comments are not allowed in schema files. The comments to the right of the following
code sections below were added to this document to clarify which sections were
associated with which databases.
CHECKSUM:240378796
TIMESTAMP:733791488
DBID=1
***(INFORMIX Standard Engine on UNIX)***
DTYPE=X
DBNAME=/usr/dbs/risdb1
OSTYPE=U
PROTOCOL=T
NETADDR=129.135.178.124
PROTOCOL=X
NETADDR=000134bb.aa-00-04-00-ac-78
PROTOCOL=D
NETADDR=33.121
PROTOCOL=
NETADDR=
DIR=/usr/informix
SQLEXEC=/usr/informix/lib/sqlexec
DBTEMP=
TBCONFIG=
DBID=2
***(INFORMIX OnLine Engine on UNIX)***
DTYPE=X
DBNAME=risdb1@serv2
OSTYPE=U
PROTOCOL=T
NETADDR=129.135.172.189
PROTOCOL=X
NETADDR=000134bb.08-00-36-35-c3-01
PROTOCOL=
NETADDR=
PROTOCOL=
NETADDR=
DIR=/usr/informix
SQLEXEC=/usr/informix/lib/sqlturbo
DBTEMP=/usr/tmp
TBCONFIG=/usr/informix/etc/tbconfig
DBID=3
***(INFORMIX Standard Engine on NT)***
DTYPE=X
DBNAME=/c=/dbs/risdb1@serv1
OSTYPE=N
PROTOCOL=T
NETADDR=129.135.178.124
PROTOCOL=
NETADDR=
PROTOCOL=
NETADDR=
PROTOCOL=
DIR=c:\win32app\informix
SQLEXEC=c:\win32app\informix\bin\sqlexec.exe
DBTEMP=
TBCONFIG=
DBID=4
***(INFORMIX OnLine Engine on NT)***
DTYPE=X
DBNAME=risdb1@serv1
OSTYPE=N
PROTOCOL=T
NETADDR=129.135.178.124
PROTOCOL=
NETADDR=
PROTOCOL=
NETADDR=
PROTOCOL=
NETADDR=
DIR=c:\win32app\informix
SQLEXEC=c:\win32app\informix\bin\sqlturbo.exe
DBTEMP=
TBCONFIG=c:\win32app\informix\etc\config
DBID=5
***(ORACLE)***
DTYPE=O
DBNAME=A
OSTYPE=U
G-8
PROTOCOL=T
NETADDR=0001352b.aa-00-04-00-a6-78
PROTOCOL=XX
NETADDR=129.135.127.174
PROTOCOL=D
NETADDR=39.19
PROTOCOL=
NETADDR=
OSUSER=ken
OSPASS=anything
DIR=/usr/oracle
DBID=6
DTYPE=O
DBNAME=A
OSTYPE=N
PROTOCOL=T
NETADDR=129.135.127.174
PROTOCOL=
NETADDR=
PROTOCOL=
NETADDR=
PROTOCOL=
NETADDR=
OSUSER=mary
OSPASS=anything
DIR=c:\orant
DBID=7
DTYPE=Y
DBNAME=risdb6
OSTYPE=U
PROTOCOL=T
NETADDR=129.135.169.47
PROTOCOL=
NETADDR=
PROTOCOL=
NETADDR=
PROTOCOL=
NETADDR=
OSUSER=washington
OSPASS=anything
DIR=/usr2/sybase
DSQUERY=RISAT0
FILENAME=
DBID=8
DTYPE=Y
DBNAME=risdb7
OSTYPE=N
PROTOCOL=T
NETADDR=129.135.169.47
PROTOCOL=
NETADDR=
PROTOCOL=
NETADDR=
PROTOCOL=
NETADDR=
OSUSER=jones
OSPASS=anything
DIR=c:\sql10
DSQUERY=RISAT0
***(ORACLE on NT)***
***(SYBASE)***
***(SYBASE on NT)***
FILENAME=
DBID=9
***(Microsoft SQL Server on NT)***
DTYPE=M
DBNAME=risdb8
OSTYPE=N
PROTOCOL=T
NETADDR=129.135.169.45
PROTOCOL=
NETADDR=
PROTOCOL=
NETADDR=
PROTOCOL=
NETADDR=
OSUSER=jones
OSPASS=anything
DIR=
DSQUERY=RISMSQ
IFILE=
DBID=10
***(DB2 Using LU6.2)***
DTYPE=D
DBNAME=risdb10
OSTYPE=U
PROTOCOL=X
NETADDR=0001388e.aa-00-04-00-20-2a
PROTOCOL=T
NETADDR=129.135.170.23
PROTOCOL=
NETADDR=
PROTOCOL=
NETADDR=
OSUSER=rc01
OSPASS=anything
ARCH=s370
OS=mvs
NET_PROTOCOL=lu6.2
ENV=cics
HOST_PROGRAM=RISX
RIS_LU=HSV1.L62S700
HOST_LU=HSV1.A01CICSA
MODE=IGRLU62P
GROUP=
NODE=
PORT=0
SCHNAME=sch1
SERVER_VERSION=0.0
SECURE=0
DICTOWNER=informix
SCHOWNER=informix
SCHOWNPASS=anything
BEGIN_GRANTEES
END_GRANTEES
DBID=1
SCHNAME=sch2
SERVER_VERSION=0.0
SECURE=0
DICTOWNER=informix
SCHOWNER=informix
SCHOWNPASS=anything
G - 10
BEGIN_GRANTEES
END_GRANTEES
DBID=2
SCHNAME=sch3
SERVER_VERSION=0.0
SECURE=0
DICTOWNER=informix
SCHOWNER=informix
SCHOWNPASS=anything
BEGIN_GRANTEES
END_GRANTEES
DBID=3
SCHNAME=sch4
SERVER_VERSION=0.0
SECURE=0
DICTOWNER=informix
SCHOWNER=informix
SCHOWNPASS=anything
BEGIN_GRANTEES
END_GRANTEES
DBID=4
SCHNAME=oracle_clip
SERVER_VERSION=0.0
SECURE=1
DICTOWNER=jane
SCHOWNER=jack
SCHOWNPASS=anything
BEGIN_GRANTEES
END_GRANTEES
DBID=5
SCHNAME=oracle_nt
SERVER_VERSION=0.0
SECURE=1
DICTOWNER=jane
SCHOWNER=bob
SCHOWNPASS=anything
BEGIN_GRANTEES
END_GRANTEES
DBID=6
SCHNAME=sybase_sun
SERVER_VERSION=0.0
SECURE=0
DICTOWNER=jil
SCHOWNER=gary
SCHOWNPASS=anything
BEGIN_GRANTEES
END_GRANTEES
DBID=7
SCHNAME=sybase_nt
SERVER_VERSION=0.0
SECURE=0
DICTOWNER=jill
SCHOWNER=sue
SCHOWNPASS=anything
BEGIN_GRANTEES
END_GRANTEES
DBID=8
SCHNAME=mssql_nt
SERVER_VERSION=0.0
SECURE=0
DICTOWNER=jill
SCHOWNER=sue
SCHOWNPASS=anything
BEGIN_GRANTEES
END_GRANTEES
DBID=9
SCHNAME=db2_ibm_tcp
SERVER_VERSION=0.0
SECURE=1
DICTOWNER=RC00
SCHOWNER=RC00
SCHOWNPASS=anything
BEGIN_GRANTEES
END_GRANTEES
DBID=10
SCHNAME=db2_ibm_lu62
SERVER_VERSION=0.0
SECURE=0
DICTOWNER=rc01
SCHOWNER=RC01
SCHOWNPASS=anything
BEGIN_GRANTEES
END_GRANTEES
DBID=11
-
There is a list of protocols in the database entry which allows for additional
protocols. Currently, only the first protocol in the list is used.
All these entries are created by the create schema statement. If the file is corrupted or
removed, the entries can be re-created by issuing the create schema statement again.
G - 12
Appendix H
__________________________________________________________________________________________________________________________________________________
H-2
Appendix H
__________________________________________________________________________________________________________________________________________________
You can also add new languages currently not supported by RIS as long as they are
supported by the operating system and database.
Defining RIS Language Settings for NT:
1.
2.
Scroll through the list of languages available under the Language drop-down list.
3.
4.
Click OK. The system prompts you for the source of the operating system language
files.
5.
The following is the langs file currently supported by RIS. The format of this file is specified
by six (6) fields per line separated by a pipe (|) delimiter. Each line represents one language
mapping between RIS and the underlying operating system. The format is:
ris_lang_id|ris_lang_name|ris_lang_dir|os_lang_id|code_page|os_lang_name
ris_lang_id
ris_lang_name
ris_lang_dir
os_lang_id
code_page
H-4
os_lang_name
Below is a sample language configuration file. Only languages with the same code page can
interoperate. If the two languages do not have the same code page then RIS gives an error of
RIS_E_INCOMPATIBLE_LANGS.
Sample langs file:
0 |english
|english
|0x0409|1252|U.S. English
1 |korean
|korean
|0x0412|946|korean
2 |chinese
|chinese
|0x0404|950|Traditional Chinese
3 |japanese
|japanese
|0x0411|932|Japanese
4 |german
|german
|0x0407|1252|German
5 |french
|french
|0x040C|1252|French
6 |spanish
|spanish
|0x0C0A|1252|Modern Spanish
7 |italian
|italian
|0x0410|1252|Italian
8 |arabic
|arabic
|0x0401|1256|Arabic
9 |bulgarian
|bulgaria
|0x0402|1251|Bulgarian
10|catalan
|catalan
|0x0403|1252|catalan
11|traditional chinese |chinese.smp |0x0804|936|Simplified Chinese
12|czech
|czech
|0x0405|1250|Czech
13|danish
|danish
|0x0406|1252|Danish
14|swiss german
|german.sws |0x0807|1252|Swiss German
15|uk english
|english.uk |0x0809|1252|U.K. English
16|australian english |english.aus |0x0C09|1252|Australian English
17|canadian english
|english.can |0x1009|1252|Canadian English
18|mexican spanish
|spanish.mex |0x080A|1252|Mexican Spanish
19|finnish
|finnish
|0x040B|1252|Finnish
20|belgian french
|french.blg |0x080C|1252|Belgian French
21|canadian french
|french.can |0x0C0C|1252|Canadian French
22|swiss french
|french.sws |0x100C|1252|Swiss French
23|hebrew
|hebrew
|0x040D|1255|Hebrew
24|hungarian
|hungarian
|0x040E|1250|Hungarian
25|icelandic
|icelandic
|0x040F|1252|Icelandic
26|swiss italian
|italian.sws |0x0810|1252|Swiss Italian
27|dutch
|dutch
|0x0413|1252|Dutch
28|belgian dutch
|dutch.blg
|0x0813|1252|Belgian Dutch
29|norwegian bokmal
|norwegia.bkm|0x0414|1252|Norwegian-Bokmal
30|norwegian nynorsk
|norwegia.nyn|0x0814|1252|Norwegian-Nynorsk
31|polish
|polish
|0x0415|1250|polish
32|brazilian portuguese|portugue.brz|0x0416|1252|Brazilian Portuguese
33|portuguese
|portugue
|0x0816|1252|Portuguese
34|rhaeto romanic
|rhaeto.rom |0x0417|0|Rhaeto-Romanic
35|romanian
|romanian
|0x0418|1250|Romanian
36|russian
|russian
|0x0419|1251|Russian
37|croata serbian
|croata
|0x041A|1250|Croato-Serbian
38|serbo croatian
|serbo
|0x081A|1250|Serbo-Croatian
39|slovak
|slovak
|0x041B|1250|Slovak
40|albanian
|albanian
|0x041C|1250|Albanian
41|swedish
|swedish
|0x041D|1252|Swedish
42|thai
|thai
|0x041E|874|Thai
43|turkish
|turkish
|0x041F|1254|Turkish
44|urdu
|urdu
|0x0420|0|Urdu
45|bahasa
|bahasa
|0x0421|1252|Bahasa
Appendix I
__________________________________________________________________________________________________________________________________________________
I-2
Appendix I
__________________________________________________________________________________________________________________________________________________
I-4
I-6
I-8
I.9 RIS_BLOB/RIS_TEXT
RIS Version 5 allows long binary or long text data that lets you:
Use it for document or picture storage by INFORMIX OnLine and ORACLE. RIS has no
RIS_BLOB/RIS_TEXT support for INFORMIX Standard Engine, SYBASE, Microsoft
SQL Server, or DB2.
Insert, update, or retrieve large data.
Access character strings with a length greater than 249 characters for other RDBMSs
not supporting RIS_BLOB.
Considerations when using this capability:
To use RIS_BLOB/RIS_TEXT data, the client and data server versions must be at least
05.01.01.xx.
This feature is available only through the programming interface; no interactive access
is available.
The application should track the data length.
The RIS_BLOB data type is for binary data; for example, GIF files, executables, and so
forth. RIS makes no attempt to convert or interpret the data.
The RIS_TEXT data type is for text data; for example, ASCII files. RIS does convert
the text data between different hardware platforms as it would for char data.
The text data can be inserted into a RIS_BLOB column, but no blob data should be
inserted into a RIS_TEXT column.
To create a table with a column of RIS_BLOB/RIS_TEXT data type
create table emp (name char(25), id int, picture ris_blob (50000))
The default size of the RIS_BLOB/RIS_TEXT column is 0. The maximum length of the
data is dependent on the database. If the maximum data size is set to 0, data can be
retrieved from the database to a memory array and not a file.
The file_used field is required for inserting and retrieving. RIS uses the filename or the
memory array as the targeted user variable.
The text data and character data are converted for different hardware platforms.
The maximum size limit cannot be zero when retrieving data from the database. The
maximum size limit is zero when retrieving data from memory.
RIS_BLOB/RIS_TEXT columns cannot be used in the SQL WHERE clause or GROUP
BY statements, and cannot be indexed.
I - 10
null
Yes
In the above example, RC01 is the dictionary owner as shown in the schema file, blob_table
is the name of the table with a blob column, set to values other than 10000.
RIS limits the data size inserted into a RIS_BLOB/RIS_TEXT column if a size is specified
when the table is created.
For example:
create table blob1 (c1 ris_blob(100000))
would impose a limit of 100,000 bytes. If the table is created without specifying a size, then
the underlying RDBMSs maximum limit for RIS_BLOB/RIS_TEXT data will be used.
For example:
create table blob2 (c2 ris_blob)
I.10 Interoperability
RIS Version 5 lets multiple versions of RIS products be available on most systems. The
following figure details interoperability of RIS Version 4 and RIS Version 5.
This capability:
Lets you continue to use RIS Version 4 applications with minimal impact. Version 4
applications should continue to run.
Considerations when using this capability:
RIS Client and Data Servers should be upgraded to RIS Version 5.
Multiple versions are available remotely through TCP only.
The ORACLE 7 Data Server requires the RIS Version 5 Client.
The Sybase SQL Data Server requires the Version 5.02 Client.
Only RIS Version 5 applications can query RIS Version 5 dictionary objects. Only RIS
Version 4 applications can query RIS Version 4 dictionary objects.
The RIS utilities are also applications and the previous restrictions apply.
The risdtype utility of RIS Version 4 cannot be used with the RIS Client Version 5 or
the RIS Data Server Version 5.
Files generated by the RIS Version 4 risrecrd utility cannot be processed by the RIS
Version 5 risplbck utility. If an application is built with RIS Version 4, the resulting
record file can be processed only by the RIS Version 4 risplbck utility.
I - 12
I.12 Utilities
The RIS Version 4 ad hoc utility ris has been renamed risbatch. There is now an ad hoc
query utility with a graphic user interface (GUI), called risgui.
Considerations when using the Version 5 loader/unloader:
The loader/unloader provides no BLOB support.
The unloader unloads (or saves) RIS names (aliases) only, not the underlying object
names.
The unloader unloads (or saves) schema ownership only, not underlying RDBMS
ownership.
I.13 Parameters
The parameter file generated by a Version 5 application or utility is compatible with Version
4 applications. In Version 4, if a parameter file existed, all parameters were expected to be
set. Unlike Version 4, Version 5 is more tolerant with respect to parameter files: any number
of parameters can be left unspecified and RIS uses the default values.
A new parameter, CLIENT_VERSION, has been added with the default value set to 0.0,
meaning that the application connects to a compatible client. When future versions of RIS
become available, Version 5 and higher applications will be able to use this parameter to
specify the client version.
Using this parameter causes Version 4 applications to fail; hence, for now, leave it
commented out. When the CLIENT_VERSION parameter is set, Version 4
applications can no longer use that parameter file.
I.14 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 NT only. The RIS application, RIS Client, and RIS Data
Server must be on NT 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 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:
create schema
schema name
schema pass
db type
dbname
db dir
osuser
ospass
ostype
db user
remote clause
8-bit English
8-bit and 16-bit English
8-bit English
8-bit English
8-bit and 16-bit English
8-bit and 16-bit English
16-bit English
8-bit English
8-bit English
8-bit and 16-bit English
8-bit English
I - 14
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 16bit characters in a column is 120.
Glossary GL - 1
Glossary
__________________________________________________________________________________________________________________________________________________
GL - 2
Glossary
Glossary GL - 3
Glossary
__________________________________________________________________________________________________________________________________________________
absolute pathname
accept
access
activate
ad hoc query
address
address expression
alias
Line added to start-up file that lets you start the software
without having to key in the full pathname each time you
want to use the software.
ANSI
application
arithmetic expression
array
ASCII
attribute
attribute, database
bar menu
Strip at the top of the screen that contains icons for selecting
commands.
GL - 4
Glossary
bit
block
buffer
Data area.
byte
cache
catalog
char
character
class
clearinghouse
client
CLIX
code page
collapse
Glossary GL - 5
column
command
command line
communication
protocol
compile
compress
configuration file
constant
cursor
cursor statement
Data Definition
Language
data dictionary
data dictionary,
database
Data Manipulation
Language
data point
data structure
GL - 6
Glossary
data type
database
database
administrator
database privilege
DB2
DBA
DDL
debug
declaration
default
default schema
delete
delimiter
detach
development platform
device
Glossary GL - 7
directory system
disk
DML
double
double precision
drop
dynamic SQL
statement
EMACS
Embedded SQL
Interface
Embedded SQL
Statement
enter
entity
environment variable
error handler
error message
Ethernet
exception
GL - 8
Glossary
exception handler
executable
exit
field
file
filename
float
floating point
notation
font
full pathname
function
grant option
graphic
Help
Help window
home directory
Glossary GL - 9
host variable
icon
ID
identify
index
indicator variable
INFORMIX
initialize
int
integer
interactive
interface
I/ORL
item
joining
keyword
GL - 10
Glossary
kill
LAN
library
Collection of subroutines.
link
log in
log-in
macro, RIS
map
memory
menu
mode
model
mouse
network
node
Glossary GL - 11
nodename
non-cursor statement
NULL
Indicates no value.
on-line Help
operating system
operator
ORACLE
parameter
parameter, RIS
password
path
pathname
portable
preprocessor
privilege
process
prompt
GL - 12
Glossary
query
A search in a database.
quit
RDBMS
real
record
relation
Table or view.
relation privilege
relational database
relational database
management system
Relational Interface
System
relative pathname
report
requester
See client.
RIS
routine
row
Glossary GL - 13
run
runtime
scale
schema
scripts
scroll
select
semaphore
server
set
Shamrock
shared library
shared memory
shell
short
GL - 14
Glossary
signal
signal handler
smallint
SQL
SQL terminator
sqlda structure
sqlvar structure
statement
states
stop
string
Sequence of characters.
Structured Query
Language
syntax
system
table
table, database
tap
Glossary GL - 15
text editor
toggle
transaction
tuple
Record or a row.
type
UNIX
user
user interface
value
variable
VAX/VMS
version
vi
view
virtual declaration
virtual table
wildcard
window
GL - 16
Glossary
workstation
XNS
Index IN - 1
Index
__________________________________________________________________________________________________________________________________________________
IN - 2
Index
Index IN - 3
Index
__________________________________________________________________________________________________________________________________________________
A
access
grant 4-54 4-55, 4-57
revoke 4-65, 4-68
revoking 4-66
accessing
dictionary views I-7
add
columns 3-14, 4-10
alias 4-8
as clause 4-8
column 3-13
aliases
exclude/include sequences I-4
object I-4
within RIS I-4
all
privileges 3-23, 4-55, 4-66
alter
statement
schema 4-7
table 3-14, 4-10
table 3-14
alter schema 4-7
alter table 4-10
ANSI SQL
Standard 2-4, 3-3
application support 2-4
as clause 4-8
autocommit mode 4-70
B
binary data I-8
blob 3-11 3-12
BLOBS
programming interface I-8
BUFFER_FULL_SIZE F-9
BUFFER_FULL_TIMEOUT F-9
C
cancel
statement 4-70
transactions 3-29, 3-32, 4-70
IN - 4
Index
create (continued)
schema 3-7, 3-9, 3-23 3-26, 4-17
DB2 4-26
INFORMIX 4-21
Microsoft SQL Server 4-31
ORACLE 4-24
SQL Server 4-31
SYBASE 4-29
schemas 3-9 3-10
statement
index 3-36, 4-15
schema 3-9, 3-24 3-26, 4-17, 4-21,
4-24, 4-26, 4-29, 4-31
table 3-11 3-12, 3-21, 3-24, 4-33
view 3-20 3-21, 3-26, 4-35
table 3-12 3-13, 3-24, 4-33
users 3-9, 4-17
view 3-20 3-21, 3-26, 4-35
views 3-20
create index 4-15
create schema
(DB2 Database Descriptor) 4-26
(Microsoft SQL Server Database
Descriptor) 4-31
(ORACLE Database Descriptor) 4-24
(SYBASE Database Descriptor) 4-29
create table 4-33
create view 4-35
creating
tables, granting and revoking authority
I-5
creating dictionaries I-6
cursors 3-31
D
data
including owned by privileged accounts
I-3
inserting large I-8
long binary I-8
long text I-8
retrieving large I-8
updating large I-8
Data Definition Language (DDL) statements
3-28
data dictionary C-3, 3-29
data types C-11
database type C-11
protocols C-12
RIS5COLUMN_PRIVS view C-4
RIS5COLUMNS view C-4
Index IN - 5
IN - 6
Index
DBMS (continued)
include table clause 4-8
include view clause 4-8
users 4-19
dbms_owner I-4
DDL statements 3-23, 3-28 3-29
alter schema 3-29
alter table 3-29
create index 3-29
create schema 3-29
create table 3-29
create view 3-29
drop index 3-29
drop schema 3-29
drop table 3-29
drop view 3-29
grant 3-29
revoke 3-29
decimal data type 3-12
declare schema 3-8, 4-37
declare schema statement I-5
declare table 4-40
declare view 4-42
no verify 4-42
verify 4-42
default
schema 3-8 3-10, 3-25
set 4-44
statement
schema 3-8 3-9, 3-25, 4-44
default schema 4-44
defining columns 4-33
definition of schema in RIS 5 I-3
delete 4-45
data from views 3-21, 3-23
databases 4-48
DML statement 4-45
indexes 4-47
privileges 3-24, 4-55, 4-66
relation identifier 4-45
rollback 4-45
rows 3-19
schemas 4-48
statement 3-10, 3-19, 3-21, 3-23, 3-30
table 3-14
table data 3-19
tables 4-50
users 4-48
views 4-51
where clause 4-45
dictionary 3-39
adding schemas to I-6
creating I-6
creation I-6
objects I-6
shared I-6
shared dictionary 3-39
views
accessing from application I-7
information in I-7
Dictionary Converter C-22
DML statements 3-23, 3-28 3-29, 4-14
delete 3-29
insert 3-29
select 3-29
union 3-29
update 3-29
document conventions 1-4
double data type 3-11
drop
databases 4-48
indexes 4-47
schemas 4-48
statement 3-10
index 4-47
schema 4-48
table 3-14, 4-50
view 3-20, 4-51
table 3-14
tables 4-50
indexes 4-50
views 4-50
tables referenced by views 3-14
view 3-20
views 4-51
drop index 4-47
drop view 4-51
dropping schemas I-6
dropschema 4-48
E
environment variable
INFORMIXDIR 4-21
RIS_PARAMETERS F-4
environment variables F-4
examples 3-37
exclude table/view/index clause 4-9
exclude/include sequences I-4
exec 4-52
executing
vendor SQL 4-52
Index IN - 7
indexes (continued)
limits 4-16
unique 3-36, 4-16
with same name I-4
INFORMIX D-7
create schema 3-9
data types 4-21
transactions 3-31
users 3-4, 4-19
INFORMIXDIR 4-21
INGRES
users 4-19
INITIAL_TIMEOUT F-8
insert 4-59
data into views 3-21
into views 3-21
multiple values 3-18
privileges 3-24, 4-55, 4-66
rows 3-17 3-18, 4-59
statement 3-10, 3-17, 3-21, 3-30
column list 3-17
values list 3-17
table data 3-17, 4-59
values clause 4-60
view data 4-59
inserting large data I-8
integer data type 3-11
Introduction to RIS 2-3
J
join
table 3-16
tables 3-15 3-16, 4-72
views 4-72
K
key in 1-4
L
language
descriptions 4-6
language configuration file H-3
limits
character columns E-3
column names E-4
database servers 4-63
DB2 specific E-4
decimal columns E-3
file path size E-4
local servers 4-63
macro names E-4
IN - 8
Index
limits (continued)
node name E-4
number of columns E-3
password size E-4
RIS E-3
row length E-3
list
data types B-3
local servers
limits 4-63
lock
statement
tables 4-61
tables 4-61
lock tables 3-31, 4-61
INFORMIX 3-34
LOCK_FILE_RETRY F-11
long binary data I-8
long text data I-8
M
MAX_BUFFER_SIZE F-6
MAX_LOCAL_SERVERS F-6
MAX_LOCAL_SERVERS variable 4-63
MAX_ROWS F-6
MAX_SECONDARY_SCHEMAS F-7
MAX_STATIC_STMTS F-7
MAX_TABLES_IN_MEM F-8
MAX_TRANSACTIONS F-7
MAX_USER_STMTS F-7
Microsoft SQL Server D-13
users 4-19
miscellaneous statements 3-28
modes
disabling 4-75
enabling 4-75
setting ANSI 4-75
setting verify 4-75
modify
db2 password clause 4-8
node 4-7
osuser 4-8
remote 4-8
schema password 4-7
user password 4-7
modify remote clause 4-8
mouse 1-4
MSSQL D-13
multiple transactions
MAX_TRANSACTIONS variable 4-13
N
name
schemas 3-7
names, aliases I-4
nested query 3-18, 3-21, 4-92
network
set verification 4-77
NETWORK Error
NET_E_CONNECT_ERROR 5-3
NET_E_READ_BUFFER_TOO_SMALL
5-4
NET_E_READ_ERROR 5-4
Network Protocols
TCP/IP 2-4
Network Support 2-4
network verification parameters F-8
node
clearinghouse 4-8
Ethernet address 4-8
modify 4-7
modify remote 4-8
protocols 4-8
nodes
schema
remote clause 4-18
not null clause 3-13, 3-21
NULL clause 3-13
O
objects
aliases I-4
dictionary I-6
of different owners within a schema I-3
ownership I-3
sharing among schemas I-3
on-line Help 1-6
open
schema 3-8, 4-63
statement
schema 4-63
open schema 3-8, 4-63
operating system
osuser 4-8
operators
UNION and UNION ALL I-3
ORACLE D-9
create schema 3-9
data types 4-24
sqldba 4-8
SQL*Net
and schemas 4-24
Index IN - 9
ORACLE (continued)
users 3-4, 4-19
order by clause 3-21
osuser
modify 4-8
ownership of objects I-3
P
parameters
client process location F-4
file F-3
LOCK_FILE_RETRY F-4
MAX_BUFFER_SIZE F-4
MAX_LOCAL_SERVERS F-4
MAX_ROWS F-4
MAX_SECONDARY_SCHEMASy F-4
MAX_STATIC_STMTS F-4
MAX_TABLES_IN_MEM F-4
MAX_TRANSACTIONS F-4
MAX_USER_STMTS F-4
network verification parameters F-4
schema definition file location F-4
SHARED_MEMORY F-4
parameters file F-3
parms file F-3 F-4
parts of the Help window 1-6
password
IBM 4-8
INFORMIX 4-8
INGRES 4-8
Microsoft SQL Server 4-8
modify 4-7
modify db2 4-8
ORACLE 4-8
Rdb 4-8
SYBASE 4-8
passwords
RIS I-5
stored for schema I-5
Performance 2-4
privileged accounts
including data owned by I-3
privileges 3-5, 3-8, 3-23
all 3-23 3-24, 4-55
column list 4-55, 4-66
connect 3-23, 4-54, 4-57, 4-65, 4-68
database 3-23
dba 3-9, 3-23
delete 4-55
deleting 3-24
grant 3-23, 3-26 3-27, 4-54 4-55, 4-57
privileges (continued)
grant to public 3-23
grant (to schema) 4-55
grant (to user) 4-57
insert 3-24, 4-55
relation 3-23
relation identifier 4-55
resource 3-23, 3-25, 4-54, 4-57, 4-65,
4-68
revoke 4-65, 4-68
revoke (from user) 4-68
revoking 3-23, 3-27, 4-66
revoking from public 3-23
sample usage 3-24
schema 4-54, 4-57, 4-65, 4-68
schemas 3-23
select 3-24, 4-55
update 3-24, 4-55
with grant option 3-27, 4-55
protocols
and schemas 4-18
dnp 4-8, 4-18
tcp 4-8, 4-18
xns 4-8, 4-18
public schema 3-23
Q
queries
changing object names I-6
nested 3-18, 3-21, 4-92
R
Rdb
users 4-19
RDBMS
logins I-5
schemas 3-5
security tracking I-5
table 3-10
users 3-4
versions, compatible with RIS 5 I-3
records
definition 3-10
references 1-3
relation 3-11
and schemas 3-8
definition 3-10
in other schemas 3-8
privileges 3-23, 4-55, 4-66
relational database management systems
definition 3-3
IN - 10
Index
remove
view 3-20
reserved words A-3
DB2 A-5
INFORMIX A-5
Microsoft SQL A-12
MSSQL A-12
ORACLE A-9
SYBASE A-11
reset 1-4
resource
privileges 3-23, 3-25
retrieving
large data I-8
revoke 4-65
privileges 4-65, 4-68
statement 3-23, 3-27
public keyword 3-23
REVOKE CONNECT FROM I-5
revoke (from schema 4-66
revoke (from schema)
privileges 4-66
statement 4-66
revoke (from user) 4-68
REVOKE RESOURCE FROM I-5
REVOKE SCHEMA FROM I-6
RIS
ANSI SQL Standard support 2-4, 3-3
AS/400 support 2-5
client 3-35
concepts 3-3
data dictionary 4-40, 4-42
DB2 support 2-4 2-5
environment variables F-4
features 2-3
INFORMIX support 2-4 2-5
INGRES support 2-4 2-5
Intergraph platform support 2-5
introduction 2-3
Microsoft SQL Server support 2-4 2-5
need for 2-3
network verification 3-35
networking 2-4, 3-9
object ownership I-3
operating parameters F-4
ORACLE support 2-4 2-5
OS400 support 2-4 2-5
password storage I-5
PC DOS support 2-4
PC support 2-5
PC Windows support 2-4
RIS (continued)
performance 2-4
platforms supported 2-5
Rdb support 2-4 2-5
server 3-35
SQL Server support 2-5
SUN support 2-5
SYBASE support 2-4
users 3-3
VAX support 2-5
versions
interoperability I-11
RIS and DBMS Reserved Words A-3
RIS dictionary 3-4, 4-8
RIS Error
RIS_E_BAD_LOGIN (0x) 5-4
RIS_E_CANT_CREATE_SCHEMA_FILE
(0x8a94812a) 5-5
RIS_E_CANT_FREE_DICT 5-5
RIS_E_CANT_GET_SCHEMA_FILE 5-6
RIS_E_CANT_LOCATE RIS 5-6
RIS_E_CANT_OPEN_ID_FILE_WRITE
5-6
RIS_E_CANT_OPEN_LANGCONFIG_FILE
5-6
RIS_E_CANT_PUT_SCHEMA_FILE 5-6
RIS_E_CLIENT_DIED 5-6
RIS_E_CLIENT_NETWORK_ERROR
5-7
RIS_E_CRE_PROC_GET 5-7
RIS_E_CRE_PROC_TAB 5-7
RIS_E_DEFAULT_SCHEMA_DIED 5-7
RIS_E_INCONSISTENT_ADDRS 5-8
RIS_E_INCONSISTENT_DBPARMS
5-9
RIS_E_INTERNAL_ERROR 5-9
RIS_E_INV_OPEN 5-10
RIS_E_INV_OPEN_DB 5-10
RIS_E_INV_SYB_OPTION 5-10
RIS_E_INV_TABLE_NAME 5-11
RIS_E_INV_USER_SPEC 5-11
RIS_E_MISSING_DIR_DEF 5-11
RIS_E_NO_PROTOCOL 5-11
RIS_E_PROC_GET_MISS 5-12
RIS_E_SCHEMA_RESTARTED 5-12
RIS_E_SERVER_NETWORK_ERROR
5-13
RIS_E_UNKNOWN_SCHEMA 5-15
RIS Limits E-3
RIS Overview 3-3
Index IN - 11
schema (continued)
create (continued)
SYBASE 4-29
creating 3-9, 3-23, 4-17
ORACLE 4-24
DB2
arch clause 4-26
env clause 4-26
gateway clause 4-26
host program clause 4-27
lu clause 4-27
mode clause 4-27
net_protocol clause 4-27
os clause 4-26
ostype clause 4-26
osuser clause 4-26
declare 3-8, 4-37
default 3-8 3-9, 3-11, 3-25, 4-10, 4-17
definition 3-5
deleting 4-48
dropping 4-48
INFORMIX
online engine 4-21
sqlexec 4-21
standard engine 4-21
Microsoft SQL Server
dsquery 4-31
ostype clause 4-31
osuser clause 4-31
multiple 3-9, 4-63
naming 3-7
on database clause 4-18
opening 3-8, 4-63
ORACLE
ostype clause 4-24
osuser clause 4-24
SQL*Net 4-24
privileges 4-57, 4-68
Rdb 4-18
referencing 3-10
relations 3-8
remote clause 4-18
restrictions 3-7
schema file 4-19
secure 3-6
set default 3-9
setting defaults 4-44
SQL Server
ostype clause 4-31
osuser clause 4-31
SYBASE
IN - 12
Index
schema (continued)
SYBASE (continued)
dsquery 4-29
filename 4-29
ostype clause 4-29
osuser clause 4-29
undeclare 4-81
with grant option 3-27
Schema
Standard 3-5
schema definition file G-3
BEGIN_GRANTEES and
END_GRANTEES G-4
DBID G-3
DBNAME G-3
DICTOWNER G-4
DIR G-4
DTYPE G-3
NETADDR G-4
OSPASS G-3
OSTYPE G-3
OSUSER G-3
PROTOCOL G-3
SCHEMA_FILE_ADDRESS F-10
SCHEMA_FILE_NAME F-10
SCHEMA_FILE_PASSWORD F-10
SCHEMA_FILE_PROTOCOL F-10
SCHEMA_FILE_USERNAME F-10
SCHNAME G-4
SCHOWNER G-4
SCHOWNPASS G-4
SECURE G-4
SERVER_VERSION G-4
schema definition file location F-10
Schema Management Utility 4-18
SCHEMA_FILE_ADDRESS F-10
SCHEMA_FILE_NAME F-10
SCHEMA_FILE_PASSWORD F-10
SCHEMA_FILE_PROTOCOL F-10
SCHEMA_FILE_USERNAME F-10
schemas
adding to dictionary I-6
definition file G-3
definition in RIS 5 I-3
dictionary creation I-6
dropping I-6
granting and revoking authority I-5
multiple in databases I-6
multi-user I-5
objects of different owners within I-3
passwords stored for I-5
schemas (continued)
secure I-5, 4-37
sharing objects among I-3
usernames stored for I-5
secure schema 3-6, 3-37
using 3-37
secure schemas I-5, 4-37
security I-5
tracking, RDBMS I-5
violations, including data without I-3
select 1-4, 4-72
columns 3-15 3-16, 4-72
conditions 3-16, 4-88
privileges 3-24, 4-55, 4-66
rows 3-15 3-16, 4-72
statement 3-10, 3-15 3-16, 3-32
conditions 3-16
group by clause 3-21
having clause 3-21
nested query 3-21
order by clause 3-21
using in create view statement 3-20
using in insert statement 3-18
table 3-15 3-16
table data 4-72
tables 4-72
view data 4-72
views 4-72
select statement I-3
sequences, exclude/include I-4
set
ANSI 4-75
autocommit 4-80
database 4-74
database statement 4-74
default schema 3-8 3-10, 3-25, 4-44
mode
ANSI statement 4-75
verify statement 4-75
network verification 4-77
transaction
autocommit statement 3-29, 3-31,
4-80
verify 4-75
set database 4-74
set mode 4-75
Set Network Verification 3-35
set network verification> 4-77
set transaction 4-80
shared component 2-5
Index IN - 13
IN - 14
Index
table (continued)
deleting 4-50
drop 3-14
dropping 4-50
in other schemas 3-8
insert rows 3-17
inserting data 4-59
inserting rows 4-59
inserting values 3-18
join 3-15 3-16
joining 4-72
locking 4-61
naming 4-34
RIS 3-10
select 3-15 3-16
selecting 4-72
SQL commands 3-11
SQL data types 4-33
undeclare 4-82
union 4-84
updating rows 3-18, 4-86
table data
inserting 3-17
tables
creating logical groupings I-3
with same name I-4
with same name in one schema I-4
text 3-12
text data I-8
timestamp 3-12
alarm 3-35
TIMESTAMP_INTERVAL F-8
TIMESTAMP_TOLERANCE F-9
Transactions 3-28
atomic 3-28
autocommit mode 4-70
cancel 3-29, 3-32
commands
commit 3-28
lock tables 3-28
rollback 3-28
set transaction 3-28
commit 3-29, 3-31, 4-13
consistent 3-28
disabling 3-30, 4-80
enabling 3-30 3-31, 4-80
MAX_TRANSACTIONS variable 3-35
multiple 3-35
rollback 3-32, 4-70
setting autocommit 4-80
tuples
definition 3-10
U
undeclare
table 4-82
view 4-83
undeclare schema 4-81
undeclare table 4-82
undeclare view 4-83
UNION I-3
union 4-84
rows 4-84
table data 4-84
tables 4-84
view data 4-84
views 4-84
UNION ALL I-3
update 4-86
columns 3-18
data in views 3-21 3-22
privileges 3-24, 4-55, 4-66
rows 3-18, 4-86
statement 3-10, 3-18, 3-21 3-22,
3-30 3-31, 3-33
table data 3-18, 4-86
tables 4-86
views 4-86
updating large data I-8
usernames, stored for schema I-5
users 3-3 3-4, 3-7 3-8
create 3-9
creating 3-9, 4-17
database
DB2 4-19
INFORMIX 4-19
INGRES 4-19
Microsoft SQL Server 4-19
ORACLE 4-19
OS4 4-19
Rdb 4-19
SYBASE 4-19
deleting 4-48
dropping 4-48
operating system 3-3 3-4
RIS 3-3
using on-line Help 1-6
utilities
risalpha I-12
risgui I-12
Schema Management 4-18
Index IN - 15
V
values, dbms_owner I-4
variables
MAX_LOCAL_SERVERS 4-63
vendor databases
executing SQL 4-52
Vendor-Specific Information D-3
view 3-5, 3-19
column list option 4-35
column names 3-20
create 3-20 3-21, 3-26, 4-35
creating 3-20
declare 4-42
deleting 4-51
deleting data 3-21
deleting data from 3-23
dictionary C-3
drop 3-20
drop table referenced by 3-14
dropping 4-51
group by clause 3-21
having clause 3-21
in other schemas 3-8
insert 3-21
insert data 3-21
inserting data 4-59
inserting rows 4-59
nested query 3-21
not null clause 3-21
order by clause 3-21
remove 3-20
restricting access with 4-35
select statement clause 4-35
selecting 4-72
undeclare 4-83
union 4-84
update data 3-22
updating data 3-21
updating rows 4-86
using to combine tables 3-19
using to restrict access 3-19
viewing on-line Help 1-6
views
including data without I-3
with same name I-4
virtual tables 3-19
W
WHERE clause I-7
ris_object condition I-7
IN - 16
Index