Detaching and reataching a SQL Server Database

I thought I would share some directions on detaching and reatching a database from the osql (SQL 7, 2000, MSDE) command line or the SQL 2005 the sqlcmd command line.

osql into the server: (i.e. – osql -u sa -p password)

Display all databases on the server:

sp_databases
go

Note:  If you do not know the location of the MDF and LDF files use the following to determine:

use <database_name>
go
sp_helpfile
go
use master
go
sp_detach_db 'existing_db_name'
go
sp_attach_db 'new_db_name', '<path to the database MDF file>', '<path to the database LDF file>'
go


Cleaning up Windows….

As a follow-up to my previous post on modifying the prefetch registry key, I found a nice little FREE tool to cleanup windows temp files and the prefetch directory for those of you who don’t want to mess with the registry settings and do the manual cleanup.? The tool is CCleaner and can be found here.

-RJB

Speeding up WinXP boot time and lightening memory footprint

Step 1.

Clear the prefetch cache located at C:\Windows\Prefetch

Step 2.

[Start] [Run] [Regedit]
Registry Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters
Modify/Create the Value Data Type(s) and Value Name(s) as detailed below.
Data Type: DWORD Value // Value Name: EnablePrefetcher
Setting for Value Data: [0 = Disabled / 1 = Application Launch Prefetch / 2 = Boot Prefetch / 3 = Prefetch All]
Exit Registry and Reboot

My prefetch registry entry was set to 3.? I cleaned the c:\windows\prefetch directory out and set the registry entry to 0 to disable and I am much happier with my system performance.

Another tool that I find very useful is Mike Lin’s Startup Control Panel, which allows simple management of autostart applications.?

Happy optimizing!

-RJB

Adding RSS feeds to personalized search pages…

A number of people have asked me about how to add content from gotitsolutions.org, storagesquid.org, recoverymonkey.org and vi411.org to their personalized MSN, Yahoo, Google, etc… home pages. Each of these providers allow users to add RSS feeds as content to their home page.

I have simplified this process. For those of you who use My Yahoo, MSN, Google or AOL as your personalized home page (this should be most of you) you can just click the the add button under syndicate on my blog page and the RSS feed will be added your home page.

If you use another service I am making the assumption that you are technical and you know how to add an RSS feed to your page. 🙂

After adding the feed URL you should be able to return to your home page and the new content should be listed. Below is an example of my google home page.

google homepage

Good luck.
-RJB