Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Some of the examples in this book are designed to run in the SQL*Plus environment. SQL*Plus provides many handy options and commands that we’ll use frequently throughout this book. For example, some of the examples in this book use dbms_output. For dbms_output to work, the following SQL*Plus command must be issued:
SQL> set serveroutput on
Alternatively, SQL*Plus allows you to set up a login.sql file, a script that is executed each and every time you start a SQL*Plus session. In this file, you can set parameters such as serveroutput automatically. An example of a login.sql script (taken from Chapter 2, “Your Performance Toolkit,” of Tom Kyte’s Effective Oracle by Design [Osborne McGraw-Hill, ISBN: 0-07-223065-7]) with self-explanatory comments is as follows (you can edit it to suit your own particular environment):