Scripting out individual objects from SQL using SMO

前端 未结 2 1943
小鲜肉
小鲜肉 2021-01-15 21:45

For my job I often have to script out a table with all its keys, constraints and Triggers (basically a full script to recreate the table) from a Microsoft SQL 2008 server.I

2条回答
  •  不思量自难忘°
    2021-01-15 22:25

    Here's a script to backup an individual object. Simply pass the object name to the function:

    http://sev17.com/2012/04/backup-database-object/

提交回复
热议问题