Friday, July 8, 2011

windows 7 search file name only

So you are one of the millions frustrated users out there who hate 7's search compared to XP's.
Try this in windows 7's Windows Explorer -Tools option - Folder Options - Search - (What to search) Click In indexed locations, search file names and ...

MSSQL 2005/2008 auto backup by task scheduler

IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'myDatabaseName')
BEGIN
   BACKUP DATABASE myDatabaseName TO DISK = 'C:\test\myDatabaseName.bak'
   WITH FORMAT, NAME = 'Auto backup by scheduler';
END
-- make sure there is MODIFY access for EVERYONE on the target folder
--repeat this command in Windows Task scheduler everyday / week:
--sqlcmd -S localhost\sqlexpress -E -i"C:\test\autoBackupScript.sql"