Author: way0utwest

  • Come to IT/Dev Connections–July Sale

    You can register for IT/Dev Connections in October and save this weekend with the July Sale. Use code: JULYSALE.

    I’ll be speaking, though I’m not sure which sessions will be chosen. This year the conference is going to be on Oct 10-13 in Las Vegas at the Aria, which is a great hotel and centrally located on the strip. It’s also got great conference wi-fi, which is still amazing to me.

    The event is a great way to get exposure to a bunch of technologies, with Visual Studio, SQL Server, ASP.NET, C#, Azure, Exchange, and more being covered. I find myself taking advantage of the time to get some sessions in on non-SQL Server topics, learning things I might not otherwise get exposure to. The All Access pass also allows you to get online access to sessions and take a pre-con.

    If you’re looking for some intense learning, and you wear a lot of hats, check out IT/DevConnections as a possible way to learn a few things this fall.

  • Email or Username

    Quite a few of us will work with application databases where we need to identify a particular user for working with the various parts of the application. I’m not talking about the authentication and verification of identity, but just having a token to identify a user once they’ve been authenticated. I don’t want to talk security here since most of you aren’t great at building these systems and should just implement an authentication scheme that’s been vetted (OAuth, Live, etc).

    However, once you get a way of authenticating a user, how do you identify them in the database? Many people store a username, but there are issues with these. They aren’t consistent across systems, a user might find theirs taken in one application, and then needs a second one for the next application. This leads to the complexity of people needing a way to retrieve their username, which can be a whole separate set of application programming pain. Often the default is to move back to an email associated with the username.

    However what does someone do when they don’t have access to that email? Therein lies the issue with using email as an authentication mechanism. I use my sqlservercentral.com email for many things, most of them related to this site. However, if I were to ever leave this job, then I wouldn’t be able to access some sites if I couldn’t remember the login information. Perhaps I shouldn’t be using this email, but there are some services that are related to both my career as a DBA/developer as well as my position here at SQLServerCentral.

    Plenty of people have a separate email for personal use, but not necessarily many users of a generic application. There are plenty of people using their work email for registration at sites, assuming they’ll always have access to the application through a username of some sort. You might even change your email, deciding at some point that coolteenager@hotmail.com isn’t the one you want to give out for your kid’s school registration. In that case, if you’ve used that email at a variety of places, then what can you do?

    PASS recently changed to using email instead of username, which is fine. I think more sites use email, but in our case, as DBAs and developers, are emails less likely to change? Should we be sure that our PASS email is always a non-corporate email so that we can keep membership as we change employers? I’d think username is more stable for people in technology, and it can be fun. I love my way0utwest moniker, and try to ensure I reserve it on many applications I may want to use.

    There’s no good answer here, and there are issues with using either one as an identifier, but what do you think? Are there compelling reasons to choose one over the other? No matter which one you use, I think the need to have multiple ways for users to gain access to their account is important.

    Steve Jones

    The Voice of the DBA Podcast

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

  • Better Explorer on High dpi Displays

    I’ve got a high dpi display on my laptop. The recommended resolution is 2560×1704. That’s small. I have had all kinds of issues with SSMS, VS, and various other applications, including a few from Redgate.

    The other day I was looking at the Explorer window from about 2 feet away and struggling to see some of the icons and filenames as the light faded one afternoon. I found I could barely make out some icons and found myself leaning forward to see and back to type. Getting older has really made this annoying.

    I found an article that helped, letting me adjust the title bars and icon sizes in Explorer. I bumped up the sizes for title bars, menus, and icons. Everything went to 12 or 14, from the 9 or 10 points that are the defaults.

    Now I can read my Explorer window better. If you’re struggling with the higher resolution displays, give this a try. It’s hard to tell in the screenshot, but things are much easier to read now.

    2016-06-09 18_14_38-File Explorer

  • Better ReadyRoll Script Naming

    One of the things that I like about ReadyRoll is that the product will automatically build new scripts that are named in a sequential order. This usually results in a few scripts that look like this:

    2016-06-14 11_05_15-Movies & TV

    As you can see, these scripts aren’t very intuitive. In fact, if you get lots of scripts, this starts to look fairly complex and confusing. What about something more like this:

    2016-06-14 11_08_13-Movies & TV

    That’s easier to read and understand. I’d also have a better idea of what happens in each script. How can I do this? It’s easy.

    Add an Object

    First, let’s add an object in ReadyRoll. I’ll alter my Exams table to add a few columns. To keep this simple, imagine I want to add a modified date and a short description. I could do this in SSMS, but I’ll open the designer in VS. Here’s the table.

    2016-06-14 11_10_30-Photos

    I’ll make my changes.

    2016-06-14 11_11_01-Photos

    Now, I click the “Update” button in the upper left. When I do this, I get a Generate script item. I could do other things, but I like to do this and see my script before applying it to the dev database.

    2016-06-14 11_12_04-Movies & TV

    I click Generate, and I get the script. Notice, it’s named with some random number (after the 0004) on the right.

    2016-06-14 11_12_34-Photos

    If I right click the script, I can do all the normal file operations.

    2016-06-14 11_13_32-Photos

    Let’s give this a more descriptive name. It’s taken me a long time from my 8.3 name days, but I’ve learned to take advantage of file names to make them descriptive. A few bytes in a name is cheap.

    2016-06-14 11_13_58-Photos

    That’s it.

    ReadyRoll does use the first characters in front of the underscore (_) to order scripts, so I don’t want to change those. I could, but in this case, I need script 4 to come after script 2 at the very least.

    After the underscore, I can do whatever I like. In this case, I can see the changes being made to my database, just reading down the scripts and seeing how things will occur. I always have the detail in the code, but at a high level, I can see the changes.

    I’m sure if you adopt this technique, you’ll find that it’s much easier to manage scripts and track what’s happening to your database.