i SQLPlus


i SQL*Plus

Once you have a 9 i database running, with the Oracle HTTP Service active, you get an additional feature: i SQL*Plus. This is Oracle's way of letting you perform SQL programming over the Web. And lest you start getting nervous, this is a real gift because there is nothing you have to do.

To test your sytem, just go to your Web browser, type in the IP address of your database server followed by "ISQLPLUS", and you will get the login screen:

graphics/14fig10.gif

Next you'll see the work screen:

graphics/14fig11.gif

If you type in the simple command "select * from students;" and then hit the Execute button, in a few seconds you will get the results at the bottom of the screen:

graphics/14fig12.gif

What is attractive about this method is that it is a true GUI interface with automatic column formatting. Notice that i SQL*Plus makes the columns very easy to read. (At the present time you cannot stretch or compress the columns .) Under the Output drop-down list, you can display your results in their own window or save them to a file. You can also save your scripts using the Save Script button, as well as run any script using the Browse... and Load Script buttons in the upper right area of the screen.

What are the advantages? First of all, your network folks will be happy because this method does not raise the random port assignment issue that requires special consideration if you have a firewall. (For those who are interested, Oracle usually listens on port 1521 or so, but it can reply on any port when you come to the server remotely. This flexibility makes firewalls choke . There are products available to handle the problem, but they do require installation and support.) Second, it is a GUI interface, hence easier than the SQL> command-line prompt. Third, all you need is a browser. Nothing else has to be installed on the client!

So here's another fine Oracle tool. Have fun with it!

In this chapter you have been introduced to the incredibly complex yet wonderfully challenging world of SQL*Plus and PL/SQL. (Entire books are dedicated to just one or two of the topics mentioned here!) Keep going, get yourself some good reference books, start collecting interesting scripts, and see what you can do with the waiver database tables. Practice, practice, practice!

Tip

Here's one thing to add to your own Oracle toolbox. This is one of those annoying things that periodically pop up, and you forget what to do. Every once in a while you're going to get the "Input truncated to 13 characters " error message when you run SQL commands from the SQL> prompt. Evrything will look good, and I guarantee you won't find any errors in your code. It's just a little quirk in SQL*Plus processing: Your script doesn't have a carriage return after the last line. That's all it is! Just go to the end of the last line in your script, hit Delete , hit Enter , save the script, and it will work fine. Most new programmers run into this problem, and knowing what to do will make you look smart!

In a sentence , then, if you get the error message "Input truncated to 13 characters" when running SQL*Plus, just add a carriage return to the very end of your script.




Guerrilla Oracle
Guerrilla Oracle: The Succinct Windows Perspective
ISBN: 0201750775
EAN: 2147483647
Year: 2003
Pages: 84

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net