|
Replies:
14
-
Pages:
1
-
Last Post:
Jun 15, 2008 9:14 AM
Last Post By: Aman....
|
|
|
Posts:
978
Registered:
11/24/06
|
|
|
|
Why the dropped table not in recyclebin?
Posted:
Jun 14, 2008 6:19 PM
|
|
|
|
Why the dropped table not lised in recyclebin? But listed in EM console.
I think it maybe a Oracle bug.
SQL> drop table jeff.job;
Table dropped.
SQL> select*from jeff.job;
select*from jeff.job
*
'ERROR at line 1:
ORA-00942: table or view does not exist.
SQL> show recyclebin;
But from the EM console, I can find the dropped table jeff.job and I get the recyclebin name from there.
SQL> flashback table "JEFF"."BIN$T6nzNsfaiAHgQAB/AQAkGA==$0" to before drop rename to "jeff.jobs";
Flashback complete.
Message was edited by:
frank.qian
|
|
|
Posts:
24,284
Registered:
10/11/99
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 14, 2008 6:26 PM
in response to: jetq
|
|
|
|
What user are you logged in as? If you're not logged in as JEFF, you'd need to query DBA_RECYCLEBIN, not RECYCLEBIN.
Justin
|
|
|
Posts:
775
Registered:
11/16/06
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 14, 2008 8:15 PM
in response to: jetq
|
|
|
Why the dropped table not lised in recyclebin? But
listed in EM console.
I think it maybe a Oracle bug.
I doubt it. I suspect a pebcak but no bug. You may wish to review:
1) the appropriate documentation at http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#sthref2380 and http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12041.htm#i2699447
2) the userid you are using when doing this.
SQL> drop table jeff.job;
Table dropped.
SQL> select*from jeff.job;
select*from jeff.job
*
ORA-00942: table or view does not exist.
SQL> show recyclebin;
Remember that SHOW is a SQLPlus command, not a SQL command. You need to look at the SQLPlus manual for the SHOW command, and you might note that SHOW RECYCLEBIN
is designated for the USER_RECYCLEBIN, not the DBA_ one
But from the EM console, I can find the dropped table
jeff.job and I get the recyclebin name from there.
SQL> flashback table
"JEFF"."BIN$T6nzNsfaiAHgQAB/AQAkGA==$0" to before
drop rename to "jeff.jobs";
|
|
|
Posts:
978
Registered:
11/24/06
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 14, 2008 9:02 PM
in response to: Justin Cave
|
|
|
|
|
|
Posts:
24,284
Registered:
10/11/99
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 14, 2008 9:47 PM
in response to: jetq
|
|
|
|
Then you'd have to query DBA_RECYCLEBIN, not RECYCLEBIN. As Hans points out, SHOW RECYCLEBIN shows the contents of USER_RECYCLEBIN, which only shows you the dropped objects that were owned by the current user.
Additionally, testing recyclebin functionality using the SYS account (SYSDBA is a role, not a user) is probably an error-- objects owned by SYS don't show up in the recyclebin.
Justin
|
|
|
Posts:
775
Registered:
11/16/06
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 15, 2008 5:43 AM
in response to: jetq
|
|
|
I login as sysdba.
Logging in to user SYS, or to another userid which has sysdba capability?
|
|
|
Posts:
1,657
Registered:
06/13/07
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 15, 2008 6:29 AM
in response to: Justin Cave
|
|
|
|
so,dropping table by sys account bypasses recyclebin and directly deleted.
Is it true?
|
|
|
Posts:
9,551
Registered:
05/20/01
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 15, 2008 6:37 AM
in response to: John Carew
|
|
|
|
so,dropping table by sys account bypasses recyclebin and directly deleted.
Is it true?
No its not true.Objects dropped by sys or any user will go in recyclebin provided they are not stored in the system tablespace.If the object is a part of the system tablespace,it wont come under recyclebin and is immediately.Mostly all the objects of Sys are in system tablespace only so it appears that sys's objects don't go inrecyclebin.But the key point is the tablespace not the schema.
Aman....
|
|
|
Posts:
1,657
Registered:
06/13/07
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 15, 2008 7:59 AM
in response to: Aman....
|
|
|
|
I made a test.
if I create table by user sys, which belongs system tablespace, when I drop it, there is nothing in recyclebin.it is directly deleted.
|
|
|
Posts:
8,806
Registered:
12/26/02
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 15, 2008 8:14 AM
in response to: John Carew
|
|
|
Aman is right :
SYS@db102 > create table foo(a number);
Table created.
SYS@db102 > drop table foo;
Table dropped.
SYS@db102 > sho recyclebin
SYS@db102 > create table foo(a number) tablespace users;
Table created.
SYS@db102 > drop table foo;
Table dropped.
SYS@db102 > sho recyclebin
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
------------------------------
-------------------
FOO BIN$T7XU+MRoGBfgQAB/AQB4KA==$0 TABLE 2008-06-15:17:11:51
SYS@db102 >
|
|
|
Posts:
19,247
Registered:
08/22/02
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 15, 2008 8:19 AM
in response to: John Carew
|
|
|
Or why do not put user's objects into the SYSTEM tablespace :
SQL> show user
USER is "SCOTT"
SQL> sho recyclebin
SQL> create table foo(a number) tablespace system;
Table created.
SQL> drop table foo;
Table dropped.
SQL> sho recyclebin
SQL> create table foo(a number) tablespace users;
Table created.
SQL> drop table foo;
Table dropped.
SQL> sho recyclebin
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
------------------------------
-------------------
FOO BIN$4lSCQj3kR1ejQ0STqEJ/BA==$0 TABLE 2008-06-15:17:19:08
SQL>
Nicolas.
Thanks to Paul for the table's name 
And good luck for Tuesday evening !
Message was edited by:
N. Gasparotto
|
|
|
Posts:
8,806
Registered:
12/26/02
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 15, 2008 8:43 AM
in response to: N Gasparotto
|
|
|
And good luck for Tuesday evening !
Thanks Nicolas, and you too...:-)
...but it could be useless...
|
|
|
Posts:
9,551
Registered:
05/20/01
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 15, 2008 8:47 AM
in response to: John Carew
|
|
|
|
if I create table by user sys, which belongs system tablespace, when I drop it, there is nothing in recyclebin.it is directly deleted.
Well I guess that's what I said in my reply,Paul and Nicolas demonstrated.
Hope you are clear now.
Aman....
|
|
|
Posts:
1,657
Registered:
06/13/07
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 15, 2008 9:10 AM
in response to: Aman....
|
|
|
|
thanks a lot Aman, as usual you again helped me:)
|
|
|
Posts:
9,551
Registered:
05/20/01
|
|
|
|
Re: Why the dropped table not in recyclebin?
Posted:
Jun 15, 2008 9:14 AM
in response to: John Carew
|
|
|
Ricardinho,
Your welcome  .
Aman....
|
|
|
|
Legend
|
|
Guru : 2500
- 1000000
pts
|
|
Expert : 1000
- 2499
pts
|
|
Pro : 500
- 999
pts
|
|
Journeyman : 200
- 499
pts
|
|
Newbie : 0
- 199
pts
|
|
Oracle ACE Director
|
|
Oracle ACE Member
|
|
Oracle Employee ACE
|
|
Helpful Answer
(5 pts)
|
|
Correct Answer
(10 pts)
|
|