Can SQL Server (2008) transaction logs handle the database being dropped and re-created?

Posted by Ben on Server Fault See other posts from Server Fault or by Ben
Published on 2011-01-07T08:39:45Z Indexed on 2011/01/07 8:55 UTC
Read the original article Hit count: 191

We're trying to restore a database (created programatically by running a hand-crafted SQL script we have). Our backup routine is to create a full backup of every database on the SQL Server 2008 instance on a Saturday then automatic transaction logs (I assume these are created automatically anyway - we appear to have lots of log files, possibly one per transaction after the full backup was taken?).

On Tuesday this week the database in question was dropped and another one with the exact same name and schema was created. SQL Server has continued to create transaction log files but it hasn't had chance to create a new full backup (that won't happen until next Saturday).

Now as it turns out we need to restore the database to how it was on Thursday. This is after the "drop and re-create". My question is, is this possible? If it isn't, what exactly does SQL Server think that it's writing to those transaction logs created since the drop and re-create? (I understood they were kind of files containing a binary delta, which makes me think maybe we can restore from them?)

I'm no DBA but then neither is our IT department, so I'm doing the best I can to resolve this. Any advice much appreciated!

© Server Fault or respective owner

Related posts about sql-server

Related posts about backup-restoration