简体   繁体   English

部署期间创建SQL DB

[英]SQL DB Creation during deployment

I have designed my SQL Server tables through Microsoft SQL Management Studio and wrote ac# application based on the database created. 我已经通过Microsoft SQL Management Studio设计了SQL Server表,并基于创建的数据库编写了ac#应用程序。 While installing the application, I must create the database from a deployer. 在安装应用程序时,我必须从部署者创建数据库。 Can Someone say about the easy way to get that done. 有人可以说一下完成这项工作的简单方法。

I'm afraid there is no really easy way. 恐怕没有真正简单的方法。

There is a tool called Roundhouse http://code.google.com/p/roundhouse/ which allows to deploy a database from script. 有一个名为Roundhouse的工具http://code.google.com/p/roundhouse/ ,它可以通过脚本部署数据库。 You can integrate it in your setup but you'll have to care about server access rights yourself. 您可以将其集成到您的设置中,但是您必须自己关心服务器访问权限。

Or you can try some installer tools - wix, installshield etc, nearly all of them have tools to create a database. 或者,您可以尝试一些安装程序工具-wix,installshield等,几乎所有安装工具都具有创建数据库的工具。

I used SQL managment studio. 我使用了SQL管理工作室。 There is an option to generate scripts from the databases and tables. 有一个选项可以从数据库和表生成脚本。 I generated the script and executed it by the programming lanugages as how i execute queries. 我生成脚本并通过编程语言像执行查询一样执行它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM