【问题标题】:Is there an Erwin Macro to pull out the table comment/definition?是否有欧文宏来提取表格注释/定义?
【发布时间】:2023-03-05 23:10:01
【问题描述】:

我创建了一个脚本模板来生成extendend 属性,以基本上将数据字典包含在数据库中,但是,我找不到任何宏来从模型中读出表注释。这有什么技巧吗?

【问题讨论】:

  • 如果你现在已经知道了,我会对答案感兴趣 ;-)

标签: database datamodel


【解决方案1】:

这是 ERwin 中特有的 DBMS。

取决于 dbms - SQL server 或 oracle 将有一个 FET 模板。
用于 sql 服务器。 如果您编辑用于创建模式的 sql server 模板。 sql server 中的哪个生成 cmets 或 udp 扩展属性。这是显示的内容。

/* Generate comments and UDP's as Extended Properties. */
[
    /* Set the variables required by the "Clause: Specify Extended Properties". */
    Set( "var_RemoveVariables", "true" ) 
    Set( "var_Operation", "sp_addextendedproperty" ) 
    Set( "var_Comment", "Definition" )
    Set( "var_Level0Type", "SCHEMA" ) 
    Set( "var_Level0Name", Property( "Name" ) )

    /* Generate Schema comments and UDPs */
    Execute( "Clause: Specify Extended Properties" )
]

[ 
    FE::Bucket( "150" ) 
    ForEachOwnee( "Permission" )
    {
        Execute( "Create Permission" )
    }
]

]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-11
    • 2018-10-04
    • 2014-10-19
    • 1970-01-01
    相关资源
    最近更新 更多