Variations quit propagating

If variations quit working, the it could be the relationship list (hidden list in the root site) could be corrupt.
This could happen when you copy sites/pages from the target site back to the source site.

The easiest way to fix is run the variations editor.
http://www.thesug.org/blogs/lsuslinky/Lists/Posts/Post.aspx?List=ee6ea231%2D5770%2D4c2d%2Da99c%2Dc7c6e5fec1a7&ID=21

You have to run the tool on the front end server (just on one of them if you have multiple, SharePoint will propagate the changes to any other front end servers).  You just download the zip file and extract the files to a folder, it doesn't install anything there is just a .exe (SharePoint Variations Editor.exe) file to run.

You have to enter the url for your site (ex, http://www.blah.com/en/pages/home.aspx), then click the scan button (next the text box you entered the url, looks kind of like a site icon).

It will scan all your sites (progress bar (with % complete) at the bottom) and show your site structure.

The very last 2 nodes will include any warnings or errors.

For each error on a page, select the page, check the check box, then click green button in the toolbar.

For each error on a site, you will need to look up that site's group in the hidden relationship list (http://demo/Relationships%20List/AllItems.aspx).  Look for that site in a different variation and get the group id from that site.  You will have to rescan after making these changes.

After that propagation will continue to work and any page not propagated will be propagated to the target sites.

 

This blog summarizes a couple of other blogs I learned from (I want to give credit where credit is due.)
http://stsadm.blogspot.com/2008/04/fun-with-variations.html

http://www.thesug.org/blogs/lsuslinky/Lists/Posts/Post.aspx?List=ee6ea231%2D5770%2D4c2d%2Da99c%2Dc7c6e5fec1a7&ID=21

Search across all fields in all tables in SQL server

I found this script that allows you to search across all fields in all tables of a database for a specific string. It’s helpful when you trying to where data might be stored in a strange/large/new database that you are not intimately familiar with. Being a consultant I have found myself digging though a clients database many times trying to figure how the data is stored and this has saved me from looking in every table manually. I did not come up with this code myself, but I didn’t save the link of the blog where I found it. So unfortunately I can’t give credit to the smart person who came up with it. To use it just set the value of @SearchStr (highlighted in red) to the string you wish to search for.
CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630))
DECLARE @SearchStr nvarchar(100)
DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110)
SET @TableName = ''
SET @SearchStr = 'string to search for' 
SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')
WHILE @TableName IS NOT NULL
BEGIN
SET @ColumnName = ''
SET @TableName =
(
SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
AND QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) > @TableName
AND OBJECTPROPERTY(
OBJECT_ID(
QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)
), 'IsMSShipped'
) = 0
)
WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)
BEGIN
SET @ColumnName =
(
SELECT MIN(QUOTENAME(COLUMN_NAME))
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = PARSENAME(@TableName, 2)
AND TABLE_NAME = PARSENAME(@TableName, 1)
AND DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar')
AND QUOTENAME(COLUMN_NAME) > @ColumnName
)
IF @ColumnName IS NOT NULL
BEGIN
INSERT INTO #Results
EXEC
(
'SELECT ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630)
FROM ' + @TableName + ' (NOLOCK) ' +
' WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2
)
END
END
END
SELECT ColumnName, ColumnValue FROM #Results
DROP TABLE #Results
Technorati Tags: ,,

SharePoint performance tips

I attended the SharePoint Saturday today and attended a session on SharePoint optimal performance by Eric Shupps.  Here are a few of the tips I learned today.

Have a separate server (not available to users) to host search indexes.

Change the default SQL growth from 1 mb, 10% to 100 mb, 250%.

Isolate the SharePoint DB, do not put any other databases on the same server as the SharePoint DB.

Create custom scopes with unique crawl schedules. If you have a specific site that needs to crawled more often than the other sites

Enable manual compression on IIS 6/7.  You will need to balance between compression and cpu benefits (Compression increases CPU utilization on WFE's).

Only things in the 12 hive can be compressed, things out of the database are not

Windows 2008 does dynamic compression out of the box
Windows 2003 can turn on dynamic compression, but has limited improvement

MOSS does caching right out of the box, wss does not
MOSS caches Pages, Objects, Disk (blob, ie documents)
Caching increases memory utilization

Check the object cache
100 MB is kind of small, maybe increase 250-500 MB

Setup cache profiles.
each site collection can be setup different
each zone can be setup different

BLOB caching does not work right before the infrastructure update

Check the output cache.
You can use the cache profiles you setup, which can be set for anonymous and/or windows auth.

For further reading:
check out SharePoint 2007 performance ad scalability white paper check out TechNet IIS performance tuning

Get Google results that matter

More than once I have searched for something on Google and gotten back too many results that don’t matter.  One of the problems with IT is that everything moves and improves quickly.  It’s such a pain when get results that over 2 years old and don’t matter because the technology has moved on.

Use the advanced search of Google to get results that are relevant.  You can tell Google what date range to use (how recent the page is), for example past week, past month, past year.  That way you will only get pages in the results that are from the your date range.  This helps when you’re working with bleeding edge technologies.

Optimize Firefox (speed it up)

For Firefox being such a good browser, I was surprised to find out to find out that Firefox can run faster.  There are some Firefox settings that can be adjusted to speed up your browsing experience.

Of course type about:config in the address to get to the Firefox settings. 

Change the following settings:
network.http.pipelining from false to true
network.http.pipelining.maxrequests from 4 to 15
network.http.proxy.pipelining from false to true

Then add a new entry nglayout.initialpaint.delay and set it’s value to 0.


This will speed up your Firefox browsing experience.

Show desktop icon missing from quick launch

Occasionally I end working on PC that is missing the show desktop icon.  I always end up looking for how to recreate it on Google. 

In Windows XP, go the run command then type the following command:

regsvr32 /n /i:u shell32.dll

Then press enter.  A dialog will let you know it was successful.
The show desktop won’t be there until you reboot or type the following command:

%appdata%\microsoft\internet explorer\quick launch

This will open a folder.  Then you can drag the show desktop icon to your quick launch bar (it will create a short cut in the folder that just opened up).


In Vista, go to howtogeek.com and download the file labeled “ShowDesktop.zip”.  Open that file and drag the file it contains to the quick launch bar.

What to do with User Account Control in Vista


Tired of Vista asking you if it’s okay to do anything, that’s the User Account Control (UAC).  You can turn it off or use free third party tools to adjust.

I choose to turn it off because it is too annoying.  Just go the control panel-> user accounts.  Then click Turn User Account Control on or off.  Click continue at the UAC prompt and on the next screen, uncheck the Use User Account Control (UAC) to help protect your computer.

That will turn off UAC and you won’t have to worry about it.

Excel 2007, determine count of rows in a spreadsheet

I had to determine how many rows are in a speadsheet with VBA.

Dim rowCount as Integer
rowCount = ActiveSheet.UsedRange.Rows.Count

Excel 2007, determine count of worksheets in a spreadsheet

 

If you need to know how many worksheets in a spreadsheet.

Dim sheetCounter as Integer
sheetCounter = ThisWorkbook.Worksheets.Count

Record count of all tables in a database

Here is a sql script that will give a count of all records in every table in your database. This comes from my friend David McCollough.
CREATE TABLE #sizes ([name] nvarchar(200), 
-- BOL says (20), but that obviously wrong
             [rowcount] varchar(25))
DECLARE @tablename VARCHAR (128)

DECLARE tables CURSOR FOR
   SELECT TABLE_NAME
   FROM INFORMATION_SCHEMA.TABLES
   WHERE TABLE_TYPE = 'BASE TABLE'
   order by TABLE_NAME

-- Open the cursor
OPEN tables

-- Loop through all the tables in the database
FETCH NEXT
   FROM tables
   INTO @tablename

WHILE @@FETCH_STATUS = 0
BEGIN
  --print 'Insert into #sizes Select ''' +  @tablename + ''' as [name] ,count(*) from ' + @tablename
  --exec ('Insert into #sizes Select ''' +  @tablename + ''' as [name] ,count(*) from ' + @tablename)
  --faster than select count(*)
  exec ('Insert into #sizes Select ''' +  @tablename + ''' as [name],(SELECT rows FROM sysindexes WHERE id = OBJECT_ID(''' +  @tablename + ''') AND indid < 2)')
FETCH NEXT
   FROM tables
   INTO @tablename
END

-- Close and deallocate the cursor
CLOSE tables
DEALLOCATE tables

select * from #sizes Order by [name]
drop table #sizes
.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }