Thursday, 16 May 2013

Steps for Backup and Restore of SQL database from SQL server 2008 / 2008 R2 to 2012.


Steps of Performing Backup activity in SQL server.

1. Login to the Database server through SSMS.
2. Right Click the Database -> Tasks -> Backup (Refer Figure 1)
3. Choose the path where the backup file need to place. (Refer Figure 2)
4. Choose the Full in Backup Type and Select Copy-Only Backup in Production Environment. (Refer Figure 2)

Note: Move the backup file of SQL database to any file share or the destination server HDD.





Steps of Performing Restore activity in SQL server 2012.

1. Login to the Database server through SSMS of 2012.
2. Right Click the databases (Next to the server name) -> Select Restore Database.
3. Select the Device and provide the backup file as a input to restore database window.
4. Give a unique Database name to identify. In this scenario I gave “WSS_Content_5002_MigratedfromSP2010”
5. Once Database restored successfully, close the SSMS.



 

Wednesday, 15 May 2013

Error 407 Proxy Authentication Required In SharePoint

If you don't want to put passwords into your web.config for the proxy, you can do so programatically and skip the error 407 in SharePoint. Here's how.

You, like me, have probably struggled on numerous occasions to get a SharePoint webpart to connect to a different website / webservice, such as google api or twitter api, and failed because you came across the error: "The remote server returned an error: (407) Proxy Authentication Required".
I tried modifying the web.config but this didn't work, I tried adding the proxy with usedefaultcredentials = true, but this didn't work either.
If you've gone this far and nothing is working for you, this is how it's done.
1.         Uri myUri = new Uri("http://www.example.com");

2.         WebRequest myWebRequest = WebRequest.Create(myUri);

3.         WebProxy proxy = new WebProxy("http://webproxy.mydomain.com:8080", true);

4.         System.Net.NetworkCredential credentials = new NetworkCredential("sharepoint.user", "password", "logon_domain");

5.         proxy.UseDefaultCredentials = false;

6.         proxy.Credentials = credentials;

7.         myWebRequest.Proxy = proxy;

8.         WebResponse myWebResponse = myWebRequest.GetResponse();

9.         output.Write(myWebResponse.Headers.ToString());

Instead of trying to use the credentials of the current user, an account is specified that allows access to the proxy.
I'd tried everything and this was the only thing that worked for me, I hope it helps you too.

Friday, 3 May 2013

How to add a SharePoint Solution (WSP) in Farm (Sharepoint Server)


Using POWER SHELL we can add a solution to the server and using Central administration can deploy the solution to the specific or All web application.

We can deploy the solution through powershell too. Before deploying you need to add a solution in the SharePoint Farm or Server.

This post is describes how to add a solution in SharePoint through Powershell.

The following command is using to do this activity attached with the example.

Syntax: Add-SPSolution -LiteralPath <FolderPath or UNC Path>

UNC Path means file sharepath (\\servername\sharename)





Friday, 26 April 2013

SharePoint 2013. Where is my DLL? Not registered in Assembly folder


.NET 4.0 has a new gac location
Today, I wanted to quickly update a dll from a custom SharePoint solution. I was puzzled when I could not find the dll in the assembly ( “c:\windows\assembly ” ) folder.
Turns out that starting from .NET 4.0 and up there is a new ‘GAC’ folder in town. It is now situated in “c:\windows\microsoft.net\assembly“. You can simply browse to that directory with Windows Explorer and view all the folders.  The new GAC folder does not hide version information (=folders) anymore like the old one did.
They introduced this new folder to avoid issues between CLR 2.0 and CLR 4.0 , the GAC is now split into private GAC’s for each runtime.  The main change is that CLR v2.0 applications now cannot see CLR v4.0 assemblies in the GAC.
So keep in mind there are two folder now. One for .NET versions 2.0, 3.0, 3.5 and one for .NET versions 4.0 and up.
For more information on installing dlls in GAC
http://msdn.microsoft.com/en-us/library/dkkx7f79.aspx

Tuesday, 16 April 2013

Update the password in SharePoint using Powershell Script



Here Domain\atou817 is the account which i tried to update the password. The below screen shot is for your more referance.


 

Wednesday, 27 March 2013

Specific User or Domain Group was not found.

Cause: "The specific user or domain group was not found"

Solution: In MOSS 2007, you will have access to change the service accounts and there is no concept like register managed account. Once you changed the service account which deleted from AD and still available in MOSS 2007.

When looking a solution for SharePoint 2010 as well as SharePoint 2013, First we need to find what the ID which is blocking the service application to do its work.

To find that account execute the following powershell command in SharePoint PowerShell.

 
Now i know the Service Application which making me the problem, then need to execute the following query in MSSQL server at SharePoint Config Database.

SELECT [Name], [Version], CAST([Properties] as xml)  from [SharePoint_Config].[dbo].[Objects] with (nolock)  Where [Name] LIKE '%PPS1%'

The result of the above query will give lot of XML files open the latest one and traverse it from last line. You will get the details which are the account have mapped with the service application using that you will come to know the User account which making the problem.

If you are working in Enterprise environment ask the AD team to recreate the account in domain with deny logon to the machine.

Restart the SharePoint server once, Now you will able to pick the user id from domain and you will have access service application page as well as configure service account page.

Change the account every where using UI itself, and then verify it through powershell. Like the below.

Get-SPServiceApplicationPool | FL Id,Name,*account*

now you output will updated with the account with configured for the service application. And remove the account from SharePoint farm.

1.  Change the service account.
2. Remove the permission if it have any delegate permission to any service application.
3. Remove from Managed Account.
4. Delete the account from AD as well.

Now your won't get the issue.

Note: Without recreating the account in AD there is no other way to solve the issue. If it is development environment and it doesn't have any data or any customization, Take web application content database break the farm and recreate a farm freshly.

Thanks in Advance!!!


Unable to Delete the Search Service Application from SP 2010

Cause: You try to delete search app through Central Admin and PowerShell but it hangs and will not delete the search application. 

If you run a Get-SPServiceApplication the ID is still listed.
 

Solution: Run: stsadm -o deleteconfigurationobject -id “GUID of search app from get-spserviceapplication” 

This will delete the search app and allow you to create a new one.

Rescan Disk Option Greyed Out | New Disks Not visible on Disk management | Update-HostStorageCache

  Recently I have added several LUN from NetApp Storage to Hyper-V servers. But in the disk management I couldn't see those new LUN. Exi...