The database user has been deleted, and the tablespace and data files are all there. How can this problem be recovered?

Source: Internet
Author: User


The database user is deleted, and the tablespace and data files are all there. How to restore the environment: www.2cto.com [html] SQL> select * from v $ version where rownum = 1; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Prod SQL>! Uname-a Linux think-V30SA 2.6.35-22-generic # 33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010
I686 GNU/Linux www.2cto.com
Http://www.bkjia.com/database/201209/154083.html

The simulated experiment process is as follows: [SQL] SQL> show user USER user is "SYS" SQL> select flashback_on from v $ database; FLASHBACK_ON ---------------- yes SQL> create user u1 identified by u1 default tablespace users quota 10 m on users;
-- Create u1 User created. SQL> grant connect, create any table to u1; Grant succeeded. SQL> conn u1/u1 Connected. SQL> create table test (I int); Table created. SQL> insert into test values (1); 1 row created. SQL> insert into test values (2); 1 row created. SQL> commit; Commit complete. SQL> select * from test; I ---------- 1 2 SQL> conn/as sysdba Connected. SQL> drop user u1 cascade; -- u 1. Delete the associated object. User dropped. SQL> shutdown immediate SQL> startup mount SQL> flashback database to timestamp sysdate-9/1440; Flashback complete. SQL> alter database open resetlogs; Database altered. SQL> select * from u1.test; I ---------- 1 2 conclusion: the key to the entire simulation experiment is the time difference between creating u1 and deleting u1. The timestamp specified by flashback database
To fall between them, otherwise the experiment will fail.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.