Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8731953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:21:05+00:00 2026-06-13T09:21:05+00:00

One of our project is using MongoDb and our database => collections are sharded.

  • 0

One of our project is using MongoDb and our database => collections are sharded. BTW, our collection gets created dynamically and hence we had to write a code inside our Application layer written in PHP to inform MongoDb to shard the collections. Hence I am looking for two options:

  1. Is there any way to identify if the collection is shareded via PHP? [or]
  2. Is there any problem in telling MongoDb to shard a collection which is sharded?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:21:06+00:00Added an answer on June 13, 2026 at 9:21 am

    1] you can identify whether the collection is sharded or not by manipulating string output given by db.printShardingStatus()
    check this to know how to print output of MongoDB

    2] No issue to ask MongoDB to shard a collection which is already sharded.
    Mongo wil never set “ok” to 1 if it is already sharded.
    db.runCommand({ enablesharding : "sharded_db_name" })
    { "ok" : 0, "errmsg" : "already enabled" }

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In one of our project we're using Linq-to-SQL to get data from our database.
We are using gitolite to manage our repositories and one of our heroku project's
I'm using Camel 2.9.x for integration purposes in our current project. One of the
Currently i am working on a project using prism where one of our modules
During working on one c++ project we decided to use MongoDB database for storing
I'm using Django for our project. And I have created a form using Django
We're using cakephp 1.2 version for one of our newly developing project, so would
We are using Oracle 10g database, NHibernate, WCF and Silverlight 3.0 in our project
In the master branch of our project, the migrations of one of our django
We have several Flash objects included in our project. We call each one a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.