정의
sh.enableMigrations(namespace)Enables migrations for the specified namespace of the sharded collection, but does not start chunk migrations. The balancer includes the collection you pass to
sh.enableMigrations()in migration operations the next time it runs. For more information on chunk migrations, see Manage Sharded Cluster Balancer.중요
You can only run
sh.enableMigrations()on amongosinstance. If you runsh.enableMigrations()on amongodinstance, the method returns an error.The
sh.enableMigrations()method has the following parameter:Parameter유형설명namespace문자열
컬렉션의 네임스페이스 입니다.
호환성
이 메서드는 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.
MongoDB Enterprise: MongoDB의 구독 기반 자체 관리 버전
MongoDB Community: MongoDB의 소스 사용 가능 무료 자체 관리 버전
참고
각 컬렉션에 대한 allowMigrations 필드를 표시하는 sh.status()를 사용하여 마이그레이션 상태를 확인할 수 있습니다.