• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

SQL query to return the servername

jideck

ADSM.ORG Member
#6
Does anyone knows how you can find out the servername using a select query ? I can't find any table containg it....
Actually
>select server_name from status
getting many lines because there is one status for every node so output will like
tsm_inst1
tsm_inst1
tsm_inst1
tsm_inst1
tsm_inst1
tsm_inst1
tsm_inst1

etc depending how many nodes are there ....
so correct one is
SELECT distinct(server_name) from status
and answer will be

SERVER_NAME
---------------------------------------------------------------------------------------------------------------------------------
tsm_inst1
 

jideck

ADSM.ORG Member
#7
so useful query could be :
Protect: TSM_INST1>SELECT distinct(status.SERVER_NAME),CAST(FLOAT(SUM(auditocc.BACKUP_MB))/1024/1024 as DEC (8,1)) as TB from STATUS,auditocc group by status.SERVER_NAME

SERVER_NAME TB
--------------------------------------------------------------------------------------------------------------------------------- -----------
TSM_INST1 ---------------------------------------------- 5599.0
 

marclant

ADSM.ORG Moderator
#8
Actually
>select server_name from status
getting many lines because there is one status for every node so output will like
tsm_inst1
tsm_inst1
tsm_inst1
tsm_inst1
tsm_inst1
tsm_inst1
tsm_inst1

etc depending how many nodes are there ....
so correct one is
SELECT distinct(server_name) from status
and answer will be

SERVER_NAME
---------------------------------------------------------------------------------------------------------------------------------
tsm_inst1
This sounds odd. There should only be 1 row in the status table.

Code:
Protect: SERVER1>select count(*) from status

  Unnamed[1]
------------
           1
 

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 9 20.5%
  • Keep using TSM for Spectrum Protect.

    Votes: 23 52.3%
  • Let's be formal and just say Spectrum Protect

    Votes: 8 18.2%
  • Other (please comement)

    Votes: 4 9.1%

Forum statistics

Threads
31,055
Messages
132,235
Members
21,274
Latest member
ctauber
Top