Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two queries ala JDBC Gateway..locks/errors...etc

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi All,

It's pretty tough finding non-ncr information on Teradata. I'm happy this website is around.

Quick question on some problems i am encountering.

We recently upgraded our JDBC drivers for Teradata after it caused a lot of strange exceptions/errors when 2 threads tried to execute an insert/update/delete statement within a few seconds of each other. I am not sure if the upgrade worked or not. For now, I'm "freezing" when a thread or 2 tries to do a drop table, or an insert. I'm assuming it's a deadlock on some system table, but considering all I have is a UNIX telnet session on my machine I'm not sure what's going on. No, I don't have queryman.

I'm more familiar with Sybase/MS-SQL server, and when it comes to teradata, i am a total newbie.

What i need to know is if 2 or more threads are updating a table, could it possibly be locking some sort of system table? How do I find out if it is? Is there any possibility the driver I have could be causing locks? Is there a way to see what the JDBC Gateway is doing?

Any information is appreciated. I'll be meeting with some DBAs in day, but I just want to get a general idea of what to look for and ask for.

Thanks

 
It sounds like you are running into deadlock problems.
Teradata updates/reads some system tables when you perform deletes and updates. DBC.Accessrights and DBC.TVM are examples of system tables that are accessed.

If you have PMON, you can use it to check for locks. If you don't, try selecting from DBC.events. It has a lockmode column that could give you a little more information.

Is there any way you can increase the update interval between these 2 processes? Teradata is not an OLTP RDBMS, so if you perform multiple updates on the same table at close intervals, you could run into deadlocks ... unless you use Transaction Processing. Please check the Teradata manuals for the "Begin Transaction" statement for more details.

Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top