dbTalk Databases Forums  

Having difficulty setting Back Up to back up file wihout datetime stamp SQL 2K

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Having difficulty setting Back Up to back up file wihout datetime stamp SQL 2K in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rico
 
Posts: n/a

Default Having difficulty setting Back Up to back up file wihout datetime stamp SQL 2K - 04-24-2007 , 08:29 AM






Hello,

I'm trying to create a simple back up in the SQL Maintenance Plan that will
make a single back up copy of all database every night at 10 pm. I'd like
the previous nights file to be overwritten, so there will be only a single
back up file for each database (tape back up runs every night, so each days
back up will be saved on tape).

Every night the maintenance plan makes a back up of all the databases to a
new file with a datetime stamp, meaning the previous nights file still
exists. Even when I check "Remove files older than 22 hours" the previous
nights file still exists. Is there any way to create a back up file without
the date time stamp so it overwrites the previous nights file?

Thanks!
Rick




Reply With Quote
  #2  
Old   
Robert Klemme
 
Posts: n/a

Default Re: Having difficulty setting Back Up to back up file wihout datetimestamp SQL 2K - 04-24-2007 , 08:55 AM






On 24.04.2007 15:29, Rico wrote:
Quote:
I'm trying to create a simple back up in the SQL Maintenance Plan that will
make a single back up copy of all database every night at 10 pm. I'd like
the previous nights file to be overwritten, so there will be only a single
back up file for each database (tape back up runs every night, so each days
back up will be saved on tape).

Every night the maintenance plan makes a back up of all the databases to a
new file with a datetime stamp, meaning the previous nights file still
exists. Even when I check "Remove files older than 22 hours" the previous
nights file still exists. Is there any way to create a back up file without
the date time stamp so it overwrites the previous nights file?
Yes, I believe option is "WITH INIT". Please see BOL for details.

Regards

robert


Reply With Quote
  #3  
Old   
Rico
 
Posts: n/a

Default Re: Having difficulty setting Back Up to back up file wihout datetime stamp SQL 2K - 04-24-2007 , 12:32 PM



Hi Robert,

Thanks, but I should have mentioned that I'm using SQL 2000 and I'm not
using T-SQL, just trying to create the Maintenance plan from the Enterprise
Manager.

Rick

"Robert Klemme" <shortcutter (AT) googlemail (DOT) com> wrote

Quote:
On 24.04.2007 15:29, Rico wrote:
I'm trying to create a simple back up in the SQL Maintenance Plan that
will
make a single back up copy of all database every night at 10 pm. I'd
like
the previous nights file to be overwritten, so there will be only a
single
back up file for each database (tape back up runs every night, so each
days
back up will be saved on tape).

Every night the maintenance plan makes a back up of all the databases to
a
new file with a datetime stamp, meaning the previous nights file still
exists. Even when I check "Remove files older than 22 hours" the
previous
nights file still exists. Is there any way to create a back up file
without
the date time stamp so it overwrites the previous nights file?

Yes, I believe option is "WITH INIT". Please see BOL for details.

Regards

robert



Reply With Quote
  #4  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Having difficulty setting Back Up to back up file wihout datetime stamp SQL 2K - 04-24-2007 , 05:33 PM



Rico (me (AT) you (DOT) com) writes:
Quote:
Thanks, but I should have mentioned that I'm using SQL 2000 and I'm not
using T-SQL, just trying to create the Maintenance plan from the
Enterprise Manager.
From what you described, you should not use a maintenance plan. Just set up
a scheduled job to run the BACKUP statement. You can do this from the
GUI where you backup databases, and select Schedule somewhere on a button.
In the end you get a one-step job that has a BACKUP job.

Then again, if you have any interest in acquiring basic DBA skills, you
should certainly learn to write basic BACKUP commands in T-SQL.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #5  
Old   
Rico
 
Posts: n/a

Default Re: Having difficulty setting Back Up to back up file wihout datetime stamp SQL 2K - 04-24-2007 , 05:44 PM



Thanks Erland,

I don't have a problem creating the T-SQL commands, it's using the
Enterprise Manager to do more than create dbs is where I get lost.

I will give that a try (creating a back up job and scheduling)

THanks!
Rick


"Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote

Quote:
Rico (me (AT) you (DOT) com) writes:
Thanks, but I should have mentioned that I'm using SQL 2000 and I'm not
using T-SQL, just trying to create the Maintenance plan from the
Enterprise Manager.

From what you described, you should not use a maintenance plan. Just set
up
a scheduled job to run the BACKUP statement. You can do this from the
GUI where you backup databases, and select Schedule somewhere on a button.
In the end you get a one-step job that has a BACKUP job.

Then again, if you have any interest in acquiring basic DBA skills, you
should certainly learn to write basic BACKUP commands in T-SQL.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #6  
Old   
Greg D. Moore \(Strider\)
 
Posts: n/a

Default Re: Having difficulty setting Back Up to back up file wihout datetime stamp SQL 2K - 04-24-2007 , 10:24 PM





"Rico" <me (AT) you (DOT) com> wrote

Quote:
Thanks Erland,

I don't have a problem creating the T-SQL commands, it's using the
Enterprise Manager to do more than create dbs is where I get lost.
That's the problem with using EM.

BTW... the reason you're seeing the behavior you're seeing is that the
maintenance job takes the conservative approach and assumes that the most
recent backup HAS to succeed before it'll delete the older one.

So setting it to 22 hours or anything won't force it to delete the older
file until the new one is successfully created.


Quote:
I will give that a try (creating a back up job and scheduling)

THanks!
Rick


"Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote in message
news:Xns991D5A7E496DYazorman (AT) 127 (DOT) 0.0.1...
Rico (me (AT) you (DOT) com) writes:
Thanks, but I should have mentioned that I'm using SQL 2000 and I'm not
using T-SQL, just trying to create the Maintenance plan from the
Enterprise Manager.

From what you described, you should not use a maintenance plan. Just set
up
a scheduled job to run the BACKUP statement. You can do this from the
GUI where you backup databases, and select Schedule somewhere on a
button.
In the end you get a one-step job that has a BACKUP job.

Then again, if you have any interest in acquiring basic DBA skills, you
should certainly learn to write basic BACKUP commands in T-SQL.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.