AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Subversion sync12/25/2022 ![]() The tool scripts Microsoft SQL Server tables, relationships, views, stored procedures, user defined types, defaults, rules, triggers, functions and data into individual. I don't know if it works with SQL Server 2005. The tool was tested on SQL Server 2000 only. If you are missing the tool ( scptxfr.exe) it can be found on the SQL Server 2000 installation CD. Please note that the tool relies upon the Scripting tool from Microsoft which was shipped with SQL Server 2000, and will only have been installed on your system if you chose for backward compatibility with SQL Server 7.0 during the installation. Because I use SVN with the TortoiseSVN shell extensions, I've targeted this project to be used with SVN, but you can probably use it with other source control systems. You can! Here's my take at it: ScriptDB4Svn does what its name suggests: it scripts your database for usage in a source control system. For WebDAV proxy configuration, see the WebDAV proxy documentation.If you are using a source control system to manage your project's source code, you have probably wondered if you could do the same with your database. The article using svnsync gives more hands-on information. The svnsync documentation is minimal but enough for a quick start. The page How to setup SSH without password (one out of many) explains how to add a non-password login with ssh. Obviously ssh must be configured in a way not to ask the password. Ssh -l svnsync "/path/to/svn-sync-slave.sh -r /path/to/local/repository" We can do this easily by editing the post-commit hook script on the master repository. We need thus a mechanism to trigger the replication from the master to the slave server. Strictly speaking, no configuration is needed on the server to allow the slave to mirror a repository, but as soon as data is committed on the server, the slave's repository will get more and more out of date. The master server must run subversion 1.4 or higher in order to provide support for svnsync. The operations described in this section can be performed by the mighty SVN slave sync script. Svn pdel -revprop -r 0 svn:sync-lock file:///path/to/local/repository Please be aware that you can seriously screw your repository up if you delete the lock while svnsync is running! Should the synchronisation fail and leave the repository locked, then the following line deletes. Svnsync sync file:///path/to/local/repository Once the repository is initialised, further updates need only the minimal command line: Svnsync init -username svnsync file:///path/to/local/repository \ The slave repository is initialised by the following command line: Let's make it executable with the following command and we're ready to go.Ĭhmod x /path/to/local/repository/hooks/pre-revprop-change Svnadmin create /path/to/local/repositoryĬhown svnsync: /path/to/local/repository -Rīefore svnsync update the data from the server, we have to manually create the file /path/to/local/repository/hooks/pre-revprop-change with the following content:Įcho >
0 Comments
Read More
Leave a Reply. |