Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
Redgate SQL Compare
The Voice of the DBA
 

Daily Coping Tip

For many of you out there working in a new way, I'm including a thought of the day on how to cope in this challenging time from The Action for Happiness Coping Calendar. My items will be on my blog, feel free to share yours.

Stay hydrated and eat well.

The Challenge of Contracting

For most of my career I've been a full time employee (W-2 in the US) or worked for myself with my own business. I've rarely been a consultant or contract (1099) employee, and what experience I had with those situations didn't suit me. I don't like the lack of security and certainly don't like being responsible for the sales portion of finding work.

Many people like contracting, and in fact, some make a career of it. There are companies that help you find work, and many large companies employ people for years as contract workers. There's an interesting article on the impact of this at Ars Technica. It looks more at hotels and other service work, but this is common for technology workers as well, especially at many of the large, common names. If you look through the comments, you'll find a few examples.

I do think this is starting to be something that workers have to contend with, and it's been obvious how hard this is over the last month. This might be especially true as companies can find ways to better specify work and hire people for their expertise at less than full time hours. This does save them a lot of long term costs and commitment, which is a change from what I expected when graduating from university.

I've said this in a few talks, but ultimately I believe that each of us should be treating all jobs as temporary, ensuring that you take care of yourself and plan for your future. While a company might provide benefits and some retirement help, you should ensure you are paying attention and saving where you can. In the US, healthcare is a mess and expensive for contract workers. Outside the US things are better in some places, but you should still ensure you plan to take care of yourself if the company doesn't.

It has always been hard for workers throughout history. Many companies exist to make profits for their management and owners, often at the expense of workers' treatment. Despite that, there are some amazing companies out there that do a better job of existing as a partnership with workers than others. My employer, Redgate Software, is one of those, and I'm lucky to work there. We're hiring, good luck if you apply, and tell them I sent you.

I hope all of you reading this can find a good employer that treats you well and gives you work you enjoy doing each day. If you don't  have that, invest in yourself, work on your tech and soft skills, apply for jobs, be diligent in your questioning of the hiring team, and cross your fingers. There are great employers out there, and best of luck in finding one for yourself.

Steve Jones - SSC Editor

Join the debate, and respond to today's editorial on the forums

 
  Featured Contents
Stairway to DAX and Power BI

Stairway to DAX and Power BI - Level 12: Function / Iterator Function Pairs: The DAX CountA() and CountAX() Functions

Bill Pearson from SQLServerCentral.com

Business Intelligence Architect, Analysis Services Maestro, eight-year Microsoft Data Platform MVP and author Bill Pearson introduces the DAX CountA() and CountAX() functions, discussing the syntax, uses and operation of each. He then provides hands-on exposure to CountA() and CountAX(), in counting non-empty cells in a column, and in counting nonblank results when evaluating the result of an expression over a table, respectively.

Using SQL Monitor Groups in PowerShell

Additional Articles from SQLServerCentral.com

Not only are SQL Monitor Groups probably the neatest and most maintainable way of ensuring that all your SQL Servers have the best possible configuration of alerts, but they represent a powerful way of categorizing your SQL Server estate. In this article, I'll show how to use the SQL Monitor PowerShell API to export these groups, save their settings onto a configuration management system, or compare groups of settings to see the differences between them.

Storage 101: Understanding the NAND Flash Solid State Drive

Additional Articles from SimpleTalk

Today, most organization are using solid-state drives for everything from laptops to enterprise database storage and virtual machines. In this article, Robert Sheldon explains how NAND flash solid-state drives work.

Free eBook: SQL Server Internals: In-Memory OLTP

Press Release from Redgate

In this free eBook, Kalen Delaney explains how Microsoft's 2016 In-memory OLTP engine works. In her book, learn how to use lock- and latch-free data structures to allow non-blocking data processing, and find out how to migrate existing tables to Hekaton.

From the SQL Server Central Blogs - Using SQL Server on Azure Virtual Machines to ease your way into the cloud

Kenneth.Fisher from SQLStudies

When it comes to migrating applications to Azure, there are a number of paths available. But if you’re migrating on-premises ... Continue reading

From the SQL Server Central Blogs - DRS Cluster Load Balancing Improvement for SQL Server on VMware

kleegeek from Technobabble by Klee from @kleegeek

Dynamic Resource Scheduling (DRS) should be enabled for all VMware host clusters, especially those who run SQL Server. It provides for resource consumption load balancing functionality into a host...

 

  Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

Getting the Hex values

I am looking to convert for decimal based integer values to hexadecimal in Python for a new application. What is the best way to do this?

Think you know the answer? Click here, and find out if you are right.

 

 

  Yesterday's Question of the Day (by Xedni)

PARSENAME and Input Length

What will this result in?

declare @long_obj nvarchar(768) = replicate('a', 128) + '.' + replicate('b', 128) select parsename(@long_obj, 1)

 

Answer: bbbbbbbbbbb...

Explanation: The reason I thought this warranted a QotD was the input to PARSENAME is of datatype sysname, which for most intents and purposes means nvarchar(128). No single object part name can be longer than 128 characters, and yet a fully qualified object can be well over 128 characters (e.g. db.schema.table.column). PARSENAME is also just a handy function for extracting the nth part of a delimited string in certain circumstances, but the question is what happens if you pass in a string which is longer than the supposed 128 character limit sysname enforces? The answer? (thankfully) nothing! As one would hope from a function designed to parse fully qualified object names, you can safely pass in as many characters as constitutes a legal object name (up to 128 per part, plus delimiters, and quoting characters). The only caveat is that no name part can exceed 128 characters). So you can't use it to parse arbitrary length delimited strings, just string isomorphic to an object identifier. Ref: PARSENAME - https://docs.microsoft.com/en-us/sql/t-sql/functions/parsename-transact-sql?view=sql-server-ver15

Discuss this question and answer on the forums

 

 

 

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.


SQL Server 2017 - Development
Programmatically create SSRS report as PDF - I would really appreciate some guidance on how to get vb code working in a SSRS report.  Please refer vb code at end of posting. The code has been added to Custom Code (Report Properties, Code) and the code is called from a Text Box expression in the report.  I have created a SSRS Data […]
How to check if a particular table is being used right now? - I am completing an SP that will do massive deletes based on certain criteria from a dozen of tables. On average each table is tens of millions of rows, no permanent or tuned indexes on it (it is a staging-swap kind of tables,  temporary transactional data holders) but occasionally heavy selects can be run against […]
Running Total - I have a table that captures rainfall data approx every 10 minutes. I want to calculate a sort of a running total of the Last Hour's Rainfall and the Last 8 Hours Rainfall by Time. Last Hour's Rainfall = Sum(PrecipitationAmount) for the previous 60 minutes (PrecipitationMinutes is the number of minutes over which the PrecipitationAmount […]
SQL Server 2016 - Development and T-SQL
Need some help getting info of people logged in, but from the POV of NON-Sysadm - I modified a proc that returns a result set of all user emails to the application in question, with one column that displays a sundial if that user is logged in. I did this by doing a left outer join to sys.dm_exec_sessions Left join sys.dm_exec_sessions b on login_name = Su.name and program_name like '
I was asked to get rid of this Dynamic SQL for performance purposes. - Is it REALLY possible to bypass the @Where_Clause variable and make the below SQL non-dynamic? This is a statement from an SP that receives the below 5 parameters and dynamically builds the WHERE clause from them. I don't think it is possible NOT TO USE DYNAMIC SQL HERE, but double-checking with you guys. Thanks. -- […]
Need explanation for below query what it does -   @Date1 = '20150630' DATEADD(m,6, @Date1) < DATEADD(m,-12,GETDATE())   Ignore this, i got the answer after validating.
Administration - SQL Server 2014
SQl Stored Procedure - View Tuning - Hi, We have a stored procedure which calling view which contains bunch of tables in sql 2014 and 2017 and it's slow. View contains roughly 100K records. I was looking view and based on joins and where clause i have created index but nothing gain as performance it's same. I tried following: Created Index based […]
SQL Server 2012 - T-SQL
Concatenating to a string - I am trying to concatenate values into one string value and what i have so far is progress, but I want to encapsulate my variables with single quotes. The below gives me e.g. Karen,Cox,Oakland,MN,95573 when what I need is 'Karen','Cox','Oakland','MN','95573': p.firstname + ',' + p.lastname + ',' + i.city + ',' + t.stateAbbrveation + ',' […]
SQL Server 2019 - Administration
Gauging Performance Improvement after removing the unused indexes - Hi All, Removed some of the unused indexes. But, how to identify the performance improvement? Is there anyway to generate any metrics and giving that the managers?   Regards
SQL Server 2019 - Development
PowerBI Report Builder - can it use/declare variables? - In SSRS, creating your own variables for use within your report is trivial... did MSFT leave this out of PowerBI Report Builder? In SSRS, I could create a dataset, and create a variable, and set the value using an aggregate for example (like a count of records in a dataset). I'm trying to do the […]
Ensuring a randomly generated number is always 8 digits - Hi there   I have inherited a piece of code which generates an Activation Code based on a seeded value as follows select cast (round(rand(31303258 * rand(DATEPART(millisecond,GETDATE()))) * 100000000,0) as int) where 31303258  is the seed or another 8 digit number   Now what I have noticed is that not all the time, a 8 […]
Reporting Services
Programmatically create SSRS report as PDF - I would appreciate some guidance on how to get vb code working in a SSRS report.  Please refer vb code at end of posting. The code has been added to Custom Code (Report Properties, Code) and the code is called from a Text Box expression in the report.  I have created a SSRS Data Source […]
SSRS 2016
SSRS 2016 - force page break - Hello, How it is possible to dynamically force a page break? for example: if the final page is on pagenumber say number 9 then have a page break before this page? Thank you
Integration Services
View package that has been deployed - First an explanation just to see if I am going about this the right way   I have a package that i've created using VS 2017 If  run it from VS2107 i.e. locally, it works fine   I've created a SQL Agent job Now, if I deploy it via SSMS i.e. through deploy project in […]
SSIS & Azure SQL database - Hi , I have an on-premise SSIS package which connects to SQL Server database(Source). On connecting source using onpremise SSIS need to connect Azure SQL database , after connecting Azure SQL database need to truncate the stage table first and insert the source data. On success of source data to destination table (stage table), need […]
 

 

RSS FeedTwitter

This email has been sent to newsletter@newslettercollector.com. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. This newsletter was sent to you because you signed up at SQLServerCentral.com.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -