Wednesday 25 August 2021

listener service register


alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = demo.localdomain)(PORT = 1531))';


alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = demo.localdomain)(PORT = 1531))','(ADDRESS = (PROTOCOL = TCP)(HOST = demo.localdomain)(PORT = 1522))' scope=both;


stop and start the listener


lsnrctl status LISTENR.



agent status check scripts for oem13c agent

 agent_check.sh



#!/bin/bash


agent_status=`ps -ef | grep -i gcagent.tmmain.TMMain|grep -i sysman |grep -v grep | wc -l`


if [ $agent_status = 0 ]

then

date >> /u01/app/agent13c/log/agentStarted.log

/u01/app/agent13c/agent_13.4.0.0.0/bin/emctl start agent >> /u01/app/agent13c/log/agentStarted.log & > /dev/null

#mailing program

#mail -s "OEM Agent 13c was not running...  Restarted on `hostname` $i `basename $0`" 'EM13c@*****' < agentStarted.log

else

date >> /u01/app/agent13c/log/agentStarted.log

echo 'Agent is running' >> /u01/app/agent13c/log/agentStarted.log

fi

MULTITENANT service register in 19c

 MULTITENANT:


BEGIN

  DBMS_SERVICE.create_service(

    service_name => 'my_new_service',

    network_name => 'my_new_service'

  );

END;

/



COLUMN name FORMAT A30

COLUMN network_name FORMAT A30


SELECT name,

       network_name

FROM   dba_services

ORDER BY 1;


SELECT name,

       network_name

FROM   v$active_services

ORDER BY 1;




BEGIN

    DBMS_SERVICE.START_SERVICE (SERVICE_NAME   => 'herospdb.localdomain');

END;

/


BEGIN

  DBMS_SERVICE.modify_service(

    service_name => 'my_new_service',

    goal         => DBMS_SERVICE.goal_throughput

  );

END;

/



sqlplus ram/ram@demo:1521/herospdb.localdomain

services for pluggable database in 19c

 command for pluggable database services.



COLUMN NAME FORMAT A12;

SELECT NAME, CON_ID, DBID, CON_UID, GUID FROM V$CONTAINERS ORDER BY CON_ID;


show pdbs;


alter session set container=PDB01;


check the services for pluggable database:


COLUMN NAME FORMAT A15;

COLUMN NETWORK_NAME FORMAT A15;

SELECT NAME,NETWORK_NAME FROM DBA_SERVICES;


other network name


lsnrctl status|grep -i pdb01 -A 1


srvctl status service -d CDBAMN   //check the service for container database.


lsnrctl status|grep -i SOA -A 1   // soa is service name


crsctl stat res ora.cdbamn.soa.svc -t


crsctl stat res ora.cdbamn.db -t


FRa space:


column SPACE_LIMIT_Gb format 999;

column SPACE_USED_Gb format 999;

select name, SPACE_LIMIT/1024/1024/1024 SPACE_LIMIT_Gb, SPACE_USED/1024/1024/1024 SPACE_USED_Gb, SPACE_RECLAIMABLE from v$recovery_file_dest;


Tuesday 3 August 2021

OUI-10166: The permission 0755 cannot be set for the file rootconfig.sh 19c grid upgrade from 12c


 

While starting the actual upgrade, If you are seeing the error. as

OUI-10166: The permissions 0755 cannot be set for the file $GRID_HOME/crs/config/rootconfig.sh. OUI-10175: The effective user ID does not match the owner of the file or the process is not the user user.

 SOLUTION:

Check the owner of the file. $GRID_HOME/crs/config/rootconfig.sh . If it is owned by root , then change it to oracle and rerun the gridsetup.sh script.

chown oracle:oinstall rootconfig.sh



PRVF-5311 : File “/tmp/InstallActions error:

If at pre-requisite stage this error is coming, then you can try below solution.

Do below changes to scp. (

# Rename the original scp. ( find where is the scp executable file present)

mv /usr/bin/scp /usr/bin/scp.orig

# Create a new file .

vi /usr/bin/scp

# Add the below line to the new created file .
/usr/bin/scp.orig -T $*

# Change the file permission to 555.

chmod 555 /usr/bin/scp


RETRY THE UPGRADE PROCESS .

###Once upgrade is done , you can revert to the original

mv /usr/bin/scp.orig /usr/bin/scp

Featured post

Postgres commads

 [oracle@Tesdb ~]$ systemctl status postgresql-15 ● postgresql-15.service - PostgreSQL 15 database server    Loaded: loaded (/usr/lib/system...