Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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: Wednesday, June 22, 2016 1:14 AM
Points: 698, Visits: 2,747
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: Yesterday @ 11:54 AM
Points: 7,199, Visits: 8,359
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 @ 4:13 PM
Points: 14,444, Visits: 37,856
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

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #1388556
Posted Monday, November 26, 2012 5:33 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 11:54 AM
Points: 7,199, Visits: 8,359
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 @ 4:13 PM
Points: 14,444, Visits: 37,856
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

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #1388561
Posted Monday, November 26, 2012 5:57 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 9:52 AM
Points: 8,193, Visits: 16,356
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