Tag: syndicated

  • Recovering a Database

    So you’re restored a database, restored a few logs, all with NORECOVERY as expected and realize there are no more logs. You see this in Management Studio and wonder what do to:

    restoringdb

    I’ve run a bunch of code, restoring lots of files, but I’m done.

    RESTORE DATABASE db4 FROM DISK = 'db4_base.bak' WITH norecovery
    RESTORE LOG db4 FROM DISK = 'db4_log1.trn' WITH norecovery
    RESTORE LOG db4 FROM DISK = 'db4_log2.trn' WITH norecovery
    RESTORE LOG db4 FROM DISK = 'db4_log3.trn' WITH norecovery
    RESTORE LOG db4 FROM DISK = 'db4_log4.trn' WITH norecovery
    ....
    RESTORE LOG db4 FROM DISK = 'db4_log42.trn' WITH norecovery
    

    You don’t need another log to bring things online. This simple command will fix things:

    RESTORE DATABASE db4 WITH recovery
    

    That will return:

    RESTORE DATABASE successfully processed 0 pages in 2.629 seconds (0.000 MB/sec).

    and your database will be ready to go:

    retoreddb

  • Wild West Day

    One of the things I’m missing today is Wild West Day at Red Gate. It’s not just because I don’t live anywhere near the office (they’re in Cambridge, UK, I’m in Denver, CO), but also because I have a vacation scheduled. Camping up near Fort Collins with family is on the agenda, and today should be a fun day of horseback riding for the girls and some biking for the boys.

    redgatewildwestday

    That’s what I expect for our trip, but this was the reminder picture that came from Red Gate, for the company outing next week. They are having a day out event for employees, which sounds fun. I worked in a few companies that had outside events for employees, and those were also the days that really helped people bond together and enjoy their jobs a little more.

    I miss those, and wish I had the chance to do one once in awhile. I might as my wife’s company has about 10 or 12 telecommuters in the Denver area and is looking to funding a day out somewhere.

  • Bloopers

    An early peak at the bloopers going out on Monday. Feel free to enjoy today. I’ve included the editorial and then the raw bloopers from the last month, which has a few more mistakes in there.

    The official Independence Day 2011 Videos

     

    The raw ones are below, and include the ones above plus a few more that didn’t make the cut.

     

    Raw Bloopers
  • The difference between REVOKE and DENY

    There was confusion recently with a poster that was moving permissions around and asked why I said they should revoke permissions and not deny them. I decided this was worth a post to explain.

    If I GRANT SELECT (or UPDATE/INSERT/DELETE) permissions to a user, then they can use those permissions to view data in a table. If I REVOKE the permissions, it’s the same as if the user never had them. They would need to be GRANTed permissions again to see the data.

    However, if I DENY them the ability to see data, then that’s different. They can’t see the data, but a subsequent GRANT will not allow them to see the data because the DENY will still be in effect.

    It’s a more permanent change, and should be used when you need to be sure that someone cannot see data, not when you are looking to remove permissions. To undo a GRANT, use REVOKE.