Professional Documents
Culture Documents
config={_id:"rstest", members:[
{_id:0,host:"localhost:2001"},
{_id:1,host:"localhost:2002"},
{_id:2,host:"localhost:2003"}]};
rs.initiate(config);
rs.status()
sh.enableSharding("vitdb")
sh.shardCollection("vitdb.employee",{"emp_id":"hashed"})
show dbs
use vitdb
db.employee.getShardDistribution()
sh.status()