Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: save sqlplus conf in a variable

Re: save sqlplus conf in a variable

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Thu, 08 Jan 2004 17:35:40 -0800
Message-ID: <1073612057.614164@yasure>


Frank van Bortel wrote:

> Daniel Morgan wrote:
> 

>> Sunil wrote:
>>
>>>> you can save
>>>> ALL of your sqlplus settings to a sql script file and then reset
>>>> them at a
>>>> later point. There is an example of this (and a lot more useful stuff
>>>> besides) at www.ixora.com.au/scripts (you will find the sqlplus
>>>> settings
>>>> ones under prerequisites).
>>>
>>>
>>>
>>>
>>> Is it possible to save a particular value in a sqlplus variable and
>>> later
>>> set it back to the original value.
>>>
>>> I need to do something like this. I am adding a call to new sql
>>> script to a
>>> huge sql script which has calls to other sql scripts. I need to do "set
>>> define off" in my script but I need to set the value of define to
>>> what was
>>> there originally at the end of my script. The solution at
>>> www.ixora.com.au/scripts will work for me. But I am interested in
>>> knowing if
>>> there is any easier way as I am interested in only the "define" value
>>>
>>> Thanks,
>>> Sunil.
>>
>>
>>
>> No. From the sounds of what you are writing you shouldn't be writing
>> scripts but rather procedures. If you want to store values ... store
>> them in a table and query them back into memory when the proc is run.
>>
> I'd say there's some miscommunication here...
> The OP just wants to remember a variable value in a SQL*Plus 
> (assumption) script. Lookup 'new value' in the SQL*Plus guide, if that's 
> what you are using.
> 
> But you don't need it - set define off will just disable it, not change 
> the value. Set it on again, and it has the original value again.
> And... it is session dependent. Exit at the end of your script, and
> you're done. Any new session will have the default value.

I think you are correct. Thanks.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Thu Jan 08 2004 - 19:35:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US