sqlplus script exit

The copy/paste hurdle was a bit too high here. It took some practice to clear it. :wink:

Michael

Damir I have a related question not necessarily a Toad question but and Oracle question

gbradley@jsums.edu

Thanks

On Wed, Aug 16, 2017 at 4:00 AM, Damir Vadas bounce-damirvadas_250@toadworld.com wrote:

RE: sqlplus script exit

Reply by Damir Vadas
hm....your if will allways be false....

IF LOWER( AHOST ) = 'IM133' THEN

should be:

IF UPPER( AHOST ) = 'IM133' THEN

????

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle Forum notifications altogether.

Toad for Oracle - Discussion Forum

Flag this post as spam/abuse.

--
Gene L. Bradley Jr.

Systems Analyst

Office of Information Technology

Jackson State University

1400 J R Lynch Street

P.O. Box 17750

Jackson, MS 39217

ph 601.979.1042

fax 601.371.9146

email gbradley@jsums.edu

*In God we trust; all others bring data. * ~W.E. Deming

CONFIDENTIALITY STATEMENT

This electronic transmission is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone (601) 979-1042. Thank you.

and mine answer was general, not toad related one.
all commands were sql*plus genuine ones.

I just said that because I don't want to get kicked off the forum :slight_smile:

I have similar use.

I need for script to check the time and not run after 10:00 PM

(either something in the batch file that calls the script

or

something in the sql itself like you did earlier in this post

On Wed, Aug 16, 2017 at 2:31 AM, Damir Vadas bounce-damirvadas_250@toadworld.com wrote:

RE: sqlplus script exit

Reply by Damir Vadas
Hi,

For use in restricted env, where user cannot access "v$instance", I would recommend to call sys_context, which is available for most situations without restrictions.
So for your case to retrieve host name, you can use

SELECT sys_context('USERENV', 'HOST') FROM DUAL;

Hope this helps.
Brg

Damir

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle Forum notifications altogether.

Toad for Oracle - Discussion Forum

Flag this post as spam/abuse.

--
Gene L. Bradley Jr.

Systems Analyst

Office of Information Technology

Jackson State University

1400 J R Lynch Street

P.O. Box 17750

Jackson, MS 39217

ph 601.979.1042

fax 601.371.9146

email gbradley@jsums.edu

*In God we trust; all others bring data. * ~W.E. Deming

CONFIDENTIALITY STATEMENT

This electronic transmission is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone (601) 979-1042. Thank you.

I just said that because I don't want to get kicked off the forum :slight_smile:

I have similar use.

I need for script to check the time and not run after 10:00 PM

(either something in the batch file that calls the script

or

something in the sql itself like you did earlier in this post

On Wed, Aug 16, 2017 at 10:28 AM, Damir Vadas bounce-damirvadas_250@toadworld.com wrote:

RE: sqlplus script exit

Reply by Damir Vadas
and mine answer was general, not toad related one.

now I do not understand a bit of this thread...

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle Forum notifications altogether.

Toad for Oracle - Discussion Forum

Flag this post as spam/abuse.

--
Gene L. Bradley Jr.

Systems Analyst

Office of Information Technology

Jackson State University

1400 J R Lynch Street

P.O. Box 17750

Jackson, MS 39217

ph 601.979.1042

fax 601.371.9146

email gbradley@jsums.edu

*In God we trust; all others bring data. * ~W.E. Deming

CONFIDENTIALITY STATEMENT

This electronic transmission is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone (601) 979-1042. Thank you.