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
 General SQL Server Forums
 New to SQL Server Administration
 Restore Log vs Restore Transaction

Author  Topic 

steve_r18
Yak Posting Veteran

59 Posts

Posted - 2012-09-21 : 11:31:45
Hey everyone, this might seem like a simple answer but I like to hear it from the experts. I recently had some issues running some restore batches when I switched from server 2005 to server 2008 r2. Where the script had "Restore Log" I had to change that to "Restore Transaction". Anything I search seems fragmented at best. Does anyone have any insight?

Thanks in advance for any help or responses.

Steve

chadmat
The Chadinator

1974 Posts

Posted - 2012-09-21 : 12:43:16
What error did you get? I have never used "Restore Transaction" didn't even know it was valid syntax.

-Chad
Go to Top of Page

steve_r18
Yak Posting Veteran

59 Posts

Posted - 2012-09-21 : 13:28:35
I honestly can't remember Chad, sorry :(. However I think I had that backwards. It went from 'Restore Transaction' to 'Restore Log'.

Steve
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2012-09-21 : 13:32:38
That makes sense. Looks like the "TRANSACTION" is deprecated syntax.

-Chad
Go to Top of Page

steve_r18
Yak Posting Veteran

59 Posts

Posted - 2012-09-21 : 13:37:41
"Msg 156, Level 15, State 1, Server OPSH1_DETROIT, Line 1
Incorrect syntax near the keyword 'TRANSACTION'."

Our current batch runs with 'LOG' and it runs successfully.

Steve
Go to Top of Page

steve_r18
Yak Posting Veteran

59 Posts

Posted - 2012-09-21 : 13:41:10
Any idea why the change?

quote:
Originally posted by chadmat

That makes sense. Looks like the "TRANSACTION" is deprecated syntax.

-Chad



Steve
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2012-09-21 : 13:54:53
Not really, I would guess RESTORE TRANSACTION is not ANSI compliant, but that is just a guess.

-Chad
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-09-21 : 13:56:12
Sounds like cruft from the Sybase codebase.
Go to Top of Page

steve_r18
Yak Posting Veteran

59 Posts

Posted - 2012-09-21 : 13:56:32
Thanks for your responses Chad..appreciate it!

Steve
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2012-09-21 : 14:42:30
You are welcome.

-Chad
Go to Top of Page
   

- Advertisement -