Computer >> Máy Tính >  >> Lập trình >> MongoDB

Làm cách nào để biết liệu cơ sở dữ liệu MongoDB của tôi có phải là 64 bit hay không?

Bạn có thể sử dụng buidInfo cùng với runCommand để kiểm tra MongoDB 32 bit hay 64 bit. Đầu tiên chuyển cơ sở dữ liệu của bạn sang quản trị viên. Sau đây là cú pháp

use admin

Sau đó, sử dụng cú pháp sau để biết máy chủ của tôi có chạy MongoDB 64 bit hay không

db.runCommand(buildInfo)

Bây giờ thực hiện cú pháp trên

> use admin
switched to db admin
> db.runCommand("buildInfo");

Sau đây là đầu ra hiển thị MongoDB là 64 bit

{
   "version" : "4.0.5",
   "gitVersion" : "3739429dd92b92d1b0ab120911a23d50bf03c412",
   "targetMinOS" : "Windows 7/Windows Server 2008 R2",
   "modules" : [ ],
   "allocator" : "tcmalloc",
   "javascriptEngine" : "mozjs",
   "sysInfo" : "deprecated",
   "versionArray" : [
      4,
      0,
      5,
      0
   ],
   "openssl" : {
      "running" : "Windows SChannel"
   },
   "buildEnvironment" : {
      "distmod" : "2008plus-ssl",
      "distarch" : "x86_64",
      "cc" : "cl: Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24223 for x64",
      "ccflags" : "/nologo /EHsc /W3 /wd4355 /wd4800 /wd4267 /wd4244 /wd4290
      /wd4068 /wd4351 /wd4373 /we4013 /we4099 /we4930 /WX /errorReport:none /MD /O2 /Oy- /bigobj           /utf-8 /Zc:rvalueCast /Zc:strictStrings /volatile:iso /Gw /Gy /Zc:inline",
      "cxx" : "cl: Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24223 for x64",
      "cxxflags" : "/TP",
      "linkflags" : "/nologo /DEBUG /INCREMENTAL:NO /LARGEADDRESSAWARE /OPT:REF",
      "target_arch" : "x86_64",
      "target_os" : "windows"
   },
   "bits" : 64,
   "debug" : false,
   "maxBsonObjectSize" : 16777216,
   "storageEngines" : [
      "devnull",
      "ephemeralForTest",
      "mmapv1",
      "wiredTiger"
   ],
   "ok" : 1
}