SQL2008 中的自动生成脚本向导 [英] Automate Generate Scripts Wizard in SQL2008

查看:41
本文介绍了SQL2008 中的自动生成脚本向导的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:如何在 SQL2008 Management Studio 中自动化生成脚本:

Problem: how to automate a Generate Scripts in SQL2008 Management Studio:

即右键单击数据库、任务、生成脚本

ie right click on database, Tasks, Generate Scripts

所有表格所有存储过程

创建 drop 语句不要使用 USE 语句生成数据

Create drop statements Don't use USE statement Generate data

这是一个 20 秒的手工过程.需要自动化:-) 我真的不想在 SQL Server 管理对象 (SMO) 中用 C# 编写它.

This is a 20sec process to do by hand.. needs automating :-) I don't really want to code it in C# in SQL Server Management Objects (SMO).

也许我必须使用 AutoHotKey :-)

Maybe I'll have to use AutoHotKey :-)

推荐答案

使用 SMO - 这是正确的做法,而且您知道它!

Use SMO - it's the right thing to do and you know it!

这篇关于SQL2008 中的自动生成脚本向导的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆