簡單介紹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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 手工建庫完成過程
- windows 上的手工建庫過程 (原創)Windows
- 手工建立oracle資料庫的過程Oracle資料庫
- 不使用dbca進行手工建庫的過程
- new運算子作用域建構函式建立物件的過程簡單介紹函式物件
- 【oracle手工建庫】Oracle
- oracle手工建庫Oracle
- ORACLE SEQUENCE的簡單介紹Oracle
- 瀏覽器渲染頁面過程簡單介紹瀏覽器
- oracle lob 簡單介紹Oracle
- Oracle鎖簡單介紹Oracle
- ORACLE 鎖簡單介紹Oracle
- oracle 10 手工建庫Oracle
- Oracle 9 手工建庫Oracle
- Oracle手工建庫指南Oracle
- Oracle 19c RAC打補丁過程避坑指南Oracle
- [轉]Oracle資料庫ASH和AWR的簡單介紹Oracle資料庫
- Oracle 鎖簡單介紹(轉)Oracle
- Oracle鎖簡單介紹(轉)Oracle
- centos 6.7下靜默安裝oracle 11.2.0.4 RAC的簡單介紹CentOSOracle
- Oracle 9 手工建庫(轉)Oracle
- 簡單介紹oracle重置序列的方法Oracle
- oracle建庫過程詳解Oracle
- javascript方法過載簡單介紹JavaScript
- LGnn 程式介紹(oracle 19c)GNNOracle
- jQuery建構函式簡單介紹jQuery函式
- Oracle RAC 概念介紹Oracle
- oracle 11g手工建庫Oracle
- Oracle 10g手工建庫Oracle 10g
- oracle-手工建庫指令碼Oracle指令碼
- Oracle10g 手工建庫Oracle
- ORACLE建庫過程與操作(轉)Oracle
- Linux運維學習過程中,磁碟的磁軌簡單介紹Linux運維
- js Date()建構函式簡單介紹JS函式
- 【手工建庫】手工方式建立 ORACLE資料庫全程記錄Oracle資料庫
- javascript建構函式的繼承簡單介紹JavaScript函式繼承
- Maven簡單介紹——必要的Java管理與構建MavenJava
- 透過oracle的指令碼研究其建庫過程Oracle指令碼