Thursday, April 23, 2009

Uninstalling System Center Essential (SCE) 2007

If you’re evaluating SCE or plan on moving SCE to new hardware it is important to understand how to correctly remove SCE from your environment prior to starting a new installation. We have performed many reinstallations while developing our SCE installation procedures and I thought I would share the steps.


Delete SCE Managed Computers Group from Active Directory

Start > Run > dsa.msc
Right-click on DomainName and click Find
Type SCE Managed Computers into the Name box and click Find Now
Right-click SCE Managed Computers in the results pane and click Delete
Close Active Directory Users & Computers


Delete Group Policies

If you performed a default installation of System Center Essentials you will have two group policy objects that were automatically created for you. Follow these steps to delete the group policies.

Start > Run > gpmc.msc
Expand DomainName > Group Policy Objects in the left pane
Right-click SCE Managed Computers Group Policy (…) and click Delete
Right-click System Center Essentials All Computers Policy and click Delete
Close Group Policy Management Console


Delete Service Connection Point (SCE)

The following procedure requires ADSI Edit.

Start > Run > adsiedit.msc
Right-click ADSI Edit in the left pane and click Connect
Select Default naming context in the Select a well known Naming Context box and click OK
Right-click Default naming context in the left pane and select New > Query…
Type SCESCP in the Name box
Click the Browse… button, select DomainName , and click OK
Paste (&(objectCategory=serviceConnectionPoint)(cn=SCESCP)) into the Query String box and click OK
Highlight and then expand Default naming context in the left pane
Select SCESCP in the left pane
Right-click CN=SCESCP in the middle pane and click Delete
Leave ADSI Edit open for the next step


Delete Service Connection Point (SDKServiceSCP)

Right-click Default naming context in the left pane and select New > Query…
Type SDKSCP in the Name box
Click the Browse… button, select DomainName , and click OK
Paste (&(objectCategory=serviceConnectionPoint)(cn=SDKServiceSCP)) into the Query String box and click OK
Highlight and then expand Default naming context in the left pane
Select SDKSCP in the left pane
Right-click the appropriate CN=SDKServiceSCP entry in the middle pane and click Delete

Identifying the appropriate entry to delete in step 7 above requires finding the entry that corresponds to the name of the SCE server to be removed. Look at the distinguished name column in the middle pane to locate the right computer name.

Thursday, April 16, 2009

Asp.Net Menu and Internet Explorer 8 (IE8)

If you use Asp.Net Menu control, you have surely noticed that with Internet Explorer 8 there are a problem with submenus.

Microsoft give out a patch for webservers IIS to fix that problem, but for me there is a better solution: working with CSS.

The Css Class to create is very simple:

.IE8Fix
{
z-index: 100;
}

and then you ave to apply it to DynamicMenuStyle tag:

<asp:Menu ID="MioMenu1" runat="server" ... >
...
<DynamicMenuStyle CssClass="IE8Fix" />
...
<asp:Menu>

Tuesday, April 7, 2009

SQL Server 2008 Row Constructors

SQL Server 2008 Row Constructors

SQL Server 2008 come with “Row Constructor”. It helps to write more compact code in less time.
With the use of Row Constructors its possible to insert some rows in a table using a single INSERT instruction:

INSERT INTO dbo.Customers(custid, companyname, phone, address)
VALUES
(1, 'cust 1', '(111) 111-1111', 'address 1')
,(2, 'cust 2', '(222) 222-2222', 'address 2')
,(3, 'cust 3', '(333) 333-3333', 'address 3')
,(4, 'cust 4', '(444) 444-4444', 'address 4')
,(5, 'cust 5', '(555) 555-5555', 'address 5');



In aggiunta a questa possibilità, now VALUES clause also works with other commands. In simple words, its possible to rewrite some SELECt with UNION operator as a single SELECT…VALUES:

SELECT *
FROM
(VALUES
(1, 'cust 1', '(111) 111-1111', 'address 1')
,(2, 'cust 2', '(222) 222-2222', 'address 2')
,(3, 'cust 3', '(333) 333-3333', 'address 3')
,(4, 'cust 4', '(444) 444-4444', 'address 4')
,(5, 'cust 5', '(555) 555-5555', 'address 5')
) AS C(custid, companyname, phone, address);