Author: way0utwest

  • You Can Telecommute

    Working in my own litlte world

    I’ve written a number of pieces about telecommuting over the years, and while some people have had success in getting permission to work from home, many of you tell me that your current manager, and likely every manager you’ve ever had wouldn’t allow it. There are a huge group of people that are convinced telecommuting is not in their future. I think you’re wrong, and let me tell you a story.

    Years ago I went to work for a small (50 people), old company. The CEO had worked their his whole life, his father had worked there most of his life, and they had very conservative values and ideals. They both wore suits to the office every day and I was expected to do the same, even as an IT guy. I went out and bought 4 or 5 suits the first year I worked there, along with slacks, shirts, and (shudder) ties.

    I argued, politely and regularly, with the CEO that the clothes didn’t really influence the quality of work. We rarely had clients in the office. My boss, the VP, agreed, and we found numerous studies and surveys that proved our point. Others felt the same way, but we two were the only one that regularly tried to debate the issue. I’d often return from a run or swim at lunch and “forget” to tighten up my tie. Usually by 2pm, however, my boss would come by to “remind” me.

    After a year, we managed to get “casual” Friday, where we could wear (non-logo) polo shirts and khakis. No faded jeans, no sneakers, and it’s almost what many companies would see as business casual today. Another year or two went by, with regular chastising of my afternoon dress, often followed by a short debate on the subject. Eventually my boss allowed us to pilot “casual” dress on all non-client days, and jeans on Friday. No faded jeans, but more comfortable wear. Work didn’t suffer, and while my boss still wore suits, he accepted that we didn’t need to. I think I even saw him wear a shirt without a tie one day before I left.

    You can do the same thing with telecommuting. Offer a pilot, show articles, blogs, and studies that talk about telecommuting, set up metrics to measure work, and get employees to agree that the privilege can be suspended. I am sure with some regular debates and discussions, perseverance and persistence, you can find a way to implement telecommuting if your job can be done remotely.

    Steve Jones


    The Voice of the DBA Podcasts

  • When Did That Restore Finish?

    I saw this question come across Twitter under the #sqlhelp tag one day and was wondering myself. Someone suggested the default trace, I was thinking msdb.dbo.restorehistory and decided to check.

    First I hit Books Online. It notes that the restore_date column means: Date and time of the restore operation. Can be NULL.

    Very helpful (hopefully you read the sarcasm). This looks like a CS 101 comment, not very helpful and not detailed. Here’s a Connect item for more detail, and here’s one I submitted for clarification.

    OK, time for testing. I first grabbed a copy of AdventureWorks since I assumed it would take at least a minute to restore. I restored a new database as “ADW_3”. It was around a minute and so I checked restorehistory:

    USE msdb
    GO
    SELECT TOP 10 * FROM restorehistory

    And I got this:

    restore2

    This was not terribly helpful. At the time I ran this, it was 9:32, so this appears to be the start date/time of the restore.

    Then I checked the default trace: ‘

    SELECT * FROM ::fn_trace_getinfo(0)
    
    SELECT *
    FROM ::fn_trace_gettable('C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\log_54.trc',0)
         INNER JOIN sys.trace_events e
              ON eventclass = trace_event_id
         INNER JOIN sys.trace_categories AS cat
              ON e.category_id = cat.category_id
    WHERE databasename = 'ADW_3'

    The first query gets the name of the file, which is put into the second query as the file source and that returned a number of results, of which the interesting ones were:

    restore

    That isn’t terribly helpful either. I was hoping there would be a second event in the default trace, but there isn’t, even 10 minutes later when I checked. (I’m ever optimistic)

    Then I thought “wouldn’t recovery run in a restored database? Isn’t that in the error log?”, so I decided to check there and found this:

    restore3

    The “starting up datbaase ‘adw_3’ is likely just after the log file is built and corresponds to a tenth of a second after the restore starts. I suspect the files are created first as part of the restore, but not marked in the error log. Then the database is started, and is marked a “restoring” immediately after.

    There is a checkdb informational message, which is the last time that the command was run not on this database, but on the source database that created the backup file (bad, Steve, bad, 8 months old!).

    Last we see that just about 6sec later there is the completed restore message.

    No duration, but you can calculate that based on the “starting up” message.

  • Third Times a Charm – SQL Saturday #64 – Baton Rouge

    Going back to Baton Rouge again

    We’re a week away from SQL Saturday #64 in Baton Rouge, LA. It takes place on August 6, 2011 at the Patrick Taylor at LSU again, the same location as the last two years. If you’re in the area, sign up and come learn about SQL Server. I’ll be presenting two sessions, one on Red Gate tools at lunch, and one on the Top Ten SQL Server Skills You Need to Know about SQL Server.

    I did a short radio interview with WRKF that should air next Thursday to promote the event. I don’t know how many people will hear it, but there might be some people signing up, which might fill up the day. If you want to come, register soon.

    This is a great event, and it’s one of the bigger SQL Saturday’s I’ve been to every year. There are 9 tracks, including a couple .NET tracks and a Windows Phone set of sessions, so there’s plenty for everyone to do. The crew that puts the event together does a great job, and I’m sure you’ll have a great time.

    Baton Rouge is a great place, and I’m am looking forward to a run or two around University Lake. It’s hot, humid, but a nice place to jog. If you want to join me, I’ll be aiming for an early Sat am run, likely around 7:00am.

    Once again I’m flying to New Orleans and driving up to Baton Rouge. I hope to get some lunch in the Big Easy, enjoying the beautiful French Quarter before going to a very nice college town in Baton Rouge. I’m not staying Saturday night, but heading back to New Orleans for an early flight home Sunday. I’ll be at the after party, so please stop by and say hi to me.

  • Time for a ROWID?

    Do we need a ROWID structure in all SQL Server tables?

    One of the things I’ve been doing lately is looking forward to future versions of SQL Server. Not SQL 11/Denali, which has CTP 3 out now, but more towards the future. SQL 12 and beyond, and wondering how the platform can advance and incorporate new ideas and knowledge from other areas such as NoSQL or NewSQL. I also have been trying to decide which parts of SQL Server could be improved to be more robust of scalable, or address some failings in the platform.

    Our systems seem to be growing larger, and storage seems to cost less all the time. While this doesn’t always result in cost savings, it does mean that we may be ready to increase the page size in SQL Server once again, perhaps growing to 16k or even 64k. If that follows as I/O transfer sizes grow, then is it time to add in a rowid marker of some sort that gives us a unique handle to every row on a page?

    I know this adds some overhead, and in reading about the internals of current pages, that overhead can be significant. However it seems that I find people that regularly have non-unique clustered indexes, or heaps, and could require SQL Server to differentiate the rows internally. With our busses increasing in size and larger sectors on disks, perhaps the overhead isn’t out of the question.

    This would allow for some interesting benefits for replication, with the possibility that any object could be replicated, no matter what the structure. It also might allow us to very efficiently eliminate duplicates and perhaps improve the efficiency of some T-SQL commands.

    What do you think? Is it time for a true ROWID? Time to increase the page size for SQL Server?

    Steve Jones

     


    The Voice of the DBA Podcasts