Category: Blog

  • Dots, Skills, and SQL Clone: A Contest from Redgate

    Redgate just launched SQL Clone, a new product that can provision copies of databases in seconds. By copies, I mean full sized, up to 2TB copies of your database, each separate and isolated, and built in seconds. What’s even more amazing is that each of these copies takes just a few MB of space.

    echodotAs a launch contest, Redgate is giving away 5 Amazon Echo Dots to some lucky individuals. The overall winner will also receive a copy of SQL Clone. To enter, you need to to tell us what “skill” for Alexa you would build. Perhaps you want to know if any backups failed. Maybe you want to know how many deployments you’ve made to your database. Perhaps you just want to have the Dot remind you to pull the lasagna out of the oven. Just let us know in the comments section below to enter and good luck.

    At Redgate, we had some fun with SQL Clone and an echo, building an Alexa skill that provisions a database using your voice. Not terribly practical, but that might be fun if a developer gets annoyed and wants to yell at Alexa to create a a new database clone. You can see how they built the real skill here (or watch the video).

    Provisioning a database with SQL Clone and Alexa

     

    Over the last few years I’ve been talking DevOps for databases with lots of people, and one of the obstacles many people face is using a shared database for development.

    Why? Often because the developers need a certain amount of data and they use a copy of production. They also don’t have (or want to use) the disk space to give everyone a copy of the database. With SQL Clone, you can see that my 97GB database uses only 49MB for each developer.

    2017-02-22 17_11_05-SQL Clone

    Take a walkthrough of SQL Clone and see how it works for you. Download the 14 day free trial and see how SQL Clone might help you smooth your database development process.

    Terms and conditions apply: http://www.red-gate.com/products/dba/sql-clone/entrypage/competition-terms-and-conditions

  • Implicit Time Conversions – #SQLNewBlogger

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

    I was trying to work with times recently and needed to get the current time. I thought, well, Getdate(), or better yet, SysDateTime() will give me a date and time, but what about the time?

    A simple experiment showed it’s easy:

    DECLARE
        @t TIME,
        @t1 TIME;
    SELECT @t = SYSDATETIME(), @t1 = GETDATE();
    SELECT @t, @t1;

    I got this:

    2017-02-24 12_34_19-SQLQuery2.sql - (local)_SQL2016.PartsUnlimited_Grant (PLATO_Steve (59))_ - Micro

    Quick, easy, and what I suspected would work. If you need to work with times, you can easily cast a datetime value to a TIME to strip the date, or just assign the values to a time.

    CREATE TABLE TimeTest
    (t TIME)
    GO
    INSERT TimeTest
    SELECT top 10
     CreationDate
     FROM dbo.Posts
     GO
     SELECT top 10
      *
      FROM dbo.TimeTest
    GO
    DROP TABLE TimeTest

    This code takes a datetime column and just inserts the time into the new table.

    SQLNewBlogger

    Literally about 3 minutes of my day to write this. When you learn something, write it down.

  • How Do You Use SQL Clone?

    On Monday, Redgate released v1.0 of SQL Clone, and I’m excited that the product is finally available. I’m excited because this has been a long time coming, but it’s worth the wait.

    You can certainly download SQL Clone and try it out, but I’d also say you should check out this virtual tour to see how the product works. It makes sense to me, but I’ve been testing it for months.

    I’ve also written a few pieces about how SQL Clone plays with TDE (part 1 and part 2), and there’s plenty more at the SQL Clone site. Check it out today and see how you can easily build dev/test environments, at full size, without using all the disk space.

  • TSQLTuesday.com

    I’ve hosted a page on this blog that has all the T-SQL Tuesday blog invitations and roundups linked. I did this mainly because I was trying to ensure I have hosted a few, I wanted to know what others had chosen. Since I didn’t see a good list, I created one.

    And I’ve maintained it, which seems crazy since it’s been 6+ years.

    Recently on a Twitter conversation someone suggested getting a central site, using a real domain. I thought that was a good idea, since my page isn’t necessarily the most intuitive item to find.

    Somehow I ended up getting a domain transfer from Brent Ozar and getting talked into hosting the site. It’s live, now at:

    TSQLTuesday.com

    I did this with a simple Azure website, using WordPress. That’s another story, and I should blog about it, but for now, the site is live and running there. I’ve added Adam and Brent as administrators, so they can help maintain things.

    I’m also open to suggestions on how to better organize things. I’d like to get a page for each entry, but we’ll have to see how that works.