What is the best way to version control my SQL ser

2019-01-08 10:20发布

What is the best way to version control my database objects? I'm using Visual studio 2005/2008 and SQL server 2005. I would prefer a solution which can be used with SVN.

10条回答
萌系小妹纸
2楼-- · 2019-01-08 11:03

I'm using scriptdb.exe from http://scriptdb.codeplex.com/

And it might be usefull to use the rails way: http://code.google.com/p/migratordotnet/wiki/GettingStarted

查看更多
聊天终结者
3楼-- · 2019-01-08 11:05

I use SVN for all of my table/sproc/function source control.

I couldn't find anything that met my needs so I ended up writing a utility to allow me to dump the code out into a nice directory structure to use with SVN.

For those interested, the source is now available at svn://finsel.com/public/VS2005/GenerateSVNFilesForSQL2005.

查看更多
ら.Afraid
4楼-- · 2019-01-08 11:05

Use versaplex for dumping your schema: http://code.google.com/p/versaplex/

Versaplex comes with Schemamatic, which reads database schema (tables, SPs, etc) and also data (data is dumped as CSV). I use it, with SVN and git, and it's awesome :) If you need help let me know, it's worth a try! http://github.com/eduardok/versaplex

查看更多
我命由我不由天
5楼-- · 2019-01-08 11:11

Same as your other code, add a "Database project" to your application solution and keep the sql files used to build the database objects in there. Use the same version control for those code files as you do for the application.

查看更多
登录 后发表回答