Enabling MongoDB authentication with –keyFile option.
Create a keyFile as below and change it’s permissions & owner as below [root@host-name bin]$ cat /srv/mongodb/keyfile SrinivasMutyalakeyFileforTesting [root@host-name bin]$ chown root:mongod /srv/mongodb/keyfile [root@host-name bin]$ chmod 700 /srv/mongodb/keyfile [root@host-name bin]$ [root@host-name bin]$ ls -lhtr /srv/mongodb/keyfile -rwx—— 1 root mongod 33…
How do I stop Replication within Replica-set in MongoDB
Is there any single command/short process to stop/pause the Replication within a Replica Set (Not Shard enabled) instead following the below long process. 1. PRIMARY> rs.remove(secondary.host.name:port); 2. restart secondary without –replSet 3. do your activity 4. restart secondary with –replSet,…
MongoDB Admin user creation script
## Copy this script to your mongo /bin folder ################################# ID=`id -u -n` echo echo ” AdminUserCreation.sh script is executed by user : $ID” echo echo ” Date and Time of Execution : `date`” echo read -p “Enter the port…
MongoDB User management shell script
MongoDB User management shell script #!/bin/bash ## Copy this script to your mongo /bin folder ################################# PWP_HOME=/opt/pwp/3.0 MONGO_HOME=/apps/bin SCRIPTS=/apps/UMG_Menu/Scripts HOME=/apps/UMG_Menu/UMG_PWP LOGS=/apps/UMG_Menu/ScriptLogs TIMESTAMP=`date +%d-%m-%y_%H:%M:%S` DATE=`date +%d-%m-%y` db=admin local_host=`hostname` ID=`id -u -n` echo echo ” User_Management.sh script is executed by user :…
NUMA (Non Uniform Memory Access) for MongoDB
From our internal testing we did see some performance boost when NUMA was disabled using -> numactl –interleave=all ….. Below are the details from MongoDB http://docs.mongodb.org/manual/administration/production-notes/ Running MongoDB on a system with Non-Uniform Access Memory (NUMA) can cause a number…
Openings with MongoDB for Developers
MongoDB Do you want to work at MongoDB, Inc. and be part of a revolution in database software? Check out our open positions buff.ly/1owu5RP Development Should Be Simple and Beautiful buff.ly MongoDB would not be the leading NoSQL database without…
SQL access to MongoDB using SonarSQL (JSON Studio)
RDBMS – MongoDB ETL Demo http://jsonstudio.com/rdbms-mongodb-etl-demo/ SQL access to MongoDB using SonarSQL Demo http://jsonstudio.com/sql-access-mongodb/
SQL to MongoDB Mapping Chart
The following table presents the various SQL terminology and concepts and the corresponding MongoDB terminology and concepts. SQL Terms/Concepts MongoDB Terms/Concepts database database table collection row document or BSON document column field index index table joins embedded documents and linking…
Depth of an attribute in Document
Say my document is very huge & have multiple sub-documents & attributes (i.e, dotted notation with long depth) in it. And assume I don’t the schema design of my document, but I want to query on the db to count…
MongoDB Shard creation script
Below shell script will be useful to create a MongoDB’s sharded environment on a single sever/multiple servers depending on your requirement. Things to remember to execute below automated script. 1) We should have required privileges to the user on your…