搜尋此網誌

星期日, 3月 08, 2009

如何將備份的partition table 還原至現有的table中

如何exp table 中特定的partition

例:將toyman中,fe_tb_cm_session_hist中,partition name為CM_SES_HIST_200812
fe_tb_cm_session_comm_hist中,partition name為CM_SES_COMM_HIST_200812
exp system FILE =toyman-p1.dmp TABLES = toyman.fe_tb_cm_session_hist:CM_SES_HIST_200812,toyman.fe_tb_cm_session_comm_hist:CM_SES_COMM_HIST_200812

我們將12月份的partition export 出來後,必須先在原先的table 中新增partition 為12月份的
不過由於partition table 不能新增一個舊時間的partition, 因此必須利用split partition指令來分割。

ALTER TABLE toyman.FE_TB_CM_SESSION_HIST
SPLIT PARTITION CM_SES_HIST_200901 AT
(TO_DATE(' 2009-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
INTO (PARTITION CM_SES_HIST_200812,
PARTITION CM_SES_HIST_200901);

最後再以imp 的方式將data import 至資料庫

imp system FILE =toyman-p1.dmp TABLES = toyman.fe_tb_cm_session_hist:CM_SES_HIST_200812,toyman.fe_tb_cm_session_comm_hist:CM_SES_COMM_HIST_200812 IGNORE=y

此例中的index 是partition local index, 如果是global index 請記得重新compiler.

星期三, 3月 04, 2009

Oracle DB parameter for OS dependence

###########################################

# for HP-UX DB server only

###########################################

filesystemio_options=setall

hpux_sched_noage=178




This Doc will be continue updated.