Jesoba.com is launched, Click below image to access it

Jesoba.com is launched, Click below image to access it
Technology and Entertainment Blog

How to start SharePoint web application

How to start and stop SharePoint web application

We do not have SharePoint web application service listed in services.msc, it is only listed in central admin, but command prompt is recommended for SharePoint service maintenance.

How to stop SharePoint web application (webapplication)

Before you run below commands you need to go following directories based on your SharePoint version.


SharePoint 2007/WSS 3 - C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\bin

SharePoint 2010 Server or Foundation - C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\bin

stsadm -o provisionservice -action stop -servicetype SPWebService

stsadm -o provisionservice -action start -servicetype SPWebService

Note: Use the command as it is no change is required.

SQL server queries list

SQL server queries list
SQL server queries list

SQL server queries or commands list. As a DBA, every database administrator should know at least some most common SQL queries and should have them handy whenever required.

I am posting these queries here so that you don't have find them here and their.

10 SQL server queries list I have added below, will add more queries soon, keep visiting.

1. SQL Query to find database location

SELECT DB_NAME(DATABASE_ID) as DATABASE_NAME,name as [FILE_NAME],physical_name as [PATH] from sys.master_files
----------------------------------------------------------------------------------------------------------------

2. SQL query to find correlation id

SELECT * FROM dbo.RequestUsage WHERE CorrelationId ='01a1dc05-7382-43c9-a74a-9f9561b63e09'
----------------------------------------------------------------------------------------------------------------

3. Command to check database size and database location, total size.

sp_helpdb dbname
----------------------------------------------------------------------------------------------------------------

4. Command to set database in multiuser mode

ALTER DATABASE [SharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6] SET Multi_User
----------------------------------------------------------------------------------------------------------------

5. SQL query to know job status, whether job is hang or in progress and how much time more it will get take, how many % it is completed.

SELECT A.NAME,B.TOTAL_ELAPSED_TIME/60000 AS [Running Time],
B.ESTIMATED_COMPLETION_TIME/60000 AS [Remaining],
B.PERCENT_COMPLETE as [%],(SELECT TEXT FROM sys.dm_exec_sql_text(B.SQL_HANDLE))AS COMMAND FROM
MASTER..SYSDATABASES A, sys.dm_exec_requests B
WHERE A.DBID=B.DATABASE_ID AND B.COMMAND LIKE '%BACKUP%'
order by percent_complete desc,B.TOTAL_ELAPSED_TIME/60000 desc
----------------------------------------------------------------------------------------------------------------

6. Query to check for any database issue, consistency, allocation error.

dbcc checkdb
---------------------------------------------------------------------------------------------------------------------------

7. Know when the last time CHECKDB was run.

dbcc checkdb history

dbcc dbinfo ('Your_Database_Name')WITH TABLERESULTS
---------------------------------------------------------------------------------------------------------------------------

8. SQL query to backup and shrink (Truncate) log files.

backup log [Your_Database_Name] to disk='E:\sql_backup\Your_Database_Name_BackupTime.trn'

And click database, log file and shrink it.

If even after clikcing shrink the LDF size does not reduce then re-run above command with adding time value to TRN and then again click shrink, re-do it until LDF size reduces.

E:\sql_backup\Your_Database_Name_BackupTime_NewTime.trn
---------------------------------------------------------------------------------------------------------------------------

9. Query to set database in multiuser mode


ALTER DATABASE [Your_Database_Name] SET Multi_User
---------------------------------------------------------------------------------------------------------------------------

10. Query to attach database through SQL query.

CREATE DATABASE [SharePoint_Config_6d3394d6-f3fb-40fd-9723-8cc57188c99b] ON
           ( FILENAME = N'D:\sharepoint data\Your_Database_Name.mdf'),
           ( FILENAME = N'D:\sharepoint data\Your_Database_Name_log.ldf')
            FOR ATTACH ;
           
Note : Replace database name.

Error 9003 when attaching SharePoint database

Error 9003 when attaching SharePoint database.

We get following error when we try to attach SharePoint content database, it is difficult to know what this error means.

The LSN (9764:53:1) passed to log scan in database 'STS_RECUPEROSVR01_1' is invalid.
Could not open new database 'STS_RECUPEROSVR01_1'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 9003)

Solution :

- Create a new db with same SharePoint database name.
- Now replace mdf, ldf with actual files.
- Now you would see that database would go in suspect mode.
- Run following rebuild command.

 DBCC REBUILD_LOG('STS_RECUPEROSVR01_1', 'C:\Program Files\Microsoft SQL Server\MSSQL$SHAREPOINT\Data\STS_RECUPEROSVR01_1_log.LDF')

Inetmgr not working

Inetmgr not working

Inetmgr command is not working

When I try to access\open Inetmgr from command prompt I get following error.
C:\Windows\system32>inetmgr
'inetmgr' is not recognized as an internal or external command,
operable program or batch file.

When I try to access\open Inetmgr from run prompt I get following error.

It works on some server (Windows Server SBS 2008) but not on all servers,
Solution:
If you want to access Inetmgr from command prompt without any issue then you need to first navigate to C:\Windows\System32\Inetmgr directory and then type inetmgr command to access Internet Information Server (IIS) Server.

Warning 8075 The Usage Data Processing timer job failed

Title: Warning 8075 The Usage Data Processing timer job failed

Product Version: SharePoint 2010

Event Summary:
=============
Log Name:      Application
Source:        Microsoft-SharePoint Products-SharePoint Foundation
Date:          04/07/2012 2:52:26 AM
Event ID:      8075
Task Category: Usage Infrastructure
Level:         Warning
Keywords:      
User:          MYOFFICE\SPFarm
Computer:      SharePoint.MYOffice.bak
Description:
The Usage Data Processing timer job failed. You can rerun this job using the Timer Job Status page in the SharePoint Central Administration site.

Solution:
=========

Verified the steps mentioned in article: http://technet.microsoft.com/en-us/library/ff453926.aspx to fix this issue.

Ref. http://technet.microsoft.com/en-us/library/ff453926.aspx

Error 6872 The incoming e-mail drop folder is not configured

Title: Error 6872 The incoming e-mail drop folder is not configured

Product Version: SharePoint 2010

Event Summary:
=============
Log Name:      Application
Source:        Microsoft-SharePoint Products-SharePoint Foundation
Date:          7/6/2012 6:11:57 AM
Event ID:      6872
Task Category: E-Mail
Level:         Error
Keywords:      
User:          iCAPITAL\mspadmin
Computer:      PG-iAPP01.icapital.local
Description:
The incoming e-mail drop folder is not configured. If automatic settings are being used, confirm that the SMTP service is running.

Solution:
=========

This issue occurs if either SMTP is not installed and configured or SMTP service is not running.
If you want to use SharePoint email alerts, please install and configure SMTP for SharePoint, else this alert can be ignored.

Reference: N/A

Warning 14 The start address sps3 cannot be crawled

Title: Warning 14 The start address sps3 cannot be crawled

Product Version: SharePoint 2010

Event Summary:
=============

Log Name:      Application
Source:        Microsoft-SharePoint Products-SharePoint Server Search
Date:          7/7/2012 3:41:16 PM
Event ID:      14
Task Category: Gatherer
Level:         Warning
Keywords:      
User:          PUES\spfarm
Computer:      SP01.pues.net
Description:
The start address sps3://sp01 cannot be crawled.

Context: Application 'Search_Service_Application', Catalog 'Portal_Content'

Details:
   Access is denied. Verify that either the Default Content Access Account has access to this repository, or add a crawl rule to crawl this repository. If the repository being crawled is a SharePoint repository, verify that the account you are using has "Full Read" permissions on the SharePoint Web Application being crawled.   (0x80041205)

Solution:
=========


- Make sure Search account has full permission on SQL databases of SharePoint site mentioned in warning event.
- Also, check permission in "User Profile Service Application"
- Go to Service Applications and select "User Profile Service Application" now click Administrators, here make sure Search a/c is added here with "Retrieve people data from search crawlers" ticked mark, if not add it.
- Once this is done, run an incremental crawl, the issue will be fixed. no full crawl is required.

Note: If you dont know what is the name of Search a/c, go to 'General Application Settings' in central admin site, click 'Farm Search Administration' click the search service application, the default name is 'Search service application' now see the account name next to Default content access account.

Reference: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/64cdf879-f01e-4595-bc52-15975fefd18d

Google+ Badge

About Author

My photo

I am Senior Server Expert and Professional Blogger.