-->

Tuesday, September 18, 2012

Enable/Disable Hyperthreading from Command Line on Dell Servers

To Enable Hyperthreading, open a command prompt, and navigate to the following directory:

For 32-bit Systems:  C:\Program Files\Dell\SysMgt\oma\bin
For 64-bit Systems: C:\Program Files (x86)\Dell\SysMgt\oma\bin

Run the following command to DISABLE Hyperthreading:

omconfig chassis biossetup attribute=cpuht setting=disable

Run the following command to ENABLE Hyperthreading:
omconfig chassis biossetup attribute=cpuht setting=enable

A reboot is then required for the setting to take effect.  To see if Hyperthreading is enabled, open up Task Manager, click on the Performance tab, and the number of cores should now be doubled under the CPU Usage section.  So, for a Single Hex-Core processor, you should now see a total of 12 CPU's if it's enabled.  If you only see 6, it's disabled.

Thursday, August 23, 2012

How-To: Copy SQL Server User Accounts From One Instance to Another

This article from Microsoft explains how to script out the logins in SQL Server on one server that you can execute onto another SQL Server.  Basically, what you are doing on the source SQL Server is creating a Stored Procedure in the Master database that will return all the logins WITH passwords in script format so that you can execute it in a Query onto the destination SQL Server.  Here is a sample of the output of the stored procedure:

-- Login: testuser
CREATE LOGIN [testuser] WITH PASSWORD = 0x0200565C53D7AE099FF88B71F1A8497B62943DF662CFDB7868EE943F2DF75BFE6249C61DDC2F4E43197991D6E617ADC2335F2C65DFB9A2A667FAE2C40C03D2A0847F66A68E HASHED, SID = 0x85VEB3BBBF2D146B272FC4E4C917512, DEFAULT_DATABASE = [master], CHECK_POLICY = ON, CHECK_EXPIRATION = ON

The article to follow is here.

Monday, August 6, 2012

Features Supported by the Editions of SQL Server 2012

This is a handy guide by Microsoft for figuring out what features are available in which editions of SQL Server 2012:

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

How-To: Pause/Suspend a Cluster Node for Maintenance

When you need to Pause a node in a cluster for maintenance, you can use this Powershell script provided by Microsoft:

http://technet.microsoft.com/en-us/library/ee461051.aspx

Monday, June 25, 2012

How to list or find Microsoft Hotfixes that are installed

These can all be run from the command line.  To send the results to a text file instead, at the end of each line include the following:  > drive\path\filename

To list all Microsoft Hotfixes that are installed:
wmic qfe get Hotfixid

To find a specific Microsoft Hotfix to see if it's installed:
wmic qfe | find "{KB#}"

To get a table list of hotfixes installed:
wmic qfe list brief

Examples:

wmic qfe | find "KB123456"
wmic qfe list brief > C:\Results\Hotfixes.txt

To generate a cluster log on a Windows 2008/Windows 2008 R2 cluster, open a command prompt and enter the following:

cluster log /g /span:30

Note that the /span:30 switch specifies the number of minutes to go back in time for the log collection. You can either specify your own number of minutes, or leave it off completely for several days of history.

Query to find spids at head of a blocking chain, their input buffers, and the type of blocking locks they hold


declare @blocker_spid smallint
declare @i_buff_string char(30)
set nocount on

/* Get all blocked spids */

select spid, blocked, hostname=substring (hostname, 1, 10),
progname=substring(program_name, 1, 10), cmd=substring(cmd, 1, 10),
status, physical_io, waittype
into #blk from master..sysprocesses (nolock) where blocked != 0

/* delete all blocking spids except the 1st in each blocking chain */

delete from #blk
where blocked in (select spid from #blk)

/* get each spid from sysprocesses which is referenced in */
/* the "blocked" column of #blk. This should be the head */
/* of each blocking chain */

select "Blocking spid" = spid, loginame=substring(suser_name(sid),1,10),
hostname=substring (hostname, 1, 10), progname=substring(program_name, 1,10),
cmd=substring(cmd, 1, 10), status, physical_io, waittype
from master..sysprocesses (nolock)
where spid in
(select blocked from #blk)

/* For each spid at the head of a blocking chain */
/* print its input buffer to show what query it's running */

declare blk_cursor CURSOR FOR SELECT blocked from #blk
open blk_cursor
fetch next from blk_cursor into @blocker_spid
while (@@fetch_status <> -1)
begin
select @i_buff_string = ('dbcc inputbuffer (' +
convert(char(6),@blocker_spid) +')')
select 'Below is input buffer for this blocking spid: ', @blocker_spid
select ' '
exec (@i_buff_string)
fetch next from blk_cursor into @blocker_spid
end
deallocate blk_cursor


drop table #blk