Oracle how to save output of the script in xls or html:
=========================================
SET MARKUP HTML ON
SPOOL <file_name>.xls
SET MARKUP HTML ON
SPOOL <file_name>.html
The content includes guides, troubleshooting tips, and best practices for managing database environments, with an emphasis on Oracle and PostgreSQL systems. You can read the full analysis at Anuroop Challa's DBA Blog.
Oracle how to save output of the script in xls or html:
=========================================
SET MARKUP HTML ON
SPOOL <file_name>.xls
SET MARKUP HTML ON
SPOOL <file_name>.html
How to check compression enabled on partition table
=======================================
select
a.partition_name, a.tablespace_name, a.compression, a.compress_for , round(sum(a.num_rows / a.blocks),0) rows_per_block,
sum(a.num_rows) num_rows, sum(a.blocks) blocks , sum(b.bytes) /(1024*1024) mb
from dba_tab_partitions a, dba_segments b
where
a.table_name = 'TESTCOMP' and
a.partition_name = b.partition_name and
a.table_name = b.segment_name
group by a.partition_name, a.tablespace_name, a.compression, a.compress_for
order by 1;
View running queries in postgreSQL: SELECT * FROM pg_stat_activity;