Home » Other » Client Tools » Difference between EXIT and DISCONN
Difference between EXIT and DISCONN [message #246434] Wed, 20 June 2007 23:37 Go to next message
srinivasocp
Messages: 91
Registered: December 2005
Location: INDIA
Member
Hi Pals,

Could you please tell me the difference between EXIT and Disconn.

Firstly i have defined a variable with the DEFINE Keyword in a schema(say Scott).

SQL> define myv='XYZ';
SQL> define myv;
DEFINE MYV = "XYZ" (CHAR)

Just disconn from the schema(SCOTT).I am able to see the value of the defined variable 'myv' even after disconnecting from the shema

SQL> show user
USER is ""

Then again i connected to another schema(say HR).Here also the value of defined variable is persisting.

SQL> show user
USER is "HR"

SQL> define myv;
DEFINE MYV = "XYZ" (CHAR).

Now i typed exit and logged in again as SCOTT,but this time i am unable to see the value of defined variable myv.

My question is why after disconnecting,the value of a defined variable is existing?Doesn't disconnect mean end of the session?

Please clarify.

Thanks
Srini..



Re: Difference between EXIT and DISCONN [message #246459 is a reply to message #246434] Thu, 21 June 2007 01:04 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
"disconnect" disconnects from Oracle but you still stay in the application (SQL*Plus) and so keep your application environment.
"exit" quits the application and so you lose your application environment.

Variables declared with "define" are SQL*Plus variables.

Regards
Michel
Re: Difference between EXIT and DISCONN [message #246622 is a reply to message #246459] Thu, 21 June 2007 08:53 Go to previous messageGo to next message
srinivasocp
Messages: 91
Registered: December 2005
Location: INDIA
Member
Hi Michel,

IS there any document where i can find more differences between exit and disconn.

Regards
Srini...
Re: Difference between EXIT and DISCONN [message #246633 is a reply to message #246622] Thu, 21 June 2007 09:11 Go to previous message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
SQL*PlusŪ User's Guide and Reference

Regards
Michel
Previous Topic: Workflow issue
Next Topic: condition in SQL (merged)
Goto Forum:
  


Current Time: Sun Dec 22 20:17:14 CST 2024