Author: way0utwest

  • A SQL Azure Customer

    Not me, though I’m not necessarily against Azure in principle. I had a friend ask me for a SQL Server hosting provider the other day, saying they had built a web front end, and had a web host, but were thinking to separate out some data to a separate provider. I have no idea why, or what this was.

    “Have you looked at SQL Azure?” I queried?

    He responded to say he was embarrassed to say he didn’t know what Azure was. I told him that I wasn’t completely sure myself, but it offered SQL Server almost as a web service, and it might work for him.

    “$9.99/mo for a 1GB database? I’m in” was what I heard a bit later. I did caution him to be careful of transactions and transfer. Test locally was my advice.

    We’ll see how he likes it. I’ll follow up in a few weeks and see what he thinks.

  • What Not To Say

    Don't yell at the boss

    This article on 8 things your boss doesn’t want to hear made me smile. There are a few phrases listed that I would definitely recommend not using if you want to succeed in your current place of employment.

    Having managed a few DBAs in my career, I thought of a few more that I thought might fit the data professionals out there as “things not to say” to your boss:

    I’m not sure if more memory will help: You could substitute CPU or disk drives for memory in this one, but it’s your job to know. If you don’t, learn how to tell what your bottlenecks are and make appropriate recommendations.

    That additional memory didn’t help: The only thing worse than not being able to make a good recommendation is making one that doesn’t improve performance after your boss has approved the purchase. Now you look bad, and you’ve made your boss look bad.

    Company X has offered me $yyyyy. Will you match it? You can get away with this once at a job, or maybe once a decade. If you want to go to your boss with this one, be ready to quit if you don’t get it, and be ready to shine if you receive the raise. No one wants to be put in a corner, and I would be likely to let you move on if you came to me, unless I felt you deserved it. Even then, the second time you ask, I’m showing you the door.

    I downloaded this software off the Internet and it crashed the server: You can’t trust stuff you download, no matter what the Open Source crowd says. Test, test, test. Preferably on a test machine.

    It works on my machine: I have always wanted to answer this with a “Who gives a <insert four letter expletive here>?” My actual responses haven’t been that far away if it’s an important project and you give me this excuse.

    Feel free to add your own “things not to say” to the comments below.

    Steve Jones

    (originally published at http://www.sqlservercentral.com/articles/Editorial/72279/)


    The Voice of the DBA Podcasts

  • Backing up the log in simple mode

    Someone posted a note saying that their backups were really large and slow. So they were trying to manage their backup scheme and ensure some level of recovery.  I was going back and forth, along with others, talking about the way your recovery would go and the merits of that particular backup scheme. While posting, the person mentioned at one point that his databases were in simple mode.

    Huh?

    AFAIK, or rather, As-Far-As-I-Remember, you can’t do a log backup in simple mode. I think that’s been a part of the product, but before posting, I decided to test.

    Short answer, if you don’t want to read, is that you can’t backup a transaction log if the database is in simple mode.

    First I grabbed a sample database on my local 2008 instance and set it to simple mode. Actually, first I had to set a database to simple mode, and I didn’t want to use the GUI. This isn’t something I do often, so I had to look up the syntax:

    ALTER DATABASE SET OPTIONS – The first example shows setting to full recovery mode.

    ALTER DATABASE db2 SET RECOVERY SIMPLE

    Once this was set, I created a few transactions and ran a backup.

    CREATE TABLE MyTable (id INT)
    
    INSERT MyTable DEFAULT VALUES
    BACKUP LOG db2 TO DISK = 'db2_log_test.trn'

    This gives me the following error:

    Msg 4208, Level 16, State 1, Line 2

    The statement BACKUP LOG is not allowed while the recovery model is SIMPLE. Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.

    Msg 3013, Level 16, State 1, Line 2

    BACKUP LOG is terminating abnormally.

    This is what I expect, as there is no backup chain that can be used to build a backup. What about running a full and then a log right away?

    BACKUP DATABASE db2 TO DISK = 'db2_db_test.bak'
    BACKUP LOG db2 TO DISK = 'db2_log_test.trn'
    

    Once again, the error occurs, and there should be no checkpoint after the full backup starts.

    db_simple_log

    So I think that my posted is mis-informed of his environment, which is a dangerous place for a DBA to be, especially with regard to backup and recovery.

  • Sharing Code

    Sharing of Ideas

    It seems that almost every week I encounter some form of plagiarism it the SQL Server community. Whether its from SQLServerCentral or it’s someone else, it seems that I’m either alerting someone or sending my own takedown notice.  It’s a little sad that I have to even explain the morality of re-publishing someone’s else’s content without giving them credit to anyone over 8 years old, but apparently I do. However this isn’t a piece about plagiarism.

    I have seen people take various additional steps to protect their content, and that’s fine. It’s their right, and I understand that some people derive a level of income from their work. Whether it’s direct or indirect, it doesn’t matter. If someone wants to protect their work and they don’t want you to reuse it, then respect their wishes. If not for legal reasons, for moral ones.

    As we publish information on the web, however, I would think most of us hope our code and ideas are adapted and re-used. Not used in another publishing piece (blog, article, etc.), but used in a piece of production code that makes a system run better. I know when I’ve published code that helps someone track backups or monitor their servers, I was quite honored to hear that someone used my code in their system.

    Sometimes I wonder if  other authors out there feel the same way. Do writers assume their code will be rewritten by someone before it is used. Digital rights and intellectual property are immature fields, and I’m not sure how we ought to best handle the re-use of code. Authors have the right to decide how they want their works to be shared, and should publish their decision. I would hope that others out there would respect that.

    Steve Jones

    (originally published at http://www.sqlservercentral.com/articles/Editorial/72245/)


    The Voice of the DBA Podcasts