Using DbUpdater with MySql

DbUpdater can be used with mysql. Here are the files you need to jumpstart the integration – DbUpdater-MySql.zip 1. You might need to change the path to mysql.exe in mysql-exec.bat. 2. Modify values in mysql-sample-command-line.bat. Make sure mysql.data.dll is placed in GAC or in the same directory as DbUpdater.exe. Connector binaries can be downloaded from here – http://dev.mysql.com/downloads/connector/net/6.1.html

SQL Azure Notes

My invitation code for SQL Azure CTP finally arrived. I had been waiting for this. You can create a database in from the SQL Azure Management page, shown above. After you have created the database, of course, you can use DbUpdater with your SQL Azure databases. Here is the command-line : DbUpdater.exe ..\SqlScripts /server:”tcp:SERVER.ctp.database.windows.net” /db:DATABASE /user:”USER@SERVER” /password:PASSWORD /confirm:true And you will need this DbUpdater.exe.config file : <?xml version=”1.0″ encoding=”utf-8″ ?> <configuration> <appSettings> <add key=”file-prefix” value=”db” /> <add key=”file-extension” value=”sql” /> <add key=”schema-versions-name” value=”schema-versions-table.sql” /> <add key=”baseline-name” value=”baseline.sql” /> <add key=”post-script-prefix” value=”post” /> <add key=”post-script-always-apply” value=”true” /> <add key=”exe-file” value=”C:\Program Files\Microsoft SQL Server\90\Tools\Binn\SQLCMD.EXE” /> <add key=”exe-args” value=’-U %UserName% -P %Password% -S “%ServerName%” -d %DbName% -i “%SqlFile%”‘ /> <add key=”dialect” value=”NHibernate.Dialect.MsSql2000Dialect” /> <add […]

Using NHibernate With SQLite in DbUpdater

DbUpdater (version 1.3 onwards) can be used with sqlite3. Review the files included in DbUpdater-sqlite3.zip 1. DbUpdater.exe.config must be modified. Note changes to the following keys – exe-file, exe-args, dialect, driver_class, connetion_string. 2. SchemaVersion.hbm.xml must be modified. The ‘class’ attributes value for the ‘generator’ of ‘id’ must be changed to ‘identity’. No other changes are needed here. 3. \SqlScripts\schema-version-table.sql is modified. Note that the datatypes of all columns are changed to TEXT, except for SchemaChangeId, which is changed to integer primary key. integer primary key is used for auto-incremented columns in sqlite. 4. \SqlScripts\baseline.sql is modified. Note the use of current_timestamp function. The actual sql syntax in this file must conform to sqlite dialect. 5. All other .sql scripts in […]

WPF – LINQ to SQL Sample

This exercise in binding a WPF ListView control with LINQ to SQL was a lot of fun ! The following image shows data from AdventureWorks sample database displayed in the ListView control. The end result is very admirable, even in this very basic demo. Feeling a complete sense of freedom is unavoidable when working with WPF. This sample demonstrates : LINQ to SQL mapping. WPF ListView Control DataBinding. Displaying images stored in database as varbinary in WPF control. The sample code can be downloaded here : WPF-LINQ to SQL Sample License : Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.

DbUpdater

Version Aware Database Schema Deployment Download : DbUpdater v 1.4 (License:GNU General Public License version 3 (GPLv3)) Copyright © 2008 : Ash Tewari www.tewari.info DbUpdater is a free tool that helps you implement the database schema version control system described by K. Scott Allen in this set of articles : Three rules for database work The Baseline Change Scripts Views, Stored Procedures and the Like Branching and Merging Usage : First read the articles listed above. The file prefix for change scripts is “db”, by default. You can change it in the config file. DbUpdater supports the baseline script as well as post-scripts. Make sure the database you are going to put under version control is already created. Specify the […]