Wednesday, 8 August 2012

Tablespace free memory Query and to know the path of the Table sapce

Tablespace free-used:

SELECT                  Total.name "Tablespace Name",
                                  Free_space,
                                   (total_space-Free_space) Used_space,
                                    total_space
FROM
(SELECT                  tablespace_name,
                                  sum(bytes/1024/1024) Free_Space
FROM                       sys.dba_free_space
GROUP BY                tablespace_name) Free,
(SELECT                    b.name,
                                   sum(bytes/1024/1024) TOTAL_SPACE
FROM                        sys.v_$datafile a,
                                   sys.v_$tablespace B
WHERE                    a.ts# = b.ts#
GROUP BY              b.name) Total
WHERE                        Free.Tablespace_name = Total.name;

For the tablespaces path Query :

SELECT substr(file_name, 1, 70), tablespace_name FROM dba_data_files;

No comments:

Post a Comment

Script to update salespersons customer site wise in oracle apps R12

SELECT * FROM HZ_PARTIES WHERE PARTY_NAME LIKE 'DEENA VISION%'; SELECT * FROM HZ_CUST_ACCOUNTS_ALL WHERE PARTY_ID =94043 ; SE...