伙计:如果这是一个重复的问题,请举起旗帜,以便我删除这个问题。
我目前正在寻找一些Informix工具,可用于从一个数据库导出触发器和存储过程,并将其导入另一个数据库。请求帮助&指针也是如此。
答案 0 :(得分:1)
DB-Schema(dbschema
)是标准答案:
dbschema -d dbname -f stored_procedure
导出特定的存储过程。all
指定所有存储过程。触发器位于特定的表上:获取该表的架构将包含触发器。没有办法单独获得触发器。
用法:
dbschema { [-q] [-t tabname] [-s user] [-p user] [-r rolename] [-f procname] [-hd tabname] -d dbname [-w passwd] [-seq sequence] [-l [num]] [-u [ia] udtname [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 -w database password -seq generate sequence specific syntax -u Prints the definitions of user-defined data types -ui Prints the definitions of user-defined data types, including type inheritance -ua Prints the definitions of user-defined data types, including all functions and casts defined over a type -u all Directs dbschema to include all the tables in the display of distributions -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