Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 best backup routine on 2012

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2013-04-05 : 03:11:48
on 2005 I used to use the backup routine from http://weblogs.sqlteam.com/tarad/archive/2007/02/26/60120.aspx

but it doesn't work on 2012

what backup routine would you recommend for 2012 to backup both the db daily and log files?

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2013-04-05 : 10:15:07
Giving Tara's script a quick once over, I'd say modify this line:
IF @version NOT IN ('8', '9')
to
IF @version NOT IN ('8', '9', '10')

then go find all the IF blocks and add '10' to everything that says '9', for example, this line
ELSE IF @edition = 3 AND @version = '9'
becomes
ELSE IF @edition = 3 AND @version in ('9', '10')

That's just with a quick glance, so it may ot be complete, but pretty sure that'll work.


Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2013-04-05 : 10:18:24
Actually, that would be 11, not 10.

And change this:

SET @version = CONVERT(char(1), SERVERPROPERTY('ProductVersion'))

To this

SET @version = CONVERT(varchar(2), SERVERPROPERTY('ProductVersion'))

Might be more but that looks about right
Go to Top of Page
   

- Advertisement -