Sie sind auf Seite 1von 2

Oracle Database Commands and Queries:1 .

T o v i e w a l l
the table from dictionary
: SQL> select table_name from dictionary;

2 . To i d e n t i f y t h e d a t a b a s e n a m e :
SQL> select name from v$database;
3 . T o i d e n t i f y t h e i n s t a n c e n a m e : SQL>
select instance from
v$thread;4 . T o k n o w t h e s i z e o f t h e d a t a b a s e
b l o c k s : SQL> select value from v$parameter where name
=’db_block_size’;5 . L i s t t h e n a m e o f t h e
d a t a f i l e s : SQL> select name from
v$datafile;6 . I d e n t i f y t h e d a t a f i l e t h a t m a k e s u p
t h e s y s t e m t a b l e s p a c e : SQL> select file_name from
dba_data_files where tablespace_name = ‘SYSTEM’;7 . To
c heck how mu ch f ree s p ace is a vaila ble in
dat aba se and h ow m uch is
u s e d: SQL>select sum(bytes)/1024 “free space in KB” from
dba_free_space;SQL>select sum(bytes)/1024 “used space in
KB” from dba_segments”;8 . L i s t t h e n a m e a n d
c r e a t i o n d a t e o f d a t a b a s e u s e r s : SQL>select
username, created from dba_users;9 . W h e r e i s t h e
existing Control file located and what is the
n a m e ? SQL> select * from v$controlfile; OR SQL> show
parameter controlSQL> select name from
v$controlfile;10.What is the initial sizing of the
datafile section in your control file?SQL>select
records_total from v$controlfile_record_sectionwhere type =
“DATAFILE”;11. Li st t he num be r and loc at ion of
e xis ti ng l og f i l es ? SQL> select member from
v$logfile;12.Display the number of redo log file groups
and members your database has ?SQL>select group#,
members, status from
v$log;13. In w hich da tab as e mode i s
your dat abas e con f i gur ed? SQL> select log_mode from
v$database; 1 4 . I s a r c h i v i n g e n a b l e d ?
SQL>select archiver from v$instance;1 5 . T o v i e w a l l
t h e t a b l e s p a c e s n a m e ? SQL>select
tablespace_name from dba_tablespaces;16. Id ent ify t he
di f f e re nt ty pe s of s egmen ts in t he
da t ab as e . SQL>select DISTINCT segment_type from
dba_segments;

Das könnte Ihnen auch gefallen