danielwertheim

danielwertheim


notes from a passionate developer

Developer that lives by the mantra "code is meant to be shared".

Share


Tags


Disclaimer

This is a personal blog. The opinions expressed here represent my own and not those of my employer, nor current or previous. All content is published "as is", without warranty of any kind and I don't take any responsibility and can't be liable for any claims, damages or other liabilities that might be caused by the content.

MongoDb for .Net folks - Choosing a GUI tool and installing as a service

Daniel WertheimDaniel Wertheim

After the first article we now have all we need locally to start developing applications in .Net against MongoDb. But I do recon there’s a bunch of .Net devs out there, having a small resent to work with the console. So before doing anything more, lets solve that issue.

Install MongoDb as a service

Before continuing we look at installing a GUI tool, lets have a look at how to install MongoDb as a service as described here.

Before doing that, I adjusted my config file with instructions to append to an existing log-file, using –logappend.

dbpath=D:DevelopmentDatabasesMongoDbData  
logpath=D:DevelopmentDatabasesMongoDbLogsmongo.log  
logappend=true  

Next install the service:

mongod.exe --config D:DevelopmentDatabasesMongoDbmongodb.config --install  

NOTE! If you don’t specify a correct path to the config-file, the service will install but you will not be able to start it.

The service is now installed. You can adjust names etc via switches like –servicename.

Next start the service:

net start MongoDB  

So, we are now happy owners of a Windows machine with an installed MongoDb service. If you like to remove it, just run:

mongod.exe --remove  

Lets continue having a look at MongoVUE.

MongoVUE, a desktop application for Windows

There are some alternatives for editors. Practise your Google skills and you will see. You can also start with the list at MongoDb.Org. I’ve chosen MongoVUE. It’s built in .Net and the download is small, 12.6Mb. It has a free version with some limitations, but you have 14 days to test out all features before it enters the “Free version mode“. After installing it and accepting to start a “Free” period and having established a connection against your local MongoDb, you can investigate the result of the tests we did in the last article:

One nice thing for newbees, is that the result of actions taken in the GUI, are presented in a small “Learn shell” in the bottom, which reflects the command you would have used in the console. So if I would repeat one of our previous queries, we would see it reflected in the “Learn shell”:

Summary

This was a short article, which looked at installing MongoDb as a service as well as selecting a GUI tool that we could use to interact with MongoDb servers. Next time I hope to start covering a bit about querying capabilities using the C# driver.

//Daniel

Developer that lives by the mantra "code is meant to be shared".

Comments