Skip to main content

Posts

Showing posts from December, 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: a) 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 clic

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: BACKUP LOG dbname WITH TRUNCATE_ONLY 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 + '''' fr