I have deleted data in a table and didnot rollback. Will the data in that table gets deleted permanently in oracle sql developer?
CodePudding user response:
Will those rows be deleted permanently?
It depends.
- if you didn't rollback, but you didn't commit either, then rows will be deleted within your own session, but any other user will still see all those rows
- check SQL Developer's preferences (Database > Advanced) and see whether the Autocommit checkbox is turned on - if so, then although you didn't explicitly commit, tool did that for you. In my opinion, autocommit is generally a bad idea
- even if you did commit, but there's the flashback option enabled in your database, then you can restore those rows
- certainly, you should perform regular backup and be able to restore data (that won't save you from losing rows that were inserted/updated between two backups, though)
Basically, there are various options that could & should help you restore deleted rows.
CodePudding user response:
You can recover deleted table records in SQL server by
Step 1: Create a Database. ... Step 2: Insert Data into Table. ... Step 3: Delete Rows from Table. ... Step 4: Get Information about Deleted Rows. ... Step 5: Get Log Sequence Number of the LOP_BEGIN_XACT Log Record. ... Step 6: Recover Deleted Records in SQL Server.