Using Notepad++ to Execute Oracle SQL
Here are the steps:
- Launch Notepad++
- Main menu -> Plugins -> Plugin Manager -> Show Plugin Manager
- Available Tab, Find and check NppExec plugin

- Press Install button to download & install plugin – restarts Notepad++
- Open a SQL script
- Press F6 key (NppExec’s default keyboard mapping for “Execute Statement”)
- 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)"

- Change the first three variables for your database, username and password
- Press the OK button
No comments:
Post a Comment
Thanks for showing your interest
I will shortly get back to you