Blog Archives

Document Databases

This post from Ayende is about Document Databases (DocDBs). The post give an introduction/explanation on what document database is, how it stores data using key/value, how the data “relates” to other compared to how a table relates to another in RDBMS. How to persist/retrieve data from document database. Some variants as CouchdB, MongoDB and Raven are also mentioned in the post.

Read the post at: http://ayende.com/Blog/archive/2010/04/11/that-no-sql-thing-ndash-document-databases.aspx

Use MSDeploy to generate import data script

I just found a very helpful tool to generate import data script when deploying database: msdeploy

First download it from here. The tool will be installed in “C:\Program Files\IIS\Microsoft Web Deploy” by default.

To use the tool, fire up command line, go to “C:\Program Files\IIS\Microsoft Web Deploy”  (assume that the tool has been installed in this folder). And type in this command:

C:\Program Files\IIS\Microsoft Web Deploy>msdeploy.exe -verb:sync -source:dbFullSql=”Data Source=[DATABASESERVER]; Initial Catalog=[DATABASENAME];Integrated Security=false ;user id=[USERID];password=[PASSWORD]”,IncludeData=[INCLUDE_DATA],IncludeSchema=[INCLUDE_SCHEMA] -dest:dbFullSql=”[FULL_PATH_TO_SCRIPT_FILE]”

  • [DATABASESERVER]: Computer name or IP address of database server
  • [DATABASENAME]: The name of database from which data are going to be exported
  • [USERID]: Id of user who has access rights to the database server
  • [PASSWORD]: Password to login to database server
  • [INCLUDE_SCHEMA]: Possible values are True or False. If this value is True, the database schema will also be generated
  • [INCLUDE_DATA]: Possible values are True or False. Set this to true to generate import data script
  • [FULL_PATH_TO_SCRIPT_FILE]: the name of the output script file including a path, i.e. C:\DataLoad.sql

Enjoy!