Home All Groups Group Topic Archive Search About

command line tools to make flat backups

Author
28 Dec 2005 5:28 AM
melson
Does anyone know if there is a way to run a command at the DOS prompt
to make a complete flat file (.bak) backup of a database?  I know you
can do this using the enterprise manager by right clicking on the
db..., but I am curious to find out if I can add a command into my
batch scripts as part of my code migration procedures?

Thanks!

-Mike

Author
28 Dec 2005 6:17 AM
Ray Mond
You could use osql e.g.

osql -Q "BACKUP DATABASE pubs TO DISK = 'e:\backups\pubs.bak'" -E

--
Ray Mond
Author
28 Dec 2005 6:46 AM
melson@gmail.com
Yes, Ray, Perfecto!!  That's what I was looking for.  Thanks for the
help...

Happy Holidays!!

AddThis Social Bookmark Button