Home » SQL & PL/SQL » SQL & PL/SQL » Running script present on webserver (10g)
Running script present on webserver [message #681326] Wed, 08 July 2020 08:35 Go to next message
bluetooth420
Messages: 145
Registered: November 2011
Senior Member
Hi

I want to run a PL SQL sript present on a webserver.

Need guidance.

the script a.sql is present here.

https://naveed110.000webhostapp.com/a.sql


After Connecting user scott, i can not run the script with following command

@https://naveed110.000webhostapp.com/a.sql



Guide me what i am missing.
Re: Running script present on webserver [message #681327 is a reply to message #681326] Wed, 08 July 2020 09:22 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
on which system does the Oracle database reside?
Re: Running script present on webserver [message #681328 is a reply to message #681327] Wed, 08 July 2020 09:36 Go to previous messageGo to next message
bluetooth420
Messages: 145
Registered: November 2011
Senior Member
it is residing in windows environment.

tried to call from host as well with different combination but failed.


host cmd /k sqlplus scott/s@hp "@naveed110.000webhostapp.com/a.sql"


host cmd /k sqlplus  scott/s@hp "@naveed110.000webhostapp.com//a.sql"


host cmd /k sqlplus  scott/s@hp "@naveed110.000webhostapp.com\a.sql"


host cmd /k sqlplus scott/s@hp "@naveed110.000webhostapp.com\\a.sql"




 



host cmd /k sqlplus scott/s@hp @naveed110.000webhostapp.com/a.sql


host cmd /k sqlplus  scott/s@hp @naveed110.000webhostapp.com//a.sql


host cmd /k sqlplus  scott/s@hp @naveed110.000webhostapp.com\a.sql


host cmd /k sqlplus scott/s@hp @naveed110.000webhostapp.com\\a.sql
Re: Running script present on webserver [message #681329 is a reply to message #681328] Wed, 08 July 2020 10:10 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
I wanted to know if the Oracle database is installed & running on the same system that is webserver.
REALIZE that Windows OS knows NOTHING about SQL or what to do with any SQL statement.
REMEMBER that the web interface is STATELESS. This means that as far as the webserver is concerned, it knows nothing about any previous command.
I have no idea how or why you believe that you logged into the DB as USER SCOTT, the next HTTP command has no history or relationship to previous activity.
I suggest you go find a working example of how to interface webserver to Oracle database, because your current approach won't work.
Re: Running script present on webserver [message #681330 is a reply to message #681329] Wed, 08 July 2020 10:49 Go to previous messageGo to next message
bluetooth420
Messages: 145
Registered: November 2011
Senior Member
Oracle database is installed locally on office computer while webserver is at some remote location.

Basically my objective is to run a script file present on remote webserver.

as per SQL*Plus user guide
Quote:

<start> is: @<URL>|<filename>[.<ext>] [<parameter> ...]

Runs the specified SQL*Plus script from a web server (URL) or the
local file system (filename.ext) with specified parameters that
will be assigned to substitution variables in the script.
Stil need guidance
Re: Running script present on webserver [message #681331 is a reply to message #681330] Wed, 08 July 2020 11:54 Go to previous messageGo to next message
Michel Cadot
Messages: 67370
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

First, can you ftp the remote file from the office computer?
Note that "failed" (as well as "i can not run the script") is not an Oracle error and help us in no way to understand where the "error" (is there an error? "failed" does not even give clue about that) come from.

Re: Running script present on webserver [message #681332 is a reply to message #681326] Wed, 08 July 2020 14:27 Go to previous messageGo to next message
John Watson
Messages: 8348
Registered: January 2010
Location: Global Village
Senior Member
From the 19c docs,Quote:
Specifies the Uniform Resource Locator of a script to run on the specified web server. SQL*Plus supports HTTP and FTP protocols, but not HTTPS. HTTP authentication in the form http://username:password@machine_name.domain... is not supported in this release.
so you can't use https.
Re: Running script present on webserver [message #681335 is a reply to message #681332] Wed, 08 July 2020 16:23 Go to previous message
bluetooth420
Messages: 145
Registered: November 2011
Senior Member
Thank you for your advice.

I did it with following command

host cmd /k sqlplus  scott/s@hp @http://naveed110.000webhostapp.com//a.sql


Thank you for giving your precious time !
Previous Topic: Identify the format and display the data type of a string
Next Topic: Run Time Errors 933 and 512 executing Proc
Goto Forum:
  


Current Time: Mon Sep 28 14:20:16 CDT 2020