Friday, August 28, 2020

RDBMS Using Notepad++ to Execute Oracle SQL

 

Using Notepad++ to Execute Oracle SQL

Here are the steps:

  1. Launch Notepad++
  2. Main menu -> Plugins -> Plugin Manager -> Show Plugin Manager
  3. Available Tab, Find and check NppExec plugin   zzz2.png
  4. Press Install button to download & install plugin – restarts Notepad++
  5. Open a SQL script
  6. Press F6 key (NppExec’s default keyboard mapping for “Execute Statement”)
  7. Enter the following macro script into the Execute pop-up

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)"


zzz3.png


  1. Change the first three variables for your database, username and password
  2. Press the OK button

No comments:

Post a Comment

Thanks for showing your interest
I will shortly get back to you