Category: Other

  • Deduplication on my Windows 8 Notebook with AX Demo Hyper-V

    [Update 6.8.2015]: Caution, at the moment there is no way to activate Deduplication on Windows 10

    After reading http://www.expta.com/2013/04/updated-blistering-fast-hyper-v-2012.html, http://www.expta.com/2013/02/windows-server-2012-deduplication-is.html and http://weikingteh.wordpress.com/2013/01/15/how-to-enable-data-deduplication-in-windows-8/ I enabled deduplication on my notebook, saving me lots of space on my precious SSD.

    It’s a pity that you cannot enable it on your boot drive, as this happens to be my largest SSD, but my secondary SSD with just 128 GB also benefited from the deduplication. I might reorganize my drives at some later stage.

    Here a short summary of the steps required for enabling deduplication on a windows 8.1 Notebook:

    1. Download Windows Server 2012 deduplication package (e.g. here)
    2. In powershell run the following to install the package files that have been extracted into the current directory
      dism /online /add-package /packagepath:Microsoft-Windows-VdsInterop-Package~31bf3856ad364e35~amd64~~6.3.9600.16384.cab /packagepath:Microsoft-Windows-VdsInterop-Package~31bf3856ad364e35~amd64~en-US~6.3.9600.16384.cab  /packagepath:Microsoft-Windows-FileServer-Package~31bf3856ad364e35~amd64~~6.3.9600.16384.cab /packagepath:Microsoft-Windows-FileServer-Package~31bf3856ad364e35~amd64~en-US~6.3.9600.16384.cab  /packagepath:Microsoft-Windows-Dedup-Package~31bf3856ad364e35~amd64~~6.3.9600.16384.cab /packagepath:Microsoft-Windows-Dedup-Package~31bf3856ad364e35~amd64~en-US~6.3.9600.16384.cab
    3. The to enable deduplication run this powershell command
      dism /online /enable-feature /featurename:Dedup-Core /all
    4. Disable Periodic Processing because our main focus will be the deduplication of VHDs
      Set-DedupSchedule -Name "BackgroundOptimization" -Enabled $false
    5. Enable Dedup on your volume of choice
      Enable-DedupVolume D:
    6. Set minimum age to zero as VHD Files will always have recent modifications. (Maybe wait a moment for the previous command to complete.)
      Set-Dedupvolume D: -MinimumFileAgeDays 0
    7. Run Deduplication only when Hyper-V stopped
      Start-DedupJob –Volume D: –Type Optimization
      Result:
      image
    8. Disable (e.g. before installing Windows 10)
      Start-DedupJob -Volume D: -Type Unoptimization
      Disable-DedupVolume -Volume D:

    [Update 6.8.2015 – Removed Windows 8 commands; Add Disable Command; Warning Windows 10]

  • Excel Sheetname Function

    [Important Edit: The definitive solution to the issue below is using CELL(“filename”,A1). The reference ensures the refresh to the current worksheet.]

    Issue description

    As many of you might have found out, you can get the sheet name using the formula

    =MID(CELL(“filename”);FIND(“]”;CELL(“filename”))+1;99)

    The issue with this solution is however that the sheet name does not refresh immediately when changing sheet.

    The following screenshots show how this as well as a proposed function you can add as add-in:

    Sheet 1: all good!
    image

    Sheet 2: field A1 has not refreshed
    image

    Sheet 2: after a press of F9 A1 is recalculated (Note that setting the recalculation options to “automatic” does not help.)
    image

    Proposed solutions

    • Get Microsoft to add a new function “SHEETNAME”
    • Add a custom function “SHEETNAME” yourself.

    Create custom function “SHEETNAME

    Create a new Excel File

    Go to the VB-Editor (Alt-F11)

    Create a new module containing the following code:

    Function SHEETNAME(reference)
    SHEETNAME = reference.Parent.Name
    End Function

    Go back to the normal Excel View

    Save As, pick Type “Excel Add-In (*.xlam)”, the path will change automatically, Save
    image

    Add the Add-In in Excel Options:
    image

    Browse for the file you created an add the Add-In
    image

    Now the new function “SHEETNAME” can be used.

    Usage

    =SHEETNAME(reference)

    It’s however reasonable to add an IFERROR to capture the error caused by not having the custom function – of course the updating issue of the standard method will occur.

    =IFERROR(SHEETNAME(A1);MID(CELL(“filename”);FIND(“]”;CELL(“filename”))+1;99))

    Sheet 1: without Add-in
    image

  • AX 2009 SP1 Released

    Get if from Customersource or Patnersource:
    https://mbs.microsoft.com/customersource/downloads/servicepacks/dynamicsax2009sp1.htm

    Some of the Changes:

    • Support for Windows Essential Business Server added
    • Support for Microsoft SQL Server 2008 added
    • Electronic signatures
    • Time zone updates

    see What’s_New-Microsoft_Dynamics_AX_2009_SP1.PDF

  • Restore Sharepoint WSS 2 Database

    I was trying to upgrade to WSS 3 and something failed so I wanted to return to WSS 2 so I reinstalled WSS 2 and tried to attached my backuped databases. I received the “Database ‘Database_Name’ already exists. (Error code:1801)” error message which I could resolve by following KB828815. But then I received the a further error message which seemed to reflect a version confilct that I could not solve. So I decided to copy the database manually with the following steps:
    1. Create a New Site (including new content database e.g. STS_new_234)
    2. Use the SQL Server management studio to attach/restore the old content database e.g. STS_old_123)
    3. Get the new SiteId from the [STS_new_234].[dbo].[Sites] e.g. {61806ab3-c940-4867-8f5a-629c0036e6bd}
    4. Copy the data of all tables (exept Sites) from the STS_old_123 to STS_new_234 and rename the field SiteId to the new SiteId in the process e.g.
      INSERT INTO [STS_new_234].[dbo].[NavNodes]
      SELECT ‘61806ab3-c940-4867-8f5a-629c0036e6bd’
            ,[WebId]
            ,[Eid]
            ,[EidParent]
            ,[NumChildren]
            ,[RankChild]
            ,[ElementType]
            ,[Url]
            ,[DocId]
            ,[Name]
            ,[DateLastModified]
            ,[NodeMetainfo]
            ,[NonNavPage]
            ,[NavSequence]
            ,[ChildOfSequence]
        FROM [STS_old_123].[dbo].[NavNodes]

      Note: The most important tables: Docs, Links, NavNodes, UserData, UserInfo, WebCat
    5. Modify the [STS_new_234].[dbo].[Webs]:
      • First make the old root a sub-site by editing FullUrl and setting ParentWebId to the new root.
      • If all is now well try and exchange the new root with the old root (again by editing FullUrl and ParentWebId accordingly).

    NOTE: The whole issue probably could have been avoided by running PRESCAN on all the existing databases BEFORE starting to upgrade.