Pages

Friday, March 24, 2023

[Result.addErrorDescription:771] PRVG-0449 : Proper soft limit for maximum stack size was not found on node "xxxx" [Expected >= "10240" ; Found = "8192"].

 

We usually get this error in installations and sometimes on adcfgclone when it is running through any automation scripts in Solaris systems.

In Installations, you will see as below.

 Installation of Oracle 12.2.0.1 on Oracle Linux reports prerequisite check failure for maximum stack size as seen below. The check does not succeed despite clicking "Fix & Check Again" OUI option and running the fixup script as "root" user

 


Modify the resource limits to meet the requirement and take operating system specific measures to ensure that the corrected value takes effect for the current user before retrying this check.

Time being on your session where you want to launch the installation.

 

To adjust the maximum stack size soft limit use:

1. For the current shell:

# ulimit -Ss 10240

 

Or to update the values in system files to make it permanent.

 

In the file : /etc/security/limits.conf , adjust the value for the below parameter.

 

Oracle            soft               stack             10240

 

The sessions needs to be relaunched for the fix-ups to be effective. For example, if it is a VNC sessions then the user has to close it and Re-Login to create a new session where the new stack limits will be loaded.

 

On the other case the issue on adcfgclone when it run through automated scripts on Solaris server.

 

Check if the user able to connect to same user with password less authentication from same session.

If yes, that could be the cause, Remove the entries from authorized keys file (authorized_keys) so the user will not connect to self-session.

 

[oracust@xxxxx]$ ssh oracust@db3301

Last login: Tue Mar 21 10:18:45 2023 from 10.134.156.141

 

|-----------------------------------------------------------------|

| This system is for the use of authorized users only.            |

| Individuals using this computer system without authority, or in |

| excess of their authority, are subject to having all of their   |

| activities on this system monitored and recorded by system      |

| personnel.                                                      |

|                                                                 |

| In the course of monitoring individuals improperly using this   |

| system, or in the course of system maintenance, the activities  |

| of authorized users may also be monitored.                      |

|                                                                 |

| Anyone using this system expressly consents to such monitoring  |

| and is advised that if such monitoring reveals possible         |

| evidence of criminal activity, system personnel may provide the |

| evidence of such monitoring to law enforcement officials.       |

|-----------------------------------------------------------------|

 

/etc/profile[52]: ulimit: 65536: limit exceeded [Insufficient privileges]

[oracust@xxxxxx]$

 

After removing authorized keys for self connection, It will be like

 

[oracust@xxxxx]$ ssh oracust@xxxxxx

Password:

[oracust@xxxxxx]$

Monday, November 21, 2022

How to Create,Start,Modify,Stop and Delete services in listener in Oracle Database 19c

 This article describes how to create database services in single instance databases using the DBMS_SERVICE package.

In a multitenant database services can be created in a CDB or a PDB. In these examples we will just create them in the CDB, so it looks similar to a non-CDB instance.


Create a Service:

We create a new service using the CREATE_SERVICE procedure. There are two overloads allowing you to amend a number of features of the service. One overload accepts an parameter array, while the other allows you to set some parameters directly. The only mandatory parameters are the the SERVICE_NAME and the NETWORK_NAME, which represent the internal name of the service in the data dictionary and the name of the service presented by the listener respectively.

BEGIN

  DBMS_SERVICE.create_service(

    service_name => 'my_new_service',

    network_name => 'my_new_service'

  );

END;

/

We can display information about existing services using the {CDB|DBA|ALL}_SERVICES views. We can see if the service is started by checking the {G}V$ACTIVE_SERVICES view.


COLUMN name FORMAT A30

COLUMN network_name FORMAT A30

SELECT name,network_name FROM   dba_services ORDER BY 1;

NAME                           NETWORK_NAME

------------------------------ ------------------------------

my_new_service                 my_new_service


SELECT name,network_name FROM   v$active_services ORDER BY 1;

No rows selected


Start a Service:

The START_SERVICE procedure starts an existing service, making it available for connections via the listener.

BEGIN

  DBMS_SERVICE.start_service(

    service_name => 'my_new_service'

  );

END;

/

We can see the service is now active.

SELECT name,network_name FROM   v$active_services ORDER BY 1;

NAME                           NETWORK_NAME

------------------------------ ------------------------------

my_new_service                 my_new_service


Modify a Service: 

The MODIFY_SERVICE procedure allows us to alter parameters of an existing service. Like the CREATE_SERVICE procedure, there are two overloads allowing you to amend a number of features of the service. One overload accepts an parameter array, while the other allows you to set some parameters directly.

BEGIN

  DBMS_SERVICE.modify_service(

    service_name => 'my_new_service',

    goal         => DBMS_SERVICE.goal_throughput

  );

END;

/

Stop a Service:

The STOP_SERVICE procedure stops an existing service, so it is no longer available for connections via the listener.

BEGIN

  DBMS_SERVICE.stop_service(

    service_name => 'my_new_service'

  );

END;

/

The service is still present, but it is no longer active.


COLUMN name FORMAT A30

COLUMN network_name FORMAT A30

SELECT name,network_name FROM   dba_services ORDER BY 1;

NAME                           NETWORK_NAME

------------------------------ ------------------------------

my_new_service                 my_new_service


SELECT name,network_name FROM   v$active_services ORDER BY 1;

No rows selected


Delete a Service:

The DELETE_SERVICE procedure removes an existing service.

BEGIN

  DBMS_SERVICE.delete_service(

    service_name => 'my_new_service'

  );

END;

/


We can see it's not longer listed as an available service.


COLUMN name FORMAT A30

COLUMN network_name FORMAT A30

SELECT name, network_name FROM   dba_services ORDER BY 1;

No rows selected


Disconnect Sessions:

The DISCONNECT_SESSION procedure disconnects all sessions currently connected to the service. The disconnection can take one of three forms, indicated by package constants.


POST_TRANSACTION : Sessions disconnect once their current transaction ends with a commit or rollback. This is the default value (0).

IMMEDIATE : Sessions disconnect immediately. Value (1).

NOREPLAY : Sessions disconnect immediately, and are flagged not to be replayed by application continuity. Value (2).

Here is an example of its usage.


BEGIN

  DBMS_SERVICE.disconnect_session(

   service_name      => 'my_new_service',

   disconnect_option => DBMS_SERVICE.immediate

  );

END;

/