How to ensure if MongoDB is enterprise?

Viewed 163

I know there are a lot about this out there and I almost checked all of them. But to my best knowledge, our mongodb is enterprise, but I can't get this info.

I run this command

db.serverBuildInfo().modules

and it returns [] which means it is community version according to this question on Stackoverflow

Is there any other way to make sure if it's community or enterprise? Thanks very much for help and not unvoting the question in advance! :)

Edit:

MongoDB Version: 4.0.12

1 Answers

Equivalent for the above is (mongo shell):

MongoDB Enterprise replset:PRIMARY> db.runCommand({buildInfo:1})["modules"]
[ "enterprise" ]

also you may see a prefix MongoDB Enterprise (added by the shell).

Additionally, you may check the bin folder where server files are placed. Servers after 4.2 will contain mongocryptd binary in enterprise version.

Related