Re: IP Address



"Jay (Work)" <nomorespammer@xxxxxxxxxxxxx> wrote in message
news:56710442-BE46-4ACF-B062-13695F93B854@xxxxxxxxxxxxxxxx
It seems SMS stores last 3 IP addresses in SQL.. the SMS Client properties
shows IPAddress(0), IPAddress(1) and IPAddress(2). How can I get the
latest/current IP from SQL?

Hi Jay,

This is an example of a query that we use for collections to determine
membership to a specific subnet. Replace the x, y & z variable to get all
machines on a specific subnet.

select
SMS_R_System.ResourceID,SMS_R_System.ResourceType,SMS_R_System.Name,SMS_R_System.SMSUniqueIdentifier,SMS_R_System.ResourceDomainORWorkgroup,SMS_R_System.Client
from SMS_R_System where IPSubnets like "%x.y.z%"

Change that one a bit and here is one that returns the system ip address,
which would be as current as the last hardware inventory:

select SMS_R_System.ResourceId, SMS_R_System.ResourceType,
SMS_R_System.IPAddresses, SMS_R_System.Name,
SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup,
SMS_R_System.Client from SMS_R_System inner join SMS_G_System_SYSTEM on
SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where
SMS_G_System_SYSTEM.Name = "computername"


.



Relevant Pages

  • Reformat Group membership table
    ... Environment is SQL 2000 SP4 ... believe I can do this effectively is to reformat the table to a format ... I'm looking for suggestions on how I can accomplish my SQL query... ... group membership or maybe someone has a super secret query that will get the ...
    (microsoft.public.sqlserver.programming)
  • Re: Discover of computer by subnet
    ... I have no problem creating collection by subnet but how do i do a query ... based on membership. ... What need to be input to all these to get relevant subnet. ... > 1) Create an empty collection called computers by subnet. ...
    (microsoft.public.sms.admin)
  • Re: SELECT to get Direct and Indirect Role Membership
    ... I'm not a SQL pro so I'm going to avoid your specific question and offer ... RoleID, RoleCode, ParentRoleID ... were looking for Users in Role 3, RoleCode '1.2', the query would return ... string you can derive membership of Role 3, RoleCode '1.2', and Role 1, ...
    (microsoft.public.sqlserver.programming)
  • Re: Changing IP address for 2 Nodes, Cluster IP and SQL IP
    ... If you change the subnet mask for the cluster, it thinks it is a new network ... that the SQL IP resource subnet matches the physical IP subnet. ... How to change the network IP addresses of SQL Server failover cluster ...
    (microsoft.public.sqlserver.clustering)
  • Re: IP/Subnet Query Question
    ... If not decrement by 1 until the subnet is found. ... -- assuming @givenIP is a nvarchar representation ... the query has to run FAST. ...
    (microsoft.public.access.queries)