Results 1 to 7 of 7
-
03-22-2012, 03:15 PM #1Newcomer
- Join Date
- Aug 2009
- Posts
- 8
- Thanks
- 3
- Thanked 0 Times in 0 Posts
Automate daily (newly created database) full backups; script help
Hello all, thanks for reading this post.
I have a server which has Microsoft SQl Server and TSM TDPSql installed on it. i have around 50 SQL server databases on it with active usage. I run a full backup every month and differential backups every day.
But when a new SQL database is created, its backup fails because 'its full backup does not exist'. So I would like to make a little change to my sqldiff schedule script. Right now all it says is
%sql_dir%\tdpsqlc backup master full /tsmoptfile=%sql_dir%\dsm.opt /logfile=%sql_dir%\sqldiff.log >> %sql_dir%\sqldiffsched.log
%sql_dir%\tdpsqlc backup * diff
I would like to add a little script here that would take a full backups of the databases created that particular day along with full backup of master. And then, run the differential.
Something like select * from sys.databases where create date is 'today'. Can anyone help?
Thanks,
Ben
-
03-22-2012, 05:29 PM #2Moderator
- Join Date
- Aug 2005
- Location
- Somewhere in the US
- Posts
- 5,296
- Thanks
- 2
- Thanked 137 Times in 135 Posts
My two cents
Just run the full backup manually unless you create new databases every hour! If you create new databases once a day, don't bother automating it.
On the other hand, I question why you have just one FULL backup a month - scary!Ed
-
03-25-2012, 03:12 PM #3Newcomer
- Join Date
- Aug 2009
- Posts
- 8
- Thanks
- 3
- Thanked 0 Times in 0 Posts
Thanks for your reply.
My application creates databases every hour.
Thanks,
Ben
-
03-26-2012, 12:13 PM #4Moderator
- Join Date
- Aug 2005
- Location
- Somewhere in the US
- Posts
- 5,296
- Thanks
- 2
- Thanked 137 Times in 135 Posts
When you say create every hour - do you mean a new instance on an existing database?
Ed
-
03-26-2012, 02:00 PM #5Newcomer
- Join Date
- Aug 2009
- Posts
- 8
- Thanks
- 3
- Thanked 0 Times in 0 Posts
Sorry , I should have been more clear. I have this application that is used by (public) users. Whenever a new user registers on our webpage, Application creates a new mssql database for him/her. We have a recent upsurge in our application usage and more and more users are registering. Hence more database creations, around 20-30 a day.
So, as I was saying before, I run all the database backups on to tape through TSM. I have no problem with the ones that have full backup, as the differentials run fine. But the ones that are newly created are failing on full backups. Right now, I am running full backups for the newly created ones manually every day. I was wondering if there is a way to automate it.
Thanks,
Ben
-
03-26-2012, 02:19 PM #6Moderator
- Join Date
- Aug 2005
- Location
- Somewhere in the US
- Posts
- 5,296
- Thanks
- 2
- Thanked 137 Times in 135 Posts
Look at this post: http://adsm.org/forum/showthread.php...hlight=tdp+sql
You can use the script I posted - modifying it of course - to run at the end-of-day a full backup of the newly created DB PRIOR to DIFF backup.Ed
-
The Following User Says Thank You to moon-buddy For This Useful Post:
microosoft (03-29-2012)
-
03-29-2012, 01:08 PM #7Newcomer
- Join Date
- Aug 2009
- Posts
- 8
- Thanks
- 3
- Thanked 0 Times in 0 Posts
Thanks, Ed.
BTW, I was looking for something similar on the forum. I found this link very useful.
http://adsm.org/forum/showthread.php...080#post107080
Solved my purpose.
Thanks.
Similar Threads
-
Is there a way to automate daily checkin tapes from offsite to a 3584 library?
By misic in forum Tape / Media LibraryReplies: 2Last Post: 11-15-2011, 04:58 PM -
Slow full backup restoration from newly added 3584 tape library on AIX server
By skyj in forum Restore / Recovery DiscussionReplies: 0Last Post: 10-01-2008, 04:58 PM -
[NetWorker] No full backups of this save set were found in the media database
By krixapolinario in forum EMC NetWorkerReplies: 1Last Post: 03-04-2008, 10:23 AM -
Deleting a newly created export?
By odyssey in forum Tape / Media LibraryReplies: 1Last Post: 07-20-2006, 04:30 AM -
Script For Daily Node Backups
By sujith in forum ScriptingReplies: 1Last Post: 07-09-2006, 02:16 PM


