Category: Blog

  • Restore a BACPAC–#SQLNewBlogger

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

    I needed to get the WideWorldImporters sample database for a project and noticed that there was a BACPAC available. I downloaded it and needed to restore this as a database. At least, that’s what many people would think.

    However, if you go to the restore dialog, and select Device and then pick your location, there’s no filter for a .bacpac. In fact, if you choose one, it won’t restore. You’ll get the “no backupset selected” error.

    2017-05-30 08_51_40-Locate Backup File - PLATO_SQL2016

    How do you restore a .bacpac? Well, you import it. If you right click the databases folder in SSMS, you’ll see this:

    2017-05-30 08_54_40-SQLQuery16.sql - (local)_SQL2016.model (PLATO_Steve (60))_ - Microsoft SQL Serve

    The BACPAC is a DACPAC with data, in other words, a data-tier application with the data included. Once we click this, we get a wizard. Of course, there’s a introduction screen.

    2017-05-30 08_57_17-Import Data-tier Application

    Then we get to choose the file, or import one from Windows Azure storage. I’ll limit the image here to the relevant parts. You can see below I’ve selected the file I downloaded.

    2017-05-30 08_57_33-Import Data-tier Application

    Once I do that, the next screen allows me to set the database name and the paths. I shot this screen, and then changed the name, but forgot to reshoot. However, this is where you’d set the paths for files and change the name of the database.

    2017-05-30 08_58_30-Import Data-tier Application

    You get to verify your settings. I know many people blow by this screen, but make sure you double check this is what you want. Notice I moved the data, but not the log. I went back and fixed things, again, forgetting to reshoot the image.

    2017-05-30 08_59_25-Import Data-tier Application

    Once you click Finish, the import begins. This can take time, depending on the system you use.

    2017-05-30 08_59_31-Import Data-tier Application

    However, you get detailed progress. As you can see, I get a lot of details on what happened. There’s plenty more below this.

    2017-05-30 09_06_28-Import Data-tier Application

    But it worked, and I have my data.

    2017-05-30 09_07_28-SQLQuery1.sql - (local)_SQL2016.WideWorldImporters (PLATO_Steve (59))_ - Microso

    You should practice this. It’s simple, but know how to import a BACPAC. You never know when you might get one and someone is at your desk. Having to google to import a simple database is a little embarrassing.

    SQLNewBlogger

    This is a simple post, one that took longer to write than setup and perform, but a good skill to showcase. If you’re looking for something to blog, create a bacpac on another instance and import it into your local SQL Server.

  • Quitting VIM

    I saw this post from Joel Spolsky lately, noting that Stack Overflow has been helping 1 million developers exit VIM. It’s a funny post, but one that has some truth in it. I’ve gotten into VIM, almost always from git, but sometimes in Linux, and I often Google the exit.

    Fortunately I’ve learned a few things and  usually remember :wq.

    Other do too, since I actually didn’t need to Google that during a presentation where I committed without the –m, and got into VIM. I actually remembered :wq, posted just “:wq” on Twitter, and a few people laughed, since it’s maybe the one VIM command quite a few people need to remember.

    Hopefully just typing this post will tatoo that sequence into my head so I never end up reading the command list on Stack Overflow again.

    If you want to learn more about VIM, here’s a cheat sheet.

  • The 2017 Laptop Search

    It seems that I’m often searching for laptops. I used to get more time out of them, but as technology changes, and my job changes, I find myself refreshing hardware more often. This usually comes about because of some issue. I’ve had numerous issues, though usually around 2 years of use:

    • a machine that would not boot up, going into BIOS and requiring 2-10 hard resets to get going.
    • a machine that stopped charging, with a $600 motherboard repair bill
    • a machine that dropped and the hinges became flaky
    • the current machine that crashed and bluescreened a couple days before  a presentation.

    Fortunately my company is good about supporting this when it makes sense. In this case, I’m looking at a second travel machine. Between my losing some confidence in the reliability of my current machine, and needing to be sure I can demo software, and even a potential travel ban on planes, I think I need another laptop.

    Since this will be a second machine I carry, I want it small. I don’t need more weight or size, and I’m also hoping to stay around the cost of a loaded Surface Book. A colleague, who shall rename nameless in his house in the NE US, boasting a new jeep and puppy, spent quite a bit on that machine. I got a cheap Z Canvas early last year, and I’m hoping my two come out less than his one.

    The Choices

    I’ve been considering and looking around. I really narrowed the choice down to these (in no order):

    • Lenovo Yoga 910
    • Dell XPS 13
    • Surface Pro 4
    • HP Spectre 360

    There may be other choices, but I like all of these and they’ve gotten good reviews. I want something mainstream, with a good chance of borrowing a power adapter if I need one. The Surface line is tempting for that reason since I see so many people with them.

    Comparisons

    This is my view, which might vary across regions

    Dell XPS 13 HP Spectre x360 Surface Pro Lenovo Yoga 910
    US$1999 US $1500 US$2199 US$1300
    16GB 16GB 16GB 16GB
    512SSD 512SSD 512SSD 512 PCIe SSD
    UHD3200x1800 UHD 3840×2160 2736×1824 UHD 3840×2160
    USB3 charge
    USB C
    HDMI
    USB C
    USB C
    USB 3.1
    Displayport
    USB 3
    micro SDXC reader
    Displayport
    USB C – Video
    USB C – Charge
    USB3.0
    Active Pen Active Pen Active Pen Passive Pen
    2.93lbs 2.89lbs 1.73lbs (no keyboard) 3.09lbs

    If I glance at this, I can see that the Dell and Surface are more expensive, and I’m not sure I’m getting more. For sure, I’d then be above the cost I want to pay. I could drop to a 256SSD, which would save $$. I could use external drives for storage, which would work fine. However, for some of those, I need to drop the RAM, and while I can probably get by with 8GB, I don’t want to get in a situation where that doesn’t work. I do know that the one VM I run at times really needs 8-9GB on its own.

    That means I’m looking at HP or Lenovo, both of which are nice looking machines. I’ve got a few days to think about it with Memorial Day sales in the US. Fortunately both models are at local stores, so I can compare them, and look at them with my current machine as well.

    I was hoping, but not expecting, the new Surface refresh to be more competitive with other devices, but it’s not, IMHO. The value isn’t there when compared to the HP and Lenovo, though to be fair, they are different devices.

    In Person

    After writing the above post, I went to a local Best Buy, which carries some of these models. I spent about 10 minutes each with the Spectre, the Yoga, and the XPS. Unfortunately the XPS and Yoga weren’t the UHD ones, so I couldn’t compare screens. However, the UHD screen on the Yoga looked nice in Windows. Unfortunately I couldn’t see SMSS and VS, which are what I’m more concerned about.

    However, I did spend some time typing on each of these machines and that was interesting. The Dell is more expensive, and probably out for me, but both the Spectre and Yoga have nice keyboards. The layout is slightly different, and for the most part I adapted well.

    Except for the right shift key.

    On the Yoga, the right shift key is half the size of the left one, and to the left of the shift key is the Page Up key. You can see it in this image. That was a problem for me as I often use the right key and I kept not getting capitals because I’d hit page up and not Shift. I’m a self-taught typist, not a traditional one, and I use a lot of muscle memory.

    I tried to adpat, and consciously I could reach my right pinky further, but it defaults to the left side of all shift keys, and I think that might be a deciding factor for me. Perhaps it’s the Spectre after all.

    We’ll see. A few more days of thinking.

     

  • Save on IT/DevConnections this fall

    For the first time in many years, I won’t be at IT/DevConnections this fall.  I’m disappointed to miss the event, but I had other commitments around this time when I heard about being chosen as a speaker and this would be the fourth event in four weeks. That’s a bit much, and so I decided to pull out Sad smile

    However, this is another of those great shows where you can learn about a number of different technologies besides SQL Server. I’ve like having the variety, and seeing different perspectives on technology, data related or not.

    You don’t have to miss IT/DevConnections, however, and you can go for a discount for the next week. Register today and use the code MDS17 to save until June 1.