In-place upgrade Windows Server 2008 R2 Standard to Enterprise without Media

If you need to upgrade a server running Windows Server 2008 R2 Standard to either the Enterprise, or Datacenter editions you can use the installation image and choose the Upgrade option or the new command-line utility, introduced in Windows Server 2008 R2, DISM (Deployment Image Servicing and Management). With DSIM it is possible to perform the upgrade online, without the need to reinstall Windows or have the installation image. 

 To perform the upgrade in-place online, without the media image, first open an elevated command prompt (run as administrator) on the server to be upgraded. 

Type the command DISM /Online /Get-CurrentEdition. This will display the current Windows version. 
   

Type the command DISM /Online /Get-TargetEditions to list the Windows editions to which this server can be upgraded. 
 

Type the command DISM /Online /Set-Edition: <TargetEdition> (replace <TargetEdition> with the syntax for the desired edition returned by Get-TargetEditions). 

If you receive a message (Error 87) indicating that you need to specify a product key you can include it with the /ProductKey: parameter 

If you receive a message (Error 50) indicating that Setting an Edition is not supported then the machine may be a Domain Controller (DC) and it must be demoted before performing an online upgrade. You do not need to demote it if you are using the installation image. 
  

As always, be certain that you back up all of your settings and data prior to performing the upgrade.

Microsoft Dynamics NAV: Application Server from the Command Line

The NAV Application Server is (NAS) is a middle-tier server that executes NAV business logic (code) without user intervention. The NAS operates as an unattended client that is connected to the database server and runs as a service on a computer.   One benefit of the NAS is that if it loses communication with the database server due to connection or server issues it does not stop, instead it will continue to attempt a connection to the database server.
When you install a NAS the setup will prompt you for the parameter information to use for connecting and communicating with the database server. This makes for an easy installation; however you may need to run more than one NAS on a computer. In this case you will need to install the NAS from the command line.
In the Application Server directory there are two executable files for launching the NAS; nas.exe and nassql.exe. To install the application server you can enter the following at the command line (example is for SQL Server) and substituting your values where appropriate:
nassql appservername=<appserver service name>, servername=<SQL Server/instance>,database=<database name>,Company="<Company Name>",startupparameter=<parameter to pass>,installasservice
To uninstall as NAS from the command line enter the following command:
nassql uninstallasservice, appservername=<appserver service name>
 

SQL: Long Running Transaction

For various reasons a SQL transaction can take an amount of time to complete.   OPENTRAN is the Databas Console Command (DBCC) that can be used to display information about the oldest active transaction. The TABLERESULTS argument will display the results in a table format.

DBCC OPENTRAN WITH TABLERESULTS, NO_INFOMSGS

OPENTRAN

The information in the table may be limited, however, once you identify the process ID (SPID) you can see the last statement sent from a client to the server with the INPUTBUFFER command.

DBCC INPUTBUFFER (64)

SSIS: Programmatically set Flat File Destination filename

Recently, I was asked to export a subset of records to uniquely named delimited files. A task easily accomplished with SSIS by using a DataFlow Task and a Flat File Destination.  In this case, however, I was required to export record groups based upon a shared sequence id.  I was required to create a separate delimited file with a distinct name for each group.  Within a Foreach Loop, which was used to loop through a set of sequence id to apply as a filter against the recordset, I added a Script Task to build the file name and set it to a string variable:

 

public void Main()
        {
			// this should be wrapped to catch errors
            Dts.Variables["strFilename"].Value = 
                Dts.Variables["Sequence"].Value.ToString()
                + ".txt";

            Dts.TaskResult = (int)ScriptResults.Success;
        }

In the DataFlow Task I added a Flat File Destination and went through the steps of the wizard to add a [delimited] text file connection.  I entered a generic name in for the filename.  Once completed, the text file connection appeared in the Connection Manager Window.  Select the text file connection, do not double click, which was created and look at the ConnectionString property in the Porperty Window.  This is where the filename is stored.  To change the filename programmatically you will need to create an expression for the text file connection.  Click the ellipse next to the Expression property and choose ConnectionString as the property and enter the variable name, which was set in the Script Task, as the expression.

 

iPhoto: Find those unnamed faces

This post marks yet another first. This is the first time that I will post something regarding Apple software. A few months ago I decided to try my luck with a Mac computer. I have not abandoned Windows or Windows development. I have broadened my horizons a bit to now include additional development. With that being said and with the quality of the Mac and great software such as Parallels my PC days are extinct.


iPhoto is a photo management software that comes with Mac OS X. One of the nice features, of which there are several, of this software is its facial recognition capabilities. One of the first things I did when I started using the new Mac was import all of my digital photos into iPhoto. As the pictures were importing, iPhoto churned as it tried to identify the faces in each photo. Once it was complete, I spent some time reviewing each photo to verify the faces that were identified. I had made corrections where necessary. Among the faces in the photos were those that iPhoto couldn't recognize; the 'unnamed' faces.


According to the documentation, iPhoto is supposed to learn from the faces that it has properly identified and any faces that are manually identified. What about the faces that it can't identify and are marked 'unnamed'? I was going through each of my photos, which was a daunting task, and seeing if there were any unnamed faces on them. With several thousand photos, this turns out to be quite a chore. Well, it was quite a chore until I recognized the Smart Albums feature of iPhoto.


Smart Albums allow you to specify photo criteria for it to be included into the album. This 'automatic' album creations saves a lot of time by dynamically creating albums for you (no more drag and drop although you can create those types of albums too). One of the criteria that you can identify is 'faces'. This makes finding those 'unnamed' faces a lot easier than scrolling one by one through each photo. Place the following condition on a smart album and all those unnamed photos will be in the album: Face is unnamed. That is it. Nice and simple. The neat thing is that after all of the unnamed faces have been identified or removed from the photos they will no longer appear in the Album.



iPhoto also allows for the tagging of a photos location (place). This is another way photos can be grouped or even better, selected from the location on a map. Just as a smart album can assist in the identification of photos that contained unnamed faces, a smart album condition can be set to display photos that do not have a location set. Place the following condition in a smart album to see the photos that do not have a location set: 'Place does not contain '. That's it. Nice and simple.

Reading Stuff

Information in this document subject to change without notice.
All Software source code published is for demonstration and knowledge sharing purposes only. The Code is supplied "as is" without warranty as to result, performance or merchantability. Use at your own risk.
The opinions expressed herein are the opinions of the author and do not reflect those of any other entity.