PL/SQL (MOSC)

MOSC Banner

PL/SQL in Shell ?

in PL/SQL (MOSC) 10 commentsAnswered ✓

Hi everybody,

I would like to develop a shell script to kill user session via sever:

this my script, but it's not working … as i'm not very strong in shell, could anyone please have idea to help me to correct this shell script … Thank you so much in advance :


#!/usr/bin/ksh
ksh

export ORACLE_HOME=/softwares/oracle/product/19.0.0
export ORACLE_SID=CGT
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_PDB_SID=GLT

sqlplus -s / as sysdba

SET HEADING OFF;
SET FEEDBACK OFF;
SET PAGESIZE 0;
SET SERVEROUTPUT ON;

BEGIN
FOR sess IN (SELECT SID, SERIAL# FROM V$SESSION
WHERE USERNAME = 'SYSADM'

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center