Posts

Showing posts from November, 2011

My MCTS certificate.

Image
I have done my MCTS certification .


If anybody need assistance in doing certifications,Please contact me .

Steps to find the Cpu cores and Cpu Sockets in SQL 2000, SQL2005 and Sql2008 through Powershell in SQL2008.

Image
In SQL Server Management Studio 2008 (executed on the server where you want the information) right click anywhere in the object explorer tree under that server and select Start PowerShell.  Then paste the command I showed below.  Alternatively you can just run Powershell.exe on the server, and paste that command and get the desired results
Let’s write function named GetCpuinfo.

function GetCPUinfo {
    param ([array]$servernames = ".")
    foreach ($servername in $servernames) {
        [array]$wmiinfo = Get-WmiObject Win32_Processor -computer $servername
        $cpu = ($wmiinfo[0].name) -replace ' +', ' '
        $description = $wmiinfo[0].description
        $cores = ( $wmiinfo | Select SocketDesignation | Measure-Object ).count
        $sockets = ( $wmiinfo | Select SocketDesignation -unique | Measure-Object ).count
        Switch ($wmiinfo[0].architecture) {
            0 { $arch = "x86" }
            1 { $arch = "MIPS" }
            …

# To find the number of CPU Total Cores (Processor count) in the SQL through query analyzer in Sql2000, Sql2005 and Sql2008.

Image
# To find the number of CPU Total Cores (Processor count) in the SQL through query analyzer in Sql2000, Sql2005 and Sql2008.
Run the XP_MSVER in the query analyzer.