本期来到第一堂的最后3个考点了。
考点4补遗
上一期写的时候忘了说一下application container的官方文档位置,这里补充一下:
oracle database 19c
-> administration
-> multitenant administrator’s guide
-> part iii creating and removing pdbs and application containers
-> 12 creating and removing application containers and seeds
-> part iv administering a multitenant environment
-> 17 administering application containers
考点6:shared server configuration 共享服务配置
- prodcdb支持500个session,并且支持100个共享连接连接:
prodcdb
sqlplus / as sysdba
alter system set processeses=500 scope=spfile;
alter system set shared_server_sessions=100;
-- restart the instance
- 配置prodcdb默认3个dispatcher,最大10个dispatchers:
prodcdb
sqlplus / as sysdba
alter system set dispatchers='(protocol=tcp)(dispatchers=3)';
alter system set max_dispatchers=10;
- 配置prodcdb支持最少10个共享服务进程,最大30个:
prodcdb
sqlplus / as sysdba
alter system set shared_servers=10;
alter system set max_shared_server=30;
考点7:control file management 控制文件管理
- 为prodcdb在$oracle_home/dbs下创建第三个控制文件:
prodcdb
sqlplus / as sysdba
alter system set control_files='/u01/app/oracle/oradata/prodcdb/control01.ctl','/u01/app/oracle/fast_recovery_area/prodcdb/control02.ctl','/u01/app/oracle/product/19.0.0/dbhome_1/dbs/control03.ctl' scope=spfile;
-- 其中'/u01/app/oracle/oradata/prodcdb/control01.ctl','/u01/app/oracle/fast_recovery_area/prodcdb/control02.ctl'为默认控制文件
shut immediate
-- bash
cp /u01/app/oracle/oradata/prodcdb/control01.ctl /u01/app/oracle/product/19.0.0/dbhome_1/dbs/control03.ctl
startup
考点8:managing pluggable databases 管理pdb
- 创建用户user1并确保该用户存在于所有pdb:
prodcdb
sqlplus / as sysdba
alter system set common_user_prefix='' scope=spfile;
shut immediate
startup
alter pluggable database all open;
creater user user1 identified by oracle container=all;
- 创建用户user2,仅存在于pdbprod1中:
prodcdb
sqlplus / as sysdba
alter session set container=pdbprod1;
--or
sqlplus sys/oracle@pdbprod1 as sysdba
create user user2 identified by oracle container=current;
- 在所有pdb中创建角色role1和role2:
alter session set container=cdb$root;
create role role1 container=all;
create role role2 container=all;
- 创建角色role3,仅存在于pdbprod1中:
alter session set container=pdbprod1;
create role role3 container=current;
- 用户user1可以连接到当前所有容器与将来创建的所有容器:
alter session set container=cdb$root;
grant connect to user1 container=all;
--or
grant create session to user1 container=all;
- 角色role1和role2可以在任何容器内创建存储过程,但是role3只能在pdbprod1中创建存储过程:
alter session set container=cdb$root;
grant create procedure to role1 container=all;
grant create procedure to role2 container=all;
alter session set container=pdbprod1;
grant create procedure to role3 container=current;
其他可能考点
- 多路径redo日志文件
alter database add logfile member '/u01/app/oracle/fast_recovery_area/prodcdb/redo01.log' to group 1;
alter database add logfile member '/u01/app/oracle/fast_recovery_area/prodcdb/redo02.log' to group 2;
alter database add logfile member '/u01/app/oracle/fast_recovery_area/prodcdb/redo03.log' to group 3;
- 移动数据文件
-- 12.2开始可以在线移动数据文件
alter database move datafile '/u01/app/oracle/fast_recovery_area/prod4/test.dbf' to '/u01/app/oracle/oradata/prod4.test.dbf';
- 配置em express到5500端口
exec dbms_xdb_config.sethttpport(5500);
select dbms_xdb_config.gethttpport() from dual;
- 将utl目录指向到/home/oracle/scripts,/home/oracle/temp,/home/oracle/files:
alter system set utl_file_dir='/home/oracle/scripts','/home/oracle/temp','/home/oracle/files' scope=spfile;
shut immediate
startup
- 补丁
直接读readme就行了 - dnfs(direct nfs)
这里还是直接po官方文档位置:
oracle database 19c
-> database installation guide for linux
-> 8 configuring file system storage for oracle database
-> deploying oracle direct nfs
其他
- 建议有结余时间开启所有数据库的归档。
- 一般会要求全量冷备,需要通过df -h命令查看路径空间情况,会要求/始终有大于15%可用空间
总结
第一堂的内容基本完成。
老规矩,知道写了些啥。
最后修改时间:2023-07-28 09:47:18
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【米乐app官网下载的版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。