How to determine MongoDB Enterprise/Free version that you’re connected to ?

To determine whether the MongoDB that you connected, Enterprise/Open source – below are many methods.

 

1) The easiest way is .. use “mongod –version ”
Enterprise Edition, mentioned as “module : enterprise” where community edition as “none”

See below, first one is community edition version 3.2.0 and second is enterprise edition.

./mongod –version
db version v3.2.0
git version: 45d947729a0315accb6d4f15a6b06be6d9c19fe7
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
allocator: tcmalloc
modules: none
build environment:
distmod: rhel62
distarch: x86_64
target_arch: x86_64

./mongod –version
db version v3.2.4
git version: e2ee9ffcf9f5a94fad76802e28cc978718bb7a30
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
allocator: tcmalloc
modules: enterprise
build environment:
distmod: rhel62
distarch: x86_64
target_arch: x86_64
2) Check by connecting your monogo with –ssl option, if you’re able to connect -possible yours is a Enterprise version. if not, it’s a free version

3) Execute “mongod -h | grep snmp” command from linux prompt, if you have output it’s a Enterprise. If not, it’s a Free version.

4) db.runCommand({buildInfo:1}) from mongodb prompt.

[root@dbversity bin]# ll -lhtr mongo*
-rwxr-xr-x 1 dbversity dbversity 18M Aug 22 2014 mongodump
-rwxr-xr-x 1 dbversity dbversity 18M Aug 22 2014 mongorestore
-rwxr-xr-x 1 dbversity dbversity 18M Aug 22 2014 mongoexport
-rwxr-xr-x 1 dbversity dbversity 18M Aug 22 2014 mongoimport
-rwxr-xr-x 1 dbversity dbversity 18M Aug 22 2014 mongostat
-rwxr-xr-x 1 dbversity dbversity 18M Aug 22 2014 mongotop
-rwxr-xr-x 1 dbversity dbversity 18M Aug 22 2014 mongooplog
-rwxr-xr-x 1 dbversity dbversity 18M Aug 22 2014 mongofiles
-rwxr-xr-x 1 dbversity dbversity 18M Aug 22 2014 mongoperf
-rwxr-xr-x 1 dbversity dbversity 18M Aug 22 2014 mongosniff
-rwxr-xr-x 1 dbversity dbversity 18M Aug 22 2014 mongod
-rwxr-xr-x 1 dbversity dbversity 14M Aug 22 2014 mongos
-rwxr-xr-x 1 dbversity dbversity 9.1M Aug 22 2014 mongo
[root@dbversity bin]#
[root@dbversity bin]# mongod -h | grep ssl
[root@dbversity bin]# mongod -h | grep snmp
[root@dbversity bin]#
[root@dbversity bin]#
[root@dbversity bin]# ./mongo –port 10000
MongoDB shell version: 2.4.11
connecting to: 127.0.0.1:10000/test
mongos>
mongos>
bye
[root@dbversity bin]# ./mongo –port 10000 –ssl
ERROR: unknown option ssl

MongoDB shell version: 2.4.11
usage: ./mongo [options] [db address] [file names (ending in .js)]
db address can be:
foo foo database on local machine
192.169.0.5/foo foo database on 192.168.0.5 machine
192.169.0.5:9999/foo foo database on 192.168.0.5 machine on port 9999
options:
–shell run the shell after executing files
–nodb don’t connect to mongod on startup – no
‘db address’ arg expected
–norc will not run the “.mongorc.js” file on
start up
–quiet be less chatty
–port arg port to connect to
–host arg server to connect to
–eval arg evaluate javascript
-u [ –username ] arg username for authentication
-p [ –password ] arg password for authentication
–authenticationDatabase arg user source (defaults to dbname)
–authenticationMechanism arg (=MONGODB-CR)
authentication mechanism
-h [ –help ] show this usage information
–version show version information
–verbose increase verbosity
–ipv6 enable IPv6 support (disabled by
default)

file names: a list of files to run. files have to end in .js and will exit after unless –shell is specified
[root@dbversity bin]#
[root@dbversity bin]#

mongos> db.runCommand({buildInfo:1})
{
“version” : “2.4.11”,
“gitVersion” : “fa13d1ee8da0f112f588570b4070f73d7af2f7fd”,
“sysInfo” : “Linux ip-10-2-29-40 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_49”,
“loaderFlags” : “-fPIC -pthread -rdynamic”,
“compilerFlags” : “-Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -Werror -fno-builtin-memcmp -O3”,
“allocator” : “tcmalloc”,
“versionArray” : [
2,
4,
11,
0
],
“javascriptEngine” : “V8”,
“bits” : 64,
“debug” : false,
“maxBsonObjectSize” : 16777216,
“ok” : 1
}
mongos>
The advantages of the enterprise version are:

MongoDB Management Service (backup and monitoring solution)

SNMP monitoring

Kerberos or LDAP as an alternative to password-based or certificate-based authentication

Commercial development license (changes you do to MongoDB itself aren’t subject to the terms of the AGPL). Note that in a usual setup you have your clients communicate with your application server and your application server communicate with MongoDB. In that configuration the AGPL does not require you to publish any sourcecode because the end-users do not interact with MongoDB directly over a network. It only matters when you expose MongoDB to your clients directly. And even then compliance with the AGPL is only problematic when you make changes to MongoDB itself.

MongoDB BI-Connector which adds a limited (very limited) SQL compatibility layer to MongoDB for integration with SQL-based Business Intelligence solutions.

MongoDB compass – a GUI tool to visualize data structures (but there are free alternatives for that).

In-Memory storage engine (as of version 3.2 still in beta-stage and not yet recommended for production use!)

Support and training contract

Certification for some operating systems (considering that the free edition is identical except for the additional features listed above, paying just for this is quite pointless. But maybe you work in a place with lots of MBAs who care about such formalities)

 

 

  • Ask Question