How to clear MongoDB Shell console

We are going to see how to clear MongoDB Shell console. There are two methods to clear mongo shell on Linux and Windows operating systems.

How to clear MongoDB Shell console on Linux and Windows:

Below two methods are used to clear the mongo shell console on Linux and Windows operating systems.
Continue reading How to clear MongoDB Shell console

How to uninstall sybase in linux

In this article, we will see how to uninstall Sybase or ASE in Linux with console mode. Uninstall can be all features or selected features. Before uninstall, please take backup of data. Following command is used to uninstall Sybase from Linux servers.

./uninstall -console

Steps to uninstall:

1. Goto sap/sybuninstall/ASESuite directory and run the following command:
Continue reading How to uninstall sybase in linux

Step by Step MongoDB Replication setup on Windows

In this article, we will see Step by Step MongoDB Replication setup on Windows. We are going to add 1 Primary and 2 Secondary servers to replica Set.

What is replication?
Replication is a way of keeping identical copies of data on multiple servers and it is recommended for all production deployments.

Step by Step MongoDB Replication setup on Windows1
Continue reading Step by Step MongoDB Replication setup on Windows

How to Install pgAdmin4 on Ubuntu

In this article, we will see how to Install pgAdmin4 on Ubuntu.

What is pgAdmin?

pgAdmin is the leading Open Source management tool for Postgres, the world’s most advanced Open Source database.

Steps to Install pgAdmin4 on Ubuntu:

1. Run the command

sudo apt-get install pgadmin4 pgadmin4-apache2

Continue reading How to Install pgAdmin4 on Ubuntu

How to start stop PostgreSQL on Ubuntu

This article covers how to start, stop and restart PostgreSQL on Ubuntu. This is PostgreSQL DBA routine task.
We are going to cover stop, start and restart using service and systemctl commands. But, not covering to kill the PostgreSQL process from Linux shell.

Stop Start and Restart PostgreSQL using service:

sudo service postgresql stop sudo service postgresql start sudo service postgresql restart

Examples for How to start stop PostgreSQL on Ubuntu:
Continue reading How to start stop PostgreSQL on Ubuntu

Install PostgreSQL 11 on Ubuntu 19.04

In this article, we are going to install PostgreSQL 11 on Ubuntu 19.04 Linux server.

Step1: Add PostgreSQL Repository:

So you need to add PostgreSQL apt repository to your system suggested on official PostgreSQL website using following commands.

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'

Continue reading Install PostgreSQL 11 on Ubuntu 19.04

Sybase revoke permission

In this article, we are going to see how to revoke permissions from Sybase user on a table(s).

Sybase Revoke Syntax:

revoke [grant option for] {all [privileges] | permission_list} on {table_name [(column_list)] | view_name [(column_list)] | stored_procedure_name | function_name | keyname} [with {pred_name | {all |no} predicates}] from {public | name_list | role_list} [cascade] [granted by grantor]

Continue reading Sybase revoke permission

MongoDB exception: connect failed

When tried to connect to MongoDB server, recieved the error: “MongoDB exception: connect failed”. This error occurs if MongoDB server is offline or It may be connecting with default port 27017.

MongoDB shell version v4.0.10 connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb 2019-07-09T22:18:34.660-0700 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused : connect@src/mongo/shell/mongo.js:344:17 @(connect):2:6 exception: connect failed

Reason:

Possible reason check the MongoDB server is up and running fine or not. In my case this error came because MongoDB server is down.

MongoDB exception connect failed

Solution 1:
Continue reading MongoDB exception: connect failed