Author: way0utwest

  • Win a SQLBits Pass

    You can win a free conference pass to SQL Bits, in Liverpool, May 4-7. It’s easy, just post a review of one of their previous events. Haven’t been? No worries, post a review of a video of one of the sessions. You can find those here:

    If you want to just register, there’s a few discount code slots left, so use 4pr1l-F00l when you register.

    This is my favorite event, and I hope to see you there.

  • How Much Can You Learn?

    One of the things we’ve tried to do at SQLServerCentral is provide a way for SQL Server professionals to continue to learn more about the platform over time. Andy Warren and I have debated how to best do this over the years, and Andy has built a great presentation on Building a Professional Development Plan that I’d encourage you to watch or attend if you can.

    One of the parts of any good plan is finding time to learn. While there are many ways in which to learn, many people seem to want an organized way of working through a particular topic. Books provide one method, while online courses such as those provided by Pluralsight are another.  There are also pre-cons at SQL Saturdays or other conferences, weeklong training classes, and other methods available. Which you choose might depend on how you best learn.

    Any of these methods work, but all require some investment, both time and money. Setting aside the money for a minute, how much can you learn in a year if you use some on-demand method such as books or on-demand video. Is there some limit to what you can absorb and work with in any particular month or year?

    I think there is. Certainly the amount you learn depends on how much you can practice and focus on a topic, as well as how closely the new skill is to your existing capabilities. The further you move away from an area you’re already comfortable with, the slower you may learn, and the greater investment to become competent in a new subject. Given that a month (or year) is a fixed amount of time, and we all have other responsibilities, how much can you actually learn and retain?

    I used to think that a few months would build some competence, but I’m finding that after I learn for a few months, I really need a few months, or at least some time, of not learning, where I can practice and work with new skills I’ve been developing. I find that if I don’t take this time, too much of what I’ve learned becomes hard to remember, and even newer skills are hard to acquire.

    Is it the same for you?

    Steve Jones

    The Voice of the DBA Podcast

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

  • Naming Is Hard

    I ran across Aaron Bertrand’s naming post recently, which I liked overall. Your team needs to agree how things are named, and be consistent, but I agree that some of the rules I’ve seen put down by people aren’t practical. However I also know that naming things becomes hard, especially over time as your systems evolve and the scale grows.

    I’ve run into some strange naming patterns in the last few years that struck me as odd. I grew up in the Hampton Roads area of Virginia, and with a parent selling real estate, I traveled all over the area, often reading a map to navigate. I can rarely remember seeing the same names used over and over, despite the fact this was a relatively populous area.

    However when I came to Colorado, I found things to be different. Either the people in charge of naming weren’t creative, or they were very, very lazy. In some of the developments I entered, I’d find the same name used many times on adjacent streets. You can find Wolfe St, Wolfe Pl, Wolfe Ct, and more all next to each other. While a computer can easily differentiate these sets of characters, this can easily create confusion in humans.

    On a note closer to our livelihood, I have seen some strange databases objects. The tables in a JD Edwards system were coded with a short alpha sequence and then a 4 or 5 digit number. Always fun to remember what “FS3401” means. However I saw one recently that stunned me. I ran across a SQL Server database that was quite large, not in data size but in the number of objects. Apparently a developer or DBA at some point decided it wasn’t worth trying to name tables to match some entity and used GUIDs are names instead. I don’t know about many of you, but comprehending which GUID stores which data might have me resigning from that position relatively quickly.

    We won’t all necessarily agree on how we should best name objects and entities, and that’s fine. However I would implore you to at least consider the humans that will have to work with your database. Use some creativity to build names that are easy to differentiate and pronounce for the future DBAs and developers that need to enhance and query your system.

    Steve Jones

    The Voice of the DBA Podcast

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

  • MDF File Password Confusion

    I had never seen this, but I ran across a blog that mentioned an MDF File password here. The post really looks at ways to reset the administrator password for the “sa” account in SQL Server. However it has some mistakes and issues. I tried leaving a comment, but comments are disabled.

    With that in mind, I decided to respond to a few things and clear up confusions.

    With regards to the post, I think it’s confusing in that the text notes an MDF file password, but all the instructions are really about resetting the “sa” account password. sa is the built in sysadmin account in SQL Server, which isn’t related to the MDF file. The MDF file is the extension of the main data file for a database. You can change this, but there isn’t a good reason to do so. Note, the .ndf files are the same format, though by convention, these are the 2nd, 3rd, and other files added to a database.

    There also isn’t a password on these files. I can open them in notepad (not recommended) or xvi32, and there isn’t any requirement if I have read access in NTFS to the file. It doesn’t matter if this is the master database or any user database. If you have NTFS permissions, you can read the file.

    Now interpreting is different. SQL Server interprets this, and it requires permissions itself to access the server process, either sysadmin, or normal login. However, you can use ORCAMDF or MDF Viewer, or some other tool to read the files. The information contained in an mdf/ndf file is just formatted in a certain way. If you spend a lot of time, you will understand how to interpret the format.

    Changing the sa password requires that the SQL Server service be running and you connect in some way. The post gets the methods right, but says that you must stop the service, which is only needed if you access the file some other way (ORCAMDF, xvi32, etc.). If you want to change the sa password, there are a few choices:

    1. USE SSMS
    2. Use SQLCMD
    3. Use osql
    4. Use one of the above methods with SQL Server restarted in single user mode
    5. Use a third party utility.

    Any of these first four will work, and feel free to use whichever fits your situation. The last one is one I do not recommend as I can’t be sure any third party products will work correctly here.

    Ultimately I’m a little embarrassed by this post, as it appeared through our syndication process on SQLServerCentral. We don’t review these posts, so there is no quality control. Most of the posts on this blog are good ones, but this one appears to be by a guest author and it’s one I’d ignore.