0

I'm running Notepad++ with NppExec plugin.

When I press F6 i enter a script that connects to my database

set ORA_USER=USER
set ORA_PASS=password
set ORA_SID= DBSID
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 $(ORA_USER)/$(ORA_PASS)@$(ORA_SID) @"$(SYS.TEMP)\$(FILE_NAME)"

If my package doesn't compile, how do I check for errors with "show errors"?

Tom
  • 302
  • 2
  • 5
  • 14

2 Answers2

0

A workaround at the moment would be to add "show errors;" a the end of the package.

Tom
  • 302
  • 2
  • 5
  • 14
0

You can add show errors as shown below:

set ORA_USER=USER
set ORA_PASS=password
set ORA_SID= DBSID
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 show errors >> "$(SYS.TEMP)\$(FILE_NAME)"
cmd /c echo exit >> "$(SYS.TEMP)\$(FILE_NAME)"
sqlplus -l $(ORA_USER)/$(ORA_SID)@$(ORA_SID) @"$(SYS.TEMP)\$(FILE_NAME)"

Next you may want to enable error highlighting in console output window: Go to menu Plugins->NppExec->"Console Output Filters" add followng line to detect PLS errors:

%LINE%/%CHAR% *PLS-*
In the field named "Red" enter: FF 

Don't forget to tick the checbox on the left.

Mao73
  • 21
  • 4