Zephyr's SharePoint Blog

My Sharepoint world experience notes on day to day basis…..

Document Information Panel fails to load for document library with lookup column – moss 2007

Posted by fillzephyr on September 7, 2012

I have an issue related to getting the value in DIP for office documents from lookup column in my SharePoint 2007 document library. The reason is that the look-up columns list id is not closed with “{ }”.

Which can be verified using “SharePoint Manager” tools by going to “Library” and clicking on “Schema tab”.

I have found a power shell  script for SharePoint 2010 and  i have made changes to this script to work for SharePoint 2007.

Use with caution in production.

here is the script :

[void][System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)

# replace your site collection url with “http://moss/sites/teamsite

$site = New-Object Microsoft.SharePoint.SPSite(“http://moss/sites/teamsite “)
$listName = “Documents”

# replace your web-url with “technology” so if you have a web url http://moss/sites/teamsite/technology
$web = $site.AllWebs[“technology”]
write-host -foregroundcolor green $web.url
$list = $web.Lists | where {$_.Title -eq $listName}
$fields = $list.Fields | where {$_.Type -eq “Lookup”}
foreach ($field in $fields)
{
Write-Host “Fixing Field “$field.Title

#Fix the Lookup WebId first
$lookupWeb = $field.LookupWebId

$tempSchema = $field.SchemaXml
$toFind = “WebId=`”$($lookupWeb)`””
$toReplace = “WebId=`”{$($lookupWeb)}`””
$tempSchema = $tempSchema.Replace($toFind, $toReplace)

#Check if we need to fix the Lookup List Id too

if ($field.LookupList.Length -gt 0)
{
$lookupList = $field.LookupList

#Need to make sure we don’t do a double fix

if ($lookupList.Contains(“{“) -eq $false)
{
$toFind = “List=`”$($lookupList)`””
$toReplace = “List=`”{$($lookupList)}`””
$tempSchema = $tempSchema.Replace($toFind, $toReplace)
}
}

#Schema updates complete at this point. Replace the field schema

$field.SchemaXml = $tempSchema
$field.Update()
Write-Host “Done Fixing “$field.Title
}

$web.dispose()

Posted in SharePoint Blogs | Leave a Comment »

The SharePoint site collection size more than 50 GB is not opening

Posted by fillzephyr on June 21, 2012

Issue:

I got a call from a user that they are not able to go to their team sites. I tried to open the site and its thinking, thinking and thinking for about 20 mins and then IE throws error page not found.

Solution:

I tried another Site collection and it opens well. So my SharePoint environment is fine except this team site.

I gone to central admin and check the quota template and find it has about 49 GB data on that site collection.

We have used one DB per Site Collection for Document management.

I have a SQL DB backed up of the troubled SC and I did restore it to Dev. try to open it and it opened straight away without any trouble.

From this I find it’s not a problem with SharePoint it’s something related to DB size.

I check logs and event viewer and couldn’t find anything.

I gone to the timer services status under Operations and here you go I find Database statistics services hang on initialized states on 45% from last 2 nights for one server out of our four server farm.

Google it and find this article:
http://blogs.technet.com/b/patrick_heyde/archive/2010/05/27/advanced-maintenance-for-sharepoint-databases-defrag-update-index.aspx
I read about the smarter way section and Patrick specify about 50 GB limit and it strikes that it conflicts with our back up schedule which makes this time services on hang on state.
I gone to the timer services definition and stop the services for the Web app having this SC and done the following steps.
1. Stop Windows SharePoint Services Timer on Windows Services
2. Go to ‘C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config’ on front-end server
3. Clear xml files from the above folder.
4. Open cache.ini file and restart the number into ‘1’
5. Start Windows SharePoint Services Timer on Windows Services

The above steps clear SharePoint Config cache and allow the timer jobs to run properly. The Database statistics timer job is aborted.
Now I turn on the Database statistics timer job then change the timing for this time service from daily to weekly and from 6 am to 4 pm other than the backup scheduled.

Here are the stsadm cmd to change the timings.

To set the schedule for when database statistics are collected for the Web application http://test, use the following syntax:

stsadm -o setproperty -pn job-database-statistics -pv “daily at 15:00:00” -url http://test

To view the current setting of the job-database-statistics property, use the following syntax:

stsadm -o getproperty -pn job-database-statistics -url http://test

Now the site opens straight away.

Posted in Errors, SharePoint Blogs | Tagged: , , , , | Leave a Comment »

Get Checkout files in SharePoint 2007

Posted by fillzephyr on December 19, 2011

Issue :  To get  all the checkout files by users in a web application .

Resolution:

I had write this power shell script to get all the checkout file from web application. I had used the power shell code from Gary’s script and Modify to used for SharePoint 2007.

Script :

[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.Sharepoint”)

$webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup(“http://Sharepointwebapp”)
foreach ($site in $webapp.Sites) {

Write-Host “Processing Site: $($site.Url)..”

foreach ($web in $site.AllWebs)

{
Write-Host -foregroundcolor red “Processing Web: $($web.Url)…”

# To get the Checked out Pages

foreach ($list in ( $web.Lists | ? {$_ -is [Microsoft.SharePoint.SPDocumentLibrary]}) ) {

Write-Host “`tProcessing List: $($list.RootFolder.ServerRelativeUrl)…”

foreach ($item in $list.CheckedOutFiles) {

if (!$item.Url.EndsWith(“.aspx”)) { continue }

$hash = @{

“URL”=$web.Site.MakeFullUrl(“$($web.ServerRelativeUrl.TrimEnd(‘/’))/$($item.Url)”);

“CheckedOutBy”=$item.CheckedOutBy;

“CheckedOutByEmail”=$item.CheckedOutByEmail

}

New-Object PSObject -Property $hash

}

# To get the Checkout documents in Libraries

foreach ($item in $list.Items) {

if ($item.File.CheckOutStatus -ne “None”) {

if (($list.CheckedOutFiles | where {$_.ListItemId -eq $item.ID}) -ne $null) { continue }

$hash = @{

“URL”=$web.Site.MakeFullUrl(“$($web.ServerRelativeUrl.TrimEnd(‘/’))/$($item.Url)”);

“CheckedOutBy”=$item.File.CheckedOutBy;

“CheckedOutByEmail”=$item.File.CheckedOutBy.Email

}

New-Object PSObject -Property $hash

}

}

# To get Managed Check Out Files

foreach ($item in $list.CheckedOutFiles ){

if ($item.File.CheckOutStatus -ne “None”) {

if (($list.CheckedOutFiles | where {$_.ListItemId -eq $item.ID}) -ne $null) { continue }

$hash = @{

“URL”=$item.Url;

“CheckedOutBy”=$item.CheckedOutBy;

“CheckedOutByEmail”=$item.CheckedOutBy.Email

}

New-Object PSObject -Property $hash

}

}

}

$web.Dispose()
}
}

Posted in SharePoint Blogs | Tagged: , , | Leave a Comment »

Event id 7024 : The SharePoint 2010 Timer service terminated with service-specific error %%-2147467259.

Posted by fillzephyr on March 31, 2011

Hi All,

i had an issue with the Timer services(SP2010). The jobs running on the servers are stopped from yesterday and all the scheduled jobs are not running. When i check under event viewer i ll got the 2 event ids at the same time.

Log Name:      System
Source:        Service Control Manager
Date:          31/03/2011 4:18:04 PM
Event ID:      7024
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      xxxx
Description:
The SharePoint 2010 Timer service terminated with service-specific error %%-2147467259.

Log Name:      System
Source:        Service Control Manager
Date:          31/03/2011 4:18:04 PM
Event ID:      7031
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      XXXX
Description:
The SharePoint 2010 Timer service terminated unexpectedly.  It has done this 5 time(s).  The following corrective action will be taken in 30000 milliseconds: Restart the service.

The Resolution for that is open the owstimer.exe config file in BIN folder (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN)

Delete all the content under the file  OWSTIMER.EXE.CONFIG and copy this lines:

<?xml version=”1.0″ encoding=”utf-8″ ?>
<configuration>
<runtime>
</runtime>
</configuration>

Hope this will help to resolve some of the issues.

Posted in SharePoint Blogs, SP2010 | Tagged: | 7 Comments »

SharePoint RSS Viewer Web Part Output display

Posted by fillzephyr on December 12, 2010

I had a blog  site collection named http://abcd.net.au/sites/blog and had the blog site underneath it called http://abcd.net.au/sites/blog/test

I want to displays the blog Posts of tests  on the sub-site Demo under main Intranet Portal http://abcd.net.au

Normally if you add the rss viewer web-part it will show all the fields related to ALLPOSTS view of the test blog.

In order to show the posts with only Title and body to the rss viewer webpart you have to follow this steps.

Go to the test blog Posts lists

Open the Posts List settings

under the column called Communications there is the RSS settings Option

Select the fields you want top display in the rss viewer webpart and hit ok.

Posted in SharePoint Blogs | Leave a Comment »

The search service is not able to connect to the machine that hosts the administration component – SharePoint 2010 Search Service Application Error

Posted by fillzephyr on December 12, 2010

Error:

System Status Crawl status The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component ‘xxxx-xxxxxxx-xxxxx-xxxxx in search application ‘Search Service Application’ is in a good state and try again.

Resolution:

Go to manage Service Application Page As shown below

Hover over the Enterprise Search Service. Go to the properties as shown below.

It opens up the page shown below. Please verify if the application pool used is SharePoint web Service Account.

If it used the application pool SharePoint web Service Account then change to other application pool from drop down as shown below.

Once you change hit OK.

It will take some time and it shows up the successful of the creation of theSearch Service Application.

Or

You can try this method by creating a new app pool. ( I had tried this after doing the above step but I don’t know what would be the outcome if you do it straight away)

Create a new app Pool

AppPool Name: SPSearch_Ent

Search Service Account: DomainName\SPSearch1

Hit Ok

Once its done successfully it will shows the above screen.

Hope this will helps.

Thanks

Posted in SharePoint Blogs | 4 Comments »

Error 6482 : Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance

Posted by fillzephyr on August 6, 2009

Error 6482

Event Type: Error
Event Source: Office SharePoint Server
Event Category: Office Server Shared Services
Event ID: 6482
Date:  4/15/2009
Time:  3:50:10 PM
User:  N/A
Computer: MOSSPRD
Description:
Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (0953efa6-baa1-474d-8e4d-58a31fad7a2e).

Reason: The underlying connection was closed: An unexpected error occurred on a send.

Techinal Support Details:
System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. —> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
— End of inner exception stack trace —
at Microsoft.Office.Server.Search.Administration.SearchApi.RunOnServer[T](CodeToRun`1 remoteCode, CodeToRun`1 localCode, Boolean useCurrentSecurityContext, Int32 versionIn)
at Microsoft.Office.Server.Search.Administration.SearchApi..ctor(WellKnownSearchCatalogs catalog, SearchSharedApplication application)
at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()
at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Resolution:

I am getting this error after my fresh installation in Of Moss Prod with SP1. I am having 64 bit environment.

I had download iis resource kit from Microsoft website.
After downloading on the server I run the selfssl command from :

Then I type the following commands :

( Installs self-signed SSL certificate into IIS.
SELFSSL [/T] [/N:cn] [/K:key size] [/S:site id] [/P:port]

/T               Adds the self-signed certificate to “Trusted Certificates”
list. The local browser will trust the self-signed certificate
if this flag is specified.
/N:cn            Specifies the common name of the certificate. The computer
name is used if not specified.
/K:key size      Specifies the key length. Default is 1024.
/V:validity days Specifies the validity of the certificate. Default is 7 days.
/S:site id       Specifies the id of the site. Default is 1 (Default Site).
/P:port          Specifies the SSL port. Default is 443.
/Q               Quiet mode. You will not be prompted when SSL settings are
overwritten.

The default behaviour is equivalent with:

selfssl.exe /N:CN=MOSSPRD /K:1024 /V:7 /S:1 /P:443 )

C:\Program Files (x86)\IIS Resources\SelfSSL>selfssl /s:951338967 /v:1000
Microsoft (R) SelfSSL Version 1.0
Copyright (C) 2003 Microsoft Corporation. All rights reserved.

Do you want to replace the SSL settings for site 951338967 (Y/N)?y
The self signed certificate was successfully assigned to site 951338967.

Posted in Errors, IIS, SharePoint Blogs | Tagged: , | Leave a Comment »

Errors 6398, 7076, 6482 on Only One server.

Posted by fillzephyr on August 6, 2009

I have 2 Web Front End  Server A  and Server B
I  ll find the errors  6398, 7076, 6482 on the event viewer of  server Server B  only (Not Server A) OR When I try to look at the web sites listed under IIS of Server B  , I’ll get a dialog box noting “Specific path cannot be used at this time”.
 
To resolve I ll have to just go to the services(Path : Start>Administrative Tools>Services) Open it.
Go to the Windows SharePoint Services Timer and restart it. This error will gone.
 
There are Hot fixes there for it but it happens sometime only and Again its effect to Server B only Not the Server A.
 
The reason for this error is beause “You may be unable to manage IIS by using Server Manager if two threads access IIS at the same time”
 
Thanks.
 

Posted in Errors, SharePoint Blogs | Tagged: , , , | Leave a Comment »

Install ASP.NET v2.0.50727 in IIS

Posted by fillzephyr on August 6, 2009

i had install the .netframework 2.0 sp2. .netframework 3.0 sp2 and .netframework 3.5 sp1.
when i see in my IIS under the server node in folder Webserver extension. ASP.NET v2.0.50727 is missing. so now i had double check whether its installed or not, for that i go to
C:\WINDOWS\Microsoft.NET\Framework64 and its reside under there so to install it i run this following cmd.
 
Open the command prompt on the server. Then go to the specified path and run this cmd.
 
C:\>WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i
Start installing ASP.NET (2.0.50727).
……………….
Finished installing ASP.NET (2.0.50727).
 
Go to IIS expand the Node .Go to the Webserver Extensions and then check the ASP.NET v2.0.50727 installed. After it is installed clicked on it and select Allow.
 
Thanks
 

Posted in General, IIS, SharePoint Blogs | Tagged: , | Leave a Comment »

Rename “My Site” Link Text to “My Something”

Posted by fillzephyr on July 9, 2009

I get a requirement to change the top global links for “My Site”  text to something different  like “My” instead of “My Site”. I had try this method

https://fillzephyr.wordpress.com/2009/06/26/redirecting-or-changing-my-sites-link-name-to-the-new-link-name/

and it works fine but when you access site in extranet zone it will shows “My” externally , which i dont want to.

so i get around this trick :

Go to MySiteLink.ascx located at 

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES 

Open MySiteLink.ascx modify at two places make the original hyperlink ” invisible” as shown below:

 Backup the MySiteLink.ascx before you do any modification

  < asp:HyperLink id=”hlMySite” runat=”server” Visible=”false” />  

check it after these changes that the My Site link disappear at the top global links.

Then add the following line below it :

< asp:HyperLink id=”NewMySiteHyperlink” runat=”server” Text=”My” Visible=”true” NavigateUrl=”http://mysitewebappurl/_layouts/MySite.aspx&#8221; /> 

Check that it will works.

I test it by deleting My site and recreate it, it works fine for me. Also i check externally and it will not shown up.

Hope it will work for you guys.

Thanks!!!!

Posted in MOSS Funstuff, Mysite | Tagged: , , , | 2 Comments »