This one is courtesy of Andrew Campbell at Sun Microsystems. He noticed in an Oracle Magazine article that you can use a URL as a script name in sqlplus.
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> @http://oracledoug.com/test.sql
NAME
---------
ORCL
SQL>
If you check out http://oracledoug.com/test.sql, you’ll see the script that this is running.
We were talking about this at work and perhaps the main use I could think of would be a centralised script repository that didn’t need distribution to multiple servers or any NFS mounts. I’m not sure I can see too many people using this extensively, but it’s nice to learn a new quirk.
Handy for consultants as well, especially if they do not get permitted to attach their own machines to the network.
I noticed that Pete Finnigan blogged about this sqlplus feature and asked him if he wanted to comment here to highlight some of the issues around using URLs, but you can find Pete’s comments here.
http://www.petefinnigan.com/weblog/archives/00000694.htm
Personally I would have thought the possible security implications were obvious, but it’s best to be careful where security is concerned.
It’s always good to hear other points of view.
Cheers,
Doug
That is nice Doug! Thanks.
Note that iSqlplus will be desupported by 2010.
See http://laurentschneider.blogspot.com/2006/03/isqlplus-and-sqlplusw-desupport.html
.
Who knows, maybe this will have an impact on URL-Scripts on the command line as well.