Is there any way to backup(like method or command to run) data that were
entered into the database' Like saving all the data into another file(.eg
.txt), so that i'm able to clear certain tables in the database in a weekly
or monthly basis. As my system handles lots of data a day, so i need to
backup and clear the database to ensure that the system had enough space and
able to run fast enough. I know that there are few types of backup available
in the books i read up like 'Database backup', 'Differential database
backup', 'File and/or File group backup' and 'Transaction log backup', but i
cannot find any methods on how to use them. And i also didn't find the full
explaination for these backup. Which of these are better? Or are there any
better backup available?
Thanx..Hi,
There are 2 options:-
1. Use BACKUP DATABASE command to backup your entire database This includes
all tables, procedures, views, indexes ,etc....(all objects
2. Use DTS or BCP OUT commands to export the contents of a table into a TXT
file. Later if need you can use DTS or BCP IN to import
the data back
BACKUP DATABASE
--
Backups the entire database into a .BAK file. After that you can delete the
huge transaction table with old data. If you require the data later you
could
use RESTORE DATABASe command to restore the database.
Execute the below command from Query analyzer to backup:-
BACKUP DATABASE <dbname> to DISK='D:\backup\dbname.BAK' with INIT -- With
INIT will overwrite the old backup file every time
COmmand to RESTORE
RESTORE DATABASE <dbname> from DISK='d:\backup\dbname.bak' -- More more
options see SQL Server books online
Thanks
Hari
SQL Server MVP
"yingying" <yingying@.discussions.microsoft.com> wrote in message
news:18D9692D-9F32-4187-AF78-63AD5D963EBD@.microsoft.com...
> Is there any way to backup(like method or command to run) data that were
> entered into the database' Like saving all the data into another file(.eg
> .txt), so that i'm able to clear certain tables in the database in a
> weekly
> or monthly basis. As my system handles lots of data a day, so i need to
> backup and clear the database to ensure that the system had enough space
> and
> able to run fast enough. I know that there are few types of backup
> available
> in the books i read up like 'Database backup', 'Differential database
> backup', 'File and/or File group backup' and 'Transaction log backup', but
> i
> cannot find any methods on how to use them. And i also didn't find the
> full
> explaination for these backup. Which of these are better? Or are there any
> better backup available?
> Thanx..
No comments:
Post a Comment