簡單介紹Oracle 19c RAC 手工建庫的過程
導讀 | 這篇文章主要介紹了Oracle 19c RAC 手工建庫搭建過程,本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑑價值,需要的朋友可以參考下 |
資料庫環境:
資料庫版本(RU): 19.10
GRID_HOME: /u01/app/19.0.0/grid ORACLE_HOME: /u01/app/oracle/product/19.0.0/db_1 DB_NAME: orcl
1.建立adump目錄(每個節點執行)
mkdir -p /u01/app/oracle/admin/orcl/adump
2.修改$ORACLE_HOME/bin/oracle檔案許可權(每個節點執行)
/u01/app/19.0.0/grid/bin/setasmgidwrap o=/u01/app/oracle/product/19.0.0/db_1/bin/oracle
3.建立密碼檔案,新增資料庫到叢集資源中
/u01/app/oracle/product/19.0.0/db_1/bin/srvctl add database -d orcl -pwfile +DG_DATA/ORCL/orapworcl -o \ /u01/app/oracle/product/19.0.0/db_1 -n orcl -a "DG_DATA" (此處與上面為同一行) /u01/app/oracle/product/19.0.0/db_1/bin/srvctl add instance -d orcl -i orcl1 -n ora19c-rac1 /u01/app/oracle/product/19.0.0/db_1/bin/srvctl add instance -d orcl -i orcl2 -n ora19c-rac2 /u01/app/oracle/product/19.0.0/db_1/bin/srvctl disable database -d orcl /u01/app/oracle/product/19.0.0/db_1/bin/orapwd file=+DG_DATA/ORCL/orapworcl force=y format=12 dbuniquename=orcl password=Oracle321#
4.編輯臨時初始化引數檔案init.ora(根據實際需要新增需要調整的引數)
vi /home/oracle/init.ora db_block_size=8192 open_cursors=300 db_name="orcl" control_files=("+DG_DATA/ORCL/control01.ctl", "+DG_DATA/ORCL/control02.ctl") compatible=19.0.0 diagnostic_dest=/u01/app/oracle nls_language="AMERICAN" nls_territory="AMERICA" processes=500 sga_target=1398m audit_file_dest="/u01/app/oracle/admin/orcl/adump" audit_trail=db remote_login_passwordfile=exclusive pga_aggregate_target=467m undo_tablespace=UNDOTBS1 family:dw_helper.instance_mode=read-only orcl1.instance_number=1 orcl2.instance_number=2 orcl1.thread=1 orcl2.thread=2 orcl1.undo_tablespace=UNDOTBS1 orcl2.undo_tablespace=UNDOTBS2
5.啟動例項到nomount狀態,建立資料庫(根據實際需要設定檔案大小,和日誌組數量與大小)
sqlplus / as sysdba startup nomount pfile="/home/oracle/init.ora"; CREATE DATABASE "orcl" MAXINSTANCES 32 MAXLOGHISTORY 1 MAXLOGFILES 192 MAXLOGMEMBERS 3 MAXDATAFILES 1024 DATAFILE '+DG_DATA/ORCL/system01.dbf' SIZE 700M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SYSAUX DATAFILE '+DG_DATA/ORCL/sysaux01.dbf' SIZE 550M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '+DG_DATA/ORCL/temp01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE '+DG_DATA/ORCL/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED CHARACTER SET AL32UTF8 NATIONAL CHARACTER SET AL16UTF16 LOGFILE GROUP 1 ('+DG_DATA/ORCL/redo01.log') SIZE 300M, GROUP 2 ('+DG_DATA/ORCL/redo02.log') SIZE 300M USER SYS IDENTIFIED BY "Oracle321#" USER SYSTEM IDENTIFIED BY "Oracle321#";
6.建立UNDOTBS2和USERS表空間,並設定USERS表空間為資料庫預設表空間
CREATE SMALLFILE UNDO TABLESPACE "UNDOTBS2" DATAFILE '+DG_DATA/ORCL/undotbs02.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED; CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE '+DG_DATA/ORCL/users01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO; ALTER DATABASE DEFAULT TABLESPACE "USERS";
7.建立資料字典 vi createCatalog.sql
set echo on spool /home/oracle/CreateDBCatalog.log append @/u01/app/oracle/product/19.0.0/db_1/rdbms/admin/catalog.sql; @/u01/app/oracle/product/19.0.0/db_1/rdbms/admin/catproc.sql; @/u01/app/oracle/product/19.0.0/db_1/rdbms/admin/catoctk.sql; @/u01/app/oracle/product/19.0.0/db_1/rdbms/admin/owminst.plb; connect "SYSTEM"/"Oracle321#" @/u01/app/oracle/product/19.0.0/db_1/sqlplus/admin/pupbld.sql; connect "SYS"/"Oracle321#" as SYSDBA @/u01/app/oracle/product/19.0.0/db_1/sqlplus/admin/pupdel.sql; connect "SYSTEM"/"Oracle321#" spool off set echo on spool /home/oracle/sqlPlusHelp.log append @/u01/app/oracle/product/19.0.0/db_1/sqlplus/admin/help/hlpbld.sql helpus.sql; spool off @createCatalog.sql
8.建立cluster資料字典
set echo on spool /home/oracle/CreateClustDBViews.log append @/u01/app/oracle/product/19.0.0/db_1/rdbms/admin/catclust.sql; spool off
9.執行datapatch ,新增thread 2日誌組並啟用thread 2 (根據實際需要設定日誌組數量與大小)
SET VERIFY OFF spool /home/oracle/postDBCreation.log append host /u01/app/oracle/product/19.0.0/db_1/OPatch/datapatch -skip_upgrade_check ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 3 ('+DG_DATA/ORCL/redo03.log') SIZE 300M, GROUP 4 ('+DG_DATA/ORCL/redo04.log') SIZE 300M; ALTER DATABASE ENABLE PUBLIC THREAD 2; host echo cluster_database=true >>/home/oracle/init.ora; connect "SYS"/"Oracle321#" as SYSDBA set echo on create spfile='+DG_DATA/ORCL/spfileorcl.ora' FROM pfile='/home/oracle/init.ora'; connect "SYS"/"Oracle321#" as SYSDBA select 'utlrp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual; @/u01/app/oracle/product/19.0.0/db_1/rdbms/admin/utlrp.sql; select 'utlrp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual; select comp_id, status from dba_registry; shutdown immediate; host /u01/app/oracle/product/19.0.0/db_1/bin/srvctl enable database -d orcl; host /u01/app/oracle/product/19.0.0/db_1/bin/srvctl start database -d orcl; spool off exit;
10.新增資料庫例項資訊到/etc/oratab檔案中
vi /etc/oratab orcl1:/u01/app/oracle/product/19.0.0/db_1:N ##節點1新增 orcl2:/u01/app/oracle/product/19.0.0/db_1:N ##節點2新增
到此這篇關於Oracle 19c RAC 手工建庫的文章就介紹到這了
原文來自:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69955379/viewspace-2854938/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 19c RAC打補丁過程避坑指南Oracle
- 手工清理19c RAC環境
- Oracle:RAC 程式簡介Oracle
- [轉]Oracle資料庫ASH和AWR的簡單介紹Oracle資料庫
- 簡單介紹oracle重置序列的方法Oracle
- 【BUILD_ORACLE】Oracle 19c RAC搭建(六)建立RAC資料庫UIOracle資料庫
- oracle 19c&21c 單機/RAC手工清理Oracle
- LGnn 程式介紹(oracle 19c)GNNOracle
- 【RAC】Oracle RAC上線測試場景介紹Oracle
- Oracle RAC簡介與要點Oracle
- Linux運維學習過程中,磁碟的磁軌簡單介紹Linux運維
- Oracle搭建rac到單庫的adgOracle
- ORACLE RAC TO RAC DG搭建過程中可能遇到的問題Oracle
- Oracle RAC DRM介紹和關閉DRMOracle
- 簡單介紹標準庫fmt的基本使用
- Maven簡單介紹——必要的Java管理與構建MavenJava
- 在青雲上部署oracle rac全過程Oracle
- Oracle10g SQL tune adviser簡單介紹OracleSQL
- Webpack 的簡單介紹Web
- AOP的簡單介紹
- Oracle:Oracle RAC 11.2.0.4 升級為 19cOracle
- Oracle:19c 新特性——Memoptimized Rowstore 簡介OracleZed
- Oracle 19c RAC INS-40724Oracle
- form表單的簡單介紹ORM
- Flownet 介紹 及光流的簡單介紹
- 簡單介紹如何使用Bazel構建Golang程式Golang
- G003-ORACLE-INS-RAC-01 ORACLE 19C RAC Ins ON OEL 7.8Oracle
- RPC簡單介紹RPC
- Python簡單介紹Python
- KVM簡單介紹
- RMI簡單介紹
- HTML簡單介紹HTML
- HTML 簡單介紹HTML
- JavaScript 簡單介紹JavaScript
- CSS 簡單介紹CSS
- ajax簡單介紹
- SVG簡單介紹SVG
- Clickjacking簡單介紹