Using flashback method, we can restore an accidentally dropped users in oracle. Basically, we will flashback the database to past, when the user was available, Then take an export dump of the schema, and restore the database to same current state. Once db is up, we can import the dump. It will need sometime( for flashback the database )

PREREQUISITE:

1. Database Must be in Archive log mode

2. Flashback must be enabled for the database.

3.  all the flashback log and archives should be available, from the time, the user is dropped

METHODS:

1. Make sure flashback and archive mode is enable.

2. Lets drop a user, to test the scenarios:

3. flashback the database to past, when the user was available.

4. Open the database in readonly mode:

We can see the tables are available now.

5. Take export backup of the schema DBACLASS:

6. Now restore the database to current stage:

 

7. Now create an empty user and import the dump

Though it need some outage in the database, to restore the user, we are able to restore schema, without loosing any other data in database.