Original link: http://www.toadworld.com/products/toad-for-oracle/b/weblog/archive/2013/08/21/ Using-notepad-to-execute-oracle-sql.aspx
notepad++ is a very useful text editing tool, it is also interesting to use it to execute Oracle SQL, although not very useful, perhaps in some cases will be useful.
In this copy of the original text is only recorded, see the original link.
The original text reads as follows:
Toad for Oracle are the single robust and powerful Ides (Integrated development environment) and DBA tool for all yo ur Oracle database needs. It ' s a veritable nuclear powered, Swiss Army knife capable of grand accomplishments. However there may well is times where you need a smaller, focused and thus simpler tool for modest tasks–such as opening And running a straightforward SQL script, where you might make minor changes such as setting a different script variable Value at the top. Yet still expect important features such as syntax highlighting for readability. For those specific, lesser needs I often use the popular freeware editor notepad++. However it requires some manual tweaking in order to has notepad++ execute SQL via Oracle ' s sql*plus. In this blog I'll show you how.
Note:The astute reader might ask why isn't just use Toad's free QSR utility (i.e. Quest Script Runner – it ships with every cop Y of Toad for Oracle which looks and operates the same is the Toad Editor, but it's only includes a subset of the Edito R ' s features? " The answer is simple–people like choices and many people know and prefer notepad++ as their standard Windows Notepad rep Lacement and editor of choice for more simple needs.
So let's see how to enable notepad++ to work much like Qsr–where notepad++ are the basic Editor and spawns sql*plus to Ru n the editor contents. It may is not being as well integrated or flexible as QSR, but once again it's what many people know and prefer for basic editin G.
Here is the steps:
- Launch notepad++
- Show Plugin Manager, Plugin Manager, Plugins, Main menu
- 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 execute keyboard mapping)
- Enter The following macro script into the Execute pop-up. set ora_user=bert 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
Using notepad++ to Execute Oracle SQL