SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


how to see Windows server information


how to see Windows server information

Author
Message
ELLEN-610393
ELLEN-610393
SSC Veteran
SSC Veteran (208 reputation)SSC Veteran (208 reputation)SSC Veteran (208 reputation)SSC Veteran (208 reputation)SSC Veteran (208 reputation)SSC Veteran (208 reputation)SSC Veteran (208 reputation)SSC Veteran (208 reputation)

Group: General Forum Members
Points: 208 Visits: 102
Hello, I am seeking advice from experienced SQL Server administrators who have had to deal with administering SQL Servers when they are not allowed to remote to the Windows server and have local permissions to see the drives and server information.

Personally I have always worked at small to midsize companies [or service companies] that have had system administrator privileges as well as SQL Server sysadmin and serveradmin privileges.

Now I am at a larger institution where the infrastructure system administrators want to limit access and privileges to the servers that host SQL Server. They don't want the SQL Server DBA's to use Remote Desktop to connect to the servers.

I am hoping there are server level commands that exist that can be used through the SQL Server Management Studio that I don't know about [since I have never needed to use them].

For a very basic example, usually to see how much space is still available to add to data or log files I will look at Windows Explorer to see the size of the drives and available space. If I can't remote to the machine to do that ... how am I supposed to find out size & availability?
ALZDBA
ALZDBA
One Orange Chip
One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)

Group: General Forum Members
Points: 29689 Visits: 8986
xp_fixeddrives shows free space on the drives the sqlinstance can see.

As you now experience, being granted windows level authorities is still a privilege.
Even though an experienced sqlserver dba will need more information than just the little bit available through the instance.
In my experience, windows level administrator privileges are not granted because someone just performs job protection.

An unexperienced dba may indeed mess up windows quite a bit.

Keep in mind only a collaborative model will result in a win / win situation for your company


On the other hand, if e.g. your company outsourced server hosting, you may even NOT want to have administrator privileges at windows level, just because of segregation of duties.
In that case, request your windows admins to provide you the windows level collected data of SQLPowerdoc ( https://sqlpowerdoc.codeplex.com/ )
on a regular basis.

It collects quite a bit of valuable information.

Johan


Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere w00t

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


press F1 for solution, press shift+F1 for urgent solution :-D


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me Alien but most of the time this is me Hehe
dan-572483
dan-572483
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: General Forum Members
Points: 3565 Visits: 2000
Here is a script I use to look at available drive space where database files are located:


sp_helpdb databasename --< Name of DB here

/* This runs on SQL 2008 R2 SP1 & higher ONLY */
DECLARE @dbID INT = 2 --< Database ID - TempDB = 2
DECLARE @fileID INT = 2 --< File ID from sp_helpDB above
select database_id, file_id, volume_mount_point AS 'Drive', logical_volume_name,
(total_bytes/1024)/1024 AS [Drive Size MB], (available_bytes/1024)/1024 as [Free MB],
100-(100*(CAST(available_bytes AS DECIMAL(38,2))/CAST(total_bytes AS DECIMAL(38,2)))) as 'Percent Full'
from sys.dm_os_volume_stats (@dbID, @fileID)



I do have admin access to the OS's so I use this mostly because it is faster than logging in via RDP, and because there is less risk of accidently clicking the wrong thing when on production servers.

This is also an IT management issue. If you are reponsible to make the databases run optimumly, you need either desktop access to the server OS, OR an OS Administrator must be assigned to work closely with you. Otherwise you're working in a Dilbertian environment.
Bill (DBAOnTheGo)
Bill (DBAOnTheGo)
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1241 Visits: 599
Glen Berry has a good set of scripts that give you this information and other things as well. It would be a good one to look into. the scripts are located here.

It was very helpful when I was in your same situation.

.
ELLEN-610393
ELLEN-610393
SSC Veteran
SSC Veteran (208 reputation)SSC Veteran (208 reputation)SSC Veteran (208 reputation)SSC Veteran (208 reputation)SSC Veteran (208 reputation)SSC Veteran (208 reputation)SSC Veteran (208 reputation)SSC Veteran (208 reputation)

Group: General Forum Members
Points: 208 Visits: 102
You guys are all great. Thank you so much for the replies.
The information is valuable and greatly appreciated.
Perry Whittle
Perry Whittle
SSC Guru
SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)

Group: General Forum Members
Points: 53717 Visits: 17672
although generally frowned upon, xp_cmdshell can get most info from the OS. Just ensure your script disables it again after calling it like so


exec sp_configure 'show advanced options', '1'
reconfigure

exec sp_configure 'xp_cmdshell', '1'
reconfigure

exec xp_cmdshell 'wmic volume get capacity, "free space", name'

exec sp_configure 'xp_cmdshell', '0'
reconfigure

exec sp_configure 'show advanced options', '0'
reconfigure



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

"Ya can't make an omelette without breaking just a few eggs" ;-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search