Article View: pl.comp.bazy-danych
Article #188513Re: [ORACLE] Rozmiar bazy itp.
From: ThomasO@cpas.com
Date: Fri, 30 Jun 2017 11:19
Date: Fri, 30 Jun 2017 11:19
64 lines
2203 bytes
2203 bytes
> czyli pewnie baza w ramach rozrostu przerzuca i automatycznie robi nowe pliki Oracle moze sam dodawac pliki jezeli jest ustawiony z opcja Oracle-Managed Files. Zeby sprawdzic czy jest, zobacz takie query w sqlplus: Polacz sie jako sys lub system lub uzytkownik z przywilejem sysdba. >show parameter DB_CREATE_FILE_DEST; Jezeli ten parameter jest pusty, to musisz dodawac pliki sam. Jezeli pokazuje sciezke do istniejacych plikow, jest szansa za Oracle dodaje pliki automatycznie. >Mam pytanie co do bazy oracle 11g i rozmiaru tabel, Jezeli chcesz wiedziec ile masz miejsca na dane w tym systemie to zobacz takie query w sqlplus: Polacz sie jako sys lub system lub uzytkownik z przywilejem sysdba. select a.tablespace_name, round(a.bytes_alloc / 1024 / 1024, 2) megs_alloc, round(nvl(b.bytes_free, 0) / 1024 / 1024, 2) megs_free, round((a.bytes_alloc - nvl(b.bytes_free, 0)) / 1024 / 1024, 2) megs_used, round((nvl(b.bytes_free, 0) / a.bytes_alloc) * 100,2) Pct_Free, 100 - round((nvl(b.bytes_free, 0) / a.bytes_alloc) * 100,2) Pct_used, round(maxbytes/1048576,2) Max from ( select f.tablespace_name, sum(f.bytes) bytes_alloc, sum(decode(f.autoextensible, 'YES',f.maxbytes,'NO', f.bytes)) maxbytes from dba_data_files f group by tablespace_name) a, ( select f.tablespace_name, sum(f.bytes) bytes_free from dba_free_space f group by tablespace_name) b where a.tablespace_name = b.tablespace_name (+) union select h.tablespace_name, round(sum(h.bytes_free + h.bytes_used) / 1048576, 2), round(sum((h.bytes_free + h.bytes_used) - nvl(p.bytes_used, 0)) / 1048576, 2), round(sum(nvl(p.bytes_used, 0))/ 1048576, 2), round((sum((h.bytes_free + h.bytes_used) - nvl(p.bytes_used, 0)) / sum(h.bytes_used + h.bytes_free)) * 100,2), 100 - round((sum((h.bytes_free + h.bytes_used) - nvl(p.bytes_used, 0)) / sum(h.bytes_used + h.bytes_free)) * 100,2), round(max(h.bytes_used + h.bytes_free) / 1048576, 2) from sys.v_$TEMP_SPACE_HEADER h, sys.v_$Temp_extent_pool p where p.file_id(+) = h.file_id and p.tablespace_name(+) = h.tablespace_name group by h.tablespace_name ORDER BY 1; HTH Thomas Olszewicki
Message-ID:
<bd51e69c-7572-4ebd-9cdb-9aaebd2132d6@googlegroups.com>
Path:
polish.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!not-for-mail
References:
<e142cd2e-d3e8-4b20-b4ee-f3ea543d8456@googlegroups.com>