Implemented cluster logic for copy/create collection - fixed the sql