Author: way0utwest

  • Securing Log Shipping

    There was a post recently where someone was asking about securing log shipping to comply with HIPAA requirements. It struck me at first that really log shipping isn’t a SQL Server operation, it’s a Windows operation. The ongoing process of log shipping is:

    • Perform a SQL Server log backup
    • File sits on the local Windows file system for some xxx time
    • Copy the log file to the remote server
    • The file sits on the remote Windows file system for some yyy time
    • Restore the log backup to the SQL Server instance

    Of these, they break down in terms of security and possible issues in this way.

  • Perform a SQL Server log backup (SQL Server process, secure)
  • File sits on the local Windows file system for some xxx time (Windows security needed)
  • Copy the log file to the remote server (Standard SMB copy, Windows security needed)
  • The file sits on the remote Windows file system for some yyy time (Windows security needed)
  • Restore the log backup to the SQL Server instance (SQL Server process, secure)

    The only real places to provide security are from Windows, where you need to do the following:

    • Assign tight Windows security to a limited access group, preferably only service accounts for SQL Server.
    • Ensure network communications between the two Windows servers is secure with something like IPSec.

    This means to me that this is primarily a Windows issue, and that the DBA needs to work with the Windows admin to implement an IPSec policy or setup a secure tunnel. Here’s one link I found, but not being a strong Windows admin, I’m not sure if it’s the best one. The idea would be that you would want to secure the network traffic to prevent a third party from copying the log backup somehow.

    Is it a big deal? I’m not sure about that. I think this is an item that auditors might be concerned about more than it is a security risk. After all, even if a hacker acquired an old full backup and a log backup, they wouldn’t necessarily be able to restore the log backup since the LSNs would be out of order. And while a log backup might contain sensitive information, an attacker couldn’t guarantee that any particular log backup would have sensitive information. Only if that information were edited would it be included in a log backup.

    The big security downside is that whatever channel or method you use here would likely be the same one used for initialize things and include a full backup somewhere. So it’s a good idea to provide tight security, and not just set up shares that Everyone can access.

  • Netbook – Finding a GB

    I turned on my netbook for the first time in a few weeks recently. My laptop had died, and I wanted to get some work done upstairs. Plus with my files now on only one machine, I wanted to get things sync’d up on the netbook so I’d have two copies. Things sync’d up and I got some work done.

    However the next day when I turned it back on, I had the “disk space low” message on it. With 500GB-1TB drives coming in many machines, I haven’t seen this message in a long time. I checked and sure enough my 16GB SSD had 127MB free. Yikes!

    I immediately started looking for things to delete. I suspected that my Live Mesh folders were the culprit since I hadn’t installed anything on the machine. After cleaning out temporary internet files I then found about 800MB of blog entries, mostly due to image and video files, that were eating up space. I removed those, thinking I could pull that stuff back down in a backup from Google if I needed it.

    With 1.5GB free, things were running better, but not great. 16GB works for the netbook alone, but I think I might need to carry around a little more space over time in a USB drive just in case.

  • SQL Saturdays and other events in 2010

    It seems that the SQL community is really growing. There are now quite a few events that you can attend in 2010 to help further your SQL education.  It’s worth the investment to travel a little if any of these are close to you.

    And if you’re a speaker, or want to give it a try, consider submitting an abstract to one of these events. Many of them would love to give you a chance to help others.

    Here is the current list in date order. I’ve included a couple other events in addition to all the SQL Saturdays.

    Jan 23, 2010
    SQLSaturday #32 – Tampa 2010
    iCal

    Jan 30, 2010
    SQLSaturday #34 – Boston 2010
    iCal

    Jan 30, 2010
    SQLSaturday #30 – Richmond 2010
    iCal

    Feb 27, 2010
    Rocky Mountain Tech Trifecta
    http://rmtechtrifecta.pbworks.com/

    Mar 6, 2010
    SQLSaturday #33 – Charlotte 2010
    iCal

    Mar 13, 2010
    SQLSaturday #37 – Philadelphia 2010
    iCal

    Mar 27, 2010
    SQLSaturday #29 – Birmingham 2010
    iCal

    Apr 17, 2010
    SQLSaturday #31 – Chicago 2010
    iCal

    May 1, 2010
    SQLSaturday #36 – Wheeling 2010
    iCal

    May 22, 2010
    SQLSaturday #27 – Portland 2010
    iCal

    May 22, 2010
    SQLSaturday #35 – Dallas 2010

    May 22, 2010
    Indy TechFest 2010

    That’s 12 events in the first half of the year, in addition to all the paid conferences that are going on! Very impressive and kudos to the community for getting these events set up.

    Be sure you thank your local organizers and speakers if you attend.

  • Someone Needs an Order BY

    I was checking on the status of my laptop the other day. It died and I shipped it back to Toshiba for repair. I ended up getting this in the status window:

     

    laptoprepair

    What’s great about this is the last column. I have these dates:

    12/02/2009 01:30:00

    12/03/2009 21:52:00

    12/03/2009 21:52:00

    12/04/2009 13:39:00

    12/07/2009 20:46:00

    12/04/2009 13:41:00

    12/04/2009 21:04:00

    12/07/2009 18:52:00

    12/04/2009 13:38:00

    Amazing isn’t it? The most recent repair entries are the5th and 8th entries (of 9). If I was checking for a change and glanced at the bottom record, I’d think nothing had changed.

    And in fact, nothing has changed in a week, but that’s another blog.

    I’m sure a developer that doesn’t do a lot of database work built this screen, inserting test records, having them appear on screen and thinking things were working. And in limited tests, with small groups of data, the natural order often appears to be holding itself as valid. The natural order is the order that the records are inserted into SQL Server, and often with no indexing, or with a clustered index on a column, in this case the “done” column, they would return in that order.

    However most database products don’t guarantee the natural order when you query for records. A fundamental aspect of my SQL systems is that there is no guarantee of order without an ORDER BY clause. Indexes are for performance, and can change. I wouldn’t be surprised if the clustered index for this table were put on the serial number and repair number instead of the date. That’s often how you’d query this data and would make sense. So without an ORDER BY date on this query, which clearly doesn’t exist, you get repair records out of order.

    And you annoy customers.