Monday, April 28, 2008

Moving an Intel ICH7R RAID (Intel Matrix Storage Controller) to a new main board

After struggling nearly four weeks with my computer and being most of the time offline, I finally managed it to build a new computer (Asus P5W, Thermaltake Shark etc.) that is running just fine.

However, I used an RAID-1 before and the big question was: Will the new motherboard accepts this RAID or do I need to start everything from scratch?

In general, if you plan to use an RAID-1 later on but currently have only one HD ready, it is no problem to prepare this: Switch the IDE/SATA mode in your BIOS from “Standard” or “AHCI” to “RAID” and enable the ICH7R boot ROM. Then just install Windows (F6 disk for Windows XP needed, Vista has those drivers build-in) as you would normally do. Later on, download and install the Intel Matrix Storage Manager on Windows. Once you have the second disk, simply plug it in, start Windows and start Intel Matrix Storage Manager. Inside it, just select that you want to have a RAID-1 and on the fly, an RAID-1 will be created.

Basically, this was my idea when attaching one of the old HDs (with my RAID1) to the new motherboard. I especially selected the Asus P5W because the chipset and ICR (Intel 975X with ICH7R) where the same as on my old Shuttle SD39P2 board.

But to my surprise, the Intel chip is much more intelligent: As soon as I attached one of the drives and booted, the ICH7R notices this one disk, showed the name I gave the RAID volume and Windows started as always. Once Windows was finished installing new components, I simply shut down and attached the second drive. Inside the Boot ROM the second drive was displayed as “Unknown” drive but once Windows started, the Matrix Storage Manager informed me that it is rebuilding my array. Two hours later, the RAID-1 was OK again and I did not lose a single file!

Kudos to Intel for this!

Thursday, April 10, 2008

Retrieving Windows SharePoint Services user access rights from the database

I case you ever need to know which access rights a given user has on your Windows SharePoint Services (WSS) site, you may find the following SQL scripts useful.


This SQL script (simply execute it against the database that has your WSS content) accepts either an email address (@search_email = 'John.Doe@acme.org') or the Windows login name (@search_account='ACME\JohnD').


If the given user is found, it will return three tables: The data of the user as WSS sees it, the groups to which the user belongs and finally to which sites the user has access to.




DECLARE @search_email varchar(100)
DECLARE @search_account varchar(100)

SET @search_email='John.Doe@acme.org
--SET @search_account='ACME\JohnD'


DECLARE @userid int

-- Retrieve user ID
IF (@search_account is null) BEGIN
select @userid=tp_ID from userinfo where tp_Email = @search_email
END ELSE BEGIN
select @userid=tp_ID from userinfo where tp_Login = @search_account
END

-- Show found user
SELECT '' as 'User Info',
tp_ID,tp_Login,tp_Title from userinfo where tp_ID=@userid

-- Show group membership
SELECT '' as 'Group membership',
ID,Title,Description from groups where id in
( SELECT groupid from groupmembership where memberid=@userid )
order by Title

-- Show Access rights
SELECT '' as 'Access rights',
Title, FulLURL from Webs where id in
( SELECT WebId FROM WebMembers WHERE (UserId = @userid) )
order by Title
GO