在 ms sql 中编写 DB 对象脚本的免费实用程序 [英] free utility to script DB objects in ms sql

查看:23
本文介绍了在 ms sql 中编写 DB 对象脚本的免费实用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实施数据库源代码控制.

I'm trying to implement database source control.

我需要的工具应该为数据库中的每个对象创建一个单独的文件,最好安排在文件夹中,如

the tool I need should create a separate file for each object in the database, preferably arranged in folders, like

存储过程职能意见表

如果能够转储某些查询的结果,以便跟踪多个配置表中的数据更改,那就太好了...

and it would be great being able to also dump the results of certain queries, in order to keep track of the data changes in several configuration tables...

我想知道是否已经有一个工具可以处理这种事情......

I wonder if there's is already a tool that can handle this kind of stuff...

--

只是为了清除一些东西...

just to clear a few things...

我已经在使用 sql delta 来处理更新脚本...

I'm already using sql delta to handle the update scripts...

我想要数据库脚本以便与 subversion 一起使用,这样我就可以跟踪每次提交更改的对象,而无需研究更新脚本...

I'd like to have scripts of the DB in order to use with subversion, so I can trace what objects where changed with each commit, without having to study the update scripts...

我正在用 SQL 分布式管理对象 (SQL-DMO) 开发一个不错的 vb 脚本,我会告诉你它是怎么回事...

I'm developing a nice vb script with SQL Distributed Management Objects (SQL-DMO), I'll tell how it goes...

拥有自己的解决方案的好处是,我还可以包含查询或存储过程执行的输出,以跟踪某些表中的更改、服务器配置、数据库的增长,以及我可以转储到的任何内容一个文本文件...

What's good about having my own solution, is that I can also include the outputs of queries or stored procedure execution, to trace the changes in certain tables, server configuration, the growth of the database, well, whatever I can dump to a text file...

推荐答案

我使用 ScriptDB 正是为了这个目的.我唯一需要改变的是在生成的文件中删除脚本的日期.否则文件在 Subversion 中总是被标记为已更改.

I use ScriptDB for exactly this purpose. The only thing I had to change was to remove the date of scripting in the generated files. Otherwise files are always marked as changed in Subversion.

这是我使用的批次.svnclient 是来自 codeplex svncompletesync.codeplex.com 的工具,用于将文件夹中的所有文件检入 subversion.:

Here is the batch I use. svnclient is the tool from codeplex svncompletesync.codeplex.com, to check in all files from a folder into subversion.:

svn checkout "http://svn/myproject" D:\Projekte\db_svn\myproject

ScriptDB "D:\temp\scriptdb" myserver mydb mylogin mypwd

del "D:\Projekte\db_svn\myproject\Schema Objects\\*.sql"/q/s

xcopy "D:\temp\scriptdb\myserver\mydb\Schema Objects\\*.sql" "D:\Projekte\db_svn\myproject\Schema Objects"/e/y/i

svnclient "D:\Projekte\db_svn\myproject" -m "commit durch svncompletesync"

这篇关于在 ms sql 中编写 DB 对象脚本的免费实用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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