Author: way0utwest

  • Delete an Azure SQL Database from PowerShell

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

    One of the things I’ve been working on is trying to get my DevOps, continuous delivery pipeline working with Azure. Part of that is a test deployment to an Azure SQL Database, which means I need to be able to update an existing database from a backup. Unfortunately, Azure SQL Database doesn’t support a restore over an existing database (yet).

    That means one task I have is to remove an existing database, in order to replace it with a new database with the same name. A little work in the PoSh documentation found Remove-AzureRMSQLDatabase, which is just what I need.

    To use this cmdlet, I need a connection to the Azure space first. I can do that with a credential that I get with this command. Ultimately I need to store this, but interactively this lets me get started:

    Login-AzureRMAccount

    This gets me an interactive login. I enter my account and password. Since I use a Live account, this won’t work in the pipeline, but it gets me going.

    2017-03-10 09_00_34-Sign in to your account

    From here, I can set a few variables I’ll need. I want the name of a resource group, a server, and a database. In my case, I’ll use a few variables. I call the database the “new” one, since I’ll be using an existing one that I’ll recreate from an “old” one.

    2017-03-10 09_03_07-powershell - How to Login without prompt_ - Stack Overflow

    From here, it’s just a question of calling the Remove-AzureRmSqlDatabase cmdlet with parameters. I do that, and get results. Here’s the call

    Remove-AzureRmSqlDatabase -ServerName $server -ResourceGroupName $rgname -DatabaseName $newname

    Here are the results. I’ve blacked out a few ids.

    2017-03-10 09_05_16-Photos

    This clears the database, and after refreshing, I can see it’s gone from my list of Azure SQL Databases.

    2017-03-10 09_08_12-SQL databases - Microsoft Azure

    Not much to this, but it’s part of a larger scheme, which is getting a copy of the production database and restoring it.

  • Launching Products

    Over the years I’ve seen a lot of products launched. I still remember the fanfare around Windows 95, and the efforts to make this an event of sorts, back when virtual events didn’t make sense. There have been a few Windows or SQL Server launches, some of which took place at large conferences, but quite a few were launched in different communities with small physical events. In Denver, there were a few times when Microsoft rented a hotel conference space and scheduled speakers, some from Microsoft, and some local. These would be all day events, showcasing new features, with customers talking about their experiences in previewing the product.

    Just a few weeks ago, Microsoft launched Visual Studio 2017, with some fanfare, and two days of virtual events. I watched one, and hope to find some time to watch a few of the second day’s events. While I don’t necessarily learn a lot, I go get a bit excited seeing new technology and how different people use it. It’s inspiring to see demos and solutions work well on stage. I think it’s a welcome respite from the drudgery of dealing with my own or other people’s code, and the various problems it presents, as well as the various bugs and limitations of the tools and IDEs I use. It seems there’s always some devil in the details that slows me down.

    However, for a short time, I get rejuvenated and excited by the new features. I want to dig in and experiment. It can be a struggle to find time, but watching someone demo a new way of working reminds me of the things I love about computers and technology. I think this is one of the reasons I love attending SQL Saturdays or other conferences and watching other presenters talk. I always see some new and interesting things that generate ideas and excitement. I’m really looking forward to SQL Bits in a few weeks (still time to register), and a few days of seeing what others have been accomplishing with SQL Server.

    I also have pride when I’m a part of the company launching a product. At Redgate, we’ve had a number of SQL in the City shows, which I’ve been honored to be a part of in many cities around the US and UK. Last year we tried a streamed version, which was yet another experience, but one I hope we repeat again. And, in fact, I get to be a part of another product launch next week. We’ve already release SQL Clone, but we have a live-streaming launch coming next week. I’ll be traveling over to Cambridge and getting ready for a few presentations that will hopefully inspire you to try the product. If nothing else, check out the stream and see if we show anything that sparks an idea in your mind.

    I know many of us work inside companies, and our product launches are small, to relatively few customers that are often our fellow employees. Some of you work with companies and the results of your work are visible to lots of others. No matter which environment you work in, I hope you feel the same pride and excitement I do when you release a new idea for your users to enjoy.

    Steve Jones

    The Voice of the DBA Podcast

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

  • Building a Database DevOps Process at the Data Platform Summit 2017

    I’m heading to India this August for the Data Platform Summit 2017. I am honored to have been selected to deliver a pre-conference seminar called “Building a Database DevOps Process”, where I’ll walk through the way in which you can include your database alongside application code and deploy it smoothly to various other environments, such as test, QA, UAT, Beta, Staging, Pre-prod, etc.

    DPS2017_Logo_Website

    If you are going to be in Bangalore during the middle of August, register for the DPS and come see my, or another, pre con as well. There are some great ones.

    This will be my first trip to India and I’m looking forward to it. Actually my whole family is looking forward, as I’ll be taking a week or so vacation before the conference to travel with them before I spend a week at work. I should be acclimated to the time change by the time the conference starts, which is good. I’ve got customer training also scheduled, so a busy August for me.

    Now to get a Visa and inoculations. Hope to see you there.

  • We are All Data Companies

    I have seen more than a few people note that every company is a software company. Or that every company should be a software company because software is becoming so important. I’m not sure that’s true. My mechanic certainly uses software, and he competes well with other businesses by tracking my car, reminding me of issues, and keeping in contact through integration between his point of sale system and some sort of email management software. However, this is a small shop, probably less than 20 employees, and I’m not sure they’re ever going to be in the business of software. They are consumers, and they need support, but they aren’t in the software business. My wife’s company is similar. She needs a website, needs to schedule events and take payments, but she’s not going to develop software to help her. Nor am I going to write code, because that might be a never-ending job.

    It’s easy to get out of touch and think that many larger companies need to be software companies. That might be true for some businesses, especially when they need to manage some infrastructure, but for many smaller businesses, I’m not sure that’s the case. Software is critical to small medical practices and retail stores, and service people, but only as a tool. Not as something they’d want to maintain or even customize beyond a simple look and feel.

    Is that true for data? If many companies aren’t software companies, are they data companies? I think so. Data is important, and having some way to look at data and manage it becomes important for them to run their business well. My wife struggles with data, but realizes that managing her mailing list and tracking the contacts is valuable. It’s hard, and her bits are stored in disparate applications, but she recognize the value of data. The same for my mechanic. They’ve seen plenty of value in treating a string of disparate transactions from me across multiple cars as those from a single customer. They also have learned that finding software to understand me as a customer, as well as string together recommendations and past work on single vehicles allows them to provide better service.

    Many companies want to track us through email, phone, or some other identification data because they realize that many people have come to expect a business to know something about us. We might not like them sharing or selling that data, but we do want to them to provide a better experience for us. I’m still surprised when there’s good integration between disparate systems, or a customer service call allows the company to recognize something about me and provide more value. I believe my kids and future generations will expect this to always be the case, shunning companies those that don’t provide customization.

    I worry about data security, data privacy, data integrity, and more, but I do also think that as more companies realize that they are data companies, and data drives many of their interactions, they will see data as more valuable. What they do with that, I’m not sure, but I can only hope they start to treat our data as a valuable resource worth protecting.

    Steve Jones

    The Voice of the DBA Podcast

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