1. Loader
set NLS_LANG=AMERICAN_AMERICA.CL8MSWIN1251
sqlldr user/passwd@cet1 control=load.ctl data=tab1.txt
LOAD DATA
APPEND
INTO TABLE domain.cc_tmp
FIELDS TERMINATED BY X'9'
(
cname,
ccode
)
2. Datapump
expdp user/password TABLES=zone_stats,zone_stat_name DUMPFILE=DATA_PUMP_DIR1:zs010311.dmp NOLOGFILE=y
!! в dba_directories должна быть DATA_PUMP_DIR1
(create directory DATA_PUMP_DIR1 as '/dump')
impdp user/password DUMPFILE=DATA_PUMP_DIR1:zs010311.dmp NOLOGFILE=y CONTENT=DATA_ONLY
impdp user/password directory=DATA_PUMP_DIR1 dumpfile=samples_022016.dmp tables=user.sample remap_table=user.sample:sample_imp1 content=data_only
3. Свободное место во временном табличном пространстве
SELECT A.tablespace_name tablespace, D.mb_total,
SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_used,
D.mb_total - SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_free
FROM v$sort_segment A,
(
SELECT B.name, C.block_size, SUM (C.bytes) / 1024 / 1024 mb_total
FROM v$tablespace B, v$tempfile C
WHERE B.ts#= C.ts#
GROUP BY B.name, C.block_size
) D
WHERE A.tablespace_name = D.name
GROUP by A.tablespace_name, D.mb_total;
4. Загрузка jar в базу
loadjava -verbose -user user/password commons-compress-1.1.jar
5. Сохранение spfile и controlfile
create pfile='/ebs/proddb/11.1.0/dbs/init_prod.ora' from memory;
ALTER DATABASE BACKUP CONTROLFILE TO TRACE as '<файл>';
ALTER DATABASE BACKUP CONTROLFILE TO '/disk1/backup/cf.bak'
|