Skip to main content

ORA-00018.Maximum number of sessions exceed

ORA-00018.Maximum number of sessions exceed



Initiate the environment variables

cat /etc/oratab
. oraenv
ISTCLOUD

Control the number of connections in use

loggin as PDBADMIN in your PDB

sqlplus PDBADMIN/welcome1@129.152.132.249:1521/SALESPDB4XOK68WUOMMXBE1WPHN.ieoracle12645.oraclecloud.internal

Check the number of connections

Run:

SELECT
'Currently, '
|| (SELECT COUNT(*) FROM V$SESSION)
|| ' out of '
|| VP.VALUE
|| ' connections are used.' AS USAGE_MESSAGE
FROM
V$PARAMETER VP
WHERE VP.NAME = 'sessions'

It displays “Currently n out of m connections are used.” Here n > m. It should be the opposite.

Change the max number of sessions

Loggin as sys in your PDB

quit
sqlplus / as sysdba
alter session set container = SALESPDB4XOK68WUOMMXBE1WPHN;

Change the number of sessions


alter system set sessions=100 scope=both sid='*';

Then bounce the database

Turn it off and on again

SQL> shutdown immediate

SQL> startup

Open all the PDBs (closed by the bouncing)

ALTER PLUGGABLE DATABASE ALL OPEN;

Control again 

Log back into the PDBAMIN user

 sqlplus PDBADMIN/welcome1@129.152.132.249:1521/SALESPDB4XOK68WUOMMXBE1WPHN.ieoracle12645.oraclecloud.internal

Run the control SQL querry

SELECT
'Currently, '
|| (SELECT COUNT(*) FROM V$SESSION)
|| ' out of '
|| VP.VALUE
|| ' connections are used.' AS USAGE_MESSAGE
FROM
V$PARAMETER VP
WHERE VP.NAME = 'sessions'

It displays “Currently n out of m connections are used.” Now n < m. 


Comments

Popular posts from this blog

Oracle Database commands

Notes Leo Oracle DB Start sqlplus Look for orale_home and SID cat /etc/oratab # # A colon, ':', is used as the field terminator.  A new line terminates # the entry.  Lines beginning with a pound sign, '#', are comments. # # Entries are of the form: #   $ORACLE_SID:$ORACLE_HOME:<N|Y>: # ORCL : /u01/app/oracle /product/12.1.0/dbhome_1:Y Set the env variables: [oracle@LeoFareco opc]$ . oraenv ORACLE_SID = [ ORC L] ? The Oracle base remains unchanged with value /u01/app/oracle Start sqlplus [oracle@LeoFareco opc]$ sqlplus / as SYSDBA Avoid the wrapping of the text SQL> set lines 999; SQL> set pages 999; PDB Create a new PDB from the Seed SQL> CREATE PLUGGABLE DATABASE PDB2 ADMIN USER oracle IDENTIFIED BY oracle; Pluggable database created. List the available PDBs SQL> show pdbs OR SQL> select name, open_mode from v$pdbs; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY PDB1 READ WRITE PDB2 MOUNTED Open a PDB in read-write mode...

Datawarehouse notes

In a nutshell You put in a data-warehouse all the data of your enterprise. This data will be imported from diverse sources; and especially operational ones (e.g. the production database of your e-commerce website).   The goal of a DWH is to offer a single data-model (that usually sits within a relational DB), so that data-analysts can ultimately* create reports about the data, for “business people” (i.e. the decision makers of the company).   *Please note that data-analysts don’t directly work on the DWH; they work on data-marts . Data-marts are spin-offs of the DWH, but they usually only include a subset of the data, and have their data-models optimized for the specific type of analytics they will be submitted to. You will periodically load into your DWH data extracted from your many operational-sources. You will then do the same for your data-marts, which are used by data-analysts. Note that the yellow lines are d...

Copy Pastes from Docker’s Get Started doc

Copy Pastes from Docker’s Get Started doc Create image, manage containers, docker cloud https://docker.github.io/get-started/part2/#log-in-with-your-docker-id Dockerfile Create an empty directory. Change directories ( cd ) into the new directory, create a file called  Dockerfile , copy-and-paste the following content into that file, and save it. Take note of the comments that explain each statement in your new Dockerfile. # Use an official Python runtime as a parent image FROM python: 2 . 7 -slim   # Set the working directory to /app WORKDIR /app   # Copy the current directory contents into the container at /app ADD . /app   # Install any needed packages specified in requirements.txt RUN pip install -r requirements.txt   # Make port 80 available to the world outside this container EXPOSE 80   # Define environment variable ENV NAME World   # Run app.py when the container launches CMD [ "python" , "app.py" ] requirements.txt Flask Redis app.py from flas...