For Oracle databases, to ensure data security, we need to set the database recycle bin function, which is enabled by default. Follow these steps:
For Oracle databases, to ensure data security, we need to set the database recycle bin function, which is enabled by default. Follow these steps:
For Oracle databases, to ensure data security, we need to set the database recycle bin function, which is enabled by default. Follow these steps to view and modify the settings.
1. Check whether the database's recycle bin is configured for the database (recyclebin function)
Show parameter recyclebin;
SQL> show parameter recyclebin;
NAME TYPE VALUE
-----------------------------------------------
Recyclebin string on
2. if this value is on, it indicates that the recycle bin function has been enabled. If it is off, we need to enable the recycle bin function of the database by running the command.
Enable and disable the recyclebin command
Enable reclebin command
View status
SQL> show parameter recyclebin;
NAME TYPE VALUE
-----------------------------------------------------------------------------
Recyclebin string OFF
The modification will be in the on status. You must specify scope = spfile because this parameter cannot be modified in the memory.
SQL> alter system set recyclebin = on scope = spfile;
System altered
The status has been changed. We need to restart the database to make the parameter take effect.
SQL> alter system set recyclebin = on scope = spfile;
System altered
3. Disable the database recycle bin function (because spfile is modified, it takes effect only after the database is restarted)
SQL> alter system set recyclebin = on scope = spfile;
System altered
4. Clear the data in the recycle bin.
Clear all data in the recycle bin
SQL> purge recyclebin;
Done
Clear a specific table
SQL> purge table dept;
Done
5. The data restoration function (the most important) is to enable the database recycle bin function to prevent accidental deletion and recycle data.
Flashback table BONUS to before drop;
Data restoration by renaming
Flashback table SALGRADE to before drop rename to SALGRADE_bak;
Modify the table name in the database
Alter table SALGRADE_bak rename to SALGRADE
Oracle 11g installation manual on RedHat Linux 5.8 _ x64 Platform
Installing Oracle 12C in Linux-6-64
Install Oracle 11gR2 (x64) in CentOS 6.4)
Steps for installing Oracle 11gR2 in vmwarevm
Install Oracle 11g XE R2 In Debian
,