$ rails c
Running via Spring preloader in process 8379
Loading development environment (Rails 5.1.5)
[1] pry(main)> ActiveRecord::Base.connection.instance_variable_get :@config
SQL (0.8ms) USE [smartdrain_dev]
=> {:adapter=>"sqlserver",
:encoding=>"utf-8",
:pool=>5,
:host=>"localhost",
:database=>"smartdrain_dev",
:username=>"sa",
:password=>"<YourStrong!Passw0rd>",
:port=>1433,
:timeout=>10,
:mode=>:dblib}
[2] pry(main)> exit
也可以直接使用navicat等数据库可视化软件会更方便.