SharePoint 2010: How to Use GREP

SharePoint 2010: How to Use GREP

Grep searches the named input FILEs (or standard input if no files are named, or the file name - is given) for lines containing a match to the given PATTERN.  By default, grep prints the matching lines.

In addition, two variant programs egrep and fgrep are available. Egrep is the same as grep -E. Fgrep is the same as grep -F.

I was getting this error everyday. That my application server couldn’t reach a database and the login failed for the specific managed account.

The problem actually is that the database event exists anymore. But SharePoint tries every hour to reach this database. So I thinked that the database could be “hard coded” on a file situated  under 14/ ( or 15/ for SharePoint 2013).

Actually if your have only 1 web application, you will have only a few web.config to verifiy ( with central administration, etc… )

But what will you do, if you have 3 or more web applications?

Yes I can hear you, you will use GREP !

Yeah Grep, but is it free? Will your Project Manager or Change Manager accept that you install a program on the server because you are to lazy?

Will they paiy for only one error on the eventviewer? If the answer is YES go a head an download it on http://www.wingrep.com/register.htm

But wait !! Maybe I can help you.. The best friend of SharePoint Administrator is a Powershell scripting guy ! ( Yeah SQLMAN will be very jealous )

You can use this little script who will search every word in every file that you will provide him.  This little script will help you find the word “SRV-DB-SQL_My_Content” in every config file under 14\*

 gci "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\*" -include *.config -recurse | select-string -pattern "SRV-DB-SQL_My_Content" -caseSensitive

Leave a Comment
  • Please add 4 and 5 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Ed Price - MSFT edited Revision 1. Comment: Title, tags

  • Carsten Siemens edited Original. Comment: fixed typo

Page 1 of 1 (2 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Ed Price - MSFT edited Revision 1. Comment: Title, tags

  • Carsten Siemens edited Original. Comment: fixed typo

  • Make sure SQL Server service account's credential is valid. If not, update its credential.

Page 1 of 1 (3 items)