Tablespace ORACLE

SELECT e.OWNER, e.SEGMENT_NAME, e.TABLESPACE_NAME, sum(e.bytes) / 1048576 AS Megs
FROM dba_extents e
WHERE
  e.OWNER = 'MY_USER' AND
  e.TABLESPACE_NAME = 'MY_TABLESPACE'
GROUP BY e.OWNER, e.SEGMENT_NAME, e.TABLESPACE_NAME
ORDER BY e.TABLESPACE_NAME, e.SEGMENT_NAME;

0
8
Awgiedawgie 440220 points

                                    CREATE TABLE TB_NOME_TABELA
(
CODIGO NUMBER(38)
)TABLESPACE TBS_NOME_TABLESPACE;

0
0
4.33
3
Phoenix Logan 186125 points

                                    -- Size and usage of tablespaces
SELECT T1.TABLESPACE_NAME,
       T1.BYTES / 1024 / 1024   as                        "bytes_used (Mb)",
       T2.BYTES / 1024 / 1024   as                        "bytes_free (Mb)",
       T2.largest / 1024 / 1024 as                        "largest (Mb)",
       round(((T1.BYTES - T2.BYTES) / T1.BYTES) * 100, 2) percent_used
FROM (
         select TABLESPACE_NAME,
                sum(BYTES) BYTES
         from dba_data_files
         group by TABLESPACE_NAME
     ) T1,
     (
         select TABLESPACE_NAME,
                sum(BYTES) BYTES,
                max(BYTES) largest
         from dba_free_space
         group by TABLESPACE_NAME
     ) T2
where T1.TABLESPACE_NAME = T2.TABLESPACE_NAME
order by ((T1.BYTES - T2.BYTES) / T1.BYTES) desc;

4.33 (3 Votes)
0
4.33
3
A-312 69370 points

                                    CREATE TABLESPACE
TBS_NOME_TABLESPACE
DATAFILE 'NOME_DATAFILE.dbf' SIZE 40M ONLINE;

4.33 (3 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
what is an oracle tablespace oracle get tablespace info oracle list tables why tablespace is required in oracle oracle what is a tablespace what is a tablespace in oracle oracle select tablespace oracle tablespace properties oracle tables list how to know the tablespaces in oracle system tablespace in oracle full oracle show tablespace names what are the tablespaces in oracle why to use Tablespace oracle Advantage of using Tablespace oracle oracle tablespace list tablespaces in oracle tablespaces size oracle oracle list all tables oracle tablespaces tablespace oracle définition oracle all tablespaces oracle system tablespace full oracle tables in tablespace oracle tablespace tables list oracle tablespace usage oracle list tablespace oracle list tablespaces tablespaces oracle oracle get current tablespace usage oracle tablespace data oracle tablespace usage by object who use system tablespace in oracle permanent tablespace in oracle tablespace usage script oracle oracle how to get tablespace oracle sql developer create table view tablespaces oracle tablespace in oracle tablespace history usage oracle tablespace with example in oracle19c table and tablespace in oracle19c table and tablespace in oracle tablespaces oracle query oracle tablespace usage query extents in oracle tablespace tablespace structure oracle oracle tablespace query oracle tablespace list sql tablespace management in oracle get tablespace in oracle oracle 9i tablespace usage available tablespace in oracle drop tablespace oracle when tablespace created in oracle oracle tablespace what is tablespace in oracle tablespace select tablespace oracle table space tablespace oracle CREATE USER PDV INTERFACE IDENTIFIED BY juno 2020 DEFAULT TABLESPACE DADOS
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source