Disclaimer

Sunday 3 November 2024

SET COLSEP ' | ' - column separator in Query

 


SQL> column service_name format a20
SQL> column network_name format a20
SQL> set colsep ' | '
SQL> select service_id, name as service_name, network_name,
  2    (select count(*) from v$active_services where name = A.nameas active
  3  from v$services A order by name;
 
SERVICE_ID | SERVICE_NAME     | NETWORK_NAME     |     ACTIVE
---------- | ---------------- | ---------------- | ----------
         4 | plt              | plt              |          1
         5 | pltp             | pltp             |          1
         3 | pltXDB           | pltXDB           |          1
         1 | SYS$BACKGROUND   |                  |          1
         2 | SYS$USERS        |                  |          1

No comments:

Post a Comment

killing session in Oracle

  Killing session :- INACTIVE and MACHINE  set lines 300 pages 300 ; col module for a40 ; col machine for a10 ; select sid , machine ,SQL_ID...