我尝试过重新开启归档。开启后也CDB_OB_ARCHIVELOG_SUMMARY的status字段还是断档状态,我不知道我的问题在哪
[root@dbatest-9-21 data]# obclient -h172.22.9.21 -P2881 -uroot@ocp -p -A oceanbase
Enter password:
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221638892
Server version: OceanBase_CE 4.1.0.0 (r100000202023040520-0765e69043c31bf86e83b5d618db0530cf31b707) (Built Apr 5 2023 20:26:14)
Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> ALTER SYSTEM SET LOG_ARCHIVE_DEST=‘LOCATION=file:///data/nfs/backup/archive’;
Query OK, 0 rows affected (0.028 sec)
obclient [oceanbase]> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE=‘ENABLE’;
Query OK, 0 rows affected (0.014 sec)
obclient [oceanbase]> ALTER SYSTEM ARCHIVELOG Ctrl-C – exit!
Aborted
[root@dbatest-9-21 data]# SELECT TENANT_NAME, LOG_MODE FROM oceanbase.DBA_OB_TENANTS WHERE TENANT_TYPE = ‘USER’\G
-bash: SELECT: 未找到命令
[root@dbatest-9-21 data]# obclient -h172.22.9.21 -P2881 -uroot@ocp -p -A oceanbase
Enter password:
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221658477
Server version: OceanBase_CE 4.1.0.0 (r100000202023040520-0765e69043c31bf86e83b5d618db0530cf31b707) (Built Apr 5 2023 20:26:14)
Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> SELECT TENANT_NAME, LOG_MODE FROM oceanbase.DBA_OB_TENANTS WHERE TENANT_TYPE = ‘USER’\G
*************************** 1. row ***************************
TENANT_NAME: ocp
LOG_MODE: NOARCHIVELOG
1 row in set (0.006 sec)
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> ALTER SYSTEM ARCHIVELOG TENANT = ALL;
ERROR 1227 (42501): Access denied
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> Bye
[root@dbatest-9-21 data]#
[root@dbatest-9-21 data]#
[root@dbatest-9-21 data]# obclient -h172.22.9.21 -P2881 -uroot@sys -p -A oceanbase
Enter password:
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221666952
Server version: OceanBase_CE 4.1.0.0 (r100000202023040520-0765e69043c31bf86e83b5d618db0530cf31b707) (Built Apr 5 2023 20:26:14)
Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> ALTER SYSTEM ARCHIVELOG TENANT = ALL;
Query OK, 0 rows affected (0.006 sec)
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> SELECT TENANT_NAME, LOG_MODE FROM oceanbase.DBA_OB_TENANTS WHERE TENANT_TYPE = ‘USER’\G
*************************** 1. row ***************************
TENANT_NAME: ocp
LOG_MODE: ARCHIVELOG
*************************** 2. row ***************************
TENANT_NAME: TEST
LOG_MODE: ARCHIVELOG
2 rows in set (0.003 sec)
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> ALTER SYSTEM SET data_backup_dest=‘file:///backup/data’ ;
ERROR 1235 (0A000): Not supported feature or function
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> show parameters like ‘%backup_dest%’;
Empty set (0.021 sec)
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> ALTER SYSTEM SET data_backup_dest=‘file:///backup/data’ ;
ERROR 1235 (0A000): Not supported feature or function
obclient [oceanbase]> Bye
您在 /var/spool/mail/root 中有邮件
[root@dbatest-9-21 data]# obclient -h172.22.9.21 -P2881 -uroot@ocp -p -A oceanbase
Enter password:
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221706014
Server version: OceanBase_CE 4.1.0.0 (r100000202023040520-0765e69043c31bf86e83b5d618db0530cf31b707) (Built Apr 5 2023 20:26:14)
Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
obclient [oceanbase]>
obclient [oceanbase]> ALTER SYSTEM SET data_backup_dest=‘file:///backup/data’ ;
Query OK, 0 rows affected (0.405 sec)
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> show parameters like ‘%backup_dest%’;
Empty set (0.019 sec)
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> select * from oceanbase.cdb_ob_backup_archivelog_summary;
ERROR 1146 (42S02): Table ‘oceanbase.cdb_ob_backup_archivelog_summary’ doesn’t exist
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_ARCHIVELOG_SUMMARY;
ERROR 1146 (42S02): Table ‘oceanbase.cdb_ob_archivelog_summary’ doesn’t exist
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BACKUP_PARAMETER\G
ERROR 1146 (42S02): Table ‘oceanbase.cdb_ob_backup_parameter’ doesn’t exist
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> alter system major freeze;
Query OK, 0 rows affected (0.009 sec)
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> select * from __all_zone where name=‘merge_status’;
ERROR 1146 (42S02): Table ‘oceanbase.__all_zone’ doesn’t exist
obclient [oceanbase]> alter system backup database;
ERROR 9040 (HY000): backup can not start, because log archive status is not doing.
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> ALTER SYSTEM MAJOR FREEZE;
Query OK, 0 rows affected (0.011 sec)
obclient [oceanbase]> alter system backup database;
ERROR 9040 (HY000): backup can not start, because log archive status is not doing.
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> select * from oceanbase.__all_zone where name=‘merge_status’;
ERROR 1146 (42S02): Table ‘oceanbase.__all_zone’ doesn’t exist
obclient [oceanbase]>