设为首页收藏本站

Botang唐波's Oracle Station

查看: 99|回复: 4

课程第4次(2018-09-27星期四)

[复制链接]

731

主题

1102

帖子

8002

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
8002
发表于 2018-9-27 19:48:02 | 显示全部楼层 |阅读模式
oracleasm的绑定:
Screenshot-station81.example.com:2 (oracle) - TigerVNC.png

上完1Z0-052 第2章 安装软件(2/40)

cloneDBCreation.sql:
  1. SET VERIFY OFF
  2. connect "SYS"/"&&sysPassword" as SYSDBA
  3. set echo on
  4. spool /u01/app/oracle/admin/orcl/scripts/cloneDBCreation.log append
  5. Create controlfile reuse set database "orcl"
  6. MAXINSTANCES 8
  7. MAXLOGHISTORY 1
  8. MAXLOGFILES 16
  9. MAXLOGMEMBERS 3
  10. MAXDATAFILES 100
  11. Datafile
  12. '&&file0',
  13. '&&file1',
  14. '&&file2',
  15. '&&file3'
  16. LOGFILE GROUP 1  SIZE 51200K,
  17. GROUP 2  SIZE 51200K,
  18. GROUP 3  SIZE 51200K RESETLOGS;
  19. select name from v$controlfile;
  20. exec dbms_backup_restore.zerodbid(0);
  21. shutdown immediate;
  22. startup nomount pfile="/u01/app/oracle/admin/orcl/scripts/initorclTemp.ora";
  23. Create controlfile reuse set database "orcl"
  24. MAXINSTANCES 8
  25. MAXLOGHISTORY 1
  26. MAXLOGFILES 16
  27. MAXLOGMEMBERS 3
  28. MAXDATAFILES 100
  29. Datafile
  30. '&&file0',
  31. '&&file1',
  32. '&&file2',
  33. '&&file3'
  34. LOGFILE GROUP 1  SIZE 51200K,
  35. GROUP 2  SIZE 51200K,
  36. GROUP 3  SIZE 51200K RESETLOGS;
  37. alter system enable restricted session;
  38. alter database "orcl" open resetlogs;
  39. exec dbms_service.delete_service('seeddata');
  40. exec dbms_service.delete_service('seeddataXDB');
  41. alter database rename global_name to "orcl.example.com";
  42. set linesize 2048;
  43. column ctl_files NEW_VALUE ctl_files;
  44. select concat('control_files=''', concat(replace(value, ', ', ''','''), '''')) ctl_files from v$parameter where name ='control_files';
  45. host echo &ctl_files >>/u01/app/oracle/admin/orcl/scripts/init.ora;
  46. host echo &ctl_files >>/u01/app/oracle/admin/orcl/scripts/initorclTemp.ora;
  47. ALTER TABLESPACE TEMP ADD TEMPFILE SIZE 20480K AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED;
  48. select tablespace_name from dba_tablespaces where tablespace_name='USERS';
  49. alter system disable restricted session;
  50. connect "SYS"/"&&sysPassword" as SYSDBA
  51. @/u01/app/oracle/product/11.2.0/dbhome_1/demo/schema/mkplug.sql &&sysPassword change_on_install change_on_install change_on_install change_on_install change_on_install change_on_install example.dmp example01.dfb +DATA/orcl/example01.dbf /u01/app/oracle/admin/orcl/scripts/ /u01/app/oracle/product/11.2.0/dbhome_1/assistants/dbca/templates/ "\'SYS/&&sysPassword as SYSDBA\'";
  52. connect "SYS"/"&&sysPassword" as SYSDBA
  53. shutdown immediate;
  54. connect "SYS"/"&&sysPassword" as SYSDBA
  55. startup restrict pfile="/u01/app/oracle/admin/orcl/scripts/initorclTemp.ora";
  56. select sid, program, serial#, username from v$session;
  57. alter database character set INTERNAL_CONVERT AL32UTF8;
  58. alter database national character set INTERNAL_CONVERT AL16UTF16;
  59. alter user sys account unlock identified by "&&sysPassword";
  60. alter user system account unlock identified by "&&systemPassword";
  61. alter system disable restricted session;
复制代码
CreateDB.sql:
  1. SET VERIFY OFF
  2. connect "SYS"/"&&sysPassword" as SYSDBA
  3. set echo on
  4. spool /u01/app/oracle/admin/cust/scripts/CreateDB.log append
  5. startup nomount pfile="/u01/app/oracle/admin/cust/scripts/init.ora";
  6. CREATE DATABASE "cust"
  7. MAXINSTANCES 8
  8. MAXLOGHISTORY 1
  9. MAXLOGFILES 16
  10. MAXLOGMEMBERS 3
  11. MAXDATAFILES 100
  12. DATAFILE SIZE 700M AUTOEXTEND ON NEXT  10240K MAXSIZE UNLIMITED
  13. EXTENT MANAGEMENT LOCAL
  14. SYSAUX DATAFILE SIZE 600M AUTOEXTEND ON NEXT  10240K MAXSIZE UNLIMITED
  15. SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE SIZE 20M AUTOEXTEND ON NEXT  640K MAXSIZE UNLIMITED
  16. SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE SIZE 200M AUTOEXTEND ON NEXT  5120K MAXSIZE UNLIMITED
  17. CHARACTER SET AL32UTF8
  18. NATIONAL CHARACTER SET AL16UTF16
  19. LOGFILE GROUP 1  SIZE 512000K,
  20. GROUP 2  SIZE 512000K,
  21. GROUP 3  SIZE 512000K
  22. USER SYS IDENTIFIED BY "&&sysPassword" USER SYSTEM IDENTIFIED BY "&&systemPassword";
  23. set linesize 2048;
  24. column ctl_files NEW_VALUE ctl_files;
  25. select concat('control_files=''', concat(replace(value, ', ', ''','''), '''')) ctl_files from v$parameter where name ='control_files';
  26. host echo &ctl_files >>/u01/app/oracle/admin/cust/scripts/init.ora;
  27. spool off
复制代码

22.png


上完1Z0-052 第3章 建库(3/40)
回复

使用道具 举报

1

主题

9

帖子

61

积分

注册会员

Rank: 2

积分
61
发表于 2018-9-29 16:30:36 | 显示全部楼层
老师,想咨询下。通过oracleasm createdisk创建的磁盘,与通过udev创建的磁盘有什么区别。
回复 支持 反对

使用道具 举报

731

主题

1102

帖子

8002

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
8002
 楼主| 发表于 2018-9-29 17:01:39 | 显示全部楼层
jarlean 发表于 2018-9-29 16:30
老师,想咨询下。通过oracleasm createdisk创建的磁盘,与通过udev创建的磁盘有什么区别。

udev绑定分区设备号完成后,还是要用oracleasm接着做oracle的绑定。
回复 支持 反对

使用道具 举报

1

主题

9

帖子

61

积分

注册会员

Rank: 2

积分
61
发表于 2018-9-29 17:21:41 | 显示全部楼层
botang 发表于 2018-9-29 17:01
udev绑定分区设备号完成后,还是要用oracleasm接着做oracle的绑定。

嗯,还想再问下,接着做oracle的绑定的理解。意思是udev绑定分区后,接着做绑定到asm的磁盘组操作(create diskgroup DG1 normal redundancy disk '/dev/raw/raw6','/dev/raw/raw7')吗?还是说在start_udev之后,create diskgroup之前还需要再做什么操作?
回复 支持 反对

使用道具 举报

731

主题

1102

帖子

8002

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
8002
 楼主| 发表于 2018-10-4 16:51:42 | 显示全部楼层
jarlean 发表于 2018-9-29 17:21
嗯,还想再问下,接着做oracle的绑定的理解。意思是udev绑定分区后,接着做绑定到asm的磁盘组操作(creat ...

不用raw,使用oracleasmlib的绑定。在udev之后就直接oracleasmlib。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Botang唐波's Oracle Station   

GMT+8, 2018-10-22 03:14 , Processed in 0.172234 second(s), 26 queries .

快速回复 返回顶部 返回列表