0

I use Notepad++ every day, and love it endlessly. The only thing I wish it could do that it can't out of the box is run SQL on a DB.

I use ConEmu to run SQLPlus when I need a command line Oracle environment, and Toad for everything else. So what I end up needing to do is either copy my code from N++ and paste it in ConEmu, or Toad. I wish I could just open the "Run" menu in N++, and have a console pop up that runs the code in ConEmu with SQLPlus.

There is THIS tutorial on how to set up SQLPlus for N++, but I would prefer ConEmu. Is there any way I could modify the code given in that tutorial to use ConEmu instead, or is my thinking all wrong here?

Code in tutorial:

set ORA_USER=bert
set ORA_PASS=bert1234
set ORA_SID= ORCL
npp_save
cmd /c copy /y "$(CURRENT_DIRECTORY)\$(FILE_NAME)" "$(SYS.TEMP)\$(FILE_NAME)" >nul 2>&1
cmd /c echo. >> "$(SYS.TEMP)\$(FILE_NAME)"
cmd /c echo exit >> "$(SYS.TEMP)\$(FILE_NAME)"
sqlplus -l $(ORA_USER)/$(ORA_PASS)@$(ORA_SID) @"$(SYS.TEMP)\$(FILE_NAME)"

If what I'm saying makes no sense, is there a way to use Toad's "Data Grid" as a console in Notepad++?

Thanks for any help you can give.

jtchase08
  • 632
  • 5
  • 12

1 Answers1

0

What version of Toad? If you're in Toad why not use Toad Script Runner? Look at the Execute as Script button on the Editor's toolbar. There's a small dropdown beside it. Click that and you can send your script to Toad Script Runner or SQL*Plus. Toad Script Runner is a GUI application that will execute your script and give you the grid control. Most users use these "Send to" methods so that Toad is freed up for other work.

Michael S.
  • 1,771
  • 15
  • 20
  • I wish I could do this, but I get an error that says, "This version of Quest ScriptRunner has expired. You must download a new version before proceeding." I'm on my work computer, so I'm limited in what I'm able to do. – jtchase08 Sep 11 '15 at 15:07
  • That should not expire. What version of Toad are you using? Is it a paid commercial copy, trial, freeware, other? – Michael S. Sep 11 '15 at 15:25
  • Ok, so to answer my own question I was informed that this was a bug with older releases of Toad (9.7-10.1). There's a new download of Quest Script Runner to fix the bug. You can download it from here... https://support.software.dell.com/Download-Install-Detail/3215668?fID=3215668&pr=Toad%20for%20Oracle – Michael S. Sep 11 '15 at 16:45