Category: Blog

  • Daily Coping 19 Jun 2020

    I’ve started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here.

    Today’s tip is to appreciate the joy of nature and the beauty in the world around.

    I’m blessed in that I live closer to nature than most. I live on a horse ranch, with lots of wide open space around. Wildlife regularly passes across my property, and I get to interact with non humans.

    I’m not a horse rider (much), but I appreciate their beauty, grace, and power. I don’t have too many chores anymore, but I have had more during the pandemic. One thing I had to do recently was feed the horses while my wife was out of town.

    This was my view, during lunch one day. A break from the office.

    20200609_150522_HDR

    A breath of fresh air, and an understanding that there is more than technology, airplanes, and my gym.

  • Social: Growing Up with the Dukes of Hazzard

    I grew up in the South. The capital of the Confederacy was a short drive from my house. We studied the Civil War.

    I watched the Dukes on TV, and enjoyed it. Many of my friends did and we laughed, joked, and wanted a car like that. We loved the horn, and when a friend’s Dad got a programmable horn that could play Dixie, we did it over and over.

    I thought many of the people thinking “the South will rise again” or embracing this as history were just showing some pride. I’ve visited the cemeteries of Confederate soldiers, even as an adult, with curiosity and understanding this is part of our history in the US.

    It is, but it’s also a racist icon and one that represents treason to me. We can study history and relegate the item to history, but I don’t think that we should display and celebrate that time. You may be proud that your ancestors stood up for that they believed in, but I’m not sure you should be proud of what they believed in.

    I used to tolerate and not think too deeply about people putting that flag anywhere. As I look at the world, which has both grown and regressed, and not grown, I can’t tolerate that symbol anymore.

    I had friends that embraced it. I also had people out there that physically threatened or assaulted me who proudly displayed it. I’ve had few physical encounters and some were not about race or skin color, but some were. In fact, all of the ones as an adult were.

    The Confederate flag in the US ought to be treated like the Nazi flag in Germany. It’s the symbol of traitors, of racism, and of losers of the Civil War. I can’t believe our military has tolerated this until 2020, but I’m glad they are removing it.

    I am, too.

  • Daily Coping 18 Jun 2020

    I’ve started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here.

    Today’s tip is to say positive things in your conversation with others today.

    I’m writing this a few days early, but there’s a lot of anger in the world lately. I’ve tried to really project more positivity. Not succeeding as much as I like, but I am trying to move forward, rather than revisit history.

    As I interact with people, I remember that. I have some disagreements with people, but I’ve tried to remember to complement them, and find the good in them. I saw some kids recently that I hadn’t see in a few years. I remembered to ask about their lives and then cheer on their successes. Express sympathy at the struggles (one graduated from high school, with no graduation), but turn this to positive and hope for the future and root for their college experience to start in the fall.

    It’s easy to complain, gripe, and be upset these days. It’s OK, and some of those feelings are acceptable, but remember to celebrate the good things.  There is always Some Good News in the world.

  • Where are Sequences?–#SQLNewBlogger

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

    I created a few sequence objects lately to test some things. Since I tended to create and use these, I knew the names. Coming back a few days later, with new queries, I wondered where these were stored. This post shows a few things I learned.

    SSMS

    Where would you think Sequences are stored. They are a weird object, with the NEXT VALUE FOR syntax being used. This feels DDL-ish. However, if we look at the Object Explorer, there aren’t a lot of choices here.

    2020-05-12 10_36_03-SQLQuery7.sql - ARISTOTLE_SQL2017.way0utwest (ARISTOTLE_Steve (56))_ - Microsoft

    The area that seems most promising is Programmability, and when I check here, I see them.

    2020-05-12 10_37_00-SQLQuery7.sql - ARISTOTLE_SQL2017.way0utwest (ARISTOTLE_Steve (56))_ - Microsoft

    If I look at the properties, I can see the settings, which is good. I especially like seeing the current value.

    2020-05-12 10_37_20-Sequence Properties - MyKey

     

    T-SQL

    Since this is an object, it ought to be query-able from T-SQL. sys.objects is a good place to start, and when I query, I see this:

    Sequence object results from sys.objects

    Good, but not a lot of information here. With SQLPrompt, I do see there is another choice, sys.sequences.

    SQL Prompt Intellisense with sys.sequences

    If I query this DMV, I now see the same information from sys.objects at the top of the result set.

    First few columns of sys.sequences

    If I scroll, I can see more of the metadata I am looking for. Last_used_value is important, though I wonder what caching does here. A post for another day.

    metadata for the sequence from the DMV

    ADS

    Azure Data Studio has an Object Explorer, but it’s not as useful, as you can see. No options to get data. In ADS, I’d query the DMV.

    Azure Data Studio Object Explorer with just a Refresh option

    SQLNewBlogger

    This was a quick post, as I tried to find information. Once I did, which took just a minute, I decided to spend 5-10 minutes assembling this post and trying the various tools to get information.

    A quick look at how I find the information. You could focus a small post in this way on some learning effort you make.