02 December, 2012

Solution Package retracting stuck: SharePoint 2007

Problem: We were planning to deploy a new solution for one of our web application. However, as we all know we have to first retract the solution from the web application and for that we use the stsadm command line given below,
stsadm -o retractsolution -name solutionName.wsp –immediate
followed by STSADM -o execadmsvcjobs
We have waited for min 20 min, but after refreshing the CA for many times we have seen the solution was stuck in retract state.
Troubleshooting: We checked the status ofWindows SharePoint Services Solution Retraction for’ timer job and It was successful for all of the servers we have in the environment.
To check the status of the above timer service,
1. Go to Central Administration
2. Navigate to Operations > "Global Configuration" > "Timer job status".
3. Look for Jobs name starting with either "Windows SharePoint Services Solution Retraction for".
Resolution: we have tried running ‘execadmsvsjobs’ STSADM command.
STSADM -o execadmsvcjobs ( On all the servers )  
To all of the servers in the env. And refreshing CA the status of the solution package was ‘not deployed’.
Some other things you can also try to resolve the problems are.
Ø  Restarting the OWSTIMER Service.
Ø  Deleting the Job Timer Definition for some reasons resolves it.
Ø  Restarting the machine and try one more time.
If you have any queries/questions regarding the above mentioned information then please let me know, Thank you.

How To Setup Direct LAN Connection Using Bluetooth

You may come in the situation when you’ve two computers but no WiFi adapters in it. In such condition you can try cheap method to share files between two computers using Bluetooth. In this tutorial I am going to teach you how to achieve such heights.
To allow file and Printer sharing names each computer with a unique name but give both computers the same workgroup name. You can do this from the System Properties window. To open System Properties, go to My computer, right click on any blank area and choose properties. Or simply you can right click on my computer icon and choose properties.

In Computer Name tab click Change to input your computer name and workgroup name. You will be asked to restart your computer after the computer name and workgroup change.

The computer name defined in this step becomes the Bluetooth device name for this computer that will be displayed on another computer this computer is discovered.

Now plug in Bluetooth adapters to both of your computer. Make sure that Bluetooth device is properly installed on both of your PC’s properly by going to device manager.

Verify that the Bluetooth adapter is identified as a Bluetooth Network Connection under Personal Area Network with Microsoft’s Bluetooth stack driver while on the second computer with third-party Bluetooth stack driver; it is identified as a Local Area Connection under LAN or High-Speed Internet.

Make the second Bluetooth-enabled computer discoverable by going to Bluetooth settings and configure its “service properties” to include PAN Networking service.

In the first computer, right click on Bluetooth taskbar icon and select “Join a Personal Area Network” to open Bluetooth Personal Area Network window.

You can also do this by going to Network Connections and right-clicking the icon and select “View Bluetooth Network Devices” or clicking View Bluetooth Network Devices link on the left sidebar.

On the Bluetooth Personal Area Network window, click “Add” to open the “Add Bluetooth Device Wizard” if the second computer hasn’t been connected before.

Now we’re done with setting up the basic things. Now we’ll have to pair the devices.
On the Add Bluetooth Device Wizard, tick “My device is set up and ready to be found”. Click Next.

Wizard will search for Bluetooth devices in range.

Select the second computer and click next.


You will be asked to input a passkey or PIN code before starting a connection to the second computer. You can create your own passkey or let Windows create a random passkey for you. Click Next.

On the second computer, you will be prompted to input a passkey. Type the same passkey as the one created on the first computer and cick OK.

If the everything went well, you’ll be welcomed to next page with Finish button enabled. Click Finish. You will be back to the Bluetooth Personal Area Network window. Now the second computer is listed under Direct Connections. Select it and click Connect to start a Personal Area Network connection.

Now, both computers have been directly connected in a Personal Area Network. First computer with Microsoft stack is the Client while the second one with Thirdparty stack is the host.

Now you can share files same like in LAN but with slower bandwidth

Hope this tutorial was helpful.


Add, Deploy, Remove and Delete Solutions in SharePoint 2010

What is solution package?

A solution package is a distribution package that delivers your custom SharePoint Server 2010 development work to the Web servers or the application servers in your server farm.

-Adding and Deploying Solutions in SharePoint 2010-
·         How to add solution package SharePoint 2010?
·         How to add a .WSP in SharePoint 2010?
Add solution with STSADM: stsadm.exe -o addsolution -filename yoursolutionpackage.wsp
Add solution with PowerShell: Add-SPSolution -LiteralPath <SolutionPath>
-Deploy Solution in SharePoint 2010-
·         Deploy Solution using Central Administration
·         Deploy Solution using stsadm.exe
·         Deploy Solution using PowerShell
Deploy Solution using Central Administration
·         Central Administration
·         System Settings
·         Manage farm solutions
·         Now click your solution from the list (for example, yoursolutionname.wsp).
·         Now click Deploy Solution and select the web application where you want to deploy the solution (example, http://sp-mach here), Click OK when you are done.
·         Click Deploy Solution
·         You are done with deployment.
Deploy Solution using STSADM.EXE
stsadm -o deploysolution -name yoursolutionpackagename.wsp -url http://sp-mach/ -local  -force

Here (-URL) means the web application where to deploy the solution.

Deploy Solution using PowerShell
Install-SPSolution -Identity <SolutionName> -WebApplication <URLname>
§  <SolutionName> is the name of the solution.

§  <URLname> is the URL of the Web application to which you want to deploy the imported solution.

Uninstallation and Retraction of a Solution in SharePoint 2010
Follow the steps for STSADM:

Open command prompt and navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN

Use the stsadm command = stsadm -o retractsolution -name solutionName.wsp -immediate

And then remove the wsp = stsadm -o deletesolution -name solutionName.wsp

Follow the steps for PowerShell:

Go to All Programs --Microsoft SharePoint 2010 Products --SharePoint 2010 Management Shell --Run as administrator

Uninstall-SPSolution -identity solutionName.wsp

Remove-SPSolution -identity solutionName.wsp

If you have any queries/questions regarding the above mentioned information then please let me know, Thank you.

30 November, 2012

Query SharePoint List to get all document versions information: SharePoint 2007

Two days back I have posted an article on SharePoint Storage Problems, which can give you a fair idea of what things to look at when you plan or your SharePoint site has eaten space more than expected.

While looking at the same problem, we already know that SharePoint document versions can be the one of the element of sudden spike in SharePoint Storage but how we could determine how many versions are there on the SharePoint collection and what size they are off?

As you all know SQL is the ocean for the SharePoint Information storage, so SQL can provide us the relevant information about this. I wrote a SQL query to get the information on the versioning of all the document in the particular site.

Select a.version, a.timecreated, a.size, b.dirname,b.leafname, b.listid
from dbo.DocVersions a, alldocs b  where a.siteid=b.siteid
and b.dirname = 'sites/AMAR' and a.size 'greator than and equal to' (<>);0 and b.listid is not null
order by a.size

In the above query, columns refer to:
Versions: refer to number of versions of documents in a list
Timecreated: time when the document was created
Size: is the size of the versions (in KB)
Dirname: site name (e.g. sites/amar)
List id: ID of the list in the SharePoint Site.

Hope this piece of information does help you.

If you have any questions and concerns do let me know.

28 November, 2012

SharePoint List Query Designer (Report Builder)

Report Builder provides both a graphical query designer and a text-based query designer to help you create a query that specifies the data to retrieve from a SharePoint site for a report dataset. Use the graphical query designer to explore the SharePoint list metadata, interactively build a query, and view the results of your query. Use the text-based query designer to view the query that was built by the graphical query designer, modify a query, or type the query commands. You can also import an existing query from a file or report.

In the graphical query designer you can explorer the SharePoint site, interactively build the command that retrieve SharePoint list data for a dataset. You choose the fields to include in the dataset and optionally, specify filters that limit the data in the dataset. You can specify that filters are used as parameters and provide the value of the filter at run-time.

SharePoint lists include a large number of SharePoint specific fields that might not be useful to include in reports. The query designer provides an option to hide these fields to make it easier and quicker to determine the fields to use.

To find more details about it, Click here.