Views & Tables
v$tablespace, v$datafile, v$datafile_copy,v$datafile_header, v$dbfile, v$offline_range, v$tempfile, v$temp_extent_map,
v$temp_extent_pool, v$temp_space_header,v$temp_ping, v$backup, v$recover_file,v$recovery_file_status, v$recovery_log,v$recovery_progress, v$recovery_status,
v$recovery_transactions, v$instance_recovery,
v$fast_start_servers, v$fast_start_transactions,
v$managed_standby, dba_tablespaces, dba_ts_quotas, dba_data_files,
dba_temp_files, dba_segments, dba_extents,
dba_free_space, dba_free_space_coalesced,
dba_free_space_coalesced_tmp[1-3],
ts_pitr_objects_to_be_dropped, ts_pitr_check,
transport_set_violations, dba_dmt_free_space,
dba_dmt_used_extents, dba_lmt_free_space,
dba_lmt_used_extents, pluggable_set_check,
uni_pluggable_set_check, straddling_ts_objects, ext_to_obj_view, ts$, file$, filext$, uet$
fet$, seg$
Parameters
db_block_checking, db_block_checksum,
recovery_parallelism, fast_start_parallel_rollback, db_file_name_convert, log_checkpoint_timeout, log_checkpoints_to_alert,db_writer_processes, db_file_simultaneous_waits,
standby_file_management,read_only_open_delayed
Packages
DBMS_REPAIR
check_object, {skip | fix}_corrupt_blocks,
dump_orphan_keys, rebuild_freelists,
admin_tables,
segment_fix_status
DBMS_SPACE
unused_space, free_blocks,
space_usage
DBMS_SPACE_ADMIN
tablespace_verify, tablespace_{rebuild |
relocate | fix}_bitmaps, tablespace_rebuild_quotas, tablespace_fix_segment_states,
tablespace_migrate_{from | to}_local,
segment_{verify | corrupt | dump |moveblocks
}, segment_drop_corrupt,segment_number_{blocks | extents},
DBMS_TTS
transport_set_check, downgrade
Deprecated Features
fast_start_io_target, log_checkpoint_interval
Desupported Features
db_block_max_dirty_target
, db_file_simultaneous_writes, db_block_checkpoint_batch,
parallel_transaction_recovery
TS Creation
create tablespace <ts>
[
datafile ‘<file>’
]
<< only optional if
DB_CREATE_FILE_DEST is set
[size <n>] [reuse]
[autoextend {off | on [next <n>]
[maxsize {<n> | unlimited} ] } ]
[,’<file>’... [autoextend...] ]
[minimum extent <n>]
[blocksize <n> [k]]
[default storage ( [initial <
5xBS
>]
[next <
5xBS
>] [pctincrease <
50
>]
[minextents <
1
>]
[maxextents {<n> | unlimited} ]
[freelists <
1
>] [freelist groups <
1
>]
[buffer_pool {
default
| keep | recycle} ] )]
[
logging
| nologging]
[
permanent
| temporary] [
online
| offline]
[extent management
{ dictionary |
local
[
autoallocate
| uniform [size <
1m
>]] }]
[segment space management
{
manual
| auto} ]
;
create undo tablespace <ts>
[datafile ‘<file>’... [autoextend...] ]
<< s.a.
[extent management local]
[uniform [size <
1m
>]];
create temporary tablespace <ts>
[
tempfile ‘<file>’... [autoextend...]
]
<< s.a.
[extent management local]
[uniform [size <
1m
>]];
drop tablespace <ts>
[including contents
[and datafiles]
[cascade constraints] ]
TS Modification
alter tablespace <ts> add {datafile | tempfile}
‘<file>’ size <n> [reuse] [autoextend...];
alter tablespace <ts> rename datafile
‘<file>’ [, ...] to ‘<new>’ [, ...];
alter tablespace <ts> { online | offline
[ normal | temporary | immediate
|
for recover
] };
<< deprecated
alter tablespace <ts> { read {write | only}
| permanent | temporary };
alter tablespace <ts> [minimum extent <n>]
default storage (...);
alter tablespace <ts> coalesce;
alter tablespace <ts> {begin | end} backup;
alter database [<db>] datafile <n> [, ...]
end backup
Datafiles
alter system checkpoint [
global
| local];
alter system check datafiles [
global
| local];
alter database [<db>] datafile ‘<file>’ [, ...]
{ resize <n> | autoextend... | online
| offline [drop] | end backup };
alter database [<db>] tempfile ‘<file>’ [, ...]
{ resize <n> | autoextend... | online
| offline | drop
[including datafiles]
};
alter database [<db>] rename file
‘<file>’ [, ...] to ‘<new_file>’ [, ...];
alter database [<db>] create datafile
‘<file>‘ [, ...] [as {
new
| ‘<file>‘ [, ...]} ];
alter system dump datafile ‘<file>’
block min <x> block max <y>;
Recovery
set autorecovery {on | off}
set logsource <dir>
alter database [<db>] recover
[automatic] [from ‘<log_path>‘]
{ { [standby] database
[until { cancel | change <scn>
| time ‘<
YYYY-MM-DD:HH24:MI:SS
>’ }]
[using backup controlfile]
| managed standby database
[
next <n>
| timeout <n> |
delay <n>
|
nodelay
|
expire <n>
| cancel
[immediate]
[nowait]
|
disconnect
[from session] [finish [nowait]]
]
| [standby] tablespace ‘<ts>’ [, ...]
[until [consistent with] controlfile]
| [standby] datafile {‘<file>’ | <n>} [, ...]
[until [consistent with] controlfile]
| logfile ‘<log>’ }
[test [allow <x> corruption] ]
[
noparallel
| parallel [<n>] ]
| continue [default] | cancel };
recover [automatic] [from ‘<log_path>’]
{ database [until { cancel | change <scn>
| time ‘<
YYYY-MM-DD:HH24:MI:SS
>’ }]
[using backup controlfile]
| [managed] standby database
[timeout <n> | cancel [immediate] ]
| [standby] tablespace ‘<ts>’ [, ...]
[until [consistent with] controlfile]
| [standby] datafile {‘<file>’ | <n>} [, ...]
[until [consistent with] controlfile]
| logfile <log>
| continue [default]
| cancel }
[
noparallel
| parallel (degree {<n> | default}
[instances <
1
> | default] )]
Utilities
dbv file=<file>
start=<n> end=<n> logfile=<log>
blocksize=<
2048
> feedback=<
0
>
parfile=<fil> segment_id=<ts.fil.blck>
Blocks
v$type_size
Block header:
static (61B), table directory, row direc
-
tory (2B*rec), interested transaction list
(23B*tx)
Row piece:
overhead, no. of columns, cluster key ID,
rowids of chained row pieces,
col data (col length, col value, ...)
RowID
Logical:
hex string of variable length
Extend(10B):
DataObj#{32b} - RelFile#{10b} -
Block#{22b} - Row#{16b}
Base64
OOOOOO – FFF – BBBBBB – RRR
Restrict(6B):
Block#{Xb} - Row#{Xb} - File#{Xb}
Packages
DBMS_ROWID
(rowid_create, rowid_object, rowid_rela
-
tive_fno, rowid_block_number, ro
-
wid_row_number, rowid_to_absolute_fno,
rowid_to_extended, rowid_to_restricted)
No comments:
Post a Comment