Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Network ip Expand / Collapse
Author
Message
Posted Monday, November 26, 2012 5:27 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Today @ 8:17 AM
Points: 667, Visits: 2,537
is any query to find the network IP , OS version etc by using management studio
Post #1388552
Posted Monday, November 26, 2012 5:29 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:35 PM
Points: 6,341, Visits: 7,338
SQL Server doesn't track those things. Therefore, no, there is no T-SQL command capable of getting that information.

However, you could use PowerShell or xp_cmdshell to get out to a command prompt and then query for that information using the usual methods.


Brandie Tarvin, MCITP Database Administrator

LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1388554
Posted Monday, November 26, 2012 5:32 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:44 PM
Points: 13,714, Visits: 35,100
in 2008 and above, there is a new function called connection property, and you can get a lot of that information from that.
that can give you both the client ip of the connection as well as the server ip the current connectionis using...it cannot give you other IP's the server listens to...for that you need the permissions to query one of the DMV's: sys.dm_exec_connections .

http://msdn.microsoft.com/en-us/library/bb895240.aspx

my typical sample query:
--Requires SQL 2008 + 
SELECT
ConnectionProperty('net_transport') AS 'net_transport',
ConnectionProperty('protocol_type') AS 'protocol_type',
ConnectionProperty('auth_scheme') AS 'auth_scheme',
ConnectionProperty('local_net_address') AS 'local_net_address',
ConnectionProperty('local_tcp_port') AS 'local_tcp_port',
ConnectionProperty('client_net_address') AS 'client_net_address',
ConnectionProperty('physical_net_transport') AS 'physical_net_transport'



Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1388556
Posted Monday, November 26, 2012 5:33 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:35 PM
Points: 6,341, Visits: 7,338
Oh, hey! I just learned something new!

Thanks, Lowell.


Brandie Tarvin, MCITP Database Administrator

LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1388557
Posted Monday, November 26, 2012 5:47 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:44 PM
Points: 13,714, Visits: 35,100
i was just looking through the SERVERPROPERTY functions, and cannot seem to find anything that shows the operating system.

it is buried in @@VERSION, though, so i'd expect a serverproperty to pull that part out.

the last part of string from SELECT @@VERSION that you can re-translate into something that makes sense to you:
Win7= ...on Windows NT 5.2 (Build 3790: Service Pack 2)
and
Server 2008 = ...on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) i think.


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1388561
Posted Monday, November 26, 2012 5:57 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 5:29 PM
Points: 7,567, Visits: 15,575
you can also use xp_regread to query the apprpriate registry values for your SQL server instance.

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1388567
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse