Ikhtisar
Keunggulan
Kasus Penggunaan
Database Architecture
Kebijakan Isolasi Sumber Daya
Database Instance
Ketersediaan Tinggi (Beberapa AZ)
Wilayah dan AZ
select * from information_schema.events; command to confirm running or non-running events in the current database instance.Parameter Name | Dynamically Provisioned | Type | Default Value | Valid Value | Description |
cdb_recycle_bin_enabled | yes | bool | OFF | ON/OFF | Enable status of the recycle bin feature. |
cdb_recycle_bin_retention | yes | ulong | 604800 | 0 - 4294966272 | This parameter sets the duration (in seconds) after which tables moved to the recycle bin will be purged by the automatic cleanup thread. The default value is 604800 seconds (one week). |
cdb_recycle_scheduler_interval | yes | ulong | 0 | 0 - 4294966272 | This parameter sets the scheduling interval (in seconds) for the automatic cleanup thread, indicating that automatic cleanup is triggered at regular intervals. The default value is 0, indicating that the capability to automatically clean up tables in the recycle bin is not enabled. When the value is greater than 0, the system will periodically initiate automatic cleanup tasks to remove tables that have exceeded the retention duration configured in cdb_recycle_bin_retention. Note: For the description and prerequisites of automatically cleaning up tables in the recycle bin, see Support for Automatic Cleanup of Tables in the Recycle Bin. |
clear <TABLE_NAME> from recycle_bin;orcall sys.recycle_bin_purge_table('<RECYCLE_NAME>');
CREATE TABLE IF NOT EXISTS recycle_bin_info (table_name varchar(64) NOT NULL, --Name of a table after it is removed to the recycle bin.origin_schema VARCHAR(64) NOT NULL, --Database of a table before it is moved to the recycle bin.origin_table VARCHAR(64) NOT NULL, --Name of a table before it is removed to the recycle bin.drop_time timestamp NOT NULL, --Time when a table was dropped.purge_time timestamp NOT NULL, --Time when a table will be cleared.PRIMARY KEY(table_name),KEY(purge_time),KEY `idx_drop_time` (`drop_time`),KEY `idx_schema_table` (`origin_schema`,`origin_table`)) ENGINE=INNODB CHARACTER SET latin1 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC TABLESPACE=mysql
show recycle_bin; or select mysql.recycle_bin_info; to view relevant information on all tables in the recycle bin.restore db.table from recycle_bin; restores the specified table from the recycle bin. If multiple tables with the same name exist, the most recently deleted table is restored.restore db.table from recycle_bin with {timestamp('expr')} {recycle_name $recycle_name}; restores the table corresponding to the specified name and deletion time from the recycle bin if timestamp is specified. If recycle_name is specified, db and table are not used for searching because recycle_name is unique. db.table indicates the table that is found by recycle_name and then restored. Therefore, this command can be used to restore tables to other schemas or modify the name of a restored table.restore database db_name from recycle_bin; restores all tables in a specified database. If tables with the same name exist, an error is reported.clear recycle_bin; clears the entire recycle bin.clear recycle_bin {all} {db.table} {before timestamp $time}; clears a table with a specified name or before the time specified by timestamp. If multiple tables with the same name exist, the oldest one is deleted. If all is specified, all tables with the same name are deleted.show recycle_bin; displays the recycle bin information.drop ... without recycle_bin; can forcibly delete a table rather than remove it to the recycle bin.Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan