mongos> use config
switched to db config
mongos> db.createView("view", "shards", [])
{
"ok" : 1,
"$clusterTime" : {
"clusterTime" : Timestamp(1678225680, 2),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
},
"operationTime" : Timestamp(1678225680, 2)
}
mongos> db.view.drop()
uncaught exception: Error: drop failed: {
"ok" : 0,
"errmsg" : "Cannot drop collection in 'config' database in sharded cluster",
"code" : 20,
"codeName" : "IllegalOperation",
"$clusterTime" : {
"clusterTime" : Timestamp(1678225682, 1),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
},
"operationTime" : Timestamp(1678225682, 1)
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DBCollection.prototype.drop@src/mongo/shell/collection.js:713:15
@(shell):1:1