Getting Windows to Search within .SQL files

August 20, 2007 at 12:02 pm (SQL, Windows)

With Windows XP the default behaviour for searching within files will ignore .SQL files.

To get around this you can add a registry setting which will force Windows to treat .SQL files as text so it can search within the file.

  1. Open regedit
  2. Go to HKEY_CLASSES_ROOT\.sql
  3. Add a new key PersistentHandler
  4. Set the default value for the key to {5e941d80-bf96-11cd-b579-08002b30bfeb}

That’s it. You can do this for any other file type as well.




  1. Crystal said,

    Dude, that is great! I have been working around that off and on for years… thank you! 🙂

  2. turrtle said,

    This is classic. really helped me. Thanks

  3. david said,


  4. kathir said,

    does this need a restart after doing this?

  5. Chris said,

    Great tip. Works for Windows 7 as well.

  6. Deep said,

    Great ! Now I can conviniently search within .php files. This method is far better than installing a seperate search engine.

  7. Dave said,

    Not working for me on XP Sp3
    Tried adding Content Type and PercievedType as per .txt entries but still no joy.
    Would changing the Default value to txtfile confuse SQL?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: