• 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.

Query nodes that is locked

TaSMania

ADSM.ORG Member
#1
How do I query for nodes that are locked or not locked?
under Table = Nodes, there is Locked
There's no "locked" info in the admin reference guide.
Tried:
Code:
 Query Node MYNODE locked='no' f=d
Doesn't work. What's another option for querying decom'ed nodes?
 

marclant

ADSM.ORG Moderator
#2
How do I query for nodes that are locked or not locked?
under Table = Nodes, there is Locked
There's no "locked" info in the admin reference guide.
Tried:
Code:
 Query Node MYNODE locked='no' f=d
Doesn't work. What's another option for querying decom'ed nodes?
First, not all locked nodes are decommissioned, but all decommissioned nodes are locked. So checking the locked status is not a good approach to determine if a node is decommissioned.

If you still want to look at locked nodes, use:
select node_name from nodes where locked='YES'

If you want to look at decommissioned nodes, use:
select node_name,decomm_date from nodes where decomm_state='YES'
 

TaSMania

ADSM.ORG Member
#3
oh I have to run sql statement and I don't have to:
Code:
 select locked from nodes?
I was going to add to my previous select statement for nodes with no backup or access for over 30 days that is NOT decom that's why I use locked='NO'
 

TaSMania

ADSM.ORG Member
#5
Thanks you so much.
Now, how would I query for the opposite? Where decomm_state is n/a. Tried below and it doesn't work.
decomm_state='no'
decomm_state=''
decomm_state=' '
decomm_state<>'YES'

First, not all locked nodes are decommissioned, but all decommissioned nodes
If you want to look at decommissioned nodes, use:
select node_name,decomm_date from nodes where decomm_state='YES'
 

reesema

ADSM.ORG Member
#6
Try this.

Code:
select node_name from nodes where decomm_state is null
Thanks you so much.
Now, how would I query for the opposite? Where decomm_state is n/a. Tried below and it doesn't work.
decomm_state='no'
decomm_state=''
decomm_state=' '
decomm_state<>'YES'
 

TaSMania

ADSM.ORG Member
#7
Keep finding myself back to this thread.
I want to query nodes that hasn't been access over 30 days that are not decom.
So I was at thobias.org/tsm/sql

I want to put to statement together.
1. List of nodes that have not accessed the tsm server in the last 30 days
Code:
SELECT node_name, TO_CHAR(lastacc_time,'YYYY-MM-DD HH24:MI') as "lastacc_time" FROM -
  nodes WHERE DAYS(current_date)-DAYS(lastacc_time)>30
2. List of nodes not locked.
Code:
SELECT node_name FROM nodes WHERE locked not like 'YES'
I'd realized when i ran the #1 Query some of the nodes lastacc_time show a date from yesterday. Why?
Once I know the reason why, I will add #2 to the end of #1 with 'and locked not like 'YES' '
 

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: 10 14.5%
  • Keep using TSM for Spectrum Protect.

    Votes: 44 63.8%
  • Let's be formal and just say Spectrum Protect

    Votes: 9 13.0%
  • Other (please comement)

    Votes: 6 8.7%

Forum statistics

Threads
31,250
Messages
133,092
Members
21,384
Latest member
Ayatar
Top