Running Oracle script from Notepad++
Solution 1
Yes, just install a plugin called NppExec.
Steps:
- Open Notepad++
- Go to Plugins
- Select Plugin Manager
- Click on Show plugin manager
- Search the plugin called NppExec and install it
- Restart the Notepad++
- Write a query
- Press the key F6
- In the box write the next chain to connect:
--The following parameters in strong you will modify--
set ORA_USER=sys
set ORA_PASS=passforsys
set ORA_SID= MYINSTANCE
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) as sysdba @"$(SYS.TEMP)\$(FILE_NAME)"
- Clik on Save and name it for remember it.
- Clik on Ok to run the query
- Erase the "as sysdba" if you connect without superuser schema
- Enjoy
Regards!
Solution 2
Yes, you can create a Command in Notepad++, which can run any program, and you can get out the FULL_CURRENT_PATH
to the currently open file, which you could send in as a parameter.
So all you'd need is a tool that will connect to an Oracle instance and execute a a file containing your sql script. Maybe you can do that with SQL*Plus, otherwise you can find tools on the net that'll let you do that, just search for something like tool to execute sql script oracle command line
. Or it should be quite easy to write a tiny app that takes in a file containing a sql script and connects to the db and executes it.
Related videos on Youtube
user3381715
Updated on September 18, 2022Comments
-
user3381715 almost 2 years
I have successfully changed the SSH port in the /etc/config/uhttpd file using Terminal. But I cannot seem to find a way to do it dynamically from PHP. To explain, I need my server to automatically set the port on the linux system on Yun. So basically I need it to automatically change the port number in the uhttpd file. Thanks in advance.
-
Ruslan Osmanov about 8 yearsWhat do you mean by changing the port automatically and changing the port dynamically? Do you want a PHP script to change the configuration file remotely? Something like this:
./myscript.php --host=somehost --port=8788
? -
user3381715 about 8 yearsYes, I need the php script to change the listening port that the linux chip uses from the default 80 to a different port remotely.
-