Page 1 of 1
ODAC Access Problem
Posted: Fri 11 Mar 2005 16:04
by anilica
Hi,
We use ODAC version 4.50.1.17 for borland c++ builder.
While ODAC attempt to first access to oracle database, application freeze and the following error log seen. We couldn't find what is wrong. We have to solve this problem urgently.
Thanks in advance,
Anıl
-------------------------------------------------------------------------------------
date/time : 2005-03-10, 16:03:11, 943ms
computer name : CALL-SERVER
user name : Administrator
operating system : Windows 2000 Service Pack 4 build 2195
system language : Turkish
system up time : 8 days 2 hours
program up time : 4 minutes 6 seconds
processor : Intel(R) Pentium(R) 4 CPU 2.80GHz
physical memory : 626/1023 MB (free/total)
free disk space : (C:) 12,73 GB (D:) 13,94 GB
display mode : 1280x1024, 32 bit
process id : $6750
allocated memory : 67,57 MB
executable : PP_PRJ.EXE
exec. date/time : 2005-03-10 10:44
madExcept version : 2.7g
exception message : Uygulama cevap vermiyor.
main thread ($5fdc):
77f82870 ntdll.dll NtWaitForSingleObject
750313f7 WS2_32.DLL WSARecv
7505109f wsock32.dll recv
40056dc7 rtl60.bpl Scktcomp TCustomWinSocket.ReceiveBuf
006c1ea2 PP_PRJ.EXE OraNet _16450
006c23fe PP_PRJ.EXE OraNet _16461
006c248f PP_PRJ.EXE OraNet _16463
006c263a PP_PRJ.EXE OraNet _16467
006c2bb8 PP_PRJ.EXE OraNet _16492
006c64a4 PP_PRJ.EXE OraNet _16580
006c6948 PP_PRJ.EXE OraNet _16581
006c75d3 PP_PRJ.EXE OraNet _16594
006c841a PP_PRJ.EXE OraNet _16625
006a675a PP_PRJ.EXE OraClasses TOCICommand.InternalExecute
006a6a76 PP_PRJ.EXE OraClasses TOCICommand.Exec
006ac4d7 PP_PRJ.EXE OraClasses TOCIRecordSet.DoExecFetch
006ac8b6 PP_PRJ.EXE OraClasses TOCIRecordSet.ExecFetch
006e4fc8 PP_PRJ.EXE CRAccess TCRRecordSet.InternalOpen
006ac37b PP_PRJ.EXE OraClasses TOCIRecordSet.InternalOpen
006ac96e PP_PRJ.EXE OraClasses TOCIRecordSet.Reopen
006e08d6 PP_PRJ.EXE MemDS TMemDataSet.InternalRefresh
006d13c4 PP_PRJ.EXE DBAccess TCustomDADataSet.InternalRefresh
0069b6cf PP_PRJ.EXE OraSmart TCustomSmartQuery.InternalRefresh
4032e589 dbrtl60.bpl Db TDataSet.Refresh
004b2386 PP_PRJ.EXE apco25_console_main_unit.cpp 898 database_sessions_init_timeout
Posted: Mon 14 Mar 2005 09:24
by Alex
We couldn't reproduce the problem.
Please send us your Oracle Client/Server versions and complete sample to demonstrate it and include script to create server objects to ODAC support address.
Posted: Wed 23 Mar 2005 08:46
by Guest
Hi again,
We use Oracle 9.i database Release 2 (9.2.0.1.0) with Windows 2000 operating system.
Let me tell our code flow:
Function below called every 10 seconds and checks the connection. If connection corrupted, a thread(blue colored) created for new connection. In this thread, a function(green colored) is called for new connection of OraSession. "kernel_ram_ptr->pp_database_connected " is a variable in RAM. Its value is FALSE when connection corrupts else TRUE.
The problem I told in my first mail occurs in the red line of "database_sessions_init_timeout()" function.
I attached the error log again under the codes. The red line in the log shows the problem line. The lines above this shows the code flow down to up. The last line code run is "77f82870 ntdll.dll NtWaitForSingleObject". Later the program freezes.
Thanks in advance,
Anıl
void database_sessions_init_timeout()
{
if(database_sessions_init_timeout_duration == 0)
{
try
{
if(kernel_ram_ptr->pp_database_connected == TRUE)
apco25_console_main->OraTable->Refresh();
}
catch( ... )
{
pp_write_error_log(__file,__LINE__);
kernel_ram_ptr->pp_database_connected = FALSE ;
}
// Controls database connection every 1 second if connection corrupt try to connect again
if((pp_database_connection_thread_info.thread_handle == NULL)&&
(kernel_ram_ptr->pp_database_connected == FALSE))
{
(HANDLE)pp_database_connection_thread_info.thread_handle=create_thread(PP_DATABASE_CONNECTION_THREAD, NULL, 0, (LPVOID)NULL, 0,
&pp_database_connection_thread_info.thread_id);
if(pp_database_connection_thread_info.thread_handle == NULL)
{
pp_write_error_log(__file,__LINE__);
}
}
database_sessions_init_timeout_duration = MAX_DATABASE_CONNECTION_TIMEOUT_DURATION;
}
database_sessions_init_timeout_duration--;
}
DWORD WINAPI pp_database_connection_thread(LPVOID lpParam)
{
while(kernel_ram_ptr->mp_loading_file[MP_APCO25_HLR_DCP_LOADING].mplf_loading_status != MP_LOADING_COMPLETED)
{
Sleep(1000);
}
apco25_console_main->database_sessions_init(); // Database Session Open
put_port_proc_thread_int_message(PP_DATABASE_CONNECTION_THREAD_END_OF_JOB);
pp_database_connection_thread_info.thread_handle = NULL;
return 0;
}
void Tapco25_console_main::database_sessions_init()
{
AnsiString error_log;
AnsiString DBPcName;
AnsiString database_ip_addr;
AnsiString database_tcp_port;
AnsiString database_name;
AnsiString Username = "CONSOLE_USR";
AnsiString Password = "CONSOLE_USR";
database_name = (AnsiString)kernel_ram_ptr->database_connection_info[CONA_DATABASE_CONNECTION].name;
database_tcp_port = IntToStr(kernel_ram_ptr->database_connection_info[CONA_DATABASE_CONNECTION].tcp_port);
database_ip_addr = (AnsiString)kernel_ram_ptr->database_connection_info[CONA_DATABASE_CONNECTION].ip_addr;
try
{
if(apco25_console_main->UserDBSession->Connected == true)
apco25_console_main->UserDBSession->Disconnect();
apco25_console_main->UserDBSession->Server=database_ip_addr+":"+database_tcp_port+":"+database_name;
apco25_console_main->UserDBSession->Username=Username;
apco25_console_main->UserDBSession->Password=Password;
apco25_console_main->UserDBSession->Options->Net = true;
apco25_console_main->UserDBSession->Connect();
kernel_ram_ptr->pp_database_connected = TRUE;
apco25_console_main->OraTable->Open();
}
catch( ... )
{
kernel_ram_ptr->pp_database_connected = FALSE;
}
}
**********************************************
date/time : 2005-03-10, 16:03:11, 943ms
computer name : CALL-SERVER
user name : Administrator
operating system : Windows 2000 Service Pack 4 build 2195
system language : Turkish
system up time : 8 days 2 hours
program up time : 4 minutes 6 seconds
processor : Intel(R) Pentium(R) 4 CPU 2.80GHz
physical memory : 626/1023 MB (free/total)
free disk space : (C 12,73 GB (D 13,94 GB
display mode : 1280x1024, 32 bit
process id : $6750
allocated memory : 67,57 MB
executable : PP_PRJ.EXE
exec. date/time : 2005-03-10 10:44
madExcept version : 2.7g
exception message : Uygulama cevap vermiyor.
main thread ($5fdc):
77f82870 ntdll.dll NtWaitForSingleObject
750313f7 WS2_32.DLL WSARecv
7505109f wsock32.dll recv
40056dc7 rtl60.bpl Scktcomp TCustomWinSocket.ReceiveBuf
006c1ea2 PP_PRJ.EXE OraNet _16450
006c23fe PP_PRJ.EXE OraNet _16461
006c248f PP_PRJ.EXE OraNet _16463
006c263a PP_PRJ.EXE OraNet _16467
006c2bb8 PP_PRJ.EXE OraNet _16492
006c64a4 PP_PRJ.EXE OraNet _16580
006c6948 PP_PRJ.EXE OraNet _16581
006c75d3 PP_PRJ.EXE OraNet _16594
006c841a PP_PRJ.EXE OraNet _16625
006a675a PP_PRJ.EXE OraClasses TOCICommand.InternalExecute
006a6a76 PP_PRJ.EXE OraClasses TOCICommand.Exec
006ac4d7 PP_PRJ.EXE OraClasses TOCIRecordSet.DoExecFetch
006ac8b6 PP_PRJ.EXE OraClasses TOCIRecordSet.ExecFetch
006e4fc8 PP_PRJ.EXE CRAccess TCRRecordSet.InternalOpen
006ac37b PP_PRJ.EXE OraClasses TOCIRecordSet.InternalOpen
006ac96e PP_PRJ.EXE OraClasses TOCIRecordSet.Reopen
006e08d6 PP_PRJ.EXE MemDS TMemDataSet.InternalRefresh
006d13c4 PP_PRJ.EXE DBAccess TCustomDADataSet.InternalRefresh
0069b6cf PP_PRJ.EXE OraSmart TCustomSmartQuery.InternalRefresh
4032e589 dbrtl60.bpl Db TDataSet.Refresh
004b2386 PP_PRJ.EXE apco25_console_main_unit.cpp 898 database_sessions_init_timeout
Posted: Thu 24 Mar 2005 09:42
by Paul
Can you send example C++ Builder project to ODAC support address and include scripts for creating server objects (tables)?
Posted: Thu 24 Mar 2005 12:56
by anilica
We have 13 OraTable, one of them is USER_TBL. Script for creation of USER_TBL is below. The other creation scripts are similar.
CREATE TABLE USER_TBL (
USERNM VARCHAR2 (20) NOT NULL,
PASSWD VARCHAR2 (20),
MANAGER VARCHAR2 ( 8 ),
PERMISSIONS VARCHAR2 (20),
DESCRIPTION VARCHAR2 (50),
MODIFY_DATE VARCHAR2 (10),
MRENVPASSWD VARCHAR2 (20),
WPASSWDCOUNT NUMBER (1),
PASSWDLOCKED NUMBER (1),
USER_ACTIVE VARCHAR2 (1),
INACTIVITY_COUNTER VARCHAR2 (3),
IP_ADDR VARCHAR2 (20)
)
We use Oracle components of Borland C++ Builder like TOraQuery, TOraTable...
"Example C++ Builder project" : I can't understand which info you want about project?
Anıl
Posted: Fri 25 Mar 2005 15:40
by Alex
We couldn't reproduce your problem.
About your demo project question we can't guess all nicety of your project implementation, may be you set some options to the wrong value and may be it's our bug in all cases small demo project from you greatly helps us to resolve your problem.
If it possible cut off all not necessary (for problem demonstration) code
from your project, make it as small as you can (desirable not bigger then 200 lines), or create a new small program that reproduce your program and send it to ODAC support address. (see Support.txt in your ODAC installation dir)
Posted: Thu 30 Sep 2010 12:06
by emb
i had the same problem with oracle client 9.2.0.1 and 9.2.0.7.
with 9.2.0.8 it works fine.