How to check number of sessions of a user in Oracle

To calculate number of session per username with status and detail source address, original OS user in Oracle database, you can use this command.

SELECT USERNAME, STATUS, OSUSER|| '@' || MACHINE AS SOURCEINFO, COUNT(*) AS NUMOFCONN 
 FROM v$session 
 WHERE TYPE = 'USER'
 GROUP BY USERNAME, 
Read the rest “How to check number of sessions of a user in Oracle”

How to allow remote root access MariaDB 10.4 on Centos 7




By default, MariaDB not allow you access as root from anywhere but localhost. In order to allow remote root access to MariaDB, follow these steps.

Step 1: Accessing MariaDB on local

Use this command

sudo mysql -u root

Step 2: Grant access for root remotely

Read the rest “How to allow remote root access MariaDB 10.4 on Centos 7”

Use distinct in php MongoDB query




Use distinct in php MongoDB query

In my cars_positions database and positions collection I have this kind of data :
db.positions.find()
{ “_id” : ObjectId(“536a5cd9e9df25cd8609d286”), “car” : { “type” : “sport”, “ref” : “nameOfTheCar1” }, “position” : { “dateTime” : “2014-05-06T06:42:10”, “latitude” : “0000.1111”, “hemesphere” … Read the rest “Use distinct in php MongoDB query”

How to implement a cron job (using node-schedule) in a Node JS application




How to implement a cron job (using node-schedule) in a Node JS application

It has been a few days I have started learning Node JS.
My Node JS application has a get api which fetches the books information from the MongoDB database in json format … Read the rest “How to implement a cron job (using node-schedule) in a Node JS application”

Find count and percentage of students failed in a subject




Find count and percentage of students failed in a subject

I am new to MongoDB and learning to write mongodb queries. I need help for below problem:
Input data is a collection student having five records:
[
{
“_id”:0,
“name”:”Maxy”,
“results”:[
{
“subject”:”maths”,
“score”:1.46
},… Read the rest “Find count and percentage of students failed in a subject”

App fails to connect to MongoDB Enterprise with “Authentication failed” and Ops Manager stuck in “AdjustUsers”




App fails to connect to MongoDB Enterprise with “Authentication failed” and Ops Manager stuck in “AdjustUsers”

The credentials of a newly deployed app are rejected by MongoDB with “Authentication failed”. The MongoDB Ops Manager is stuck on “AdjustUsers” for a few hours already.

Verified by:… Read the rest “App fails to connect to MongoDB Enterprise with “Authentication failed” and Ops Manager stuck in “AdjustUsers””

Morphia aggregation stage group with object push




Morphia aggregation stage group with object push

I’m using that latest version of morphia (1.3.2) and I’m trying to replicate the following succesfull mongodb aggregation stage in Java:
{
_id: null,
pv: { $push: { t: ‘$_id’, c: ‘$c’ }}
}

example input to stage … Read the rest “Morphia aggregation stage group with object push”

how to use $lookup stage in java with spring data mongodb? [duplicate]




how to use $lookup stage in java with spring data mongodb? [duplicate]

This question already has an answer here:

lookup in mongodb aggregation

1 answer

Up to last version of spring i have seen lot of stack over flow questions which shows there is no … Read the rest “how to use $lookup stage in java with spring data mongodb? [duplicate]”