I need to backup a database daily. The commands are as follows,
osql -E
1> backup database mydata to disk = "c:\mydata.bak"
2> go
1> quit
Is there a way to automate this daily?
Thanks
Danny
Danny,
You do not mention which version of SQL Server you are running, but the task
is pretty much the same.
1 - Create a SQL Agent job with your TSQL backup statement. You only ever
get one backup file. However, NOINIT is the default, which means that your
backups will append to the backup file. Specify INIT if you only want the
latest backup for some reason.
2 - Create a maintenance plan (or plans) to do more comprehensive backups of
your server. Every backup will be a unique file name. You can determine
how long to retain backup files, etc. Look up Maintenance Plans in the Book
Online.
RLF
"Danny" <Danny@.discussions.microsoft.com> wrote in message
news:A05AFB52-F80B-48F2-BFA4-CF5D0A75CB71@.microsoft.com...
>I need to backup a database daily. The commands are as follows,
> osql -E
> 1> backup database mydata to disk = "c:\mydata.bak"
> 2> go
> 1> quit
> Is there a way to automate this daily?
> Thanks
> Danny
|||Hi Russell,
I have very little SQL experience to begin with. I am running SQL version
8.0. This runs on Windows 2003 server and SQL is for Blackberry Enterprise
Server. Through DOS prompt I can manually backup database with those
commands. I just would like a script to do it. Can you provide more details?
Thanks
"Danny" wrote:
> I need to backup a database daily. The commands are as follows,
> osql -E
> 1> backup database mydata to disk = "c:\mydata.bak"
> 2> go
> 1> quit
> Is there a way to automate this daily?
> Thanks
> Danny
|||Danny,
I would suggest that you search the SQL Server 2000 Books Online for
"Automating Administrative Tasks". Start reading there and follow the
"Creating Jobs" link. Rather than trying to type up all the instructions
here, look at the examples under each topic.
Come on back with specific questions, if you need to.
RLF
"Danny" <Danny@.discussions.microsoft.com> wrote in message
news:4FE4DEF9-1F1D-49BE-8B13-C552F1F6278A@.microsoft.com...[vbcol=seagreen]
> Hi Russell,
> I have very little SQL experience to begin with. I am running SQL version
> 8.0. This runs on Windows 2003 server and SQL is for Blackberry Enterprise
> Server. Through DOS prompt I can manually backup database with those
> commands. I just would like a script to do it. Can you provide more
> details?
> Thanks
> "Danny" wrote:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment