mo.notono.us

Thursday, February 28, 2008

Google/MOSS: Google Sites (beta)

In case there was ANY remaining doubt that Google has its sights set on Microsoft Office, and in this case WSS/MOSS, here comes Google Sites:

image

Labels: , , ,

Wednesday, February 27, 2008

Vista: Activation Error Code 0x8007232b

Note to self:  When installing Vista from a volume-licensed media, Windows installs without prompting you for the REAL key, and uses a generic product key instead.   When you subsequently forget this after entering 39 different product keys when rebuilding your laptop, when you decide to activate your Windows copy, you will get the following error:

clip_image002

This does NOT mean that you're having network/DNS issues, it means the Activation Wizard can't locate a Key Management Service (KMS) host on your network.  It's looking for that, because, as the KB says, you are trying to activate with the generic product key.

Simple solution: Use the Change Product Key link from Control Panel\System and Maintenance\System to enter the REAL Volume License key that you presumably are the rightful owner/user of.

Labels: , ,

Monday, February 11, 2008

SQL: Simple Search of Stored Procedure Code

Once upon a time I used to send out a "Tip of the Day" to my esteemed colleagues.  Here's a piece of code I used a lot prior to creation of my Data Dictionary system function (prior to me starting SharePoint development, which has pretty much precluded any SQL work).

 

Date: Tue, 22 Nov 2005 18:47:41 -0400
Subject: Tip of the Day: How to locate a word in sql

Say you need to find where a table field named 'InitSalesID' is referenced in your stored procedures and functions.

Easy, use my FindText query:

DECLARE @query varchar(100)
--Change this
SET @query = 'InitSalesID'
--End changes
 
--Leave this alone
SELECT DISTINCT name, type
FROM sysobjects so INNER JOIN syscomments sc ON so.id = sc.id
WHERE text LIKE '%' + @query + '%'
ORDER BY name

But what if the database also contains a field called ‘DefInitSalesID’? The above query would also return those references.  How do you limit the results to those only referencing the ‘InitSalesID’ field?

You can’t simply preface the text in the query with a space, since you may have code like ‘bu.InitSalesID’, or the field name may be at the beginning of a line, etc.

The solution is this:

DECLARE @query varchar(100)
--Change this
SET @query = 'InitSalesID'
--End changes
 
--Leave this alone
SELECT DISTINCT name, type
FROM sysobjects so INNER JOIN syscomments sc ON so.id = sc.id
WHERE text LIKE '%[^a-z]' + @query + '[^a-z]%'
ORDER BY name

By adding the [^a-z] wildcards to the like statement, you limit the search to entries that do NOT have an alpha character immediately before or after the query text.

Labels: ,