I have a job that runs daily that creates a backup and copies that backup
off to a second server. I currently have another job running on the second
server that restores that database locally on that server. I gave the job
on server 2 enough time where job 1 on server one will have enough time to
finish before job 2 starts. That being said, sometimes, job 1 runs kind of
close. I am not sure if this is possible, but I would like to create a step
in job 1 that would kick off job 2 on server 2. Any ideas if this can be
done?
AaronHi,
There is a command in Windows Resource Kit "RCMD" , which is used to execute
jobs / executables / batch files remotely.
Thanks
Hari
MCDBA
"Aaron" <amhigley@.hotmail.com> wrote in message
news:#05tLnRwDHA.1908@.TK2MSFTNGP10.phx.gbl...
> I have a job that runs daily that creates a backup and copies that backup
> off to a second server. I currently have another job running on the
second
> server that restores that database locally on that server. I gave the job
> on server 2 enough time where job 1 on server one will have enough time to
> finish before job 2 starts. That being said, sometimes, job 1 runs kind
of
> close. I am not sure if this is possible, but I would like to create a
step
> in job 1 that would kick off job 2 on server 2. Any ideas if this can be
> done?
> Aaron
>|||If you create a linked server, you could
EXEC linkedServerName.msdb..sp_start_job 'job_name'
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Aaron" <amhigley@.hotmail.com> wrote in message
news:#05tLnRwDHA.1908@.TK2MSFTNGP10.phx.gbl...
> I have a job that runs daily that creates a backup and copies that backup
> off to a second server. I currently have another job running on the
second
> server that restores that database locally on that server. I gave the job
> on server 2 enough time where job 1 on server one will have enough time to
> finish before job 2 starts. That being said, sometimes, job 1 runs kind
of
> close. I am not sure if this is possible, but I would like to create a
step
> in job 1 that would kick off job 2 on server 2. Any ideas if this can be
> done?
> Aaron
>
Showing posts with label backup. Show all posts
Showing posts with label backup. Show all posts
Wednesday, March 21, 2012
Friday, February 24, 2012
Keep only X # of backups when appending to BU file
Using SQL Server 2005 STD, is there a way to create a maintance plan to
backup the database, appending to a file, but only keeping the last X number
of backups?
I would like to keep 4 full backups at a time. When the 5th backup occurs, I
would like the first to be deleted.
I've seen options like this in 3rd party backup tools, but is there a way to
do this natively w/ SQL Server?Have a look at the expire parameter of the backup command. From
http://msdn2.microsoft.com/en-us/library/ms187510.aspx
a.. To have the backup set expire after a specific number of days, click
After (the default option), and enter the number of days after set creation
that the set will expire. This value can be from 0 to 99999 days; a value of
0 days means that the backup set will never expire.
The default value is set in the Default backup media retention (in days)
option of the Server Properties dialog box (Database Settings Page). To
access this, right-click the server name in Object Explorer and select
properties; then select the Database Settings page.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:DEA2E6D1-DB67-42F7-8406-E37EB553AEA9@.microsoft.com...
> Using SQL Server 2005 STD, is there a way to create a maintance plan to
> backup the database, appending to a file, but only keeping the last X
> number
> of backups?
> I would like to keep 4 full backups at a time. When the 5th backup occurs,
> I
> would like the first to be deleted.
> I've seen options like this in 3rd party backup tools, but is there a way
> to
> do this natively w/ SQL Server?|||If every backup goes to the same file, then the answer is no. There
is no way for SQL Server to drop old backups from the front of the
file. The solution is for each backup to go to an individual file.
Roy Harvey
Beacon Falls, CT
On Tue, 19 Sep 2006 18:34:01 -0700, Dan
<Dan@.discussions.microsoft.com> wrote:
>Using SQL Server 2005 STD, is there a way to create a maintance plan to
>backup the database, appending to a file, but only keeping the last X number
>of backups?
>I would like to keep 4 full backups at a time. When the 5th backup occurs, I
>would like the first to be deleted.
>I've seen options like this in 3rd party backup tools, but is there a way to
>do this natively w/ SQL Server?
backup the database, appending to a file, but only keeping the last X number
of backups?
I would like to keep 4 full backups at a time. When the 5th backup occurs, I
would like the first to be deleted.
I've seen options like this in 3rd party backup tools, but is there a way to
do this natively w/ SQL Server?Have a look at the expire parameter of the backup command. From
http://msdn2.microsoft.com/en-us/library/ms187510.aspx
a.. To have the backup set expire after a specific number of days, click
After (the default option), and enter the number of days after set creation
that the set will expire. This value can be from 0 to 99999 days; a value of
0 days means that the backup set will never expire.
The default value is set in the Default backup media retention (in days)
option of the Server Properties dialog box (Database Settings Page). To
access this, right-click the server name in Object Explorer and select
properties; then select the Database Settings page.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:DEA2E6D1-DB67-42F7-8406-E37EB553AEA9@.microsoft.com...
> Using SQL Server 2005 STD, is there a way to create a maintance plan to
> backup the database, appending to a file, but only keeping the last X
> number
> of backups?
> I would like to keep 4 full backups at a time. When the 5th backup occurs,
> I
> would like the first to be deleted.
> I've seen options like this in 3rd party backup tools, but is there a way
> to
> do this natively w/ SQL Server?|||If every backup goes to the same file, then the answer is no. There
is no way for SQL Server to drop old backups from the front of the
file. The solution is for each backup to go to an individual file.
Roy Harvey
Beacon Falls, CT
On Tue, 19 Sep 2006 18:34:01 -0700, Dan
<Dan@.discussions.microsoft.com> wrote:
>Using SQL Server 2005 STD, is there a way to create a maintance plan to
>backup the database, appending to a file, but only keeping the last X number
>of backups?
>I would like to keep 4 full backups at a time. When the 5th backup occurs, I
>would like the first to be deleted.
>I've seen options like this in 3rd party backup tools, but is there a way to
>do this natively w/ SQL Server?
Monday, February 20, 2012
Keep backup files ?
We are running SQL Server 2000.
We would like to know:
Is it possible to make ad hoc backup of the production
database in the same directory where daily database backup
is generated by the Database Maintenance Plan ? We have
selected "Daily backup is 'Remove files older than 1 week'
option is chosen for the production database" in the
Database Maintenance Plan.
This is because if the "Database Maintenance Plan" only
remove backups generated by itself, it is perfect for us
to put ad hoc backup there as we don't want to create
another directory for holding ad hoc backup.
ThanksYes you can place manually run backup files in the same directory as the
maintenance plan stores them. In fact, some use this method to run restore
jobs to a secondary database as you don't have to write a script to
determine the latest backup generated from the maintenance plan.
HTH
--
Ray Higdon MCSE, MCDBA, CCNA
--
"Roger Lee" <anonymous@.discussions.microsoft.com> wrote in message
news:02b701c3a195$11bdb430$a501280a@.phx.gbl...
> We are running SQL Server 2000.
> We would like to know:
> Is it possible to make ad hoc backup of the production
> database in the same directory where daily database backup
> is generated by the Database Maintenance Plan ? We have
> selected "Daily backup is 'Remove files older than 1 week'
> option is chosen for the production database" in the
> Database Maintenance Plan.
> This is because if the "Database Maintenance Plan" only
> remove backups generated by itself, it is perfect for us
> to put ad hoc backup there as we don't want to create
> another directory for holding ad hoc backup.
> Thanks
We would like to know:
Is it possible to make ad hoc backup of the production
database in the same directory where daily database backup
is generated by the Database Maintenance Plan ? We have
selected "Daily backup is 'Remove files older than 1 week'
option is chosen for the production database" in the
Database Maintenance Plan.
This is because if the "Database Maintenance Plan" only
remove backups generated by itself, it is perfect for us
to put ad hoc backup there as we don't want to create
another directory for holding ad hoc backup.
ThanksYes you can place manually run backup files in the same directory as the
maintenance plan stores them. In fact, some use this method to run restore
jobs to a secondary database as you don't have to write a script to
determine the latest backup generated from the maintenance plan.
HTH
--
Ray Higdon MCSE, MCDBA, CCNA
--
"Roger Lee" <anonymous@.discussions.microsoft.com> wrote in message
news:02b701c3a195$11bdb430$a501280a@.phx.gbl...
> We are running SQL Server 2000.
> We would like to know:
> Is it possible to make ad hoc backup of the production
> database in the same directory where daily database backup
> is generated by the Database Maintenance Plan ? We have
> selected "Daily backup is 'Remove files older than 1 week'
> option is chosen for the production database" in the
> Database Maintenance Plan.
> This is because if the "Database Maintenance Plan" only
> remove backups generated by itself, it is perfect for us
> to put ad hoc backup there as we don't want to create
> another directory for holding ad hoc backup.
> Thanks
Subscribe to:
Posts (Atom)