root 登陆 sys 租户
obclient -h10.11.99.101 -P2883 -uroot@sys -A -p
obclient [(none)]> set global recyclebin = on;
Query OK, 0 rows affected (0.016 sec)
root 登陆业务租户 obcp_t1
[admin@kvm-clone01 ~]$ obclient -h10.11.99.101 -P2883 -uroot@obcp_t1
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 1048577
Server version: OceanBase 3.2.4.1 (r101000052023010822-346aa35c32e99d1b82d713f75f0072c45bdf7aab) (Built Jan 8 2023 22:52:43)
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 [(none)]> show databases;
±-------------------+
| Database |
±-------------------+
| oceanbase |
| information_schema |
| mysql |
| test |
±-------------------+
4 rows in set (0.069 sec)
obclient [obcp_db]> create table t06 (id int,name varchar(25));
Query OK, 0 rows affected (0.909 sec)
obclient [(none)]> create database obcp_db;
Query OK, 1 row affected (0.540 sec)
obclient [(none)]> show databases;
±-------------------+
| Database |
±-------------------+
| oceanbase |
| information_schema |
| mysql |
| test |
| obcp_db |
±-------------------+
5 rows in set (0.032 sec)
obclient [(none)]> use obcp_db;
Database changed
obclient [obcp_db]> create table t01(id int,name varchar(25));
Query OK, 0 rows affected (1.314 sec)
obclient [obcp_db]> create table t06(id int,address text);
Query OK, 0 rows affected (0.825 sec)
obclient [obcp_db]> show tables;
±------------------+
| Tables_in_obcp_db |
±------------------+
| t01 |
| t06 |
±------------------+
2 rows in set (0.017 sec)
obclient [obcp_db]> set global recyclebin = on ;
Query OK, 0 rows affected (0.332 sec)
obclient [obcp_db]> show recyclebin;
Empty set (0.051 sec)
obclient [obcp_db]> drop table t06;
Query OK, 0 rows affected (0.654 sec)
obclient [obcp_db]> flashback table t05 to before drop rename to t0005;
ERROR 5270 (HY000): object not in RECYCLE BIN