Posts

Showing posts from April, 2018

MongoDB Commands

Export collection without ID field: mongo --host dfwlnpmgdb-03:27018 cpq_prod --quiet --eval "db.PricingTable.find({}, {_id: 0}).forEach(printjson)" > /home/kolguk01/export/out.json Create/DROP Index: Note: Always use background set to true while creating the indexes db.css.dropIndex("ts_365_days") db.css.dropIndex("url_1_src_1") db.css.dropIndex("_id_") db.css.createIndex( { "ts" : 1}, {"name" : "ts_365_days", "expireAfterSeconds" : 31536000,background : true}) db.css.createIndex( { "url" : 1, "src" : 1}, {"name" : "url_1_src_1", "unique" :true,background : true}) db.css.createIndex( { "_id" : 1}, {"name" : "_id_" ,background : true}) Select documents without the _id field db . collection . find ({}, { _id : 0 }) How to configure Replica set in MongoDB Step 1 : In th...

SQL Slipstream Installation

Steps for the Slipstream Installation Here are the steps: 1. Copy your original SQL Server 2008 R2 source media to C:\SQLServer2008R2_SP1 2. Download the SQL Server 2008 R2 SP1 packages from  here . You need to download all Service Pack 1 architecture packages: SQLServer2008R2SP1-KB2528583-IA64-ENU.exe SQLServer2008R2SP1-KB2528583-x64-ENU.exe SQLServer2008R2SP1-KB2528583-x86-ENU.exe 3. Extract each of the  SQL Server 2008 SP1  packages to C:\SQLServer2008R2_SP1\SP as follows: SQLServer2008R2SP1-KB2528583-IA64-ENU.exe /x:C:\SQLServer2008R2_SP1\SP SQLServer2008R2SP1-KB2528583-x64-ENU.exe /x:C:\SQLServer2008R2_SP1\SP SQLServer2008R2SP1-KB2528583-x86-ENU.exe /x:C:\SQLServer2008R2_SP1\SP Ensure you complete this step for all architectures to ensure the original media is updated correctly. 4. Copy Setup.exe from the SP extracted location to the original source media location. Here is the robocopy command: robocopy C:\SQLServer2008R2_SP1\SP C:\SQLSer...