Sunday, April 17, 2016

SharePoint Site Backup restore/ Forgot the SA password of SQLServer 2008

I was trying to restore the SharePoint 2010 site backup through content database method, but unfortunately the site backup which I’m trying to restore on my environment has version mismatch.

The site backup version was 14.0.7145.5000 and the current environment where I’m trying to restore it 14.0.6029.1000, but wait I’ve list of other issues as well.
Phase 1 Issues:
  •      Forgot the SA password of the SQL-Server 2008 R2
  •      Unable to login through windows credentials


For password recovery this URL helped me a lot.

I have two option:

  1. Either restore the site backup in SharePoint 
  2. Restore the content database backup (which is relatively easy and recommended way)
Restore the content database backup 

For restore the SQL backup, refer these article, howtogeek msdn

The following commands is little modified command compare to the article, but it really works for me.

use master
go

ALTER DATABASE SET SINGLE_USER WITH ROLLBACK IMMEDIATE;


RESTORE DATABASE [Target DatabaseName] 
FROM  
DISK = N'C:\Backup\SQLBackupFile.bak' 
WITH  FILE = 1,  
MOVE N'' TO 'c:\mssql\data\.mdf',   
MOVE N'_log' TO 'c:\mssql\log\.ldf',  
KEEP_REPLICATION,  NOUNLOAD,  REPLACE,  STATS = 10
GO

use
go

/********* Use this command if database is throwing error of "database is already use by another user"

ALTER DATABASE SET MULTI_USER;

Wednesday, January 20, 2016

workflow integration with media wiki / FlaggedRevs installation on Media Wiki

I tried hard to install / configure Flagged Revs on Mediawiki I got different errors such as :

After gave the current user (bureaucratic) to Reviewer suddenly the whole wiki stops working

Then I start with fresh installation of media wiki and did it again, sometime it happens unknowingly we configure some wrong option, and they guy like me got into trouble :). 
Anyhow when I investigate it further the php_error log file, following error was found.

Call to undefined method ObjectCache::getMainStashInstance() in C:\wamp\www\newwiki\extensions\FlaggedRevs\backend\FRUserActivity.php on line 56

With the help of  Krenair, figure it out that I've incompatible version of FlaggedRev and MediaWiki, so I download the mediawiki-1.26.2 with FlaggedRevs-REL1_26-56a565c. 

The problem solve!!

Root Cause:

Actually, as error states that getMainStashInstance is not available, so when I checked in media wiki 1.24 the function implementation was not available and Krenair helped me to figure it out in which version it will be available, lets cut it short, use the latest version of both Flagged and Mediawiki to avoid such issues.

Monday, January 11, 2016

Media WIki LDAP configuration

Step1:

First download the LDAP extension from MediaWikiExtension and follow the instructions given on the same page.

Step2.

For running the command “ php maintenance/update.php” it’s a little trick, because sometime it happens that PHP is not configured in path variable to run on command prompt, so for this follow this article.

Step3

Configure the LDAP settings in your localsettings.php, that’s a little hack, first follow the instructions mentioned in this article, actually this is the same author's blog which wrote the plugin, so it’s very informative.

Step4

If you got the error of “Unable to start TLS: Server is unavailable” then use the following code:

$wgLDAPEncryptionType = array("group"=>"clear"); 

Where “group” will be replaced by the same string used in the ldap settings in localsettings.php file. Usually it’s a domain name in LDAP string for instance:
group.root.gp

Step 5

Enjoy the LDAP login!!!

If you face any issue, you can contact to me via blog comments!

Thursday, September 26, 2013

Attempted to perform an unauthorized operation. Failed to start DB services.

I was trying to install Sql2012 on VM server for my Sharepoint2013, I got this error "Attempted to perform an unauthorized operation. Failed to start DB services." again n again :(  me and my Sql Admin had to think, why this error is coming after giving rights for internet/power user but after some search we got this link, to solve this issue.

This is the discussion link:
http://www.sqlservercentral.com/Forums/Topic1300021-2799-2.aspx

This is real KB article:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1012225

Thursday, September 19, 2013

How to change the password of SharePoint 2010 using Power Shell

Here is the simple way without going into trouble and configuration nitty-gritty of SharePoint Central Admin.

#Set Execution Policy
1. Set-ExecutionPolicy -ExecutionPolicy Unrestricted -force

#Import SharePoint Module
2. Add-PSSnapin Microsoft.SharePoint.PowerShell -EA silentlycontinue

3. $m = Get-SPManagedAccount -Identity “Domain\userid”

4. Set-SPManagedAccount -Identity $m  -ExistingPassword (ConvertTo-SecureString “LoginAccountPassword″ -AsPlainText -force) –confirm

iisreset

Simple recipe to change the password isn't it? :)

Note: You can use this script on your all WFEs and Application Servers to change over the other Farms server as well.

And for more details you can visit to this blog
Change Password

Monday, September 2, 2013

Cannot connect to server at this time. Your list cannot be published

1.Cannot connect to server at this time. Your list cannot be published
2.Excel can't import the data from Sharepoint List
3.Cannot connect to server at this time. Your list cannot be published

These are all the error we faced when we try to import data form Sharepoint to Excel sheet.
I spent many hours to figure out this issue , I found list of solution. I decide to list all the solution
because one of the solution should work in your scenario. A clue to solve these type of errors is "security" settings.

Here is solution links

Solution 1: // Check Sharepoint list premisison
http://social.technet.microsoft.com/Forums/sharepoint/en-US/8d8704e9-b14f-477a-945c-fa6740cbe065/cant-export-list-to-excel-you-do-not-have-adequate-permissions

Solution 2: // Check your IE certificate security Setting
Open your Internet Explorer.

1. Click on Tools, then Internet Options
2. Go to Advaced tab
3. Scroll down to security and then uncheck the "Check for server certification revocation"
4. Restart your browser and then try again to import the list again. This should work.

Solution 3:
http://support.microsoft.com/kb/838703
// but not sure it works or not some time we don't have permission to create anything as this solution suggest to do.

Solution 4:
This is the solution I found on my own becasue after checking the security settings of SharePoint List(Permission) for the current user (who try to import the list data), then IE certificate security
settings. I conclude that Excel has some permission issue with Sharepoint List because I was access the List through "Https" Protocol.
I open the excel sheet in the Main menu Data-->From Web---> connect to the SharePoint site it ask the credentials after providing the credentials of user then try to import
the List data to Excel. Logic here is Excel saves this Credentials which helps to import the actual list data.
Follow these steps:

1.If your list is not already open, click its name on the Quick Launch. If the name of your list doesn't appear, click View All Site Content, and then click the name of your list.
2.On the Actions menu Actions menu, click Export to Spreadsheet.
3.If you are prompted to confirm the operation, click OK.
4.Windows SharePoint Services 2.0
5.If your list is not already open, click Documents and Lists, and then click the name of your list.
6.On the page that displays the list, under Actions, click Export to spreadsheet.
7.In the File Download dialog box, click Open.
8.If you are prompted whether to enable data connections on your computer, click Enable if you believe the connection to the data on the SharePoint site is safe to enable.
9.Do one of the following:
10.If no workbook is open, Excel creates a new blank workbook and inserts the data as a table on a new worksheet.
11.If a workbook is open, do the following in the Import Data dialog box that appears:
12.Under Select how you want to view this data in your workbook, click Table, PivotTable Report, or PivotChart and PivotTable Report.
13.Under Where do you want to put the data, click Existing worksheet, New worksheet, or New workbook.
14.If you click Existing worksheet, click the cell where you want to place the upper-left corner of the list.

Click OK.

Monday, July 29, 2013

Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format. Oracle Data Access 64 bit

Hi,
I was try to connect with Oracle.DataAccess dll (64bit) It was working fine with Windows/Console base application but once I try to connect it through Asp.net Application it throws error
Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program

This isssue has solved with 32 bit of Oracle.DataAccess library because I think there is an issue with 64bit Oracle.DataAccess library. I search on other blogs and forums everyone is pointing to the
IIS Pool configuration and Assembly ( target framework ). but in my case nothing worked.But anyhow if we have to downgrade our solution with 32 bit then why not use the stable version of 32 bit itself :)

Please share if anyone has different finding...