tsm sql query output format

bxtr97

ADSM.ORG Member
Joined
Oct 12, 2010
Messages
29
Reaction score
0
Points
0
Is there a way to change how my output is formatted when I run an sql query. Right now if i execute the command:

select volume_name,stgpool_name,status from volumes where volume_name='
X00172L4'

The results is formatted like:

VOLUME_NAME: X00172L4
STGPOOL_NAME: TAPE_STGPOOL_L4
STATUS: FULL

I want to get the result is a table format similar to ms sql.

volume_name STGPOOL_Name STATUS
X00172L4 TAPE_STGPOOL_L4 FULL

I am just running the queries from the administrative command line.

Thanks for the help.
 
Try using the -tab option when opening the admin clui. However, if memory serves me, it won't list the header/column names.
 
The -tab option does show me the information in more of a table format, it makes it easier to view and compare more information. Any thoughts on how to get the column names? Or is there a better program I should use to query the database instead of the admin command line?

Thank you
 
Is you SQLDISPlayMode set to narrow or wide?

Code:
query sqlsession
If wide, try setting it to narrow. (I do not think you want wide but feel free to try it.)

Also, though not pretty, you could try the add whitespace trick
Code:
select volume_name as "Volume Name         " ,stgpool_name as "Storage Pool               " ,status as "Status          " from volumes where volume_name='X00172L4'

Cheers
 
You can force the output in list or table mode on the command line when you start dsmadmc using -displaymode=list or -displaymode=table. I believe the admin client switches from table to list mode by default once the column width reaches some threshold width.

Try starting your admin client like this:
dsmadmc -tcps=xx.xx.xx.xx -tcpport=1500 -displaymode=table
 
Back
Top