[SERVER-20090] How to create a user defined function to connect with multiple databases in the single host Created: 24/Aug/15  Updated: 15/Nov/21  Resolved: 24/Aug/15

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: 3.0.6
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: vijay kumar Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Hi Team,

I have tried to write a javascript function to get the data from multiple collections from different databases. But it seems it is not connecting to the multiple databases in the same host.

Can you please let me know do we have support to deal with multiple databases in a javascript function?



 Comments   
Comment by vijay kumar [ 25/Aug/15 ]

Fernandez,

Thanks for your information. I will follow up with mongodb-user group.

Comment by Ramon Fernandez Marina [ 24/Aug/15 ]

vijaykumar, you may find getSiblingDB useful. You may also found interesting this presentation on shell tips and tricks by one of our engineers.

Please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. A question like this involving more discussion would be best posted on the mongodb-user group. See also our Technical Support page for additional support resources.

Regards,
Ramón.

Generated at Thu Feb 08 03:53:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.