All posts by arcanecode

Eric Ligman’s FREE Microsoft eBook Giveaway–Revising the download script

Every year, Eric Ligman, director of Sales Excellence for Microsoft, creates a blogpost in which he gives away tons of FREE Microsoft eBooks. This year has 361 in the list.

You name it, it’s in the list. SQL Server, Azure, PowerShell, .NET, BizTalk, SharePoint, Windows Server, and more. You can find Eric’s post at:

https://blogs.msdn.microsoft.com/mssmallbiz/2017/07/11/largest-free-microsoft-ebook-giveaway-im-giving-away-millions-of-free-microsoft-ebooks-again-including-windows-10-office-365-office-2016-power-bi-azure-windows-8-1-office-2013-sharepo/#comments

While there are individual links to each file, what if you want every one of them? He explains on the post why he doesn’t provide a big zip file. He does, however, provide a PowerShell script (attributed to David Crosby) that will do the job.

However, I found some issues with the script. Not that it didn’t work, it did, but there were several things I felt could be done to improve it.

First, there was no progress message issued during the download. As a user, I had no idea which file I was on, so had no concept of how much longer it would take. Thus, I’ve added a little progress message.

I then thought “Hmm, what if my downloads were interrupted, I don’t want to have to start all over”. So, I added some code that sees if the file we’re downloading already exists. This way it won’t re-download a file it already has.

But then another problem arose. What if it had partially downloaded a file? Just checking the file names wouldn’t catch that. So I added further code to compare the file size at the source with the file size on disk. If different, then it will re-download.

So far so good, now it will skip the file only if the file name is already on the local disk, and the file sizes match.

I now encountered my next concern. Crappy internet. I live out in the country, and while I love my privacy and rural living, my internet sucks. It is prone to go down or drop packets. If it had issues during a  download I didn’t want it to crash, but instead go onto the next file.

Thus I added a try/catch error handler, which displays an error message and continues on.

At this point I thought I was done. Just I was about to call it finished though, a typical afternoon Alabama thunderstorm came up. Kaboom! House rattled and power blinked.

This presented my final concern, what if the power went out? I’d want to know where it got to with the downloads. So I added some further code such that when the downloading starts it creates a new log file and appends each message to it.

I realize some of you have superfast gigabit internet and will be able to download these almost instantly. (I hate you by the way. #jealous). Therefore I made logging optional, so it wouldn’t create an extra file if you didn’t want it. Just set the $log variable to $false, and it will skip logging.

So there you go, a revised download script that will handle stopping and restarting the script gracefully, will look for errors, and adds logging so you can track progress.

You’ll find the revised script on my GitHub site, in the PowerShell folder:

https://github.com/arcanecode/PowerShell

Just look for the file “Eric Ligmans Microsoft eBook Giveaway Revised Download Script.ps1

There’s also a readme style file by the same name, which echoes this blog post.

VidCon 2017 – Day 2

Below is my update from Day 2 of VidCon 2017. As you’ll see, while I have experience with recording screen presentations I’m still learning the ins and outs of recording myself as video, especially in the audio department.

Bear with me, I’ve already ordered some new equipment to help in the audio world; as I continue to learn things will only get better. While I definitely plan to make screen capture style recordings (such as my PowerShell and XML video) the bulk of my content, I will be doing live presentations, such as this vlog, from time to time.

In the recording I mention several products I saw, the links for which are at the bottom of this post. I want to be clear that these are not paid promotions, nor did I receive any type of compensation. I was just impressed with them and wanted to share.

 

 

To find out more about me: http://arcanecode.me

AdultsOnlyMinecraft: https://www.youtube.com/user/AdultsOnlyMinecraft
Social Blade: socialblade.com
Mighty Selfie Stick: bit.ly/10ftSelfie
Katie’s YouTube Channel: https://youtube.com/ktmh9600
LumaFusion: https://luma-touch.com

What’s Old Is New Again: Updating Arcanecode

I realized it has been far too long since I updated the look and feel of the blog. If you’re reading this, you can obviously now see the new look and feel.

Over to the right you can now see my Twitter feed. I post multiple stories daily of interest to the tech community.

I’ve also generated a new “About” page:

https://arcanecode.com/info

On it you’ll find my bio, plus links to all my social media accounts, including my github page where all my code samples now reside.

You’ll also find the link to the Facebook site for my company, Arcane Training and Consulting, where I post stories and discussions on a variety of technical subjects including SQL Server Business Intelligence, PowerShell, Azure, Security, and more.

In addition are links to all my Pluralsight courses, as well as the books I’ve co-authored.

Finally, I’m in the process of creating my own YouTube channels. While Pluralsight will host my long form training courses, ranging from one to six hours, YouTube will have very short videos focused on a specific topic. Ideally 15 minutes max so you can get answers quickly. Stay tuned for more as I get these published.

I did say channels, plural, as I’ve decided to make two YouTube channels. One will host only technical material for subjects such as PowerShell, Azure, SQL Server Business Intelligence, and the like.

The second will host videos for my hobbies, allowing me to post videos of a more personal interest such as Minecraft and Ham (Amateur) Radio. This will make it easier for people to digest the topics of interest to them.

I hope you enjoy the new format, and check back often.

Optimizing SQL Server Database Performance and Overcoming Unpredictable Challenges

This is a guest post from Tony Branson at ScaleArc.

With the explosion of digital data, achieving optimum database performance has become the primary concern of every database professional. For improving efficiency when managing a complex IT environment, DBAs must stay one step ahead consistently and learn about the best practices, proven strategies, and innovative approaches being applied to different DBA processes. Here are 5 key areas to consider for driving database efficiency even with an exponential increase in data:

1. Knowing What Needs Your Focus

It is important to have a good fundamental understanding of your IT infrastructure as a DBA. It’s critical to understand what’s working well and what’s not performing within the database infrastructure itself – e.g., if you’re having memory issues vs. I/O issues. It’s also critical that you understand how the database is reached – what network issues, application issues, VM issues could be impacting database availability or performance. Ensure your perspective is broad enough to understand the parts of the technology stack that need your attention.

2. Performing Periodic Health Checks

Database corruption hits without warning and has a devastating impact on your data if you are unprepared. Backups are essential but if you are backing up corrupt data, all your efforts are going down the drain. To prevent such a scenario it is important to perform health checks periodically using a standardized process. As a rule of thumb, DBAs should check and validate the consistency and integrity of a database frequently to make sure there is an accurate, valid backup always available in case the need arises.

3. Fine-tuning SQL Server Performance

The biggest challenge facing any DBA is how to improvise, optimize and maintain SQL Server database performance. When tuning a busy system, considering the full range of KPIs can get downright overwhelming. Use online guides to identify the metrics that actually matter and make improvements accordingly. For example, if you see a sudden fall in page life expectancy, it reflects an increase in your I/O requirements, which means you should be checking the processes running at that time.

4. Staying Compliant

Compliance can take a toll on compute resources, giving rise to on-going stress. While it may seem tempting to monitor every single transaction, it can kill your performance because it would need a large amount of storage space.

It is important to have an audit strategy in place with well-defined data and events before you can start. This approach will help you make any necessary adjustments over the time and track all the results for quarterly and annual audits.

5. Leveraging a Modern Database

The emergence of new generation applications that require both scale and speed to function at peak efficiency has exposed the flaws and gaps in existing database technologies. Scale up has reached full capacity, but scale out has historically been really tough. Modern databases support key features that can boost app performance and improve uptime, but taking advantage of these capabilities has required substantial application recoding.

Database load balancing software makes SQL Server management easy, avoiding the need for code changes to support features at the application tier. It enables geo-aware load balancing, supports app-transparent failover, transparently delivers read/write split, enables query routing, and performs multiplexing and connection pooling, enabling DBAs to tackle the challenges of an ever-growing pool of database servers. Deploying database load balancing lets you harness all the capabilities of SQL Server databases. By deploying database load balancing software, DBAs can efficiently address all the issues and problems that impact their ability to manage and optimize SQL Server databases effectively.

young man portrait, isolated on whiteAbout the author: A self-proclaimed tech geek, with a passion for ScaleArc’s disruptive technology innovation in database load balancing. Tony has a passion for dissecting tech topics such as transparent failover, centralized control, ACID compliance, database scalability and downtime effects. On his days off, he can be found watching sci-fi movies, rock climbing or volunteering.

Disclaimer: This post is not an advertisement. The owner of this blog has received no compensation for the placement of this guest post.