For some cases we may have access to database instance of MongoDB as DBA. But we may not have access to Linux or Windows box to shutdown the MongoDB service or MongoDB instance. To Shutdown the MongoDB instance you should be able to log in to "admin" database. If your MongoDB instance is running with "auth" mode you really need ...
Before few weeks I got a book from Oreilly Blogger Review program to review a book. I took enough time to read this book. This book covers most of the new trends and features in SQL Server 2012 with good explanation. I was addicted to first chapter to get to know about the SQL Server Data Tools. Because previously I ...
At the first date I heard about NoSQL DBMS, I felt insane. Then I got an eager to learn. But I didn’t pay any attention to learn. Later I got to know that MongoDB is a scalable one. Then I got a chance to follow free MongoDB course. Although I registered to both Developer and DBA courses I had no ...
Some times we need to take backups or we need to copy databases to another servers for administrative purposes. But sometimes just copying files is not enough. In MongoDB Shell they support to copy database from remote instance to current one with a single command. ( :D Just like Single Click in Windows )For this demo I made alive two ...
Previously I wrote a post about CTE (Common Table Expressions). And Common Table Expressions are valid for a single statement only. But single statement can use many CTEs. And statement also should be within same batch. USE AdventureWorks2012GO--Defining CTEWITH ctePerson AS( SELECT * FROM Person.Person)--First Statement will run SELECT FirstName FROM ctePerson --Second statement will occur an errorSELECT FirstName FROM ...
If you are new to MongoDB you may need to discover the databases and collections (basically objects) on your MongoDB instance. For this easily you can use a GUI tool like MongoVUE. But in this blog post I’m not going to describe about GUI tools. I’m going to explain about MongoShell to navigate through database objects. I can remember the ...
If you have Yes or No data to store in DB, what will you select as the data type? Most of the times you will select “Bit”. Because it only takes 1 bit to store data. And it is the best data type for this situation. But it takes more than bit in SQL Server. If you have only one ...
In SQLCMD and Powershell I wanted to take the list of databases. In MySQL “show databases” command was there. But in SQLCMD I was unable to find such a command.--Stored ProcedureEXEC sp_databasesGO --SELECT StatementSELECT Name FROM master.dbo.sysdatabasesGO You can use above commands in SSMS (if you are lazy to move your mouse to object explorer) and SQLCMD. Also you can ...
If you have so many documents in your collection in MongoDB database. Sometimes you may want to retrieve few documents. But if we run find() we cant have nice output. You may need to have nice indentation and line breaks. You may want results in more readable way. Then you can use pretty(). Who can read this?? If you use pretty() you can take nice output with Mongo Shell.
Although it was a rainy day so many attendees were there to participate SQL Server Universe Monthly User Group Meeting. At the beginning Dinesh’s TV interview was on the screen until the meeting begins. And then we had 3 sessions one on Data migration to Dynamics, one on execution plan myths, and last one was about Paging Results in SQL ...
I got few questions to answer quickly in last week just like a test. Then I suddenly answered then after that I tried to find correct answers to them. I found answers for most of them. And one of them was there as it was. A Windows server has 32 GB of memory and dedicated for SQL Server database. Every ...
In the beginning of this week I got a task from Susantha to modify a stored procedure. After the modification I had to test to compare the result sets before modification and after modification. That procedure only returns a data table. So I had so many test data on another table. Then I wrote a script to go through the ...
In SQL Server we use varchar, varbinary to save disk space in our tables. But its not saving data always as it sounds. When the data stores it takes few extra bytes to describe the data length. Because of that there is no gain using varchar(2). If you use varchar(2) it will take 4 or 3 bytes to store data. ...
Secret Messages!! I was always amazed by secret messages and Cryptography is the science applied for this. Modern cryptography has gone to a high standard as it's bonded with mathematics, computer science and electrical engineering. I thought of giving a basic idea about classic cryptography for a change.There are three methods in classic cryptography. concealed messages (Steganography) - These hidden ...
For some cases, we may have access to database instance of MongoDB as DBA. But we may not have access to Linux or Windows box to shutdown the MongoDB service or MongoDB instance. To Shutdown the MongoDB instance you should be able to log in to "admin" database. If your MongoDB instance is running with "auth" mode you really need ...
For some cases, we may have access to database instance of MongoDB as DBA. But we may not have access to Linux or Windows box to shutdown the MongoDB service or MongoDB instance. To Shutdown the MongoDB instance you should be able to log in to "admin" database. If your MongoDB instance is running with "auth" mode you really need ...
Some times we need to take backups or we need to copy databases to another server for administrative purposes. But sometimes just copying files is not enough. In MongoDB Shell, they support to copy the database from remote instance to the current one with a single command. ( :D Just like Single Click in Windows )For this demo, I made ...