培训
1.DCP培训一共4天,培训期间主要培训的是考试内容,老师讲的非常详细,涉及的考点很多,会上如果记不住可以下来看录播几倍回放,课后每天的练习很重要,必须要上手实操并且只要认真听讲,并事后多加练习,基本考试都能过
理论考试
2.关于理论考试总共有200道题涉及单选、多选以及判断题,在考前有模拟考试,总共4套题,每套可以练习3次,如果次数用完可以找老师增加次数,只要勤加练习,考试基本也是没问题的
机试
3.关于机试,这个千万要注意的一点是,手速问题! 机试总共4个小时,看起来挺充裕,但在机试过程中是不能复制粘贴的,全程都是自己敲代码,最后一题还会涉及主备集群的安装,合理安排时间很重要,否则到最后有可能会做不完!另外能用图形界面做的尽量都用图形界面来操作,节约时间
考点
初始化实例--->创建表空间及用户--->分区表--->外部表(查一下数据是否存在)--->dmfldr数据导入--->序列--->物化视图--->审计(注意验证)--->索引(普通索引、分区索引、全文索引)---优化---权限管理、用户资源管理--->会修改参数--->备份还原--->作业--->集群搭建配置(主时主备)
简单练习相关:
分区表:
1范围分区
create tablespace TEST datafile '/dm8/data/DAMENG/TEST01.DBF' size 512;
create user TEST IDENTIFIED BY aiNI1995 DEFAULT TABLESPACE TEST;
CREATE TABLE TEST.T1
(
"ID" INT,
"NAME" VARCHAR(20)
)
PARTITION BY RANGE ("ID")
(
PARTITION "P1" VALUES LESS THAN(100),
PARTITION "P2" VALUES LESS THAN(200),
PARTITION "P3" VALUES LESS THAN(300)
)
STORAGE(INITIAL 1,NEXT 1,MINEXTENTS 1,FILLFACTOR 0)
;
begin
FOR i IN 1..299 LOOP
insert INTO TEST.T1 VALUES(i,'eeee'||i);
COMMIT;
END LOOP;
end;
insert INTO TEST.T1 VALUES(300,'aaa');
alter TABLE TEST.T1 ADD PARTITION pn VALUES LESS THAN (MAXVALUE);
create TABLESPACE tbs1 DATAFILE '/dm8/data/DAMENG/tbs01.DBF' size 64;
create TABLESPACE tbs2 DATAFILE '/dm8/data/DAMENG/tbs02.DBF' size 64;
create TABLESPACE tbs3 DATAFILE '/dm8/data/DAMENG/tbs03.DBF' size 64;
create TABLESPACE tbs4 DATAFILE '/dm8/data/DAMENG/tbs04.DBF' size 64;
create table test.t2
(
"ID" int,
"NAME" varchar(20)
)
partition by RANGE ("ID")
(
PARTITION "P1" VALUES LESS THAN(100) STORAGE (INITIAL 1,NEXT 1,MINEXTENTS 1,FILLFACTOR 0,on "TBS1"),
PARTITION "P2" VALUES LESS THAN(200) STORAGE (INITIAL 1,NEXT 1,MINEXTENTS 1,FILLFACTOR 0,on "TBS2"),
PARTITION "P3" VALUES LESS THAN(300) STORAGE (INITIAL 1,NEXT 1,MINEXTENTS 1,FILLFACTOR 0,on "TBS3"),
PARTITION "pn" VALUES LESS THAN(MAXVALUE) STORAGE (INITIAL 1,NEXT 1,MINEXTENTS 1,FILLFACTOR 0,on "TBS4")
)
storage (INITIAL 1,NEXT 1,MINEXTENTS 1,fillfactor 0)
;
create table test.t3
(
"ID" int,
"NAME" varchar(20)
)
partition by RANGE ("ID")
(
PARTITION "P1" VALUES LESS THAN(100) STORAGE (INITIAL 1,NEXT 1,MINEXTENTS 1,FILLFACTOR 0,on "TBS1"),
PARTITION "P2" VALUES LESS THAN(200) STORAGE (INITIAL 1,NEXT 1,MINEXTENTS 1,FILLFACTOR 0,on "TBS2"),
PARTITION "P3" VALUES LESS THAN(300) STORAGE (INITIAL 1,NEXT 1,MINEXTENTS 1,FILLFACTOR 0,on "TBS3"),
PARTITION "pn" VALUES LESS THAN(MAXVALUE) STORAGE (INITIAL 1,NEXT 1,MINEXTENTS 1,FILLFACTOR 0,on "TBS4")
)
storage (INITIAL 1,NEXT 1,MINEXTENTS 1,fillfactor 0 ,NOBRANCH)
;
---2列表分区
---'北京','天津', '哈尔滨','青岛'
---'上海','南京','杭州'
---'武汉','长沙','合肥'
---'广州','深圳','福建'
---'西安'
create table TEST.t_sales(sales_id INT,saleman VARCHAR,saledata DATE,city CHAR(10))
partition by LIST(city)
(partition P1 values ('北京','天津', '哈尔滨','青岛'),
PARTITION P2 VALUES ('上海','南京','杭州'),
PARTITION P3 VALUES ('武汉','长沙','合肥'),
PARTITION P4 VALUES ('广州','深圳','福建'));
insert INTO TEST.T_SALES values (1,'aaaa','2022-04-18','北京');
commit;
insert INTO TEST.T_SALES values (2,'ccccc','2022-03-18','西安');
alter table TEST.T_SALES ADD PARTITION PN VALUES(DEFAULT);
---3哈希分区
create TABLE TEST.t4
(ID int,
NAME varchar(20)
)
partition by HASH(ID)
(
PARTITION "P1",
PARTITION "P2",
PARTITION "P3",
PARTITION "P4"
);
create TABLE TEST.HASH1
(ID int,
NAME varchar(20)
)
partition by HASH(ID) PARTITIONS 10;
---4组合分区
create TABLE TEST.sales_sum(id int,name varchar(20),sale_date DATE,city CHAR(10))
partition by LIST(city)
SUBPARTITION BY RANGE(sale_date)
SUBPARTITION TEMPLATE(
SUBPARTITION P11 VALUES less THAN ('2012-04-01'),
SUBPARTITION P12 VALUES less THAN ('2013-04-01'),
SUBPARTITION P13 VALUES less THAN (maxvalue))
(
PARTITION P1 VALUES ('北京','天津', '哈尔滨','青岛')
(SUBPARTITION P1_1 values less than ('2012-08-01'),
SUBPARTITION P1_2 values less than ('2013-08-01'),
SUBPARTITION P1_3 values less than (maxvalue)),
PARTITION P2 VALUES ('上海','南京','杭州'),
PARTITION P3 VALUES ('武汉','长沙','合肥'),
PARTITION P4 VALUES ('广州','深圳','福建')
);
insert into TEST.SALES_SUM VALUES(1,'aaaaa','2012-05-01','北京');
insert into TEST.SALES_SUM VALUES(2,'bbbbbb','2012-06-01','武汉');
commit;
---5间隔分区
create TABLE TEST.R10_INTERVAL_YEAR
(ID int,NAME VARCHAR(20),BIR DATE)
partition by RANGE(BIR)
INTERVAL(numtoyminterval(1,'YEAR'))
(
partition P1990 VALUES LESS THAN (to_date('1991-01-01','YYYY-MM-DD')),
partition P1991 VALUES LESS THAN (to_date('1992-01-01','YYYY-MM-DD')),
partition P1992 VALUES LESS THAN (to_date('1993-01-01','YYYY-MM-DD'))
);
INSERT INTO TEST.R10_INTERVAL_YEAR VALUES(3,'EEE','1989-03-02');
INSERT INTO TEST.R10_INTERVAL_YEAR VALUES(4,'ffffff','1991-03-02');
INSERT INTO TEST.R10_INTERVAL_YEAR VALUES(7,'UIOULIU','1994-07-02');
commit;
----6分区表维护
---相关的数据字典: dba_tab_partition
select * from SYS.DBA_TAB_PARTITIONS where DBA_TAB_PARTITIONS.TABLE_OWNER='test';
alter TABLE TEST.t1 ADD PARTITION pn VALUES LESS THAN (MAXVALUE);
alter TABLE test.T1 DROP PARTITION pn;
alter TABLE TEST.R10_INTERVAL_YEAR drop PARTITION SYS_p1147_1151;
alter table TEST.T1 MERGE PARTITIONS p2,p3 INTO PARTITION p2_3;
alter TABLE test.T1 SPLIT PARTITION p2_3 AT(200) INTO (PARTITION p2,PARTITION p3);
create TABLE TEST.t10 (ID int,NAME VARCHAR(20));
alter TABLE TEST.T1 EXCHANGE PARTITION P1 WITH TABLE TEST.T10;
select * from test.t10;
create table test.t20(id int);
begin
for i in 1..10000 loop
insert into test.t20 values(i);
end loop;
commit;
end;
drop TABLE TEST.t20;
create TABLE TEST.t20 (id int)
partition by RANGE(id)
(
PARTITION p1 values LESS THAN (1000),
PARTITION p2 values LESS THAN (2000),
PARTITION p3 values LESS THAN (3000),
PARTITION p4 values LESS THAN (4000),
PARTITION p5 values LESS THAN (5000),
PARTITION p6 values LESS THAN (6000),
PARTITION p7 values LESS THAN (7000),
PARTITION pn values LESS THAN (maxvalue)
);
select * from TEST.t20;
二、外部表
create EXTERNAL TABLE TEST.ext (id int,name VARCHAR(20)) from '/dm8/a.ctl';
select * from TEST.EXT;
create EXTERNAL TABLE TEST.ext2 (c1 int,c2 int,c3 int) from DATAFILE '/dm8/b.txt' PARMS(fields delimited by '|');
三、临时表
---1、事务级别: on commit detele rows
create GLOBAL TEMPORARY TABLE TEST.tmp_01(id int) ON COMMIT DELETE ROWS;
insert into test.tmp_01 values(1);
insert into test.tmp_01 values(2);
insert into test.tmp_01 values(3);
commit;
select * from TEST.TMP_01;
---2、会话级别的临时表 on commit preserve rows
create GLOBAL TEMPORARY TABLE TEST.tmp_02(id int) on COMMIT PRESERVE ROWS;
select para_name,para_value from v$dm_ini WHERE "V$DM_INI".PARA_NAME LIKE '%TEMP%';
SP_SET_PARA_VALUE(2,'TEMP_SIZE',20);
sp_trunc_ts_file(3,0,10);
select TABLESPACE_NAME, FILE_NAME, BYTES/1024/1024 from
dba_data_files where tablespace_name='TEMP';
四、序列
---序列:在内存预先申请的一段地址空间,类似于取号排
CREATE SEQUENCE "TEST"."s1" INCREMENT BY 2 START WITH 1 MAXVALUE 10 MINVALUE 1;
五、同义词
create SYNONYM TEST.SY1 FOR TEST.T1;
create PUBLIC SYNONYM SY2 FOR TEST.EXT;
六、视图
CREATE VIEW TEST.V1 AS SELECT employee_id,employee_name FROM DMHR.EMPLOYEE;
CREATE VIEW TEST.V2 AS
SELECT d.department_name, a.av1
FROM (select department_id,AVG( salary) as av1
FROM dmhr.EMPLOYEE e GROUP BY DEPARTMENT_ID having
avg(salary)>10000) a
join DMHR.DEPARTMENT d ON a.DEPARTMENT_ID=d.DEPARTMENT_ID;
---物化视图
create MATERIALIZED VIEW TEST.MV1 AS SELECT * FROM TEST.T1;
create MATERIALIZED VIEW TEST.MV2 AS SELECT * FROM TEST.T1 WHERE id >200;
CREATE MATERIALIZED VIEW LOG ON TEST.T1;---日志
CREATE MATERIALIZED VIEW TEST.MV3 REFRESH COMPLETE ON COMMIT AS SELECT * FROM TEST.T1;---自动更新
CREATE MATERIALIZED VIEW TEST.MV3 REFRESH FAST ON COMMIT AS SELECT * FROM TEST.T1;---自动更新
七、索引
---唯一索引
create UNIQUE INDEX ind_t2 ON TEST.t2(ID) TABLESPACE ind;
---函数索引
create INDEX ind_tmp ON TEST.TMP(UPPER(email)) TABLESPACE ind;
---复合索引
create INDEX IND_TMP1 on TEST.TMP (EMPLOYEE_ID,employee_name);
---位图索引
create BITMAP INDEX ind_t2 ON TEST.T2(SEX);
---索引维护
alter INDEX TEST.IND_TMP REBUILD;
alter INDEX TEST.IND_TMP1 REBUILD ONLINE;
drop INDEX TEST.IND_TMP1;
---分区索引
create INDEX ind_sale2 ON TEST.SALE2(SALE2.ID);
create INDEX ind_sale3 ON TEST.SALE2(SALE2.NAME) GLOBAL STORAGE(INITIAL 1,NEXT 1,MINEXTENTS 1,on ind);
---全文索引
create CONTEXT INDEX cti_ad on PERSON.address(ADDRESS1) LEXER default_lexer;
---执行计划
explain select * from TEST.T1;
八、审计
---审计---使用审计用户
sp_set_enable_audit(2);---0,1,2
sp_set_enable_audit(0);---0,1,2
sp_audit_stmt('table','test','all');---语句级别-表,用户,all,successful,fail
sp_noaudit_stmt('table','test','all');
sp_audit_objecit('UPDATE','test','test','emp','salary','all');---对象级别
sp_noaudit_objecit('UPDATE','test','test','emp','salary','all');
---select username,operation,sql_text form v$auditrecords;
腾科教育是华为授权的培训合作伙伴,专业提供华为ICT技术架构认证、平台与服务认证、行业服务认证等华为职业认证服务,连续多年荣获华为年度最佳合作伙伴贡献奖、华为优秀战略合作伙伴、上海HCIE精英俱乐部伙伴,连续多年举办腾科技术嘉年华华为专场,并协办华为ICT大赛、华为生态伙伴精英赛伙伴赛分赛场、华为人才双选会上海场等活动和赛事,提供面向华为生态合作伙伴和ICT学员的人才供需双选平台及ICT学员就业通道,培养ICT行业所需创新型、融合型人才。
腾科教育是华为优秀战略合作伙伴、红帽交付培训合作伙伴、思科优秀合作伙伴、红帽年度优秀合作伙伴等,每年协办华为、红帽等厂商技术大赛,定期举办各种技术峰会等技术交流活动。同时也是培生集团(Pearson VUE)与Prometric(普尔文)两大全球国际考试中心授权的双国际电子考试中心,提供一站式ICT认证考试服务,十年来专注于为考生提供包括华为,思科,红帽,Oracle,VMware,ITIL,微软,Citrix等数千种ICT认证考试服务,每年通过腾科教育培训并参加HCIE(华为认证专家)、RHCA(红帽认证架构师)等高级职业认证考试的学员,其通过率高达94.32%。