Categories
Exchange Server 2007

PFDavAdmin : WIndows 7

PFDavAdmin : WIndows 7

In order to get PFDavAdmin working on Windows 7 you must install .NET Framework 1.1, otherwise you will get errors when trying to connect, expand or modify DACLs. You can get a Windows 7 64-bit compatible version from here: http://www.microsoft.com/downloads/en/confirmation.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3&displaylang=en

PFDavAdmin has been replaced; http://gallery.technet.microsoft.com/Exchange-2010-RTM-ExFolders-c76c3649

Categories
Windows 2008

AD DS : Automate AD DS Snapshots

AD DS : Automate AD DS Snapshots

Use the following code within a command file to automate the creation of AD DS snapshot in a Windows Server 2008 based Active Directory. You can then set this script as a scheduled task (running as a Domain Admin):

@echo off ntdsutil snapshot "activate instance ntds" create quit quit exit
Categories
General

ESXi – Deployment Steps for BL465c G7 / c-Class blades

ESXi : Deployment Guide

1)       If VMFS LUNs are presented, unpresent LUNs or remove Virtual Connect FC SAN configuration from the servers virtual connect profile. There is a risk these LUNs will be formatted during setup if this is not completed.

 If this is a rebuild of an existing host, perform the following steps:

 1.       In Command View, find the VMware cluster “host” entry.

2.       Identify the pair of WWNs that relate to the host to be removed – cross-reference with fabric zones or Virtual Connect profile.

3.       In the example image, WWNs for EUVM06 have been circled. The entries are not always adjacent so take care!

4.       Click ‘Delete Port’ and choose the WWN from the pull down.

5.       Only 1 port can be deleted at a time.

 

 2)       Create new VC profile for the ESX server (NOTE you can copy an existing EUVM profile to save a lot of time)

 

Port 1 + 2 Multiple Network Configuration

Click the paper/pencil icon to access this screen

 

Port 3 + 4 Multiple Network Configuration

Click the paper/pencil icon to access this screen

         Port 5 + 6 Multiple Network Configuration

        

3)       Set BIOS Power Management Configuration:

a.       Reboot the server and enter the Rom Based Setup Utility (RBSU)

b.       Select Power Management Options

c.        Select HP Power Profile

d.       Select Maximum Performance

e.        Verify that HP Power regulator is now set to HP Static High Performance Mode

4)       Upgrade firmware:

a.       BIOS – mount BL465cG7_A19October2010 as a virtual USB driver and boot server.

b.       CNA – Boot from OneConnect-Flash-2.102.517.7.iso

c.        ILO – flash ILO3 via Web Interface using ilo3_115.bin

5)       Install ESXi 4.1 (HP OEM version) – The ISO file is HP-ESXi_41.iso

 

6)       Present VMFS LUNs / new data stores to ESXi host – via Command View. Note you will have to shutdown the ESXi server and re-enable the SAN Fabric connections on the servers Virtual Connect profile if these were disabled previously.

7)       Perform post-configuration requirements: (note there is no root password by default)

  • Set root password – use the configure password option in the ILO console
  • Set vmnic0 and vmnic1 as management NICS:

 

 

You will need to set the VLAN ID of the management network using the VLAN (optional) menu, set the VLAN to 120

 Set IP address, DNS servers, hostname (upper case hostname, lower case domain name)

 

 8)       Create forward and reverse DNS lookup records in Active Directory DNS for the new ESXi server (manual requirement for VMware HA to function correctly)

 9)       Enable SSH Tech Support Mode from ILO console

 

 

 10)   Modify hosts file, add entries for EUVCENTER01/02 both with IP 10.144.110.110, essential for VMHA. Login via SSH and enter the command vi /etc/hosts

 

 Press ‘i’ to insert new text and add the following lines:

 10.144.110.110 EUVCENTER01.domain.local EUVCENTER01

10.144.110.110 EUVCENTER02.domain.local EUVCENTER02

 

 Press Escape, then enter the following characters ‘:wq’ This will save the file and exit the text editor.

 11)   Import the new VM host into vCenter at the Datacenter level

 

 12)   Configure Time Server Settings, (per server). To access this console, login to the vCenter GUI, select a host and then select the configuration tab. Finally select the Time Configuration option.

 Click the Options button:

 Select NTP Settings

 

Click Add, and enter 10.44.90.1, then perform the same for 10.44.90.2:

 

 13)   Configure Distributed Switch Networking (as per Virtual Connect configuration)

 Adapters must be added to the dvSwitch as follows:

 

Vmnic0

Management/vMotion dvSwitch

Vmnic1

Management/vMotion dvSwitch

Vmnic2

Internal dvSwitch

Vmnic3

Internal dvSwitch

Vmnic4

Ecommerce dvSwitch

Vmnic5

Ecommerce dvSwitch

 To add host adapters to Distributed Switches browse to Home > Networking

 

 Expand the list of distributed switches:

 

 Referring to the table above we’ll now add the correct physical adapters to the distributed virtual switches. Right-click the distributed switch you wish to add the host to, in this case dvSwitch_Management/vMotion and select ‘Add host to vNetwork Distributed Switch…

 

 Select the host and then select the correct adapters for the Distributed Switch, then click Next

 

 You must migrate the vmk0 (management interface) to port group dvPortGroup_Internal_VLAN120 otherwise you will lose connectivity with the ESXi host, click the assign port group button:

 

 Select dvPortGroup_Internal_VLAN120 then click OK:

 

 Click Next

 

  Click Next

 

 Click Finish, wait for the task to finish – you can see the status in the task status window.

 

 14)   Now add the adapters to the Internal and Ecommerce distributed vSwitch, you do not need to migrate any vmk interfaces, just click next on this window.

 15)   In the Hosts and Clusters window select the new host, then the configuration tab, select Networking and finally vNetwork Distributed Switch. Click Manage Virtual Adapters

 

We must now define the vMotion and Fault Tolerance vmk interfaces (vmk1 vMotion and vmk2 FT)

The following configuration should be present when you have finished configuration at this stage:

  • vmk0 – VLAN120 – Management
  • vmk1 – VLAN121 – vMotion
  • vmk2 – VLAN122 – Fault Tolerance

 Click Add

 

Click Next

 

 Click Next

 

 Select the correct VLAN port group for the virtual adapter function (as per definitions above) then select the correct function for the virtual adapter; in this case VLAN 121 and vMotion, then click Next

 

 Enter an IP address for the correct VLAN, don’t change the Default Gateway, the host can only have a single default gateway. Finally click Next

 

Click Finish to apply the change

 

 Perform the same for vmk2 for VMware FT:

 

 Final configuration should be as follows:

 

16)   Ensure that the host can see all of the data stores, select the host, then the configuration tab and select Storage

 17)   Install patches/updates using the VMware vSphere CLI

Place host you wish to update in maintenance mode

 Copy the SVE-be2net-2.102.554.0-offline_bundle-347594.zip, hpq-esxi4.1uX-bundle-1.0a.zip and hp-nmi-bundle-1.1.02.zip files to your local C:\.

Using the vSphere CLI install the network driver update for the CAN, you’ll need to change the hostname:

    vihostupdate.pl –server server01 –install –bundle “C:\SVE-be2net-2.102.554.0-offline_bundle-347594.zip” –bulletin SVE-be2net-2.102.554.0

 Now copy the hp-esxi4.1uX-bundle-1.0a.zip and hp-nmi-bundle-1.1.02.zip files to c:\ then execute the following vSphere CLI commands:

vihostupdate.pl –server server01 –install –bundle “C:\hp-esxi4.1uX-bundle-1.0a.zip” –bulletin hpq-esxi4.1uX-bundle-1.0a

 vihostupdate.pl –server server01 –install –bundle “C:\hp-nmi-bundle-1.1.02.zip” –bulletin hp-nmi-driver-1.1.02

18)   For active/active storage (EVA8400) you must configure the multi-path options for the host.

 This can be completed in two ways, the easiest of which is using the VMWare PowerCLI

 Once installed, change the server name and use the following commands to configure the storage correctly on the new host:

connect-viserver euvcenter01

$vmhost = get-VMhost server01.domain.local

Get-VMHost $vmhost | Get-ScsiLun -CanonicalName “naa.6001438005*” | Where {$_.MultipathPolicy -ne “RoundRobin”}

Get-VMHost $vmhost | Get-ScsiLun -CanonicalName “naa.6001438005*” | Where {$_.MultipathPolicy -ne “RoundRobin”} | Set-ScsiLun -MultipathPolicy “roundrobin”

Using the GIU, the same result can be achieved from the Hosts and Clusters tab, select the new host, select Configuration, then select Storage.

Right-click the VMFS datastore you wish to change the settings on and select properties, the click Manage Paths:

 

 You can view the current multipath selection mode; click the drop-down box to change this to Round Robin, once done click Change.

 

 You must complete this for every EVA8400 volume.

 You can verify the change in the host storage window:

 

 19.    Configure vMA logging; open an SSH connection to vma01.domain.local

                vifp addserver server01.domain.local

(You’ll be prompted for a password)

 

 Now setup logging for the new host:

vilogger enable –server euvm05.domain.local –numrotation 20 –maxfilesize 10 –collectionperiod 10

 

       Verify that logging is working for the server (all servers will be listed, just look for the new one):

 

20.    Configure ServersAlive Alerts for the new server.

21.    Add the server to the cluster (if applicable) – simply drag and drop via the Hosts and Clusters window.

Categories
SQL

SQL Server : Deployment Guide

SQL Server : Deployment Guide

  1. Use mount points for storage and an anchor lun for the mount points. This will simplify storage management.
  2. Split logs and database files; lots of SAN storage vendors will say this isnt necessary now, but keep them seperate. This will protect you in the even of database file growth beyond normal tolerances.
  3. Storage must be aligned, if operating system is earlier than Windows 2003 this must be manually done when partitioning the LUNs, Windows 2008+ automatically aligns disks:
    1. If the disk you are aligning is already blank (raw), proceed to Step 3. If the disk contains data, backup the disk before proceeding.
    2. Delete all partitions on the disk.
    3. Open a command prompt, and execute Diskpart.exe.
    4. At the Diskpart command prompt, type List Disk and press Enter. If the disk you want to align does not appear in the list make sure that it exists and is accessible using the Disk Management snap-in.
    5. At the Diskpart command prompt, type Select Disk X, where X is the number of the disk as shown in the output of the List Disk command. Diskpart should return a message that indicates that Disk X is the selected disk.
    6. At the Diskpart command prompt, type Create Partition Primary Align=X, where X is either 32 or 64, depending on the recommendation from your storage vendor. If your storage vendor does not have any specific recommendations, it is recommended that you use 64. W 2008 / Vista use an offset of 1024.
    7. At the Diskpart command prompt, type Assign Letter=. For example, to assign letter Z to the disk, type Assign Letter=Z.
    8. Once the drive letter is assigned, type exit to exit out of the Diskpart utility.
    9. Use the Disk Management snap-in or the Windows Format command to format the partition as an NTFS-formatted partition.
  1. All data and log LUNs should be formatted with 64K NTFS allocation unit size
  2. If server has more than 8 CPU’s (or cores) you must configure MAXDOP to a value of 8, when less than 8 CPUs are present use a value of 0-X where X is the number of CPU’s. For OLTP scenarios use a MAXDOP calue of 1.
  3. Confirm SQL collation setting is correct (if upgrading/migrating from an existing platform) using SELECT SERVERPROPERTY(‘Collation’) AS ‘Collation’
  4. TempDB should be configured to have approx 4 data files, execute the code below, modify for each additional data file:
        ALTER DATABASE [tempdb]
        ADD FILE (
            NAME = N’tempdev_1′,
            FILENAME = N’E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Data\tempdb_1.ndf’ ,
            SIZE = 8MB ,
            FILEGROWTH = 10% )
        GO

  5. Ensure you use setspn to configure the ServicePrincipalName for and SQL service accounts, setspn –A MSSQLSvc/[server fqdn]:[port | instance name] “[service account]” – anything in RED should be changed:
    1. For an instance running on port 1188 example: setspn –A MSSQLSvc/DB1.domain.local:1188domlocal\svc_dbe
    2. For a named instance, in this example ‘I1’, you should also run: setspn –A MSSQLSvc/DB1.domain.local:I1domlocal\svc_dbe
  6. MSDTC should have its own resource group
  7. MSDTC should be configured with the following permissions (more information here: http://technet.microsoft.com/en-us/library/cc753510%28WS.10%29.aspx):
    1. Open Component Services > My Cmoputer > Distributed Transaction Coordinator > Clustered DTCs
    2. Enable Network DTC Access (But do not select Allow Remote Clients/Allow Remote Administartion)
    3. Enable Transaction Manager Communication (Allow Inbound, Allow Outbound and select incoming Caler Authentication Required)
    4. Select SNA LU 6.2 Transactions (Ensure that Enable XA Transactions is not selected)
    5. In Windows Firewall configure an exception for DTC
  8. For SQL Server 2008 ‘Page Verify’ should be set to ‘Checksum’
  9. Configure a maximum memory size (see below)
  10. When managing [ermissions ensure that the local Administartors group is not a member of the sysadmin role
  11. The SQL service account should have th following permissions:
  • Perform Volume Maintenence Tasks (allows for faster restores as database files are not pre-zeroed)
  • Lock Pages in Memory
  • Logon as a Service

Additional Notes/Setup Instructions

SQL Server Memory Configuration

Suggested maximum memory allocations (http://www.sqlservercentral.com/blogs/glennberry/archive/2009/10/29/suggested-max-memory-settings-for-sql-server-2005_2F00_2008.aspx):

Physical RAM                        MaxServerMem Setting
2GB                                           1500
4GB                                           3200
6GB                                           4800
8GB                                           6400
12GB                                         10000
16GB                                         13500
24GB                                         21500
32GB                                         29000
48GB                                         44000
64GB                                         60000
72GB                                         68000
96GB                                         92000
128GB                                       124000

Configuring a maximum meory size for an SQL instance

EXEC  sp_configure‘max server memory (MB)’,2048;
GO
RECONFIGURE;
GO

Disk Alignment

To verify disk alignment execute the command: diskpar –I 2 where 2 is the number of the disk you wish to check the alignment.

The important setting here is the StartingOffset – this value should divide cleanly by the NTFS cluster size implemented on the disk.

Ensure that Partition Offset ÷ Stripe Unit Size is a whole number (you will need to consult the storage configuration to identify stripe size).

Ensure that Stripe_Unit_Size ÷ File_Allocation_Unit_Size is also a whole number.

http://msdn.microsoft.com/en-us/library/dd758814%28v=sql.100%29.aspx

Configure MAXDOP

sp_configure ‘show advanced options’, 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
sp_configure ‘max degree of parallelism’, 8;
GO
RECONFIGURE WITH OVERRIDE;
GO

Categories
Windows 2008

Windows : Dump File Analysis

Windows : Dump File Analysis

First install the debugging tools for Windows: http://msdn.microsoft.com/en-us/windows/hardware/gg463009

Now open a command prompt window and enter the following command:

cd “c:\program files\debugging tools for windows”

Next enter the following command:

kd -y srv*c:\symbols*http://msdl.microsoft.com/download/symbols -i c:\windows\i386 -z C:\Mini060209-01.dmp -logo C:\kd.log –v !analyze –v

This command assumes there is a DMP file located under the following path: C:\Mini111208-01.dmp This will give you a possible cause of the crash as well as the bug-check string associated with the blue screen error.

Further information can be obtained using the !analyze –v command.

It is also possible to use C:\Program Files\Debugging Tools for Windows\WinDbg.exe (a semi-graphical tool), you will need to specify the symbols path as follows:

srv*c:\symbols*http://msdl.microsoft.com/download/symbols

You can then File > Open Crash Dump and use the commands as above.

Categories
Windows 2008

Network Monitor : Using NMCap

Network Monitor : Using NMCap

Once istalled open a command prompt and change directory to C:\Program Files\Microsoft Network Monitor 3:

NMCap.exe /network * /capture /stopwhen /timeafter 1 min /file issue.cap

You should now recreate your issue, to extend the capture window increase the value in red.Using /capture followed by no filter captures all traffic.

Recreate the issue then ctrl-c the window with NMcap running in it. You can also filter captured results, for example HTTP only:

NMCap.exe /network * /capture “HTTP” /stopwhen /timeafter 1 min /file issue.cap

Or to capture HTTP traffic for a specific IP address:

NMCap.exe /network * /capture “(HTTP || DNS ) && IPv4.Address == 192.168.1.1” /stopwhen /timeafter 1 min /file issue.cap

You can also reprocess capture files to generate filtered captures, for example to extract HTTP only traffic from the capture above into a new capture file:

NMCap /InputCapture issue.cap /capture “HTTP” /file HTTP_only.cap