How much freespace do i have?

hi:)
Please tell me, how can i write function which return me in MB how much free space do i have(to create tables)?
thanks

Which Tablespace you want to find out the space
SQL> select     tablespace_name         "Tablesapce",
  2          bytes                      "Size",
  3             nvl(bytes-free,bytes)   "Used",
  4             nvl(free,0)             "Free",
  5             nvl(100*(bytes-free)/bytes,100) "% Used"
  6    from(
  7     select ddf.tablespace_name, sum(dfs.bytes) free, ddf.bytes bytes
  8     FROM (select tablespace_name, sum(bytes) bytes
  9     from dba_data_files group by tablespace_name) ddf, dba_free_space dfs
10     where ddf.tablespace_name = dfs.tablespace_name(+)
11     group by ddf.tablespace_name, ddf.bytes)
12    order by 5 desc;Use this query to find
SS

Similar Messages

Maybe you are looking for

  • Mail Account sending message to itself

    I have an account with RR and the sub account I set up is for my business. I set it up in mail on my iPhone and it shows up just fine. But when I send from the iPhone it sends a copy of the message to itself. Why is this? and is there a way to stop t

  • Memory leak in JCO when calling an ABAP-function that returns larg tables

    Hello everybody, I think discovered a memory leak in JCO when the calling functionions that have exporting tables with large datasets. For example the ABAP-function RFC_READ_TABLE, which in this example I use to retrieve data from a table called "RSZ

  • 1200 Series Access points

    I have an problem with multiple access points losing the ability to telnet to them.They access points work fine but the only way I can get the ability to telnet back is to restart them. Has anyone else had this problem.

  • JPGencoder and Preloader problem

    Hi guys, I have an swf which allows the user to take a snapshot of the stage, which works fine on its own. When I use an external preloader with it i get the error: TypeError: Error #1009: Cannot access a property or method of a null object reference

  • Why does "remove attachments" move me to the next email?

    This is really annoying. I am not normally finished with the email when I remove attachments. Is there any way to override this behavior?