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 […]

Database Schema Version Control Tool

It is essential to treat database schema as source code and apply all the norms and best practices applicable to it. From what I hear and read, database schema version control is non-existent in too many projects. Various techniques to accomplish version control of database schemas have been discussed and published. Martin Fowler and Pramod Sadagale has written a comprehensive article on Evolutionary Database Design. It is a must-read for everyone involved with database development. K. Scott Allen writes in detail about an excellent system here – Versioning Databases – Change Scripts. This approach is sufficiently light-weight (for my taste) and provides complete control over the whole process. I am providing a free tool here that you can use to […]