Author: way0utwest

  • A Broken Linux VM

    I have no idea if this is the best thing, but I went to boot up a Linux VM today and got this:

    2018-05-23 09_35_37-Ubuntu 64-bit SQL Server .210 - VMware Workstation

    My Linux skills are rusty, but this looks like a disk error. I rebooted and found this:

    2018-05-23 09_39_33-Ubuntu 64-bit SQL Server .210 - VMware Workstation

    A search on Stack showed this page: https://askubuntu.com/questions/697190/fsck-error-on-boot-dev-sda6-unexpected-inconsistency-run-fsck-manually

    I ran the utility, and answered yes to about 20-30 items. I have no idea what to do, but I figured this was worth a try. Once this completed, I rebooted again.

    The boot sequence in text took awhile, with a “start job” running about about 2 minutes on the disk device. While 2 minutes isn’t that long, it’s an eternity when you are hoping something works.

    Eventually it completed and I found this:

    2018-05-23 09_45_33-Ubuntu 64-bit SQL Server .210 - VMware Workstation

    Good news, as I wasn’t looking forward to rebuilding the machine. It’s just a lab machine, but I need to check something that day, and so I needed it. While installing Ubuntu and SQL Server is fairly quick, it’s still time.

    Fortunately things appear to be working and I can connect from SSMS to the server, so I’m guessing things are mostly working. Fingers crossed.

  • Will Coding Be Less Important?

    How many of you can read Greek? I can decipher the alphabet and pronounce words, but that’s about it. I thought about this after running across an essay that says that coding will eventually be as important to most people as ancient Greek, which is to say, hardly important at all. The author seems to suggest that eventually we’ll tell systems what we want and they’ll build algorithms. I guess that’s what we do in code, but the impression I have from the piece is that we’ll use natural language to inform some AI system that will actually produce the code.

    Possibly, but let’s set that aside for a minute. Assume that we could have an AI that removed the need for us to code the corporate CRUD systems or most of the websites we have. Could such a system be adapted to manage data?

    Possibly, and maybe more consistently than we can. Certainly plugging in RTO/RPO values and HA needs might allow an AI like system to schedule backups, build up or tear down new nodes in a cluster or Availability Group, and certainly respond to DBCC errors, reindex systems, and more. I certainly could see that we could request a system to do X and lots of the background details would be handled.

    There are some other thoughts about this piece that I tend to agree with. The ability to easily specify the way in which a system can work, for the average or even above average user, isn’t coming soon, if ever. The thing is, I’ll take solace in something that I truly believe.

    Writing the code isn’t the hard part.

    Sure, syntax can be challenging, and working out the mechanics of how modules interact, and building MAKE-like scripts, and deploying changes are difficult. We forget about the differences in environments and configuration, and I bet better static analysis and AI might help here. The thing that’s really hard, that is likely to still exist even if we specify the way something works is that it’s really, really hard to be specific.

    We struggle to express the exact way that systems should work. We struggle sometimes to communicate what “a discount for more than 10 pieces” means. Is that a discount at 10? At 11? what if there are 20 ordered and 10 returned? Do we remove the discount or pro-rate the return? We can solve the issue, but so often, we don’t know there’s an issue until the system gets into production. Changes in rules/regulations? We don’t often know about them, much less know how to express those changes in plain language.

    Even if we could get by without writing code, the expression of “how” something works likely requires a lot of detail, a meticulous person, and endless patience to get the machine to understand. Something many developers do now. I suspect the same thing would be necessary for database development. Even if we could specify the result set, would we really trust the machine to query the source and not come up with multiple ways to get this result set, which might not be valid for another?

    Call my cynical, but coding isn’t going away, even if the syntax changes to English (or some other spoken tongue).

    Steve Jones

    The Voice of the DBA Podcast

    Listen to the MP3 Audio ( 5.0MB) podcast or subscribe to the feed at iTunes and Libsyn.

  • Engineers Making the World Better for Diabetics

    At Music City Tech today, I had the chance to watch Scott Hanselman deliver an opening keynote called Solving Diabetes with an Open Source Pancreas. It was an engaging and humorous talk that I enjoyed. Scott is a great speaker, and you can watch a previous recording from Webstock if you like.

    I met Scott years ago, and he talked about his sensor at that time that got his blood sugar on his phone. At the time I thought that was cool, but in an abstract way. I’m blessed with good health as is my family. My eyes are bad and one of my ears is fairly broken, but those are really minor issues.

    This is really my life, a shot from Scott’s talk.

    2018-06-01 11_23_29-Webstock ‘18_ Scott Hanselman - Solving Diabetes with an Open Source Artificial

    I mostly do what I want and my blood sugar works well. In fact, my morning was wake up, a little hungry, but I hit the elliptical for a bit before eating breakfast. As a contrast, here’s another shot of what Scott does.

    2018-06-01 11_22_54-

    This past year, while coaching volleyball, one of my players was diagnosed with Type I diabetes. For a time I wasn’t sure if the player would return, and when she did, we had to be sure that she took time to prick her finger and check the reading during practice and tournaments. At some point she got a continuous glucose monitor, which Scott talked about, that sent readings to a small cell phone sized device. Over the season, all the girls learned to check the device periodically and warn the young lady or her mother if the numbers went too high or low.

    I was quite impressed with the way this 14 year old managed her health, but more I realized just how lucky I am. As Scott delivered his talk, he also mentioned that he was lucky in that he’s in a first world country with the resources to manage his condition, something that many people struggle with.

    Scott is working with the NightScout Foundation to use technology to try and automatically manage his diabetes. He has his real time blood sugar uploaded to the cloud so that he and his wife can track it, he gets data on his phone, and he has his pump low dosing him throughout the day. It’s an amazing system, and he even has his blood sugar appear in his git command prompt.

    On one hand I’m amazed and thrilled that technology has really found  a way to help people improve their lives. On the other, it’s a maddening situation where proprietary systems limit the access and ability of most people to manage their health. My heart angers over corporate greed and feels anguish for the struggles that should be much more manageable.

    If you feel this is your cause, check out NighScout and maybe get involved.

  • Getting SQL Agent going for SQL Server on Linux–#SQLNewBlogger

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

    It’s actually a simple procedure, but I thought I’d write a short note to help me remember. The procedure is documented in Books Online.

    When I first started playing with this version, I noticed that SQL Agent was disabled. That’s not great, since SQL Agent is a great tool for various tasks in SQL Server. I can’t start the agent from here, as the underlying implementation is different, and I’m not really a host OS admin when connecting in SSMS.

    2018-05-23 15_19_26-SQLQuery4.sql - ubuntu.master (sa (56))_ - Microsoft SQL Server Management Studi

    After checking which patch level I was at (CU6), I changed to my Linux console, and ran the configuration utility. For Linux, this is mssql-conf.

    2018-05-23 15_20_34-Ubuntu 64-bit SQL Server .210 - VMware Workstation

    The next step is to run the command listed to restart the system. I actually just ran

    sudo sysmctl restart mssql-server

    Once this was done, I refreshed SSMS.

    2018-05-23 15_22_52-SQLQuery4.sql - ubuntu.master (sa (56))_ - Microsoft SQL Server Management Studi

    This appears to work, but let’s test it. I’ll create a new job that does a backup of a database. This should be simple, and I’ll use defaults, just a filename for a full backup. I’ll use this command:

    backup database dbaadmin to disk = ‘dbaadmin.bak’ with init

    I save the job and run it. Sure enough, I have a backup.

    2018-05-23 15_28_37-Ubuntu 64-bit SQL Server .210 - VMware Workstation

    Tada, now I can move forward with work.

    SQLNewBlogger

    This is a fairly simple thing to do, but the writing helps me remember, but more importantly, I can document that I’ve done some learning here and experimenting.

    The next person thinking about interviewing you wants to know that you can learn and solve problems.