How to get or set UNDO_RETENTION parameter - Oracle

I have recently encountered an issue while trying to export the Oracle DB using the expdp command and my database size was huge, therefore I got an error stating that Snapshot is too old

When I researched further I noticed that my UNDO_RETENTION was too less and set to 900 seconds.

This is how I have managed to get or set the value to this parameter in Oracle

 

How to know the current value of UNDO_RETENTION in Oracle

to know the current or configured value of UNDO_RETENTION parameter in Oracle you can use the following SQL query

In order to be able to execute this SQL command, you must have SQL dba privileges or some specific grants to make you an elevated user

SQL> show parameters undo_retention;

NAME				     TYPE	 VALUE
---------------------------------- – – ------- – – ----------------------------
undo_retention			     integer	 10600

 

How to modify/set this UNDO_RETENTION value in Oracle

to modify or to set this UNDO_RETENTION value in oracle. you can use the following sql query.

Remember that the value of this parameter is mentioned in seconds.

SQL> ALTER SYSTEM SET UNDO_RETENTION = 10600;

System altered.

You can use the previous SQL statement to make sure that the value is changed or not.

Now you can go ahead and re-run the expdp and hopefully it should be fine.

Good luck

 

Thanks

Sarav

Follow me on Linkedin My Profile
Follow DevopsJunction onFacebook orTwitter
For more practical videos and tutorials. Subscribe to our channel

Buy Me a Coffee at ko-fi.com

Signup for Exclusive "Subscriber-only" Content

Loading