Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Script to do a full backup of a DB
Message
 
 
To
09/03/2011 09:41:28
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
Microsoft SQL Server
Category:
Backups
Miscellaneous
Thread ID:
01503020
Message ID:
01503023
Views:
64
This message has been marked as the solution to the initial question of the thread.
>>>I think I remember seeing a script to do a full DB backup posted on here before.... can somebody repost it?
>>>
>>>Thanks!
>>
>>Do you mean script to do backup of all databases or just one DB? If just one, go to SSMS, do a backup manually with all needed options and save the script from that dialog. It's easy to extrapolate it then for all DBs.
>
>Hmmm, I don't see a script anywhere. SQL Server 2005 if that makes a difference.

Right click on the database you want to backup, Tasks, Backup. At the top there is a Script button.

I just did without too much attention and I got this script
BACKUP DATABASE [AdventureWorksDW2008R2] TO  DISK = N'C:\SQL DB Backups\All DBs\AdventureWorksDW2008R2.bak' 
WITH NOFORMAT, NOINIT,  NAME = N'AdventureWorksDW2008R2-Full Database Backup', 
SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform