DM8壓縮表 0、結論 行表(普通表)不支持壓縮。但是語法支持。建表之後,查詢到的占用空間會比普通表小一半。 經過測試,裝10萬數據(兩個欄位),壓縮的、未壓縮,占用空間一樣大。 列表(huge表)支持壓縮。可以壓縮表(就是壓縮所有列),也可以選擇壓縮列。但是建表的時候就要設置,否則建好表之後修改不 ...
今天嘗試創建了一個RAC環境的PDB資料庫,在本地執行alter pluggable database pdb01 open 成功了,但是使用上去了plus連接還是連接不上,提示錯誤如下:
C:\Users\Administrator>sqlplus system/[email protected]:1521/pdb01 SQL*Plus: Release 19.0.0.0.0 - Production on 星期日 11月 19 08:39:09 2023 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. ERROR: ORA-01109: database not open
依次檢查配置:
1.手工啟動pdb資料庫
[oracle@mesdb01 ~]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Sun Nov 19 10:25:39 2023 Version 19.15.0.0.0 Copyright (c) 1982, 2022, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.15.0.0.0 SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB01 MOUNTED SQL> alter pluggable database pdb01 open; Pluggable database altered. SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB01 READ WRITE NO SQL>
2.在Oracle用戶下的tnsnames.ora文件添加了監聽:
[oracle@mesdb01 ~]$ cd $ORACLE_HOME/network/admin [oracle@mesdb01 admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /oracle/product/19.0.0/db_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. MESDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = mesdb-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mesdb) ) ) pdb01 = (DESCRIPTION = (ADDRESS = (PROTOCOL= TCP)(HOST = mesdb-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pdb01) ) ) [oracle@mesdb01 admin]$
3.重啟grid用戶下的監聽
[oracle@mesdb01 admin]$ exit logout [root@mesdb01 ~]# su - grid Last login: Sun Nov 19 10:18:31 CST 2023 [grid@mesdb01 ~]$ lsnrctl stop LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 19-NOV-2023 10:30:30 Copyright (c) 1991, 2022, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))) The command completed successfully [grid@mesdb01 ~]$ lsnrctl start LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 19-NOV-2023 10:30:34 Copyright (c) 1991, 2022, Oracle. All rights reserved. Starting /grid/crs_home/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 19.0.0.0.0 - Production System parameter file is /grid/crs_home/network/admin/listener.ora Log messages written to /grid/crs_base/diag/tnslsnr/mesdb01/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 19-NOV-2023 10:30:34 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /grid/crs_home/network/admin/listener.ora Listener Log File /grid/crs_base/diag/tnslsnr/mesdb01/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) The listener supports no services The command completed successfully [grid@mesdb01 ~]$ lsnrctl status LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 19-NOV-2023 10:30:38 Copyright (c) 1991, 2022, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 19-NOV-2023 10:30:34 Uptime 0 days 0 hr. 0 min. 4 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /grid/crs_home/network/admin/listener.ora Listener Log File /grid/crs_base/diag/tnslsnr/mesdb01/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.21)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.23)(PORT=1521))) Services Summary... Service "0a5aa414b738a716e0631601a8c05401" has 1 instance(s). Instance "mesdb1", status READY, has 1 handler(s) for this service... Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s). Instance "mesdb1", status READY, has 1 handler(s) for this service... Service "mesdb" has 1 instance(s). Instance "mesdb1", status READY, has 1 handler(s) for this service... Service "mesdbXDB" has 1 instance(s). Instance "mesdb1", status READY, has 1 handler(s) for this service... Service "pdb01" has 1 instance(s). Instance "mesdb1", status READY, has 1 handler(s) for this service... The command completed successfully [grid@mesdb01 ~]$
發現問題依然存在,後來發現問題所在,下麵這條指令需要在兩個節點都執行一遍。但是我以為只需要在其中一個節點執行就可以了,所以只有有一個節點啟動成功了,但我連接時候是連接到了另一個節點,因此提示失敗。
檢查如下:
節點一
[root@mesdb01 ~]# su - oracle Last login: Sun Nov 19 10:25:31 CST 2023 on pts/0 [oracle@mesdb01 ~]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Sun Nov 19 10:38:50 2023 Version 19.15.0.0.0 Copyright (c) 1982, 2022, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.15.0.0.0 SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB01 READ WRITE NO SQL>
節點二:
[root@mesdb02 ~]# su - oracle Last login: Sun Nov 19 10:18:49 CST 2023 [oracle@mesdb02 ~]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Sun Nov 19 10:36:48 2023 Version 19.15.0.0.0 Copyright (c) 1982, 2022, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.15.0.0.0 SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB01 MOUNTED SQL>
在兩個節點都執行上述操作後OK!
C:\Users\Administrator>sqlplus system/oracle@192.168.1.25:1521/pdb01 SQL*Plus: Release 19.0.0.0.0 - Production on 星期日 11月 19 10:30:42 2023 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. 上次成功登錄時間: 星期日 11月 19 2023 09:16:00 +08:00 連接到: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.15.0.0.0 SQL>
低級錯誤!