Using notepad++ to Execute Oracle SQL

Source: Internet
Author: User
Tags postgresql



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:


  1. Launch notepad++
  2. Show Plugin Manager, Plugin Manager, Plugins, Main menu
  3. Available Tab, Find and check nppexec plugin 
  4. Press Install button to download & Install plugin–restarts notepad++
  5. Open a SQL script
  6. Press F6 key (nppexec ' s default execute keyboard mapping)
  7. 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) " 
  8. Change the first three variables for your database, username and password
  9. Press the OK button











Using notepad++ to Execute Oracle SQL


Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.