Search

Top 60 Oracle Blogs

Recent comments

SQLPlus goodies with linesize

Anyone that has used SQL Plus since its inception will be familiar with this frustration:

image

There is my window, with all of that lovely free space at the right hand side for the results of my query to flow into…but the output wraps anyway! This is because SQL Plus was born in a different era Smile, when terminals ruled the earth, not windows that can be resized on a whim. In the example above, I had my LINESIZE set to 60, and SQL Plus obediently wraps the output as it crosses that threshold.

But there is help at hand. Even if you are not running the latest version of the database, I encourage you to upgrade to the more recent versions of SQL Plus. From 18c onwards, there is an option to set the LINESIZE to a new value of WINDOW.  This allows the output to stretch in a more intuitive fashion to the size of the window SQL Plus is running in.

image

“But it is still wrapping!” I hear you exclaim. True, but that is the same as any other standard windows client tool. All you need to do now is resize the window and not need to bother tinkering with SQL Plus settings.

image