Home » RDBMS Server » Server Administration » Broken Oracle 10g servers?
Broken Oracle 10g servers? [message #135108] Mon, 29 August 2005 23:50 Go to next message
mjschwenger
Messages: 137
Registered: July 2005
Location: US
Senior Member
Hi All,
I had a post a while ago for problems in dropping users/schemas. It was taking more then an hour... There was no too many responses to this posting.
Now I have a second server with the same behavior.
This is the story. In the beginning of May05 2 servers were built for testing/dev- aix5.2/Ora10.1.0.4. QA started to use the first one. The tests include dropping of the current user with "drop user user_name cascade;", then a new schema is recreated with the same user name, tables, FK, PK, indexes are created as well. There are about 200 rows inserted in 2-3 tables and some queries run against this set up to check for syntax errors, missing fields, etc. This is all - if the error is found, then the dev corrects it and run it again the same way. The names of the dropped and recreated schema never change as this is an automated script which we do not control.
In about 3 months of daily dropping and recreating with the same user names, the server started to take a long time to drop and create user. I checked a lot of things - temp tblspace, UNDO, it's a LMT,so there should be no fragmentation, Auto segment& memory management, no archiving. I have created a new tablespace for the testing and in the beginning this solved the speed problem but later the situation was the same. I thought that there's may be a bad hardware...
Since then the second server was slammed the same way and now I have the same problem on the second machine as well.
In the same time, I have a Ora 9.2.0.7, same hardware, even less memory, it runs for 2 years with no problems - the same load - we just have to test on 10g as required platform.
So, the problems is: with the same load the 2 machines were fine for a couple of months and then start having the same problems. Is it a 10g problem? What is wrong with the 10g? Is it just a matter of time?
What possible I could look at? How I can solve my problem? I still believe that there'll be a solution - don't want to wipe the boxes and make all new installations...
Any ideas are greatly appreciated.
Thanks, mj
Re: Broken Oracle 10g servers? [message #135202 is a reply to message #135108] Tue, 30 August 2005 07:50 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
I remember the thread and was able to reproduce the issue.
are you using

sql> drop user username cascade;

try dropping the tables/objects first and then
drop the user.



[Updated on: Tue, 30 August 2005 07:51]

Report message to a moderator

Re: Broken Oracle 10g servers? [message #135205 is a reply to message #135108] Tue, 30 August 2005 08:20 Go to previous messageGo to next message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
I may have seen this as well, and would agree with the suggestion to drop the objects first and then the user. Below is an example, showing that even with just one tiny table it takes a while for the drop user cascade.

Now, for my (pure) speculation as to why:

1. Something to do with the recyclebin. When you drop a user, it purges the recyclebin for that user. Perhaps the cascade option causes this to take longer?

2. The drop user cascade operation uses more of the data dictionary in that single command than most times it would use. That means a good portion of it may not be in SGA. A test (that I have not done) to attempt to validate this would be to not use ASMM, set a very large shared_pool_size, do the drop operation once to load everything up, and then run it again to time it and see.

Basically, the cascade requires that oracle check everything. Sure, you may know that the user only has a single table. But oracle doesn't know, and it must check for triggers, indexes, types, etc etc to make sure it gets them all.

Anyway, here is the example dropping objects first being faster:

MYDBA@ORCL >
MYDBA@ORCL > create user b identified by b;

User created.

MYDBA@ORCL > grant create session, resource, connect to b;

Grant succeeded.

MYDBA@ORCL > connect b/b;
Connected.
B@ORCL > create table test(a number);

Table created.

B@ORCL > connect mydba/orcl
Connected.
MYDBA@ORCL > drop user b;
drop user b
*
ERROR at line 1:
ORA-01922: CASCADE must be specified to drop 'B'


MYDBA@ORCL > set timing on
MYDBA@ORCL > drop user b cascade;

User dropped.

Elapsed: 00:00:19.06
MYDBA@ORCL > create user b identified by b;

User created.

Elapsed: 00:00:00.04
MYDBA@ORCL > set timing off
MYDBA@ORCL > grant connect, resource to b;

Grant succeeded.

MYDBA@ORCL > connect b/b;
Connected.
B@ORCL > create table test(a number);

Table created.

B@ORCL > set timing on;
B@ORCL > drop table test;

Table dropped.

Elapsed: 00:00:00.57
B@ORCL > connect mydba/orcl
Connected.
Elapsed: 00:00:00.01
Elapsed: 00:00:00.01
MYDBA@ORCL > drop user b;

User dropped.

Elapsed: 00:00:00.83
MYDBA@ORCL > set timing off
MYDBA@ORCL > select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Prod
PL/SQL Release 10.1.0.4.0 - Production
CORE    10.1.0.4.0      Production
TNS for 32-bit Windows: Version 10.1.0.4.0 - Production
NLSRTL Version 10.1.0.4.0 - Production

5 rows selected.

MYDBA@ORCL >

Re: Broken Oracle 10g servers? [message #135209 is a reply to message #135202] Tue, 30 August 2005 08:31 Go to previous messageGo to next message
mjschwenger
Messages: 137
Registered: July 2005
Location: US
Senior Member
This is may be a solution but I cannot use it at the moment.
I cannot change the automated scripts. It'll take a month at least. Also, to request a script change I need to explain on the meeting why I'm requesting that. For the moment I have no explanations... Just "Oracle blows up"... but then they'll ask me - what about 9i and it's still OK... Please, understand - this scripts work for over 2 years, changed only when there's a new change to the DB - the same use all the times. How I'm goign to tell this people that now we need to change bacause Oracle cannot handle it...
What is the reason for that? Should I expect the same for 9i box?
Do I need to open a TAR?
Is there something I can do to improve the situation - maintenance, etc.???
When I flash the pool and then purge the dba recyclebin - this seems to help a little.
What can I do?
Are there some links I could read so I could get the understanding what is goign on and to be able to explain the situation to my QA people.
Thanks a lot,mj
Re: Broken Oracle 10g servers? [message #135217 is a reply to message #135205] Tue, 30 August 2005 08:44 Go to previous messageGo to next message
mjschwenger
Messages: 137
Registered: July 2005
Location: US
Senior Member
I was typing my message in the same time with you, Steve.
Thanks a lot. I'll run it right now and try to change the options for the SGA.
Could you explain why in the beginning both servers were fine and all was running fast and good? It takes about 2-3 month to start seeing that.
Thanks very, very much,mj
Re: Broken Oracle 10g servers? [message #135222 is a reply to message #135108] Tue, 30 August 2005 09:03 Go to previous messageGo to next message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
I really don't know why, but I am curious as to what you find out. You may indeed want to open a TAR, that is what support is for, and this looks to be an issue with a newer version, so it indeed could indicate a problem of some kind that has already been raised and has a known solution.

Also, when software versions change (any software, not just oracle), custom programs and scripts that use it will need to be tested and possibly changed. That is part of the process.

But, see what you can find out first in testing and with TAR. Maybe purging the dba_recyclebin will help? That would be my guess, is that it is recyclebin related, but I don't know why.
Re: Broken Oracle 10g servers? [message #135225 is a reply to message #135217] Tue, 30 August 2005 09:07 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>Do I need to open a TAR?
Yes.
Please Take a level 12 trace.
Let us see if it can demystify something.!.
Re: Broken Oracle 10g servers? [message #135298 is a reply to message #135108] Tue, 30 August 2005 17:37 Go to previous messageGo to next message
mjschwenger
Messages: 137
Registered: July 2005
Location: US
Senior Member
Running traces it got clear that the most wait event is
"enq: RO - fast object reuse". Problems with the system in creating and dropping objects - which I already know...
I read a good article about that @:
http://www.confio.com/English/Collaterals/Newsletter/2005/200508_TheOracleResource.pdf
but it doesn't tell me how to fix it - application design - this is not an app, Better server set up - what do I need to change in my current config???
SQL> show sga
Total System Global Area 1.2885E+10 bytes
Fixed Size 1346448 bytes
Variable Size 5465928816 bytes
Database Buffers 7415529472 bytes
Redo Buffers 2097152 bytes
ASSM - which I'm going to remove, undo_management - auto;
4 log groups and files - 1G wach
undo_retention = 5000;
purge dba_recyclebin; - helps a lot if it's run before to dropping but it takes sometimes like hour...
Any idea how I can stop using the recyclebin at all?
Any ideas are appreciated.
Thanks a lot, mj

[Updated on: Tue, 30 August 2005 17:39]

Report message to a moderator

Re: Broken Oracle 10g servers? [message #135303 is a reply to message #135298] Tue, 30 August 2005 18:50 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
did you try to purge along with drop?

SCOTT@teng>drop table emp purge;


Table dropped.

>>Any idea how I can stop using the recyclebin at all?

There is this parameter _recyclebin that you can set it to false!.
But before doing this, raise a TAR and check with the big brothers.

Re: Broken Oracle 10g servers? [message #135314 is a reply to message #135303] Tue, 30 August 2005 22:55 Go to previous messageGo to next message
mjschwenger
Messages: 137
Registered: July 2005
Location: US
Senior Member
There's little difference in the time of dropping a table with purge or just "drop table owner.table_name cascade constraints;" but I cannot drop only a single table. I still need to drop by schema. It looks that if I purge the dba_recyclebin (which could take over an hour!!!) I have much better timing in dropping and recreating the new schema, but not so much... Purging the user tablespace takes seconds but it is not help at all. The biggest time saver is if I create a brand new tablespace and start creating there the new users and the objects inside. But before that I need to drop the existing tablespace which sometimes also takes time although much less then dropping the user.
Please, give me an idea what will be the fastest way to drop the old tablespace and to recreate new one.
It looks as fragmentation issue although the tblspaces are LMT. I think that it may be it's a extent allocation problem. The coleasce for tablespace runs for 2-3 sec. and I do not think it does something... What command I could use to defrag fast the tablespace and to realese the extents?
What I do now is to "select * object_name" by user then "alter table with move" to the same tblspace and "rebuild indexes where status unusable"... It's too long... May be there's a short way to do it. Also, I do not know yet if this is going to take care for already fragmented parts which doesn't exist anymore.

Thanks a lot for the help,mj
Re: Broken Oracle 10g servers? [message #135394 is a reply to message #135314] Wed, 31 August 2005 07:36 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
MJ,
As long as you have the LMT with UNIFORM extents, there will be NO FRAGMENTATION.
Raise a TAR.
Lets us see what OSS can say.
Re: Broken Oracle 10g servers? [message #135517 is a reply to message #135394] Wed, 31 August 2005 21:07 Go to previous message
cadillac
Messages: 5
Registered: August 2005
Junior Member
is your tablespace created with logging option?
Previous Topic: how to use pfile instead of spfile
Next Topic: How to know if a database is in which mode.
Goto Forum:
  


Current Time: Sun Jan 26 11:39:41 CST 2025