Monday, December 31, 2007

"Search for word or phrase in a file" - Windows flaw

Microsofts MSN property is far behind in online search; taking a far 3rd position. To further demonstrate how far behind Microsoft is in Search, they're own OS fails to adequately search documents.

When performing a search for "A word or phrase in a file", the feature has had several flaws. A big issue is that Windows outright ignores files is doesn't recognize. So unless you're looking for a simple Office document, you're out of luck.

There is a work-around, but it takes considerable steps, here are two potential methods:

1.Click Start, and then click Search (or point to Search, and then click For Files or Folders).
2.Click Change preferences, and then click With Indexing Service (for faster local searches).
3.Click Change Indexing Service Settings (Advanced). Note that you do not have to turn on the Index service.
4.On the toolbar, click Show/Hide Console Tree.
5.In the left pane, right-click Indexing Service on Local Machine, and then click Properties.
6.On the Generation tab, click to select the Index files with unknown extensions check box, and then click OK.
7.Close the Indexing Service console.

or B)
Set the FilterFilesWithUnknownExtensions DWORD value to 1 in the following registry key:

ASP file searching STILL fails

Even beyond that, Windows may need explicit instructions to search specific file types. In order to change that behavior, the default handler of a specific file type needs to be set:


to {Default} REGSZ value of:

Note that a reboot will be needed after this step.

Moving a SQL Server Database

Should your SQL server need to be decommission, it will be necessary to move the databases.

Two method: backup or detach.
Backing up requires an intermediate BAK file, so I prefer the detach method.

1) Shrink the datafile. You can truncate the log by:
2) Then use the GUI to shrink the log file, or if you know the log file name use: dbcc shrinkfile (file_name)
3) Detach
 sp_detach_db 'dbname'
4) Copy the database to the new server
5) On the new server attach the database:
 sp_attach_db 'dbname','D:\Sqldata\mydbdata.mdf','L:\Sqllog\mydblog.ldf'
6) Repair/fix SQL logins. If new server already has the same named logins, use the below command:
 EXEC sp_change_users_login 'auto_fix', ''

To compliment step 6, you can determine which logins need repair by running a discrepancy check:

select 'EXEC sp_change_users_login ''auto_fix'', ''' + name + ''''
from sysusers su
where hasdbAccess = 1
and not exists ( SELECT 1 FROM master..syslogins sl WHERE su.sid = sl.sid )

Share Links