Home » RDBMS Server » Networking and Gateways » Client Side Application Hanging when connecting to Database
Client Side Application Hanging when connecting to Database [message #274196] Mon, 15 October 2007 01:10 Go to next message
sarfraz_attari
Messages: 123
Registered: July 2005
Senior Member
Dear All

We are having Oracle database 10g Installed.
Sometimes when we are connecting to Server from Client the Client side application hangs,even when we are trying through SQL Plus , it hangs but when we use SQL PLUS directly from Database Server it is working fine , Our Network is working fine during this problem.

Can anyone suggest what is this Problem

Thanks

Sarfraz
Re: Client Side Application Hanging when connecting to Database [message #274200 is a reply to message #274196] Mon, 15 October 2007 01:19 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Try tnsping on client, does it work?
Maybe SQL*Plus does not hang but just wait for an answer, search for login.sql and glogin.sql if there is not something with an "&" in them.

Regards
Michel
Re: Client Side Application Hanging when connecting to Database [message #274245 is a reply to message #274200] Mon, 15 October 2007 03:50 Go to previous messageGo to next message
sarfraz_attari
Messages: 123
Registered: July 2005
Senior Member
Dear Michel

Thanks for your reply

We tried TNSPING and it is working fine and not only one client, all the clients are hanging as soon as we are entering SQL* PLUS

Thanks
Re: Client Side Application Hanging when connecting to Database [message #274252 is a reply to message #274245] Mon, 15 October 2007 04:08 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I assume they have the same glogin.sql and/or login.sql.
Investigate this.

Regards
Michel
Re: Client Side Application Hanging when connecting to Database [message #274257 is a reply to message #274252] Mon, 15 October 2007 04:26 Go to previous messageGo to next message
sarfraz_attari
Messages: 123
Registered: July 2005
Senior Member
Dear Michel

Thanks once again

Yes, you are right we are using login.sql and it has &. But I want to know that what is the problem if we are using & in login.sql and secondly I think this script will run only when we logged in through SQL PLUS , but when we are trying to run any of our Application from client which is connecting through database , Application is also hanging

Thanks

Sarfraz
Re: Client Side Application Hanging when connecting to Database [message #274268 is a reply to message #274257] Mon, 15 October 2007 05:08 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
First insert "set define off" at the top of login.sql and "set define on" at the bottom to prevent from this problem in SQL*Plus (unless you use a define variable in your script).
"&" introduce a variable name, if this variable is not defined, SQL*Plus waits for the user to enter a value.

Fix that and try to connect with SQL*Plus, we will for your application when we'll fix for SQL*Plus.

Regards
Michel
Re: Client Side Application Hanging when connecting to Database [message #274384 is a reply to message #274268] Mon, 15 October 2007 22:15 Go to previous messageGo to next message
alantany
Messages: 115
Registered: July 2007
Senior Member
Hi:
I have a same problem as your,but it is not of login.sql,because all user from anywhere can not login the db through listner,but direct loggin can at the server local.
Dear Michel,could you give me a method where should I start to check on this problem?
Regards!
Alan
Re: Client Side Application Hanging when connecting to Database [message #274385 is a reply to message #274196] Mon, 15 October 2007 22:26 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>because all user from anywhere can not login the db through listner
Rather than you describing (poorly) what you think is happening,
why don't you CUT & PASTE to show us EXACTLY what is happening.
I bet you are seeing error message, but decided we did not need to know exactly what error happens.

Did the clients ever work OK?
If so, what changed?

What is OS name & version?
What are clients OS name & version?
What is Oracle DB server version to 4 decimal places?

My car is broken.
Tell me how to make my car go.
Re: Client Side Application Hanging when connecting to Database [message #274394 is a reply to message #274385] Mon, 15 October 2007 22:59 Go to previous messageGo to next message
alantany
Messages: 115
Registered: July 2007
Senior Member
Hi,Ana:
db:10.2.0.0
server:win2003
client os :winxp
client db: 10.2.0.0
When we do sqlplus uid/pwd@string,It hangs,never success,but sqlplus uid/pwd at server local,it is ok.
Here are some mesages and configuration:
  
tns:

ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = scn4699)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
)
)


sqlnet :

# sqlnet.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\sqlnet.ora
# Generated by Oracle configuration tools.

# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES)

listener.ora
# listener.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
(SID_NAME = ORCL)
)
)

LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = SCN4699)(PORT = 1521))
)

C:\Documents and Settings\wangfan>tnsping orcl

TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 16-OCT-2007 10:44:44

Copyright (c) 1997, 2005, Oracle. All rights reserved.

Used parameter files:
C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = scn4699)(PORT = 1521))) (CONNECT_DATA = (SID = orcl)))
OK (60 msec)


C:\Documents and Settings\wangfan>lsnrctl status

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 16-OCT-2007 10:45:19

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=SCN4699)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 16-OCT-2007 10:21:49
Uptime 0 days 0 hr. 23 min. 30 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\oracle\product\10.2.0\db_1\network\admin\listener.ora
Listener Log File C:\oracle\product\10.2.0\db_1\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SCN4699.xxx.net)(PORT=1521)))
Services Summary...
Service "orcl" has 2 instance(s).
Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
C:\Documents and Settings\wangfan>lsnrctl service

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 16-OCT-2007 10:45:36

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=SCN4699)(PORT=1521)))
Services Summary...
Service "orcl" has 2 instance(s).
Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Instance "orcl", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:1 refused:0 state:ready
LOCAL SERVER
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1002 state:ready
DISPATCHER
(ADDRESS=(PROTOCOL=tcp)(HOST=SCN4699.xxx.net)(PORT=1363))
Service "orcl_XPT" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:1 refused:0 state:ready
LOCAL SERVER
The command completed successfully


--ARCHIVE LOG disabled:
SQL> conn sys/admin as sysdba;
Connected.
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Current log sequence 2
SQL>

Re: Client Side Application Hanging when connecting to Database [message #274396 is a reply to message #274196] Mon, 15 October 2007 23:02 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
SQLNET.AUTHENTICATION_SERVICES= (NTS)
likely the problem above


#SQLNET.AUTHENTICATION_SERVICES= (NTS)
possible fix above
Re: Client Side Application Hanging when connecting to Database [message #274401 is a reply to message #274396] Mon, 15 October 2007 23:17 Go to previous messageGo to next message
alantany
Messages: 115
Registered: July 2007
Senior Member
Hi,ana:
Why do you think the problem is this:
SQLNET.AUTHENTICATION_SERVICES= (NTS)

I think it is just for authentication,could you a comment?
Regards!
Alan
Re: Client Side Application Hanging when connecting to Database [message #274403 is a reply to message #274196] Mon, 15 October 2007 23:19 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>I think it is just for authentication,could you a comment?
If you won't follow advice, then You're On Your Own (YOYO)!
Re: Client Side Application Hanging when connecting to Database [message #274412 is a reply to message #274403] Tue, 16 October 2007 00:17 Go to previous messageGo to next message
alantany
Messages: 115
Registered: July 2007
Senior Member
anacedent wrote on Mon, 15 October 2007 23:19

>I think it is just for authentication,could you a comment?
If you won't follow advice, then You're On Your Own (YOYO)!


I have commented it ,It is useless.
Re: Client Side Application Hanging when connecting to Database [message #274430 is a reply to message #274412] Tue, 16 October 2007 01:11 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Activate SQL*Net trace on client at level 12 and see what happens in trace file during connection.

Regards
Michel
Re: Client Side Application Hanging when connecting to Database [message #274443 is a reply to message #274430] Tue, 16 October 2007 01:44 Go to previous messageGo to next message
alantany
Messages: 115
Registered: July 2007
Senior Member
Hi,Michel:
How can I configure it?
Regards!
Alan
Re: Client Side Application Hanging when connecting to Database [message #274456 is a reply to message #274443] Tue, 16 October 2007 02:16 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Net Services Reference, Chapter 5 Profile Parameters (sqlnet.ora), parameter TRACE%CLIENT.

Regards
Michel
Re: Client Side Application Hanging when connecting to Database [message #274508 is a reply to message #274456] Tue, 16 October 2007 04:42 Go to previous messageGo to next message
mson77
Messages: 208
Registered: August 2007
Location: Brazil
Senior Member
Hello alantany,

alantany wrote:

When we do sqlplus uid/pwd@string,It hangs,never success,but sqlplus uid/pwd at server local,it is ok.

You have presented:

  • listener.ora
  • sqlnet.ora
  • lsnrctl status
  • tnsping orcl

My questions are: (from your clients)

  1. Did you issue "tnsping orcl" from client desktop? (Or at local server?)
  2. Did you setup service name on your client? And are you able to TNSPING using the name you have created?
  3. Can you PING the server by name from your clients? ("ping scn4699")

Regards,


mson77
Re: Client Side Application Hanging when connecting to Database [message #274654 is a reply to message #274196] Tue, 16 October 2007 13:04 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>I have commented it ,It is useless.
But did you actually stop the listener & restart it so it would use the modified version of the listener.ora file?
Re: Client Side Application Hanging when connecting to Database [message #274772 is a reply to message #274196] Wed, 17 October 2007 02:00 Go to previous message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Quote:

it hangs but when we use SQL PLUS directly from Database Server it is working fine , Our Network is working fine during this problem.

Quote:


When we do sqlplus uid/pwd@string,It hangs,never success,


Instead of it,

You have to use
sqlplus username/password@server_name/name_of_the_service_which_status_is_ready.


To see the name_of_the_service_which_status_is_ready issue lsnrctl status and find the service name which you want and look at the status.


Hope you will get no more hanged state.
Previous Topic: DBLink Creation - ORA-12154
Next Topic: query regading listener.ora file
Goto Forum:
  


Current Time: Sat Apr 20 01:59:21 CDT 2024