Chapter 6

Schema Export Utility: dbschema

6.1INTRODUCTION

This chapter describes the c-treeSQL utility, dbschema. This utility recreates specified data- base elements and data.

Syntax

dbschema [ -h ] [ -d ] [-u user_name ] [-a password ] [ -o outfile ] [ -p [ user_name.]procedure_name [ , ... ] ]

[ -t [ user_name.]table_name [ , ... ] ] [ -T [ user_name.]trigger_name [ , ... ] ] [ database_name ]

Description

Generates SQL statements to recreate the specified database elements and data. If the dbschema statement omits all arguments, it displays definitions for all elements (tables, views, indexes, procedures, and triggers) for the default database on the screen.

Options

-h

Displays brief online help of dbschema syntax and options.

-d

In conjunction with the -t option, specifies that dbschema generates SQL INSERT statements for data in the tables, in addition to CREATE statements. The output of the dbschema com- mand invoked with the -d option can be directed to a command file and executed in interactive SQL to duplicate and load table definitions.

-u user_name

The user name c-treeSQL uses to connect to the database. c-treeSQL verifies the user name against a corresponding password before it connects to the database. If omitted, the default value depends on the environment. (On UNIX, the value of the DH_USER environment vari- able specifies the default user name. If DH_USER is not set, the value of the USER environ- ment variable specifies the default user name.)

-a password

The password c-treeSQL uses to connect to the database. c-treeSQL verifies the password

FairCom Corporation

6-1

Page 87
Image 87
HP c-tree-SQL ISQL and Tools manual Schema Export Utility dbschema, Introduction