Categories
Windows 2008

Windows 2008 Server Core : Using netsh to configure TCP/IP

Windows 2008 Server Core : Using netsh to configure TCP/IP

List all ipv4 interfaqces and obtain the interface ID of the NIC you wish to change the configuration for, in this instance we will modify the settings of interface ‘10‘ which is shown as ‘connected’:
  netsh interface ip show interfaces

 

Set DHCP for ipv4 interface ’10’:
  set address 10 dhcp

Set Static IP Address/subnet mask/gateway on ipv4 interface ’10’:
  set address 10 static 192.168.1.100 255.255.0.0 192.168.1.1

Set primary and secondary DNS servers for ipv4 interface ’10’:
  set dnsservers 10 dhcp
  set dnsservers 10 static 192.168.1.10 primary
  add dnsservers 10 192.168.1.11

Set WINS servers for ipv4 interface ’10’:
  set winsservers 10 dhcp
  set winsservers 10 static 192.168.1.10
  add winsservers 10 192.168.1.11

Reset TCP/IPv4 stack:
  netsh interface ip reset

Categories
Exchange Server 2007

Outlook 2007 : Scanpst.exe Errors

Outlook 2007 : Scanpst.exe Errors

When using scanpst.exe to check a Personal Folder (.pst file) you may be presented with the following error: “Internal errors were found in this file. They must be repaired for this file to work correctly.

This is actually a red-herring in some cases. Creating all of the standard Microsoft Outlook folders resolve the inconsistency errors requiring a repair with scanpst.exe.

These folders include:

  • Calendar
  • Contacts
  • Deleted Items
  • Drafts
  • Inbox
  • Journal
  • Notes
  • Outbox
  • Sent Items
  • Tasks

That-said, creating the folders is unnecessary as you needn’t be worried about the reported ‘errors.’

Categories
Windows Server 2003

Windows : Re-installing the WMI Provider

Windows : Re-installing the WMI Provider

If you receive errors such as ‘SwbemLocator’ Critical Error 8004100A when running VBScripts, or applying GPO’s with WMI filters it may be necessary to re-install WMI.

Use WMIDiag.vbs to perform initial diagnosis (available here: http://www.microsoft.com/downloads/details.aspx?familyid=d7ba3cd6-18d1-4d05-b11e-4c64192ae97d&displaylang=en),
> Insert the slipstreamed Windows CD (including the current client Service Pack version) into the CDROM.
> Re-install WMI using the following command: rundll32.exe setupapi,InstallHinfSection WBEM 132 %windir%\inf\wbemoc.inf

You may be prompted for a file named ‘napclientprov.mof’ a non-corrupt version of this can be downloaded here.

Categories
Exchange Server 2007

Exchange 2007 : SendAs Bug

Exchange 2007 : SendAs Bug

I recently came across an issue where SendAs for a Resource (Shared) Mailbox appeared to be failing, despite specifically defined permissions granting this.The mailbox in question had several email addresses defined, and the SendAs function was using one of the secondary email addresses.

It would appear that it is impossible to SendAs using an email address other than the primary (reply) email address, or display name of any Exchange object.

Categories
Windows 2008

Windows Server 2008 R2 : LookupAccountName Issues

Windows Server 2008 R2 : LookupAccountName Issues

When running Windows Server 2008 R2 x86/x64 that is a member of a Windows 2000 Domain you may encounter errors when installing applications that are similar to:

‘The trust relationship between this workstation and the primary domain failed’

I recently came across this error when installing SQL Server 2008 SP1 on a Windows Server 2008 R2 failover cluster, when selecting the service accounts from the domain I was presented with the error:

Error in User Account –   ‘The trust relationship between this workstation and the primary domain failed’

To resolve this error you must apply the following hotfix: http://support.microsoft.com/?id=976494

This issue affects Windows 7 and Windows Server 2008 R2, only when joined to a Windows 2000 domain. It is caused by a program that calls the LookupAccountName function to retrieve a security identifier (SID) for an account.

Categories
Exchange Server 2007

Exchange 2007 : Grant Full Mailbox Access via Shell

Exchange 2007 : Grant Full Mailbox Access via Shell

The following Exchange Management Shell command can be used to assign ‘Full Mailbox Access’ permissions on a users mailbox for another user:

Add-MailboxPermission “UserA” -User “UserB” -AccessRights FullAccess

This will grant UserB full access to UserA’s mailbox.

Categories
SQL

SQL : View Running Trace Information

SQL : View Running Trace Information

The following SQL can be used to identify any traces that are active on a SQL instance.

Use the query below to see how many running traces there are on the instance:

SELECT count(*) FROM :: fn_trace_getinfo(default) WHERE property = 5 and value = 1

running
1

The next query will return more detailed information about the active traces:

SELECT * FROM :: fn_trace_getinfo(default)

traceid property value
1 1 0
1 2 c:\temp\TraceGlobal
1 3 5
1 4 29:27.5
1 5

1

To halt the running trace use the fllowing query:

EXEC sp_trace_setstatus  1, @status = 0

To delete the trace definition from the database:

EXEC sp_trace_setstatus  1, @status = 2

 

Categories
SQL

SQL : Enable AWE on i386/x86

SQL 2000 : Enabling AWE on Windows Server

On an x86/i386 system it is possible to use PAE and AWE to allow SQL to use more than 2GB of RAM. Windows Server Advanced 2000 x86 allows for up to 8GB of RAM using PAE and AWE, Windows Server 2003 Enterprise allows for up to 16GB.Datacenter editions allow for even greater ammounts of PAE/AWE assigned RAM.

First configure the /PAE switch in the operating system boot.ini file. You can also use the /3GB switch if not configuring more than 16GB of RAM.

Next, run the following SQL to enabled the instance to use AWE, and therefore the newly available RAM.

sp_configure ‘show advanced options’, 1
RECONFIGURE
GO
sp_configure ‘awe enabled’, 1
RECONFIGURE
GO
sp_configure ‘max server memory’, 2048 — This Sets The Allocation To 2 Gigabyte
RECONFIGURE
GO
 

You will have to restart the SQL instance for the change to become effective.

Considerations:

  • The total sum of all SQL assignd RAM should not be greater than all of the memory in the server; you should removed 2GB from this total for the OS if not using the /3GB  switch, or 1GB if using the /3GB switch.
  • You should configure the SQL service account to have ‘Lock Pages In Memory‘ permissions; this will prevent the AWE memory being paged to disk.
  • On a failover cluster environment, the sum of ALL instance assigned AWE memory should be no greater than the total memory (taking the kernel reserved 2GB/1GB depending on /3GB switch) on a single node. If this is exceeded, any instance which starts on a node where all memory is assigned will start in dynamic mode with 128MB RAM, or my even fail to start.
  • The ‘min server memory’ option is ignored when using AWE.
  • You cannot monitor SQL server memory use when utilising AWE from Task Manager – this will simply show the SQL instance using the total amount of memory. The following SQL can be used to identify real memory usage:

select counter_name,cntr_value/1024 As MemoryUsedMB from master..sysperfinfo
where counter_name = ‘Total Server Memory (KB)’

  • AWE is is an enabler allowing a 32-bit Operating System to address more than 4GB of physical memory.; there are obvious benifits however, there are performance considerations which should not be over looked when using AWE. For example, AWE memory cannot be swapped to the page file, therefore you should closely monitor application memory requirements after machine startup before allocating memory to SQL.
Categories
Windows Server 2003

HP BL460 : ASR hpqilo2 Issues

HP BL460 Automatic System Reboot Errors

For a while now a set of HP BL460c servers have been randomly rebooting, the HP Integrated Management Log shows ‘ASR Detected by System ROM‘ along with the following events in the System event log on an affected machine:

Event Type:    Warning
Event Source:    hpqilo2
Event Category:    None
Event ID:    57
Failed GET SENSOR READING, sensor 16

Event Type:    Warning
Event Source:    hpqilo2
Event Category:    None
Event ID:    57
NetFN 0x4, command 0x2D timed out

The solution for this was to perform the following:

  • Install the latest ILO Firmware Update v. 1.81
  • Install the HP iLO Management Channel Interface Driver v. 1.15.0.0
  • Install the HP ProLiant iLO2 Management Controller Driver  v. 1.12.0.0

All of these drivers can be downloaded form the following location, selecting your operating system:

http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?prodNameId=3288156?=en&cc=us&prodTypeId=3709945&prodSeriesId=1842750&taskId=135

Categories
Domain Migration

Windows 2008 : DCPromo Administrator Account Error

Windows 2008 : DCPromo Administrator Account Error

When trying to promote a Windows Server 2006 x84 R2 server to a domain controller of a new forest I obtained the following error which stopped the promotion of the system:

The local Administrator account becomes the domain Administrator account when you create a new domain. The new domain cannot be created because the local Administrator account password does not meet requirements.

Currently, a password is not required for the local Administrator account. We recommend that you use the net user command-line tool with the /passwordreg:yes option to require a password for this account before you create the new domain; otherwise, a password will not be required for the domain Administrator account.

To resolve this error, open a command-prompt as Administrator and execute the following command: net user Administrator /passwordreq:yes *

This will ensure that the Administrator account requires a password, and that a password is set. After running this I was able to proceed with the promotion of the server to a DOmain Controller.