如何在数据库中生成脚本 [英] how to generate script in database

查看:169
本文介绍了如何在数据库中生成脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在sql server 2008数据库中生成脚本,
我想生成过程脚本(如果过程为alter模式),则应创建alter

how to generate Script in sql server 2008 databse,
i want to genereate procedure script if procedure is alter mode then it should be create alter

推荐答案

看看:

Pinal Dave:如何:生成创建脚本 [生成脚本(SQL Server Management Studio) [ ^ ]

..以及更多类似的线程
Have a look:

Pinal Dave: Create Script[^]

MSDN:
How to: Generate Create Scripts[^]
Generate a Script (SQL Server Management Studio)[^]

..and lot more similar threads here[^]



object explorer上的数据库名称上单击鼠标右键,选择Tasks ,然后在Generate Script上单击下一步",然后选择要编写脚本的对象或将其保留给整个数据库
下一步,单击高级",选择sql的Script Drop and Creat e Version ,再选择Type of data to script ,您将找到很多指定所需内容的选项,然后单击确定",然后选择保存到新查询",然后单击下一步",然后单击下一步".
Hi ,
Right Click on Database name on object explorer select Tasks then Generate Script Click Next Then select the objects you want to Script it or leave it for the whole Database
Next Click on Advanced Choose Script Drop and Create Version of sql select Type of data to script You will find alot options specify what you need then click ok then Choose save to new query then Next Next Finish
http://blog.sqlauthority.com/2011/05/07/sql-server-2008-2008-r2-create-script-to-copy-database-schema-and-all-the-objects-data-schema-stored-procedure-functions-triggers-tables-views-constraints-and-all-other-database-objects/[^]
Best Regards
M.Mitwalli


在这里,您可以看到演示相同内容的链接:
http://myvsdotnetstuff.blogspot.in/2011/11/sql- server-2008-generate-script-of.html [ ^ ]
http://sqlblog.com/blogs/eric_johnson/archive/2010/03/08/script-data-in-sql-server-2008.aspx [ http://blog.sqlauthority.com/2009/07/29/sql-server-2008-copy-database-with-data-generate-t-sql-for-inserting -data-from-one-table-to-another-table/ [ http://blog.sqlauthority.com/2007/08/21/sql-server-2005-create-script-to复制数据库架构和所有对象存储的过程函数触发器表视图约束和所有其他数据库对象/ [
Here you go with the links which demonstrating the same:
http://myvsdotnetstuff.blogspot.in/2011/11/sql-server-2008-generate-script-of.html[^]
http://sqlblog.com/blogs/eric_johnson/archive/2010/03/08/script-data-in-sql-server-2008.aspx[^]
http://blog.sqlauthority.com/2009/07/29/sql-server-2008-copy-database-with-data-generate-t-sql-for-inserting-data-from-one-table-to-another-table/[^]
http://blog.sqlauthority.com/2007/08/21/sql-server-2005-create-script-to-copy-database-schema-and-all-the-objects-stored-procedure-functions-triggers-tables-views-constraints-and-all-other-database-objects/[^]



--Amit


这篇关于如何在数据库中生成脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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