Pages

Thursday, June 20, 2013

How to connect SQL Embbeded Version via Management Studio

Use the following connection string in SQL Management Studio while trying to connect SQL Database server running Embedded Edition :

\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query


Applicable for SQL Server 2005 and SQL Server 2008

Wednesday, November 21, 2012

Windows Activation Service (WAS) failed to start : Error 3

Windows Process Activation services (WAS) failed to start in IIS 7.5:

Error Discription : I recently had this issue in our production environment when our production website stopped all of a sudden and we were not able to start the site and getting an error that WAS and W3SVC services are in stopped state. 
When we tried to start W3SVC service from the services.msc console we got another error that this service failed to start as this is dependent on WAS (Windows Process Activation Service)..as following.

"The World Wide Web Publishing Service service depends on the Windows Process Activation Service service which failed to start because of the following error: The system cannot find the file specified."

When we try to start  Windows Process Activation Service - WAS... we get another error something like following...

"The Windows Process Activation Service service terminated with the following error3 : The system cannot find the file specified."

Solution :

We tried all the paths like where the services or its files could be located but failed. Then at last from the Google Uncle we got the following solution.. Hope this would work for you too....




Steps :
1. Check the following path if it is present there on the box...
     C:\inetpub\temp\apppools
2. If the apppools folder is not present under the path then this is the culprit of your problem. Just create this folder under C:\inetpub\temp (if temp is also not present then first create temp folder under C:\Inetpub and then create apppools under temp). 
3. Once you create the folder apppools under c:\inetpub\temp.. Go to services.msc and start WAS service. This time you should not get any error.
4. Now start W3SVC service. This service too would start now.

Now you can start your stopped website without any issue...

Happy Googling!!! ENJOY!!!!

Thursday, October 18, 2012

Command to check the open and listening ports on Windows Machine

We can use following commands on a windows machine to find all open ports: 

1. To list all the open ports on machine :
  •     netstat -an |find /i "listening" 
2. To list all the established connections on machine : 
  •    netstat -an |find /i "Established"
3. To list the processes owning the established connection :
  •  netstat -ao |find /i "Established"

ENJOY :-)

Thursday, January 26, 2012

How To Check Crawl Status of Windows Sharepoint Services 3.0 Search

Recently I came across with a Search Issue in my Clients WSS 3.0 Sharepoint enviornment. Search was running but was crawling only very few sites. It was not even crawling any document library. I checked the Search Searvice Account's access to all content Databases and it had full read access to all content. Still there were only very few search results shown against any keyword.

Unfortunately there is No GUI available in WSS 3.0 Search to check Its Crawl Status or Crawl Logs.
I did some googling and found these SQL Queries to check the Crawl Status of Search in WSS 3.0 Environment.


Queries

Notes -
  • WSS_Search corresponds to your default search database.
  • All the following queries should be run in SQL Query Analyzer in Management Studio of your defaul databse server for WSS 3.0
        

1.  SQL Query to check the last crawled URLs (WSS 3.0. )

I found these Queries Really Very Useful.
ENJOY!!!!!!!!!!!
SELECT [DocID],[AccessURL],[DisplayURL],[DisplayHash],[LastTouchStart],[LastTouchEnd]
FROM [WSS_Search].[dbo].[MSSCrawlURL]
where DisplayURL like '%wsstest:90%'
order by LastTouchStart desc

2. SQL Query to check the crawl errors for the SharePoint sites (WSS 3.0.)select msscrawlurllog.lasttouchstart as Time, msscrawlurllog.displayurl as URL,msscrawlurllog.errorid as Error, msscrawlerrorlist.errormsg as Description
from msscrawlurllog
join msscrawlerrorlist on msscrawlurllog.errorid = msscrawlerrorlist.errorid
order by msscrawlurllog.lasttouchstart

3. SQL Query to find how many items have been crawled for the SharePoint site (WSS 3.0.)SELECT [HostID],[HostName],[SuccessCount],[ErrorCount],[WarningCount]
FROM [WSS_Search].[dbo].[MSSCrawlHostList]
where HostName like '%wsstest:90%'

4. SQL Query to find out the crawl 'Start" and 'completed" time ( WSS 3.0.)
SELECT [CrawlID],[RequestTime],[Status],[StartTime],[EndTime]
FROM [WSS_Search].[dbo].[MSSCrawlHistory]
order by starttime desc

Thursday, November 3, 2011

Renaming A Site Collection in Sharepoint (MOSS2007)

Renaming A Site Collection in Sharepoint

Some times we need to rename an existing site collection in our Sharepoint environment under the same Web application. Here is a way I used to rename a site collection under the same Web application on the same virtual server. Here are the Steps:

Backup the Original SiteCollection

Backup the Original Site Collection by command stsadm -o backup -url http://server/sites/originalsite -overwrite -filename %Path%\backup.dat at the command prompt.. Replace server and Originalsite as according to your environment.

Delete the Original SiteCollection

As we are restoring the site to the same virtual server and under the same Web application, we need to delete the original site because the GUIDs of SharePoint sites are stored in the contenet DB and hence are stored in the backup file.  The SharePoint content database requires that all list and siteGUIDs must be unique.  Delete the original site by typing stsadm -o deletesite -url http://server/sites/originalsite.

Restoring the Site Collection with New Name

Now we can restore the backup to it new site name by typing stsadm -o restore -url http://server/sites/newsite -filename %path%\\backup.dat (use -overwrite option too if the new site has already been created on the server) at the command prompt .  Replace server and newsite according to your environment

Nowthe old SharePoint site has been restored on a new site collection with a new name!!!!!!!!!!!!!!!!!!!!!!


Enjoy!!!!!!!!!!!!!!!!!!!

Thursday, October 13, 2011

Restoring Content DB of a Web Application from Pre-Production to Production Environment and Vise-Versa

Some time we have to restore the Content Database of a Web Application from Produciton to the same web application running on Pre_production and Vise - Versa (In order to make both the enviroments Identical).

Restoring the Content Database of a Web Application on other runnig application :

Here we will Restore the Production Content DB to Pre_production Web application ... We can do Vise versa too...

Taking the Backup of Content Database of Production Web Application:

1. Take the Backup of Content Database of web application on Pre Production server and keep it on some
     safe place.
2. Log on to the Production Database server and take the Backup of the Content Database of the Web Application that you want to restore on Pre-Production web applcation. (Content DB of a web application can be found in Central Admin --> Application Management --> Contenet Database section and selecting the rigth web application)


Restoring the Backup on the Pre Productin Database server

1. Transfer this DB backup to the Pre_Production Database server.
2. Create an empty DB in Management Studio and set the location of .MDF and .LDF files of that DB as
     per your environment  ( C:\ or D:\ )
3. Restore from backup on this newly created DB , you should change an option in the “options” tab and
    select "Overwrite DB" on the restore dialog to make it work.

Attaching the Restored DB to the Web Applicaiton

1. As the web application on Pre-Prod is already created and it has already a database attached to it. We    
   do  not need to create a new web application. We will just detach the existing DB from this Web
    application and will attach the new restored DB to it.
2. Go to Central Admin->Application Management->SharePoint Web Application Management->Content 
     Databases-> Remove Content Database from the web app. ( This step will remove the Previous or old
     DB from the application and the application is ready to get the new restored DB attached to it)

3. Now we will associate the new DB to the application :
    We will use STSADM to add restored DB to this web app
     Open the command Prompt and set the path to "C:\Program files\Common files\Microsoft Shared\Web
     Server Extentions\12\bin on new server is where you can find the STSADM.
     run this command from there.
    stsadm -o addcontentdb -url http://yourwebapp:port -databasename yourcontentdb -databaseserver   
    yoursqlserver

4. Run the IISRESET command.


It's DONE.....


ENJOY!!!!!!!!!!!!!!

Thursday, August 25, 2011

Error deleting Web site . You can't delete a site that has subssites

Error Description : When we try to delete ( From site settings wizard) a sharepoint site ( Not a site collection) which has some sub sites created under it, we get following error message :

Error deleting Web site . You can't delete a site that has subssites

Stsadm -o deleteweb command too doesn't delete such sites and throws the same error.

Solution : Try following steps from site settings to delete such sites:

  • Site Actions -> Site Settings
  • Site Administration: Content and Structure
  • In the left column, move to the parent of the main site to be deleted
  • In the right column, choose the site to be deleted (YourSite in our example)
  • Menu: Actions -> Delete
  • Deleting the selected sites will permanently delete all content and user information. All subsites in this site will also be permanently lost. Do you want to continue?: OK
Hope this will help. ;-)