We shall go on to the end, we shall fight.
Thursday, November 11, 2010
BPM and ECM – The War Begins
We shall go on to the end, we shall fight.
Friday, October 15, 2010
Convert VDI to VHD
I have found a number of articles, and this article/post was the only one that worked.
1. Convert the .vdi file to a raw disk image (.raw)
Perform a search on your system for existing .vdi files that you are going to convert.
a. Go to a cmd prompt and navigate to the VirtualBox folder (typically c:\program files\sun\VirtualBox).
b. Execute the following command against the .vdi file in question:
vboxmanage.exe internalcommands converttoraw "x\path-to-vdi\diskimage.vdi" "x:\path-to-output-folder\diskimage.raw"
Depending on the size of your .vdi file, the time for conversion may greatly vary.
Also, be sure you have around 2 times the available drive space
that your existing .vdi currently consumes on your logical volume.
2. Convert .raw disk image to .vmdk format using WinImage
a. Open WinImage, click on 'Disk'> 'Convert Virtual Hard Disk image...'
b. Next to the 'File name:' field, click on the file type drop-down and select 'All files (*.*)'.
c. Navigate to the location where you stored your outputted .raw disk file and double-click it.
d. Choose whether you wish to 'Create Fixed Size Virtual Hard Disk' or
'Create Dynamically Expanding Virtual Hard Disk' (I typically pick the latter) and click 'OK'.
e. Navigate to a folder where you wish to store the newly converted image to. Next to
'Save as type:' (for the sake of this How-to) choose 'VMWare VMDK (*.vmdk). and click 'Save'.
You should see a 'Reading disk' progress indicator giving you the status of the conversion process.
I've converted 30Gb images in about 10 minutes or less...but I have no firm numbers.
f. Once the conversion is complete, you'll see a dialog box that will ask you if you wish to connect to the partition. Click 'OK' if you wish to view the contents.
3. Import your disk images into your existing Virtual Infrastructure
Now that the files are converted, copy or move your converted disk image files to your virtualization software's datastore/disk storage folder.
Once moved/copied, you should now be able to create a new Virtual Machine and utilize the disks you just converted.
Note that you will need to install the proper guest additions/tools to the virtual machine when you get it booted, so you will likely not have
network access right off the bat.
Thursday, October 14, 2010
Top 10 Mistakes When Building and Maintaining a Database
Tuesday, April 27, 2010
Running Alfresco as Windows Service
:\> service.bat install
:\> tomcat6 //US//Tomcat6 --JvmMs=128 --JvmMx=512 --JvmSs=96 ++JvmOptions "-XX:MaxPermSize=128m"
ERRORS: TomCat6 SERVICE NOT STARTING
- prunsrv.c Failed creating java
- Solution:
- Copy msvcr71.dll from java’s bin directory to windows\system32 folder
- Known issue
- Solution:
- Make sure your tomcat’s pointing to correct jvm.dll folder.
- My tomcat pointing to C:\Program Files\Java\jre1.6.0_07\bin\client\jvm.dll, try change to C:\Program Files\Java\jre\bin\client\jvm.dll
you can install MySQL as a windows service you need to set the following directories
in the C:\alfresco\mysql\my.ini file
datadir="C:\Alfresco\alf_data\mysql"
:\> mysqld.exe --install AlfrescoMySQL --defaults-file=C:\Alfresco\mysql\my.ini
ERRORS: MySQL SERVICE NOT STARTING
None so far...
Sunday, April 25, 2010
Cloning / Copying Virtual Hard Drives
But when cloning / copying VHD’s you sure will be running in to this error:
Thursday, December 10, 2009
SQL COALESCE
If you want to pivot the data you could run the following command.
DECLARE @DepartmentName VARCHAR(1000)
SELECT @DepartmentName = COALESCE(@DepartmentName,'') + Name + ';'
FROM HumanResources.Department
WHERE (GroupName = 'Executive General and Administration')
SELECT @DepartmentName AS DepartmentNames
and get the following result set.
- sent by Dirkie
Friday, November 13, 2009
Check disk space in C#
//Get disk space info from remote server
System.Diagnostics.PerformanceCounter _pc;
float _freemegabytes;
float _freespacepercentage;
float _capacity = 0;
string result = "";
//Get free space percentage
_pc = new System.Diagnostics.PerformanceCounter("LogicalDisk", "% Free Space", serverdrive, servername);
_freespacepercentage = _pc.NextValue();
//Get free space in megabytes
_pc = new System.Diagnostics.PerformanceCounter("LogicalDisk", "Free Megabytes", serverdrive, servername);
_freemegabytes = _pc.NextValue();
//Calculate the capacity in gigabytes
_capacity = ((_freemegabytes / _freespacepercentage) * 100) / 1024;
//Calculate free space in gigabytes
_freemegabytes = _freemegabytes / 1024;
result = "" + servername + " " + serverdrive + " TotalS:" + _capacity.ToString("##.00") + "gb FreeS:" + _freemegabytes.ToString("##.00") + "gb. ";
Sample 2: Using System.IO.DriveInfo
//Get disk space info from local server
System.IO.DriveInfo dinfo = new DriveInfo("x:");
//Get disk size
double dsize = double.Parse(dinfo.TotalSize.ToString()) / 1073741824;
//Get free space
double dspace = double.Parse(dinfo.TotalFreeSpace.ToString()) / 1073741824;
result = "Logical Disk Size = " + dsize.ToString("##.00") + " GB";
result += " Logical Disk FreeSpace = " + dspace.ToString("##.00") + " GB";
Wednesday, November 11, 2009
SysPrep base Virtual Machine to create multiple images
Creating new virtual machines is bit time consuming so to create a base virtual hard drive and just make copies of it and start-up new virtual machine is ideal, but cloning/coping vhd will lead to having virtual servers with same SID and CID on your network. There are tools like NewSID to fix it but I had problem with clone/ghost virtual machine which didn't want to be joined to a domain.
SysPrep is a tool that allows you to prepare or “prep” a machine with the operating system along with any software you wish was pre-installed and pre-configured. Once a machine is SysPrep’d, you have a new virtual hard drive that has the Windows operating system along with any additional software or features you want, such as IIS, preinstalled and pre-configured. SysPrep allows you to create your perfect system configuration packaged so that you can have a new virtual machine up and running in just minutes. And, it is available for both Windows Server 2003 32bit/64bit and Windows XP.
System Preparation tool for Windows Server 2003 Service Pack 2 32bit Deployment
System Preparation tool for Windows Server 2003 Service Pack 2 64bit Deployment
Creating the base virtual machine image/vhd
- Create new virtual machine, I did it on Hyper-V but should work for VPC 2007/Virtual Server and more.
- Install your OS. Windows Server 2003 R2 (latest service pack) or Windows XP.
- Do NOT join the virtual machine to any domain.
- Leave the administrator password blank or reset it to blank.
- Now get all latest windows updates and all.
- Install antivirus software and latest updates.
- Install the virtual additions, depending which virtualization you're using.
- Install all and latest .Net frameworks.
- Activate the OS license. Then you don't need to re-activate the OS for each new virtual machine you create.
- When I create a base for virtual servers (MOSS, K2, SQL or WEB servers) I install BGInfo, part of Windows sysinternals package, get it here. It creates cool desktop background with various server information as a desktop background.
Before you can SysPrep you virtual machine, you need to create a SysPrep.inf configuration file. This file contains the information about your machine. It will also prevent you from having to enter you CD Key each time you create a new virtual machine from you SysPrep’d image. Below is a sample of the SysPrep.inf file that you need to create. This file configures the SysPrep process and automates boot up process.
- On your virtual machine, create a folder SysPrep at the root of your C: drive (C:\SysPrep).
- Copy the following text into a text file named SysPrep.inf.
- Enter the correct values for the following keys:
- TimeZone – the value of 140 is Harare, Pretoria (UCT +02:00). You may want to change this to your local time zone, but it is not required to do so, Index numbers for [GuiUnattended]/TimeZone.
- OEMDuplicatorsting – this should contain the name of the operating system you have installed on your virtual machine.
- FullName – your name, the name you would enter if you were installing Windows.
- OrgName – the name of your company, or blank.
- ProductKey – Your product key (CD key) license.
;SetupMgrTag
[GuiUnattended]
TimeZone=140
OEMSkipRegional=1
OemSkipWelcome=1
EncryptedAdminPassword=NO
OEMDuplicatorstring="Windows Server 2003 R2 64Bit"
[Identification]
JoinWorkgroup=WORKGROUP
[Networking]
InstallDefaultComponents=Yes
[LicenseFilePrintData]
AutoMode=PerServer
AutoUsers=50
[Unattended]
OemSkipEula=Yes
InstallFilesPath=C:\sysprep\i386
[UserData]
FullName="YOUR NAME HERE"
OrgName="YOUR COMPANY NAME HERE"
ProductKey=YOUR-PRODUCT-KEY-HERE
[SetupMgr]
DistFolder=C:\sysprep\i386
DistShare=windist
Your SysPrep.inf configuration file is now ready to be used.
SysPrep-ing your Virtual Machine
SysPrep-ing your virtual machine takes just a minute or two. Most of the time is simply shutting down your virtual machine. Important: do not start this virtual machine back up or it will un-SysPrep your machine. If this does happen, you can simply go through these steps below to SysPrep you virtual machine again.
- Run the SysPrep install tool, it will install a deploy.cab file in this location, C:\WINDOWS\system32\deploy.cab.
- Extract all the files in the deploy.cab to C:\SysPrep.
- Then run SysPrep.exe
- Check the “Don't reset grace period for activation” option.
- Make sure Shutdown mode is Shut down.
- Click the Reseal button to shutdown and package.
- Click OK to generate new SID's.
- Your virtual machine will now shut down and be SysPrep’d.
- You now have a virtual image that is SysPrep’d, but not ready to be used.
- Before you use this image, you will need to make a backup copy of your virtual machine image. This will allow you to always have a SysPrep’d virtual machine ready and waiting.
- Backup your SysPrep’d virtual machine image (.vhd), and rename them to something you can easily understand and that describes what your image contains. For example:
Base2003R2x64_SysPrep.vhd - You now have your virtual machine SysPrep’d. You can now use this image to quickly create a new virtual machine in minutes, with a new machine name and new unique System ID (SID) each time you use it.
Wednesday, October 21, 2009
The SSRS 2008 Minefield
Tuesday, September 22, 2009
Quick/Simple Ping in C#
{
try
{
System.Net.NetworkInformation.Ping ping = new System.Net.NetworkInformation.Ping();
System.Net.NetworkInformation.PingReply pingReply = ping.Send(host);
return "Status: " + pingReply.Status.ToString();
}
catch (System.Net.NetworkInformation.PingException e)
{
return e.Message;
}
}
Monday, September 21, 2009
K2 SQL User Manager 101
Read More
How to implement a ASP.NET Security Provider for K2 blackpearl
Read More
Wednesday, September 09, 2009
Microsoft Deployment Toolkit 2010
Click here to download MDT now.
Tuesday, September 08, 2009
Checking the Job Status on Multiple Servers
This article shows how to generate a comprehensive Job Status Report about all the jobs in a multi-server environment. You can use this report to check the status of all the jobs that are running on all servers with ease and make sure important production jobs run on schedule and have not slipped through cracks.
Step 1
First you have to create linked server connections on the master server for all your target servers that you want to monitor. For more information on how to create linked servers in SQL 2000, please check the topic “How to set up a linked server (Enterprise Manager)” in SQL Server Books Online or on the web. For help on setting up linked servers in SQL Server 2005 check the topic “Linking Servers” in books online. The following scripts will use the information from sysservers table which contains all the registered link servers in the master database. Please make sure that you can connect to all the linked servers before you proceed.
Step 2
This script creates a table called Job_Status on the master server. You have to substitute your database name for yourdb. This script is called 01_create_table_job_status.sql.
Step 3
Create the stored procedure called usp_mon_job_status_of_all_servers on the master server. You have to substitute your database name for yourdb The script is called 02_usp_mon_job_status_of_all_servers.sql.
Step 4
Create the stored procedure called usp_help_job_status on the master server. You have to substitute your database name for yourdb. The script is called 03_usp_help_job_status.sql
Step 5
Create a job that executes the procedure created in Step 3 on the master server. You can also create a schedule that runs this job daily on the master server. For more information on how to create jobs, job steps and schedules, please refer to the topic “Implementing Jobs” on SQL Server Books Online (BOL).
That’s it. You are all set. Now every day you just have to connect to the master server using Query Analyzer or SQL Server Management Studio, open a query window and run the proc usp_help_job_status as shown below. Replace your database name for yourdb.
Use yourdb
Go
Exec usp_help_job_status
And it will show you a report similar to the following:
- The Source of this article can be found @ sqlservercentral.com.
Thursday, September 03, 2009
SQL TCP/IP Connections Dropping
So after more investigation, I found that there were cases on the net where people had the same isses as us...
• TCP/IP Connection was forcibly closed by the software in your machine
• Operation cannot be completed because the Socket is not a Socket.
• Software in your Remote Host has forcibly closed your connection.
The fix I applied which has led to 3 weeks of no further issues being logged is as follows...
• Open SQL Server Configuration Manager on your DB Server
• Expand the node SQL Native Client Configuration and click on Protocols
• Ensure that the Shared Memory option is disabled and that TCP/IP is ordered 1 and Named Pipes is 2
This fixed the problems we were having, again I only suggest this fix if you encounter the problems described above, obviously trying to understand what this fix does, which the guys on net coudn't explain was that Shared Memory was enabled and ordered 1, thus when the server ever took alot of strain, or had many connections, even though the connection limit was set to unlimited, it seems SQL would then go and close random/dormant/sleeping TCP Connections cause it gave priority to Shared Memory even though we never used Shared Memory.
Take note, though, becareful when disabling Shared Memory if you have applications that run on the SQL Box, so for example if we have web apps and the DB on the same server, this could end up breaking your application.
- sent by Robert aka Robbie aka Rabobi
Wednesday, September 02, 2009
Tuesday, September 01, 2009
Recursive Queries using Common Table Expressions (CTE) in SQL Server
WITH tmpData AS
(
SELECT 1 as iIndex
UNION ALL
SELECT iIndex + 1 FROM tmpData WHERE iIndex <=100 ) SELECT * FROM tmpData;
This works for Dates as well:
WITH tmpData AS
(
SELECT CONVERT('2009-01-01',DATETIME) As DateValue
UNION ALL
SELECT DATEADD(dd,1,DateValue) FROM tmpData WHERE DateValue < '2010-01-01' ) SELECT * FROM tmpData;
The Source of this article can be found here;
Convert byte array to hex string
I was always confused as to why the framework would not have a native method to do this, so I used to write my own little method to do it that looked something like this.
StringBuilder sb = new StringBuilder();
foreach (byte b in myByteArray)
{
sb.Append(b.ToString("X2"));
}
string hexString = sb.ToString();
But low and behold, the framework does have a native method that does this, I was just looking in the wrong place.
So in the BitConverter class there is a ToString method that takes a byte array as a parameter and spits out a nice hex string for you.
string hex = BitConverter.ToString(myByteArray);
Jumpbox - Free Virtualization Platforms
- Drupal 5.x Content Management System
- SugarCRM 4.5.x CRM System






