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

Daily Coping Tip

Do something kind to nature and our planet

I also have a thread at SQLServerCentral dealing with coping mechanisms and resources. Feel free to participate.

 

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.

Long Term WFH

I'm not sure I've accepted that we're still in a work from home pandemic that is going to continue for the next six months. It does weigh on me at times, and I've struggled to cope with the same four walls the last few weeks, mostly because I don't think I've accepted this fact. Redgate's offices are closed for the rest of the year, with no real plans to open anything anytime soon. Many people are pleased with the current status, and we're hiring people on a regular basis.

Is long term work from home the thing that many companies will adopt? Certainly some can't, and lots of jobs around the world don't lend themselves to remote work, but for those of us in technology, it's possible. Lots of our management has realized this, and plenty of people like it. Disappointing for me, and maybe for some of you, but good for lots of others.

Is this a good thing? There is some research coming out about how the longer term status is affecting people. People are working more, and having difficulties unplugging from work. There's an interesting thread at Hacker News about finding some disconnect from work, with some creative suggestions. Especially nice to flip through and pick/choose them if you are space constrained.

The upside of remote work is that we can live anywhere and work for a company. Basecamp has done this for years. The downside is that your physical proximity to your company is not an advantage. If you aren't a high performer, perhaps your company will look to find someone in another city or country that can do more. Stress about job security and certainly the pressure that employers might bring to do more, stand out, even come back to work sooner than you like, these are all potential issues for employees.

Finding some balance and getting away from work is important. I know vacation and holiday is hard in some locations and situations, but it is important. I know I need to take 4-5 more days of holiday this month to meet the 60% guideline Redgate has set for the end of September. I'm not sure I can go anywhere, but if nothing else, I'll just try to do something different around the house. If you have holiday, you should find a way to take it. Even spending a couple days reading a book for enjoyment or cooking a meal for your family, or anything non-work related can be a good break.

I've worked from home for nearly two decades, and overall I love it, but I also like going to see customers, clients, and my co-workers at Redgate. I do hope that we adopt some of the good remote work habits after this pandemic, but I also hope that we go back to some of the older "normal" way of working.

Steve Jones - SSC Editor

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

 
  Featured Contents

Stairway to DAX and Power BI - Level 15: The DAX ALLSELECTED() Function

Bill Pearson from SQLServerCentral

Business Intelligence Architect, Analysis Services Maestro, and author Bill Pearson introduces the DAX ALLSELECTED() function, discussing its syntax, uses and operation. He then provides hands-on exposure to ALLSELECTED(), focusing largely upon its most popular use in supporting “visual totals” in Power BI.

How Do I Know If My Query Is Good Enough for Production?

Additional Articles from Brent Ozar Unlimited Blog

Find out with Brent Ozar.

Using Filters to Fine-tune Redgate Database Deployments

Additional Articles from Redgate

Filters are used by Redgate's SQL Compare, SQL Source Control, DLM Dashboard, and SQL Change Automation. A typical use for a filter is to work on just one schema within a database or just a limited set of tables and routines. You would also want to use a filter to exclude certain object, such as database users, from comparisons. Phil Factor explains how they work, and how to create, edit and then use them within the various Redgate tools.

Free eBook: Understanding SQL Server Concurrency

Press Release from Redgate

When you can’t get to your data because another application has it locked, a thorough knowledge of SQL Server concurrency will give you the confidence to decide what to do.

From the SQL Server Central Blogs - Who is your Fail-Safe Agent??

gbargsley from GarryBargsley

Did you know it is possible for SQL Server Agent to  alert you of problems if something goes haywire with your Agent? Have you ever had an issue with...

From the SQL Server Central Blogs - Recursively Querying Row Groups

Bert Wagner from Bert Wagner

Recursively Querying Related Rows Recursive queries are fun to plan and write. They can be frustrating too depending on the complexity of the problem you are trying to solve....

 

  Question of the Day

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

 

How Many Sales for Each Year?

I have an R dataframe, called Sales. In this I have two columns, denoted Month and Year. I want to get a count for the number of records I have for each year. What expression should I use if I have the dplyr package loaded?

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

 

 

  Yesterday's Question of the Day (by Steve Jones - SSC Editor)

Bypassing Dynamic Data Masking

I am using Dynamic Data Masking to limit access to the last four digits of an ID number for customer service personnel. I want a manager to be able to see the entire field for a table. What permission to do I assign and at what scope?

 

Answer: GRANT the UNMASK permission on the database to the user/role

Explanation: The UNMASK permission is only set at the database level to view the information that is masked. Ref: Dynamic Data Masking - https://docs.microsoft.com/en-us/sql/relational-databases/security/dynamic-data-masking?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 2016 - Administration
Replication gets dropped automatically - I am not sure who or what is doing it but as soon as I setup a snapshot replication and leave it for a day then the other day I find the replication gets dropped completely and I have no clue what process is doing it. I checked agent jobs as well and I couldn't […]
Changing values in Partitioned Key - Hi All One interesting scenario here. We have a partitioned table which is partitioned based on a date column. The clustered Primary key is a composite key with ID+ that Date column. The table also has some 25 non clustered indexes. Now the value of partitioned key (i.e. the date column) might change. So that […]
How to create a role and add data_reader and execute permission on 2 databases - Hi Can someone tell me the easiest way to create a new role (report_user_role)  on 2 databases which gives it the data_reader permissions and execute permissions on 2 databases. I then want to create a new user report_user and assign that role to it so it can read all tables in the 2 databases and […]
SQL Server 2016 - Development and T-SQL
Sum of column from multiplied columns - I would like to get the sum of "Transaction Cost" as created from the multiplication of TxQty and AvgCostOld. Any help would be appreciated. SELECT  Item, TxQty, AvgCostOld,  TxQty*AvgCostOld AS TransactionCost,  TxNumber,  TxDate FROM     tblimInvTxHistory WHERE  TxDate > '2020-08-25' AND         TxCode = 'ADJ'
LEGACY_CARDINALITY_ESTIMATION = ON and COMPATIBILITY_LEVEL - Hi everyone, we migrated from sql 2012 to sql 2016 and since then we have been facing some performance issue. We decided to change the compatibility level to 110 (sql 2012) and set the LEGACY_CARDINALITY_ESTIMATION= ON. It helped but then we were still having performance issues and we switched back to the original configuration. Now, […]
Administration - SQL Server 2014
What is XE_SERVICES_RWLOCK and why am I seeing it so much? - So I've got a new Windows 2016 / SQL 2014 SP3 server that's giving me trouble.  When the issue occurs, the response from the server is extremely slow, up to and including login timeouts when trying to connect to it with SSMS from a workstation. When the problems occur, applications that use the various databases […]
FCI - I have two standalone SQL Server instances. Planning to configure SQL Server FCI between those two instances. Is that possible or I need two nodes without SQL Server on it? Please advise? Thanks in Advance!
SQL 2012 - General
NT authority/system - In our environment someone is using nt authority/system account with sysadmin permission I have checked the logs, event viewer but not able to find how/who assigned this and when Is there a way to find this   Thanks Atulyan
SQL Server 2019 - Development
How to CAST() the value column in a dynamic unpivot - I have a set of data that has multiple different data types including one field that is a nvarchar(max) field. I need to unpivot the data but of course I am getting the pesky error "The type of column "myColumn" conflicts with the type of other columns specified in the UNPIVOT list. I am wondering […]
find group of time - hi all, i have the follwing table : 10 lines i want to show only row after 30 second (should be paramter :)) between them. ( as summery of previous records) on this record set: 2020-08-26 00:00:00.000  --first line bring 2020-08-26 00:00:20.000 -- 30 second not over avoid this record 2020-08-26 00:00:25.000 -- 30 second […]
SQL Server Newbies
SSMS connections to Availability Groups - Hello, I am new to Sql server and have a question on SSMS connecting to AGs. When I connect to the primary node the database has a white circle on it and on the secondary node it has a green arrow. I would think it should be the other way around. Primary should show a […]
Reporting Services
Two Tablix in a report - I have a report that renders two different outputs depending on a parameter(Summary or Detail). I have to add a new column to both reports. When I add a new column, its only adding to the detail report. I can't figure out how to change both. I'm using report manager to do this but could […]
General
GMSA for use on Windows Task Scheduler Job - Hi team, I created a new windows task scheduler job using GMSA. Command was success: $Action = New-ScheduledTaskAction "E:\TEST\DeleteFiles.bat" $Trigger = New-ScheduledTaskTrigger -At 06:00 -Daily $Principal = New-ScheduledTaskPrincipal -UserID DOMAIN\SVCSQL$ -LogonType Password Register-ScheduledTask TestTask –Action $Action –Trigger $Trigger –Principal $Principal The task is just clear any files in a folder, example D:\TEST\ - any files […]
SSDT
How to dynamically create a table in SQL from a Excel file using SSDT - Hi, I am fairly new to SSDT and am looking for some help with loading excel files that I have been provided for a project. The files will all have the consistent file names and consistent tab names but that is where the consistency ends. The tabs can have from 1 to 150 columns  with […]
Integration Services
SSIS Package Slow As Agent Job vs Manual DTexec execution - Hello Folks, I have an SSIS package on a machine(SQL Server 2017, Windows Server 2016) that has user configured variables for table names and exports 3-4 tables from SQL Server database to a flat file and later zip it so essentially it is doing a select * from view (the view in question here is […]
 

 

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

 

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