Wednesday, October 24, 2007
Taking (ASR) Backup without floppy disk
1. Run the ASR wizard, which is part of Windows Backup.
2. After you run the ASR Wizard, start Windows Explorer.
3. Navigate to the \%windir%\repair folder (e.g., C:\windows\repair).
4. Copy the asr.sif and asrpnp.sif files to a network location.
5. On a different networked computer that has a 3.5" disk drive, copy these files to a 3.5" disk and label the disk as your ASR disk.
For more information on ASR backup read this article : http://tec-articles.blogspot.com/2007/10/taking-automated-system-recovery-asr.html
Taking Automated System Recovery (ASR) Backup
The ASR process allows to restore the system disk (usually the C: drive) including the Windows files, all Registry settings and all user programs and data, allowing to recover a completely crashed system. To use this procedure you must be able to boot the Windows XP Pro Setup-program from the installation CD-ROM.
During the restore process all data previously found on the System partition (usually C:) will be erased, then XP/2003 will be reinstalled, and the data from the ASR backup will be restored.
Create the ASR backup
In order to use ASR you first need to create the ASR backup. Follow these steps:
-
Run NTBACKUP.EXE from the Run command or from the Program Files > Accessories > System Tools.
-
When the program starts click on the ASR button to invoke it's wizard.
-
The Wizard will start with a Welcome screen, advising that a Backup and the ASR disk will be created. Click Next.
-
Choose a destination and filename for the ASR backup. Make sure you do NOT select A: as the destination (duh...) nor C:, and that you have at least 2GB of free space on that partition.
-
The "Completing the ASR Preparation Wizard" will appear.When you click Finish, the Wizard creates a backup of your system files. You will then be asked to insert a floppy disk. You will later use this disk and the backup to restore your System in an event of a major failure.
-
To close this wizard and to begin the backup, click Finish".
-
The system will create a list of all files and then start the backup processes, creating a disk-backup-file. Once the disk-backup is done, you will be prompted for a floppy disk (blank, formatted) to store some ASR-data. If you do not have a floppy disk read this article for taking ASR backup without floppy disk: http://tec-articles.blogspot.com/2007/10/taking-asr-backup-without-floppy-disk.html
Use ASR to recover your system
In case all other methods to start the XP/2003 system fail, you can use the ASR backup and floppy disk to restore the system to the status as during the creation of the ASR backup.
-
Insert your Windows XP Professional Installation CD-ROM and boot from CD-ROM. If you get the message to "press any key to boot from CD...", press any key.
-
As soon as you see "Press F2 to run Automated System Recovery (ASR) ..." on the bottom line - press F2. You only have about 2 seconds to do so, so be prepared.
-
You will then be prompted to insert the ASR floppy disk. Do so.
You have for a few seconds still the time to abort the ASR process by pressing ESC. -
Warning! The system will now start to format your C: drive. When it's done it will start with a process very similar to the XP installation.
-
After the file copying is done, the system will reboot and continue with the installation process, but it will not continue a complete installation. It starts the Automated System Recovery Wizard. This screen will wait for 90 sec, then it will continue automatically.
-
A screen will appear, asking you to confirm the location of the disk backup-file.
-
At the end of the ASR process, NTBACKUP.EXE is automatically used to restore the information on the C: drive.
-
After the process is over check to see if all data and settings have been restored properly.
Monday, October 22, 2007
Database Maintenance Plans in SQL Server 2005
Database maintenance is vital to the health of an organization's data delivery infrastructure. In SQL Server 2005 Microsoft redesigned the method through which Database Maintenance Plans are created and managed. These plans can be created through a wizard in SQL Server Management Studio (SSMS). They are handled mainly through the Business Intelligence Studio (BIDS), and custom plans can be created in BIDS using SSIS. Although the process is comprehensive, the management of physical backup files is not automatically handled in the Database Maintenance Plan Wizard, but history cleanup is completed. In this tip we will outline a number of methods that are available to manage these files.
Solution
Let's first talk about the process involved in creating a Database Maintenance Plan. You create maintenance plans in BIDS, just as you would create any other SSIS package. Here are the maintenance tasks available in SSIS:
Of particular interest are the two tasks highlighted above-the History Cleanup Task and Maintenance Cleanup Task. The History Cleanup Task deletes maintenance information generated prior to a specified date in the msdb database. One new and much appreciated feature in the tasks themselves is that you can view the T-SQL statement to be issued when the task is executed. Here is the History Cleanup Task and associated T-SQL statement:
The Maintenance Cleanup Task is a way of deleting physical backup files, although this task can be used to clean up other files as well. Here is what the Maintenance Cleanup Task looks like, along with its T-SQL statement:
You can customize each of these tasks by using an Expression or use the T-SQL statement as a scheduled job per se'. One thing to note about the Maintenance Cleanup Task is that it is not added to a maintenance plan when using the Database Maintenance Plan Wizard in SSMS. To add this task to an existing maintenance plan, right-click the plan in SSMS and choose Modify:
A screen opens in SSMS giving a view similar to the SSIS Designer and listing the steps involved in the plan:
You can add additional steps to the plan by dragging and dropping a task over to the screen. In this case we'll add a Maintenance Cleanup Task to it:
Once you add the task to the plan you have to add more information: the server connection, the folder where the backup files are housed, the file extension you want it to delete, and time span. In addition you must add a Precedence Constraint to the task so that the order of task execution is maintained:
There are other alternatives to deleting the physical backup files, but perhaps the safest is to run a vbscript on a daily basis. Here is a sample script that deletes files whose date last modified is over 30 days: