Toad World® Forums

CTRL+ENTER not working as it should

Hi there.

I used to use TOAD for Oracle 32 bits and liked to run my statements with CTRL+ENTER. Now I installed the 64 bits version but I cannot use the CTRL+ENTER shortcut anymore, at least not like it was before. On my previous version the CTRL+ENTER was associate with the Execute Statement command, but in this new installation it seems that it’s a shortcut for Execute Snippet. The difference between these two commands, you ask? The damn empty lines in the SQLs!

Executing an SQL with blank lines as statment make the empty lines ignored, but running it as Snippet returns an error. So I just went into the options and assigned the Execute Statement to CTRL+ENTER, but it keeps executing my SQLs as Snippet, that means it keeps failing with empty lines. Using the default shortcut F9 runs fine, it ignores the blank lines and my SQLs run perfectly. The weird thing is that I see in the options that Execute Snippet is assigned to Shift+F9. Why the CTRL+ENTER keeps running it as Snippet even though I see no conflict when I assign it to Execute Statement?

When I select the whole SQL (with blank lines) it doesn’t matter if I run it as Statement or a Snppet, it always ignore the empty lines, but it’s not pratical when we have statements fo 200+ lines…

So, what am I missing here? How can I have the CTRL+ENTER shortcut run SQLs with blank lines without having to select them?

What versions of Toad do/did you have? CTRL+Enter and Shift+F9 have used empty lines and lines containing only a forward slash as terminators for as long as I
can remember. Both of those shortcuts are mapped to the same action, CTRL+Enter is not configurable as you’ve seen. This method of execution bypasses the parser, F9 is the preferred method. Let me know what version you had before and what you have now and
I’ll compare them for differences. And this is just straight SQL you’re dealing with, correct? It’s not SQL embedded within PL/SQL is it?

From: LeoMDELima [mailto:bounce-LeoMDELima@toadworld.com]

Sent: Friday, February 27, 2015 12:18 PM

To: toadoracle@toadworld.com

Subject: [Toad for Oracle - Discussion Forum] CTRL+ENTER not working as it should

CTRL+ENTER not working as it should

Thread created by LeoMDELima

Hi there.

I used to use TOAD for Oracle 32 bits and liked to run my statements with CTRL+ENTER. Now I installed the 64 bits version but I cannot use the CTRL+ENTER shortcut anymore, at least not like it
was before. On my previous version the CTRL+ENTER was associate with the Execute Statement command, but in this new installation it seems that it’s a shortcut for Execute Snippet. The difference between these two commands, you ask? The damn empty lines
in the SQLs!

Executing an SQL with blank lines as statment make the empty lines ignored, but running it as Snippet returns an error. So I just went into the options and assigned the Execute Statement to CTRL+ENTER,
but it keeps executing my SQLs as Snippet, that means it keeps failing with empty lines. Using the default shortcut F9 runs fine, it ignores the blank lines and my SQLs run perfectly. The weird thing is that I see in the options that Execute Snippet is assigned
to Shift+F9. Why the CTRL+ENTER keeps running it as Snippet even though I see no conflict when I assign it to Execute Statement?

When I select the whole SQL (with blank lines) it doesn’t matter if I run it as Statement or a Snppet, it always ignore the empty lines, but it’s not pratical when we have statements fo 200+ lines…

So, what am I missing here? How can I have the CTRL+ENTER shortcut run SQLs with blank lines without having to select them?

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

Actual TOAD version: 12.1.0.22 (64bits)

Previous version was 12 (32bits), but I don’t remind anymore the release, I changed it there’s a week.

In fact I started using TOAD there’s only three months, but I’m so used with this feature from SQL Developer that I used it naturally on my previous install of TOAD. Now that it stopped working properly and I cannot restore it I’m felling a bit lost.

You said that CTRL+Enter always bypassed the parser? How come that only with this new install I’m missing it? Is there a way to change its behavior, a config file other than the options window and map CTRL+Enter = F9?

In 12.0 Ctrl+Enter used blank line as statement terminator as well. I can’t recall a single release since Toad 7.3 that this was any different. Here you see I’m running Toad 12 32-bit with two statements separated by a newline. You can see the second statement is flagged by the parser as having an error since the first statement is missing the terminator (notice the red squiggle). I’ve executed with Ctrl+Enter and only the first statement was executed.

The same setup in 12.0, but F9 is used. The expected ORA error is raised.

There has never been a way to reconfigure Toad to change this behavior.

Michael

From: LeoMDELima [mailto:bounce-LeoMDELima@toadworld.com]
Sent: Friday, February 27, 2015 2:24 PM
To: toadoracle@toadworld.com
Subject: RE: [Toad for Oracle - Discussion Forum] CTRL+ENTER not working as it should

RE: CTRL+ENTER not working as it should

Reply by LeoMDELima

Actual TOAD version: 12.1.0.22 (64bits)

Previous version was 12 (32bits), but I don’t remind anymore the release, I changed it there’s a week.

In fact I started using TOAD there’s only three months, but I’m so used with this feature from SQL Developer that I used it naturally on my previous install of TOAD. Now that it stopped working properly and I cannot restore it I’m felling a bit lost.

You said that CTRL+Enter always bypassed the parser? How come that only with this new install I’m missing it? Is there a way to change its behavior, a config file other than the options window and map CTRL+Enter = F9?

To reply, please reply-all to this email.

Stop receiving emails on this subject.
Or Unsubscribe from Toad for Oracle - General notifications altogether.
Toad for Oracle - Discussion Forum

Flag this post as spam/abuse.

Well, it’s quite odd that in this couple of months I did not run a single query with an empty line before and just notice this behavior now. Anyway I’m thinking here, would it work if I create a longin script with the attribute SET SQL BLANKLINES ON to be fired by TOAD for each single connection with any BD?

Is there such option to execute login scripts?

There is an option to run login scripts on the Scripts page in View|Options, but it won’t help you here. Those only affect script execution (F5) and not Ctrl+Enter,
Shift+F9, or F9. Since you’re a new Toad user you should try to get used to F9. That’s the method to do exactly as you are looking for in Toad since Ctrl+Enter behavior cannot be changed at this time.

From: LeoMDELima [mailto:bounce-LeoMDELima@toadworld.com]

Sent: Friday, February 27, 2015 3:42 PM

To: toadoracle@toadworld.com

Subject: RE: [Toad for Oracle - Discussion Forum] CTRL+ENTER not working as it should

RE: CTRL+ENTER not working as it should

Reply by LeoMDELima

Well, it’s quite odd that in this couple of months I did not run a single query with an empty line before and just notice this behavior now. Anyway I’m thinking here, would it work if I create
a longin script with the attribute SET SQL BLANKLINES ON to be fired by TOAD for each single connection with any BD?

Is there such option to execute login scripts?

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

Dears, I have found something similar to the problem indicated, simply running a script with at the end the character “;” .

I have always used the “;” at the end of my scripts and I always use ctrl+enter to run them, without any problem…but…

After having migrate Oracle from Solaris to Linux, running a script with at the end the “;” return me the error ORA-03113 end of file on communication channel . Running it with F9 it runs. The same on versions 11.0 and 12.0 of TOAD.

I have installed the version 12.8 and the script with the “;” at the end runs well with the CTRL+ENTER command that in anycase means Execute Snippet SQL as the previous version.

Do you have a meaningful response on what happened on version 11 and 12 (could be the serve linux the problem that invalidate the script with the “;” )?

Thanks to everyone,

Filippo

So 12.8 is working well? If so there’s no point in going back to see what those old versions did differently. My guess would be that 12.8 strips the semicolon before sending to Oracle and in the older versions we send the SQL with the semicolon, waiting for the ORA-911 invalid character error and then stripped at that point before reissuing the query. Toad did that in the past (and still may in some cases).

It seems but without an explanation… The TOAD version 12.0 is installed to everyone, but I have the 12.8 to test for new features.

Anyway a simple query like this: CREATE VIEW TEST (FIELD1) AS SELECT ‘TEST’ FROM DUAL;

running with CTRL+ENTER return the error indicated - ORA-03113: end-of-file on communication channel Process ID: 40146 Session ID: 694 Serial number: 56723

due to the “;” as statement delimiter , in fact removing it the statement runs well with CTRL+ENTER command .

With F9 it runs in anycase.

The strange thing is that I never had this problem with Solaris. Do you think server Linux could generate a problem like this?

incredible… with TOAD 12.0 the script :

CREATE TABLE TEST (FIELD1) AS SELECT ‘TEST’ FROM DUAL;

runs correctly.

The short command CTRL+ENTER so sends TOAD in crash only with the create view statement… any explanation?

I don’t have anything to offer, sorry. It worked before on your old OS, but after you moved your DB Oracle is now throwing an exception. I can’t answer why your environment no longer works as it did before. Don’t use CTRL+Enter is my suggestion. F9 is the way to go. Also, if you update to 12.9 the benefit of CTRL+Enter is even less. 12.9 allows you to write code with blank lines as terminators instead of requiring the semicolon. This negates the only benefit of CTRL+Enter for standalone statements.