Migrate Your SQLSERVER Data To MongoDB Using Mongify Utility

por | 17 agosto, 2020

Install Ruby 2.5

gem list

yum install freetds freetds-devel

yum -y install nano wget gdbm-devel libdb4-devel libffi-devel libyaml libyaml-devel ncurses-devel openssl-devel readline-devel tcl-devel zlib-devel mysql-devel

activerecord-sqlserver-adapter (4.2.0)
mongify (1.3.2)
tiny_tds (2.1.2)

gem install activerecord-sqlserver-adapter -v 4.2

 vi database.config 
-----------------------
sql_connection do
  adapter   "sqlserver"
  host      "localhost"
  username  "sa"
  password  "123456"
  database  "musicdb"
end

mongodb_connection do
  host      "localhost"
  database  "musicmongodb"
end
--------------------
mongify check database.config

mongify translation database.config > translation.rb

mongify process database.config translation.rb 

-------------