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 8075543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:01:03+00:00 2026-06-05T15:01:03+00:00

does anyone know how I can use a database-name like abc-123 from the mongodb

  • 0

does anyone know how I can use a database-name like “abc-123” from the mongodb console doing something like this in one command:

 use abc-123;
 db.Configuration.find()

I tried somethings like

 ['abc-123'].Configuration.find()

but nothing worked.

Thx for any help!

  • 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-05T15:01:04+00:00Added an answer on June 5, 2026 at 3:01 pm

    You can use db.getSibling() to do this –

    > db.getSiblingDB("abc-123").Configuration.find()
    
    { "_id" : ObjectId("4fd20ac548b3c185dd9f8e5c"), "name" : "mongo" }
    { "_id" : ObjectId("4fd20ac748b3c185dd9f8e5d"), "x" : 3 }
    { "_id" : ObjectId("4fd20b9648b3c185dd9f8e5e"), "x" : 4, "j" : 1 }
    { "_id" : ObjectId("4fd20b9648b3c185dd9f8e5f"), "x" : 4, "j" : 2 }
    { "_id" : ObjectId("4fd20b9648b3c185dd9f8e60"), "x" : 4, "j" : 3 }
    { "_id" : ObjectId("4fd20b9648b3c185dd9f8e61"), "x" : 4, "j" : 4 }
    { "_id" : ObjectId("4fd20b9648b3c185dd9f8e62"), "x" : 4, "j" : 5 }
    { "_id" : ObjectId("4fd20b9648b3c185dd9f8e63"), "x" : 4, "j" : 6 }
    { "_id" : ObjectId("4fd20b9648b3c185dd9f8e64"), "x" : 4, "j" : 7 }
    { "_id" : ObjectId("4fd20b9648b3c185dd9f8e65"), "x" : 4, "j" : 8 }
    { "_id" : ObjectId("4fd20b9648b3c185dd9f8e66"), "x" : 4, "j" : 9 }
    { "_id" : ObjectId("4fd20b9648b3c185dd9f8e67"), "x" : 4, "j" : 10 }
    ......
    ......
    

    Here’s a link to the command refererence list for MongoDB where it talks about getSibling a little more – http://docs.mongodb.org/manual/reference/commands/.

    Additionally, it’s recommended to keep the db name alphanumeric.

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

Sidebar

Related Questions

Does anyone know of an Image Map-like Blackberry Control that I can use in
I know I can use Request.Browser.IsMobileDevice . But does anyone know how it works,
Does anyone know how i can use BST for config.time_zone in my rails config/environment.rb
Does anyone know of a tool that I can use to find explicit C-style
Does anyone know how DbDataReaders actually work. We can use SqlDataReader as an example.
Does anyone know if I can use a TEXT (UUID) primary key for an
Does anyone know of a function as such that I can use to add
Good morning, Does anyone know if there is an easy way I can use
Does anyone know how can I cut a string and then assign into an
Does anyone know how can I detect the browser type in css? What I

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.