Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Earlier today we had a problem logging into a database that had just been created automatically.

When on the actual box (Linux) sqlplus schema/pw, i.e. a local connection, was fine, though, it was occasionally impossible to do anything once connected. Otherwise, whether using a session on the box or not sqlplus schema/pw@db did not work at all. tnsping and DNS testing revealed nothing and there was no problem in listener.ora.

The Listener was accepting the connection but not handing it off to the database. This was confirmed by using tail -f on the listener log and watching it accept the connection. There is a logon trigger on the database that inserts the user details / time etc into a table, but this doesn't have any indexes and there cannot have been any locks.

We finally traced the issue. There was a conflict in the file that creates the temporary tablespaces for the database. It resulted in there only being 5MB of tempspace instead of the normal 25GB. Disabling the logon trigger and then adding the additional temporary tablespaces, sorted everything out. There were some sessions already running that would have been using some of this tablespace.

Apparently Oracle requires some temporary tablespace in order to accept an incoming connection. The specific version used on this DB was 9i, though I think this applies to all.

Why and what is it used for?

share|improve this question
    
There aren't really any appropriate tags and I can't create them. <authentication> doesn't really fit. –  Ben Jun 25 '12 at 19:50

1 Answer 1

During the connect process Oracle builds information on what access you have. This remains static for the length of the connection. (If you need to access newly granted privileges, you need to reconnect.) Creating this data as temporary tables would seem the appropriate thing to do. This would require temporary tablespace and could trigger the problems you were encountering.

The lack of locks, does not mean there isn't in-flight information floating around. If the transaction inserting the data doesn't commit, then the database will need to track the block containing the row until the transaction is committed. You can check for this by opening two connections and seeing if both can see the information from the login trigger before doing a commit.

There are views which will show what locks exist, and a wide variety of other information which is useful in managing the database.

share|improve this answer
    
I mentioned the locks, just to clarify that the trigger wasn't doing much... You say seem... how does this explain why the local session worked and the non-local didn't? –  Ben Jun 26 '12 at 7:49
    
@Ben Network connections usually have some more overhead than local connections. If you are using the multi-threaded listener, it may store some information in the temporary tablespace that local connections store in their own memory. –  BillThor Jun 26 '12 at 13:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.