Wednesday, November 24, 2021

ODI - Sql query to monitor TEMP size and resize

Query to monitor the temp total, used and free space in mb:

Select A.tablespace_name tablespace , D.mb_total, SUM(A.used_blocks * D.block_size) / 1024 / 1024 mb_used, D.mb_total - SUM(A.used_blocks * D.block_size) / 1024 / 1024 mb_free

From v$sort_segment A, ( select B.name, C.block_size, SUM(C.bytes) / 1024 / 1024 mb_total from v$tablespace B, v$tempfile C where B.ts#= C.ts#

Group by B.name, C.block_size) D

Where A.tablespace_name = D.name

Group by A.tablespace_name, D.mb_total


Query to Resize the temp file space:

Alter Database TEMPFILE 'tempfile' RESIZE 300G



No comments:

Post a Comment

Featured Post

OIC - how can I use XSLT functions to remove leading zeros from numeric and alphanumeric fields?

To remove leading zeros from an numeric field in Oracle Integration Cloud (OIC) using XSLT, you can Use number() Function The number() funct...