Home » Other » Client Tools » login.sql not working? (Oracle 10g 10.1.0.4.2)
login.sql not working? [message #439268] Fri, 15 January 2010 08:36 Go to next message
mike1976
Messages: 26
Registered: June 2005
Location: Happaugue, NY
Junior Member
My problem is simple. I just got a new widescreen monitor and i want my sql*plus output to fill the whole page. I added the 'linesize 999' to my login.sql file but the line length only goes 100 characters across. It doesnt matter what kind of query or function i run. Still only 100 characters across. what else can i be missing?

My login file is attached
  • Attachment: login.sql
    (Size: 1.38KB, Downloaded 1670 times)
Re: login.sql not working? [message #439270 is a reply to message #439268] Fri, 15 January 2010 08:41 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Do any of the commands in your login.sql work or is it just that one that's causing problems?
You do realise your attached file only has it set to 200?
Re: login.sql not working? [message #439271 is a reply to message #439270] Fri, 15 January 2010 08:46 Go to previous messageGo to next message
mike1976
Messages: 26
Registered: June 2005
Location: Happaugue, NY
Junior Member
no everything else in the login.sql seems to be working properly. I adjust settings almost daily and restart sql*plus and the changes always take effect.

Right now i counted the characters across and its exactly 100 characters displaying... 200 would fill the whole (wide) screen.


Thanks for your reply!!
Re: login.sql not working? [message #439272 is a reply to message #439268] Fri, 15 January 2010 08:50 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
If you set linesize within sqlplus does it work as expected?
Do you have multiple copies of login.sql laying around?
Re: login.sql not working? [message #439274 is a reply to message #439272] Fri, 15 January 2010 08:54 Go to previous messageGo to next message
mike1976
Messages: 26
Registered: June 2005
Location: Happaugue, NY
Junior Member
No.... See attached

  • Attachment: example.txt
    (Size: 1.18KB, Downloaded 1588 times)
Re: login.sql not working? [message #439278 is a reply to message #439274] Fri, 15 January 2010 09:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Try to give an alias to your expression.

Regards
Michel
Re: login.sql not working? [message #439292 is a reply to message #439278] Fri, 15 January 2010 09:32 Go to previous messageGo to next message
mike1976
Messages: 26
Registered: June 2005
Location: Happaugue, NY
Junior Member
I'm not sure what you mean?

i know what alias are, but not how it applies to "set linesize 200"....
Re: login.sql not working? [message #439296 is a reply to message #439292] Fri, 15 January 2010 09:36 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
In your SELECT <select expression> FROM ..., give an alias to the <select expression>.

Regards
Michel
Re: login.sql not working? [message #439297 is a reply to message #439268] Fri, 15 January 2010 09:36 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
It might make it easier to see what's going on. It appears from you're example that lines of text are being truncated. That shouldn't happen even if lines is set too low - oracle should just multi-line it.
e.g:
SQL> select 'aaaaaaaaaaaaaaaaaaaa'||'bbbbbbbbbbbbbbbb'||'cccccccccccccccccc'||'ddddddddddddddd'||'eeeeeeeeeeeee' from dual;

'AAAAAAAAAAAAAAAAAAAA'||'BBBBBBBBBBBBBBBB'||'CCCCCCCCCCCCCCCCCC'||'DDDDDDDDDDDDDDD
----------------------------------------------------------------------------------
aaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbccccccccccccccccccdddddddddddddddeeeeeeeeeeeee

SQL> set lines 50;
SQL> /

'AAAAAAAAAAAAAAAAAAAA'||'BBBBBBBBBBBBBBBB'||'CCCCC
--------------------------------------------------
aaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbcccccccccccccc
ccccdddddddddddddddeeeeeeeeeeeee


SQL> 
Re: login.sql not working? [message #439304 is a reply to message #439297] Fri, 15 January 2010 09:45 Go to previous messageGo to next message
mike1976
Messages: 26
Registered: June 2005
Location: Happaugue, NY
Junior Member
i set the linesize to 50 from within sql plus and it truncated the rest of the characters...

See attached.
  • Attachment: example.txt
    (Size: 1.19KB, Downloaded 1459 times)
Re: login.sql not working? [message #439306 is a reply to message #439268] Fri, 15 January 2010 09:53 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
That'd be because you've got wrap set to off.
Let's switch that back on and see what happens.
Re: login.sql not working? [message #439318 is a reply to message #439306] Fri, 15 January 2010 10:53 Go to previous messageGo to next message
mike1976
Messages: 26
Registered: June 2005
Location: Happaugue, NY
Junior Member
Wrap is now set to on in the login.sql and sql*plus prompt. Still no Dice!!!


See attached Confused
  • Attachment: example.txt
    (Size: 1.22KB, Downloaded 1723 times)

[Updated on: Fri, 15 January 2010 10:54]

Report message to a moderator

Re: login.sql not working? [message #439323 is a reply to message #439318] Fri, 15 January 2010 11:15 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You still don't give an alias to your expression.

Regards
Michel
Re: login.sql not working? [message #439353 is a reply to message #439323] Fri, 15 January 2010 14:54 Go to previous messageGo to next message
mike1976
Messages: 26
Registered: June 2005
Location: Happaugue, NY
Junior Member
I'm sorry what expression do i need to give an alias?

Something in my log file?

Would this:

select a.text_value from nai_samples a

produce better output than:

select text_value from nai_samples???


I'm not sure i understand where the alias needs to be added.


Thank you,

Mike
Re: login.sql not working? [message #439355 is a reply to message #439353] Fri, 15 January 2010 14:59 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
select 'aaaaaaaaaaaaaaaaaaaa'||'bbbbbbbbbbbbbbbb'||'cccccccccccccccccc'||'ddddddddddddddd'||'eeeeeeeeeeeee' ALIAS_HERE from dual;
Re: login.sql not working? [message #439428 is a reply to message #439268] Sat, 16 January 2010 14:05 Go to previous messageGo to next message
Kevin Meade
Messages: 2103
Registered: December 1999
Location: Connecticut USA
Senior Member
sqlplus for windows has a but in it.

You will often have to go to the menu and change your environment variable BUFFER WIDTH. It may infact match what you set but that will not matter, change it to something else anyway. You can even set it back.

For example if you SET LINESIZE 999 then do this:

SQLPLUS MENU
   <option>
      <environment>
         BUFFER WIDTH (currently 999) then (set to 1000)
or
         BUFFER WIDTH (current set to 888) then (set to 999)

You will get the idea. See if this is you issue.

Also, you may wish to set COL command in sqlplus. For example:

set linesize 999
col TEXT format a300 trunc

SELECT TEXT FROM USER_VIEWS WHERE VIEW_NAME = 'V1';


Good luck, Kevin
Re: login.sql not working? [message #439799 is a reply to message #439428] Tue, 19 January 2010 08:04 Go to previous message
mike1976
Messages: 26
Registered: June 2005
Location: Happaugue, NY
Junior Member
That was it!!! Thank you!! So obvious yet still eluded me until your help.

Thanks again,

Mike
Previous Topic: how to exec a procedure within Editor
Next Topic: Interface screen for Oracle database
Goto Forum:
  


Current Time: Fri Mar 29 08:08:21 CDT 2024