Showing posts with label SharePoint 2007. Show all posts
Showing posts with label SharePoint 2007. Show all posts

Monday, 7 January 2019

"An update conflict has occurred, and you must re-try this action" in SharePoint

Hi all,

I was facing this issue when trying to run manually a timer job from the Central Administration GUI.

According to Microsoft, I've clear the cache of SharePoint only from 1 server of my Farm.
I've 4 servers in that Farm, and I had to clear the cache on each servers in my Farm.

This article explain how to clear the cache config, but the path mentioned is specific for SharePoint 2007:
https://support.microsoft.com/en-us/help/939308/error-message-when-you-try-to-modify-or-to-delete-an-alternate-access

Use this article for the path for SharePoint 2010, 2013 and 2016:

https://gallery.technet.microsoft.com/office/SharePoint-2010-2013-21f55320

1- Stop SharePoint Timer Job Service
2- Navigate to : C:\ProgramData\Microsoft\SharePoint\Config
3- Locate the GUID folder that has the file "Cache.ini", and the .xml files
4- Create a Backup folder
     Move all *.xml files into the Backup folder
     Copy the Cache.ini into the backup folder
5- Edit the Cache.ini (from the GUID folder)
     Select ALL, type 1
     Save the Cache.ini file
6- Restart the SharePoint Timer Job, and check that the cache .xml files are created again

Proceed those steps on each servers in your Farm.


Voilà,

That’s all Folks !!!

Monday, 9 July 2012

How to list all the Site Collection Admins into a specific Web Application in Shp2007


Hi all,

Today’s challenge, is to list all the SCA’s of a Web App.

With google, I found a nice simple post on "The Frog Pond of Technology" with a little powershell script.
Then, I found a link to the Brian T. Jackett TechNet Script Repository , and tested his script, with a little change, explained by Tasha’s feedback in the first link (I got the same blank names).

So, hereunder is the script that I’m now using to grab all the SCA’s in the needed WA.

########################################################### #SP_Display-SiteCollectionAdmins1.ps1 -URL # #Author: Brian T. Jackett #Last Modified Date: Mar. 25, 2011 # #Display all site collection admins for all site collections # within a web application. ########################################################### [void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SharePoint') #DECLARE VARIABLES [string]$siteUrl = $args[0] function GetMissingParameter { $script:siteUrl = Read-Host "Enter Site URL" } ############ # MAIN ############ #IF MISSING PARM FOR SITE URL, ASK FOR INPUT TO FILL if($args.length -eq 0) { GetMissingParameter } $rootSite = New-Object Microsoft.SharePoint.SPSite($siteUrl) $spWebApp = $rootSite.WebApplication foreach($site in $spWebApp.Sites) { foreach($siteAdmin in $site.RootWeb.SiteAdministrators) { Write-Host "$($siteAdmin.ParentWeb.Url) - $($siteAdmin.Name)" Write-Output "$($siteAdmin.ParentWeb.Url) - $($siteAdmin.Name)" |Out-File -encoding default -append } $site.Dispose() } $rootSite.Dispose()


nb: added the output to a file



I didn’t test this script in SharePoint 2010, but it is said that this script in object model will work for 2007 and 2010.


That's all folks.

Thursday, 14 June 2012

How to Apply Cumulative Updates and Avoid Issues

Hi all,

The last few weeks, I was busy in patching our SharePoint 2007 and 2010 farms in test and prod environment.
Of course, I faced several issues, but now, I can say that all farms are up-to-date until Feb 2012 CU.

I can warmly told you to monitor available space on your SQL disk, and the Errors in your Event Viewer for the lack of access rights on the DB's.

Part 1 : Procedure followed to apply the CU

First of all, write down the complete list of your servers of all your farms.

I've 3 environments : PROD, UAT (should be as close as possible to PROD) and Test.
Test is only used for big changes, or in standalone.

PROD and UAT are very important, as if UAT pass the tests, we are allowed to apply the changes in PROD.
This procedure is for the patch, adding new feature, and in this case : allow the end-users to test their migrated sites and to fill the survey.

Doing this, we were able to point out the sites that were customised via SharePoint Designer in 2007.


Now, let's go for the CU process :

STEP1 :
-          Download and prepare the binaries of the CU that will be needed for your patching process.
-          Install the binaries on all your servers in the same Farm. (proceed farm by farm)
-          At the end of this install process, do not click on the message box : "Do you want to reboot to finalise the installation of this package?"
Sometime, this message was displayed, sometime not… Strange…
-          When the binaries are installed on all servers, click on "OK" or "No", following the end message that you got.

STEP 2 :
-          Open the "Configuration Wizard", click "Next", then "YES"
-          And WAIT !!!!
-          Do same operation on all the remaining servers of your farm
-          When all servers are at the same step, go to your CA, and press "Next"
-          When the Wizard is successful, do not click on "Finish", but continue the Configuration process to the next servers, one-by-one.

STEP 3 :
-          On the CA, click "Finish" and check your farm version (System Settings è Manage Servers in this Farm
-          Check the Version, and the status of your servers in the farm. (in this example, 2 servers are upgraded, not the 2 others)

-          Check the Upgrade Status via Upgrade and Migration è Check Upgrade Status





Part 2 : Errors found

Case #1 : Event 3760
The account issue occurs specially on our TEST environment, as DB's are copied from prod, removed and replaced for test purpose.

Case #2 : Event 3758
SQL disk-volume was full.
Solution is to move some DB's to another volume, but SharePoint Services have to be stopped.


Case #3 : Database is deleted, but still listed in SharePoint 2010 CA
I also had this Event 3760, same error as in case #1.
The difference is that the concerned DB was deleted from SQL disk, but was not deleted from SharePoint CA.
So, I removed the entry via Application Management è Manage Content Database, select the related Web Application, and then delete the missing Database Name entry.




Part 3 : used tips

-          If you have the status "Upgrade Available" in the "Farm Information" page, you can always execute this command from your BIN folder (<drive>:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN) :
psconfig -cmd upgrade -inplace b2b -wait
               or
            psconfig -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

In my example, I had to wait longer than in the other farms, as lot of DB's were present, and to run                                                the second psconfig command on the last server.

-          When you've installed the binaries, and you need to install again the CU, you can force it's installation via the command line :
<filename>.glb.exe PACKAGE.BYPASS.DETECTION.CHECK=1

-          In the configuration Wizard, if there is some installed patches shown as "Missing on <servername>", you can use this PowerShell command :
Get-SPProduct -local
            Then, press "Refresh" in the Configuration Wizard".

If you still have issues, please check the created logs, and the Event Viewer.

Doing this let me update all my servers until Feb 2012 CU, in SharePoint 2007 and 2010.



That's all folks.






SharePoint document Category : double check for typo

Today's story is only to show how this product (SharePoint) is known by the end-users.

When they do modification into their documents, and the result is different as expected, it is always SharePoint's fault.

Today, a colleague of mine call me :
- Hey, Mr SharePoint. There is a problem. Can you check ?
- Yes, what is the problem - I said.
- I've change the category of my document, and it is gone from SharePoint.
- Ok, let's check in explorer view (Documents are still on SharePoint 2007 platform).

... Of course, the document is in the library.

- So, what have you done ?  -- I asked.
- I've changed the category, like this (he saved the doc on his laptop, then delete it from SharePoint, and upload it again)
So, my colleague repeat what he does previously, and I checked all the settings he choose, specially the category.

Then, he said, like a winner : "Look, my doc is not there !!!"

- Yes, but check the next category .... you'll find it !!!!

So, SharePoint made what he was asked to do.
The used category was not the same as the expected one. Instead of "IIS 7.0", the selected category was "IIS 7"

So, double pay attention to the typo when creating categories.

Now, my colleague's nickname is "PEBKAC"

SharePoint 1 - PEBKAC 0



That's all folks

Friday, 11 May 2012

FYI : Sharepoint Designer 2010 cannot edit SharePoint 2007 Web Sites

Dear all,

This mail is only for information purpose concerning SharePoint World.

Opening SharePoint 2007 site with SharePoint Designer 2010 give this message box :

Reason :


Solution : install SharePoint Designer 2007


That's all folks

SharePoint 2007 : Issues with 'Not Finished' Surveys

Today, I was forced to go into the SharePoint Survey Database to try to "unlock" the not finished surveys.

The problem is due to the misuse of the Survey Button.
End-user think that if we point the fact that the button "FINISH" will really finish the survey, part of them will never click on it, and they'll think that the "SAVE" button will do the same.

At the other end of the chain, I'm facing with the survey result that is not compatible with the number of sites that should be in the survey.

Little search on internet, and this post (http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/b9ecc145-9bfc-42a2-ae5a-77416657ea85/) gave me the missing pieces of my jigsaw.
The SQL items that must be changed to force the saved survey to become as finished survey.

-          Step 1 : write down the Survey Name (for me, I have to do the job 3 times…) :

-          Step 2 : open your SQL Server Management Studio and open you DB

-          Step 3 : in your dbo.Lists view, find your survey(s) name.

Used Query :
SELECT TOP 1000 [tp_WebId]
      ,[tp_ID]
      ,[tp_Title]
      ,[tp_Created]
  FROM [SharePoint_Content_shpSurvey].[dbo].[Lists]
  Where [tp_Title] like '%Upgrade%'

                               Note : I've used the 'like' word as my three surveys had this word in their name.

                Result :

Now, I've my 3 tp_ID related to all my Surveys.


-          Step 4 : Let's check the content of the dbo.UserData

Used Query :
SELECT TOP 1000 [tp_ID]
      ,[tp_Level]
      ,[tp_DeleteTransactionId]
      ,[tp_CheckoutUserId]
      ,[tp_LeafName]
      ,[nvarchar5]
      ,[tp_Modified]
      ,[tp_Created]
      ,[tp_ContentType]
      ,[nvarchar4]
  FROM [SharePoint_Content_shpSurvey].[dbo].[UserData]
  where [tp_ListID] = '90A65233-C431-414D-8B19-F14C20F799EF'

                Result :

In this list, we can see the completed Surveys (green box).
If tp_Level = 1 and tp_CheckoutUserId = NULL, then the survey is "Completed".
If tp_Level = 255 and tp_CheckoutUserId is not null, then you've pointed out the unfinished surveys.

Adding this line in the previous query "and [tp_Level] = 255", will give the surveys to modify : 10 rows to correct.



-          Step 5 : now, we are going to set the tp_Level to 1 and tp_CheckoutUserId to NULL

Used Query :

BEGIN TRAN UPDATE    UserData
                             SET              tp_CheckoutUserId = NULL, tp_Level = 1
                             WHERE     tp_ListId = '90A65233-C431-414D-8B19-F14C20F799EF' AND tp_Level = 255 AND tp_DeleteTransactionId = 0 COMMIT


Now, checking the dbo.UserData entries : rows 14, 17 and 21 are now correct



-          Step 6 : Let's check the content of the dbo.Docs

Used Query :
SELECT TOP 1000 [Id]
      ,[CheckoutUserId]
      ,[CheckoutDate]
      ,[Level]
      ,[DeleteTransactionId]
  FROM [SharePoint_Content_shpPortal].[dbo].[Docs]
  Where [ListID] = '90A65233-C431-414D-8B19-F14C20F799EF'

In the green square, you can find the correct values for CheckoutUserId, CheckoutDate and Level columns.
In the red square, values that shows the unfinished surveys.

-          Step 7 : now, we are going to set the CheckoutUserId, CheckoutDate to NULL, and Level to 1

Used Query :
BEGIN TRAN UPDATE    Docs
                             SET              CheckoutUserId = NULL, CheckoutDate = NULL, [Level] = 1
                             WHERE     ListId = '90A65233-C431-414D-8B19-F14C20F799EF' AND [Level] = 255 AND CheckoutDate IS NOT NULL AND
                                                   DeleteTransactionId = 0 COMMIT


Now, let's check by searching the Id of former unfinished surveys :

As you can see, all the values are set as requested.


Now, let's check the Before/After in the Survey site : missing Surveys are now available.

                        


That's all folks

Thursday, 1 March 2012

How to acces in read/write a checked out document ?

Today, I had to explain to a Site Collection Admin how I unlock a file on his SharePoint 2007 site.
The file was checked out by a user that was no more working in his team.

This post resume the steps I explain to the end-user :

1-      Check that the Icon is in "check out"

2-      Two options:
Ø  Check In : make your changes visible to your colleagues, and create a new version (if the versioning option is set)
Ø  Discard Check Out : will discard changes, and the main advantage, is to avoid making new versions of the document when not changes are made into the file.

Complete info can be found on the Microsoft Support Page


That's all folks 

Wednesday, 18 January 2012

How to reset the "AllItems.aspx" page in your Shared Documents Library


I was face to a blank page while accessing Shared Documents Library.

First, checking with SharePoint Designer 2007, I saw that the AllItems.aspx page's size was more than 13000Kb (instead of 1Kb).

Trying to open the .aspx page gave me really special caracters, as if you try to open a excel file with your notepad.
By the way, the end user explained that he was saving his excel file into the SharePoint Site's Document Library.

Don't know why, via excel, it overwrite each time the wrong file : the AllItems.aspx


The solution that I've applied is describe herunder :

1         Into the URL, add at the end "?contents=1" :
         …./sitename/Shared%20Documents/Forms/AllItems.aspx?contents=1
2         Check the "Shared Documents" entry
3         Click "Reset"
4         Test
If not ok (was my case), the go to next step
5         Open SharePoint Designer 2007, and open your faulty site
6         Browse through the structure and expand the tree view "Shared Documents => Forms"
7         Right-click on the AllItems.aspx file, and select : "Reset to Site Definition"


That's all folks 


Wednesday, 31 August 2011

MOSS 2007 : Data changes are lost after Check in of .accdb file

Let's describe the user issue :

User had a database file stored on our SharePoint 2007 environment. (Database into another Database… Uh ? )
The process to reproduce the user's issue :
-          Put the .accdb in Check out
-          Open the .accdb file
-          Making the changes
-          Saving the file
-          Check in to allow other users to work with the .accdb file

Error got by the user :


Little analysis of the error message : seems that the user had selected an incorrect option while opening the file.


So, I made the same process as the user, but I found a little box that I didn't checked.

-          In Sharepoint, do the Check out to avoid having multiple users modifying the file at the same moment

In the "You are about to check out" popup windows, pay attention that the checked box "Use my local drafts folder" is NOT checked

 Open the file


 In the "Save A local Copy" popup windows, simply click on the Save button..
It is mandatory, as Access had to open the file as if it is on your computer, without any restriction.


-          We are using Office 2010, and at the top of the opened database, you can see those 2 yellow warning bar :

-          Clicking on the "Save to SharePoint Site" button from the Yellow bar will open the "Save to SharePoint" popup windows, showing that the file will be correctly saved to the Site, as expected.

-          System is showing several message windows, and then, we can find the modified database file on SharePoint.



-          Now, let's do the Check in of the document.





-          Now, the document is Check in without any error.



That's all folks

Wednesday, 15 June 2011

Unable to Upload files larger than 28Mb : Error 404


For an unknown reason, I'm unable to upload files larger than 28Mb on a Sharepoint Site, and I got an "Error 404 Page" after 5 to 10 seconds, depending of the file's size.


But the strange thing, is that I'm able to upload the same file (same extension, size) on another Site and located on another Web App.


I tested with multiple upload, without any success for the larger file :



Next step was to check the SharePoint configuration, and specially concerning the erroneous Web App.
-          Maximum Upload Size is correctly set
-          Web Page Security Validation expiration time is also correctly set.


Now, it remains the IIS, ASP to be checked.

To do so, I googled a little bit and after a little cleaning, I was able to point 3 specific Microsoft documents:

The first had the exact problem that I was facing, but their solution gave me error after an IISReset.


And the second document, gave me the correct file to change :


I simply added the "<requestLimits maxAllowedContentLenght="52428800" />" under the 
"<requestFiltering>" node:

  















 The third documents is requesting to add a parameter into the "web.config" files in two places on the server :

     - First path : in the 12-Hive folder, under Template => Layouts



 

     - Second path : in inetpub, in the Web App folder
 


A IISReset later, let's test again :

Et voilà !


The 2 largest files are now on my SharePoint Site:

Nb1: Do not forget to change also on all your WFE servers.
Nb2: The manipulation was completely successfull in our Test Environment, but not in Production...
  ==>> Update : all is working.
  Issue was due because I forgot the add "<requestLimits maxAllowedContentLenght="52428800" />" parameter to the "applicationHost.config" file on the 2 WFE Servers (it was done on the CA Server only in Production)

That's all folks

Wednesday, 8 June 2011

Move Sites from one Content Database to another


When a Content DB contains too many sites, we can script the migration process of the selected sites to be moved to another Content DB.

The purpose, is to reduce the number of sites from the DataBase1_site, and balance them between the 2 other DB, leaving Sharepoint the ability to distribute the sites on the DB's.

Step 1 :
First things first, the DataBase1_site Maximum Number of Sites is set to a lower limit (in this case, I divided by 2 the Warning and Number  - my choice)
This will leave Sharepoint to restore the sites to the lowest populated DB ( DataBase3_site in my case)

Step 2 :
Then, it's time to give some work to the SQL Team :
-          Full backup of the DataBase1_site as it is a customer requirement (and this time, I was happy to have it done !!! )

When backup is completed, I've locked all the sites that will be moved.

Then, time for SQL Team to do a differential backup of the DataBase1_site.


Step 3 :

I've written a .bat file with all those commands (according to the explanations of my SharePoint Guru), for each site that will be moved :

stsadm -o backup -url "http://<URL>/sites/<SiteToMove>" -filename "<SiteToMove>.bak"
stsadm -o setsitelock -url "http://<URL>/sites/<SiteToMove>" -lock none
stsadm -o deletesite -url "http:// <URL>/sites/<SiteToMove>"
stsadm -o restore -url "http:// <URL>/sites/POL_CONINO" -filename "<SiteToMove>.bak"
stsadm -o setsitelock -url "http:// <URL>/sites/<SiteToMove>" -lock none

1-      Backup:               Local backup to restore the site into to new DataBase
2-      SetSiteLock:      Unlock the site, or the DeleteSite will not be possible
3-      DeleteSite:        Delete the site from DataBase1_site
4-      Restore:              Restore the deleted site into the allowed DataBase
5-      SetSiteLock:      Unlock the site, as the restore was made from the backup of a locked site

If all is correctly done, job is finish.


But …. In case of problem … as the backup command didn't succeed for any reason, the restore of the full DB is needed, and must be done on SQL side.

Step 4 :

Now, the restore of the DB is done by SQL Team, and we must add the Content DB to Sharepoint, then create a backup of the lost site.

I've wrote a little script that will do all step, with a little "pause" to check the restore of the lost site, before deleting the Backup DB from Sharepoint.
As the Backup DB contains exactly the same sites as the production DB, a new ID must be set to the Backup DB using the stsadm.exe parameter :  –assignnewdatabaseid .

You can find all the details to the Microsoft TechNet Site:



stsadm -o addcontentdb -url http://backupsitemove -assignnewdatabaseid -databasename xxxxxxxxxx1_Site -databaseserver SQLServer\InstanceName
stsadm -o backup -url http://backupsitemove/sites/<SiteName> -filename "<BackupPath>\Backup\<SiteName>.BAK"
stsadm -o restore -url http://<Destination _URL>/sites/<SiteName> -filename "<BackupPath>\Backup\<SiteName>.BAK"
pause
stsadm -o deletesite -url http://backupsitemove/sites/<SiteName>
stsadm -o unextendvs -url http://backupsitemove -deletecontent -deleteiissites
pause


The last command will delete the Database from SharePoint AND from the SQL Server if the used account is set as dbo of the Content DB.


Step 5 :

A full Cralw had to be done to refresh the Search engine.


Step 6 :

Take a deep breath, a coffee and be proud of your job done without losing any user's data.



Nb:  for the little story, I've done all this recovery for one site… that had its last modified document/folder set to 2009 …


That's all folks