如何生产数据库对象脚本?

如何生产数据库对象脚本?

另外,可以按用户生成吗?

参与8

2同行回答

spiderliujiespiderliujie软件架构设计师GBase
您好,可以使用dbschema命令,如下所示:USAGE:    dbschema { [-q] [-t tabname] [-s user] [-p user] [-r rolename] [-f procname]             [-hd tabname] -d dbname [-seq sequence] [-l [num]]    ...显示全部

您好,

可以使用dbschema命令,如下所示:

USAGE:

    dbschema { [-q] [-t tabname] [-s user] [-p user] [-r rolename] [-f procname]

             [-hd tabname] -d dbname [-seq sequence] [-l [num]]

             [[-u[i|a] udtname] | [-u all]] [-it [Type]] [-ss [-si]] [filename]

             [-sl length] [-nw] }

             { [-q] -c [-ns] [filename] }

    -q      Suppress the db version from header

    -t      table name or "all" for all tables

    -s      synonyms created by user name

            or "all" for all users

    -p      permissions granted to user name

            or "all" for all users

    -r      create and grant of the role

            or "all" for all roles :Not a valid option for SE

    -f      SPL routine name

            or "all" for all SPL routines

    -hd     Histograms of the distribution for columns of

            of a specified table, a specific table column,

            or "all" for all tables.

    -d      database name

    -seq    generate sequence specific syntax

    -ui     Prints the definition of a user-defined data type, including

            type inheritance

    -ua     Prints the definition of a user-defined data type, including

            functions and casts defined over an opaque or constructor type

    -u all  Prints the definitions of all user-defined data types,

            including all functions and casts defined over the types

    -it     Type of isolation can be DR, CR, CS, RR or LC

    -l      set lock mode to wait [number] optional

    -ss     generate server specific syntax

    -si     excludes the generation of index storage clauses for

            non-fragmented tables

    -sl     the maximum length (in bytes) of unformatted CREATE TABLE and ALTER

FRAGMENT statements.

            filename is the name

            of file that the SQL

            script goes in.

    -c      generate storage space and logical log definitions

    -ns     generate commands in non-sql format

    -nw     generate file with no specified owner

收起
互联网服务 · 2016-06-08
浏览986
南帝南帝数据库运维工程师data
可以通过dbschema命令生成数据库对象结构。dbschema -d  databasename  -t tablenameinformix/gbase用户都是系统级别的,是无法按用户生成的。显示全部

可以通过dbschema命令生成数据库对象结构。

dbschema -d  databasename  -t tablename

informix/gbase用户都是系统级别的,是无法按用户生成的。

收起
IT咨询服务 · 2016-06-08
浏览1012

提问者

gochina
软件开发工程师太极

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2016-06-08
  • 关注会员:3 人
  • 问题浏览:2343
  • 最近回答:2016-06-08
  • X社区推广