SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

Featured Script

The Voice of the DBA

The Pressure to Perform

I've worked as a technical person for most of career. I've often been responsible for building or managing systems, and ensuring they operated according to some set of requirements. If things didn't work, I'd have to fix them, but often there wasn't the threat of losing employment unless I was grossly incompetent. If I made a strong effort, I'd get other another chance, or maybe be shuffled to work on some other application or system.

Throughout my career, I have worked with various salespeople in different companies. Either they were my customers/clients or they were just co-workers. However, they operated under a different mindset. Most salespeople are expected to make a certain amount of sales in a time period, and if they don't, they may be let go. In fact, in quite a few companies, a salesperson couldn't miss their target more than two time periods in a row without finding themselves out of a job.

I realize that sales isn't like the creative work that developers do, or the tedious work of managing systems, but what if we were treated like salespeople? Do you think you'd want to work in an environment where you had some quantifiable measurement, such as uptime for a quarter, plus tickets closed, and if you couldn't meet the goals, you'd be let go from your DBA position?

Imagine if you were a developer. You might have the demand that you meet the expectations for delivery and you are held accountable for estimates within some amount of variance. Perhaps as a developer there would be a requirement to complete xx amount of stories in some time period. I don't this would work well. I think we'd try to make longer estimates and more granular stories to better define out work, but I'd also expect the business might press back and put more pressure on us.

In plenty of organizations, there are these pressures. I certainly see developers working harder to get things done, not because of the threat of their job, but because many of us that choose technical work feel a sense of pride and responsibility in the work we do. We work long hours to meet deadlines, sometimes because we're afraid not to, but usually we do want to complete our projects in the best way we can.

I think we'd all be worse if we were treated like salespeople, and likely many of us would have more job changes. I also think our organizations would suffer more, with higher turnover and a lack of detailed institutional knowledge among those that build systems. Certainly some high performers might thrive, especially if we received large bonuses, like salespeople often do, but I also think we'd find shoddier work overall, with applications even more cobbled together with patches and prayers, with the hopes that our workload doesn't overwhelm our systems.

I know I wouldn't like working in that type of environment, and why I'm not sure I'd ever want to go into any sales role.

Steve Jones from SQLServerCentral.com

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

ADVERTISEMENT
3T

Have you got NoSQL fingers?

No, thought not. Writing and tuning queries in JSON is a short-cut to repetitive strain injury. But with Studio 3T - the IDE for MongoDB - you can manage MongoDB directly with SQL queries. Join the accuracy of SQL to the speed of NoSQL. Get me my free 14-day trial. Get a free 14-day trial

Redgate Hub

Register now for SQL in the City Streamed

Redgate’s popular SQL in the City Streamed virtual event takes place again this December. Wherever you are, tune in on Wednesday December 13 to watch some of the best-known speakers from the database world present the latest technologies and tools from Redgate. Register free now

Featured Contents

 

Stairway to MDX - Level 3: The Order() Function

Bill Pearson from SQLServerCentral.com

The Order() function provides the 'hierarchized' sorts you need for reports and applications using MDX. In this Step, Business Intelligence Architect Bill Pearson explores using the versatile Order() function for providing dataset sorts that respect dimensional hierarchies. More »


 

Free eBook: Fundamentals of SQL Server 2012 Replication

Press Release from Redgate

Fundamentals of SQL Server 2012 Replication provides a hands-on introduction to SQL Server replication. The book introduces you to the technologies that make up replication, and then walks you through setting up different replication scenarios. When you've finished reading, you should be able to implement your own multi-server replication setup while following the principle of least privilege. More »


 

SQL Source Control v6 now supports SQL Server 2017, SQL Graph, and TFS 2018

SQL Server 2017 went on general release a couple of weeks ago and the latest version of SQL Source Control offers full support, as well as support for Team Foundation Server (TFS) 2018. This brings a whole host of benefits and opens up cross-platform workflows, encompassing both on-premises and cloud, through connections to SQL Server instances on Linux and Azure Active Directory authentication. More »


 

Dynamic Data Masking on Azure SQL Database

Additional Articles from Database Journal

Azure SQL Database’s Dynamic Data Masking (DDM) feature limits the exposure of sensitive information to non-privileged users. DDM can mask either the full value or partial value in a column. This method can also mask Social Security and Credit Card Numbers without making any changes to the application. More »


 

From the SQLServerCentral Blogs - Using Plaster To Create a New PowerShell Module

Rob Sewell from SQLServerCentral Blogs

Chrissy, CK and I presented a pre-con at PASS Summit in Seattle last week Tracey Boggiano T | B came along to our... More »


 

From the SQLServerCentral Blogs - Finding Input Parameters in an Execution Plan

Dharmendra Keshari from SQLServerCentral Blogs

The query execution plan is a map of work which SQL Server is going to perform to execute a query.... More »

Question of the Day

Today's Question (by Steve Jones):

I have this code, which creates two variables

 a <- array(1:12, dim = c(3, 4)) b <- 1:12 

This gives me a matrix and a vector, as seen here:

 > a [,1] [,2] [,3] [,4] [1,] 1 4 7 10 [2,] 2 5 8 11 [3,] 3 6 9 12 > b [1] 1 2 3 4 5 6 7 8 9 10 11 12 

If I run this, what happens?

 a == b 

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


We keep track of your score to give you bragging rights against your peers.
This question is worth 1 point in this category: R Language.

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

Design and configure SQL Server instances and databases in support of high-throughput applications that are mission-critical and provide consistent response times in the face of variations in user numbers and query volumes. Learn to configure SQL Server and design your databases to support a given instance and workload.

Pick up your copy of this great book today at Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Thomas Franz):

What will the following query return:

 SELECT CHECKSUM(x) chk_x, CHECKSUM(y) chk_y, CHECKSUM(z) chk_z FROM (VALUES (CAST(NULL AS INT), CAST(NULL AS VARCHAR(10)), CAST(NULL AS DATETIME)) ) sub (x, y, z)

Answer: three times the same value

Explanation:

The CHECKSUM() OR BINARY_CHECKSUM() function ignores the datatype of NULL values, so the statement returns 2147483647 for all 3 columns.


» Discuss this question and answer on the forums

Featured Script

Read Only access to all databases to a user in a SQL Server Instance

Gaurav Deep Juneja from SQLServerCentral.com

-----------------------------------------------------------------------------------------------------------------------------
--Script to grant a user read-only access to all the databases at on go in a SQL Server instance except the system databases and 
-- the Log shipped databases(secondary :read-only)
--- Created by : Gaurav Deep Singh Juneja
-----------------------------------------------------------------------------------------------------------------------------
--STEP 1 : Create the Login(Windows or SQL) which needs the db_datareader access. ( 
--For ex: -
-----------------------------------------------------------------
--create login [doamin\username] from windows;
--create login [username] with password='######' ,CHECK_EXPIRATION = OFF,  CHECK_POLICY = OFF;  
--Step 2:  Replace the user with the one that requires access in Set @user in parameters below
USE master
GO
DECLARE @DatabaseName NVARCHAR(100)   
DECLARE @SQL NVARCHAR(max)
DECLARE @User VARCHAR(64)
SET @User = '[username]' –-Replace Your User here
PRINT 'The following user has been selected to have read-only access on all user databases except system databases and log shipped databases:  ' +@user
DECLARE Grant_Permission CURSOR LOCAL FOR
SELECT name FROM sys.databases
WHERE name NOT IN ('master','model','msdb','tempdb','distribution')  
and [state_desc]='ONLINE' and  [is_read_only] <> 1 order by name
OPEN Grant_Permission  
FETCH NEXT FROM Grant_Permission INTO @DatabaseName  
WHILE @@FETCH_STATUS = 0  
BEGIN  
SELECT @SQL = 'USE '+ '[' + @DatabaseName + ']' +'; '+ 'CREATE USER ' + @User + 
    'FOR LOGIN ' + @User + '; EXEC sp_addrolemember N''db_datareader'', 
    ' + @User + '';
PRINT @SQL
EXEC sp_executesql @SQL
Print ''-- This is to give a line space between two databases execute prints.
FETCH NEXT FROM Grant_Permission INTO @DatabaseName  
  
END  
CLOSE Grant_Permission  
DEALLOCATE Grant_Permission
----------------------------Script end-------------------------------------------

More »

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 : SQL Server 2017 - Administration

Amount of RAM in server - Just curious  - how much RAM do you have in your SQL server?

Why dbid is 1 for master, 2 for tempdb, 3 for model and 4 for msdb? - Hi Is there any reason why the below DBid order is maintained? Master - 1 TempDB - 2 Model - 3 MSDB - 4

Installation issues on Windows Server 2016 - Hi. I'm hoping this is an easy fix for somebody as I've spent a while on this today. I'm trying...


SQL Server 2016 : SQL Server 2016 - Administration

AlwaysOn Sync history - In SQL 2005, in the Database Mirroring monitor you could go into the sync history for each database and it...

Migrate SQL Server to new server - Hello All, I would like to upgrade my SQL Server 2012 to SQL Server 2016. I created new machine and i would...


SQL Server 2016 : SQL Server 2016 - Development and T-SQL

how optimize update query which has column store index on all coumn and one non clustered index on the same column - Hi Champs, I have  an update query  for record which has around 50 crores of data , and  full table(120 columns) having...

Date Ranges - Simple, but seemingly impossible - Hi all, I've done a lot of research and tried so many things for around a week. I'm desperate at this...


SQL Server 2014 : Administration - SQL Server 2014

monitor when files get to 80% - is there an easy way to monitor and alert when mdf ndf and ldf reach 80% capacity

Cluster Behaviour - Hi Experts, We have a 2 Node Active \Active Cluster of BizTalk and 2 Node Active\Passive cluster for Application. The Second...


SQL Server 2014 : Development - SQL Server 2014

A different end table by parameter - Hi guys, I have loads of stored procs that gather data but need an option to be inserted into different tables. Basically...


SQL Server 2012 : SQL Server 2012 - T-SQL

Force execution plan in a view - I'm having an issue right now. We removed an identity column that is mostly irrelevant to a table. However, this...

Add New Column Based on Criteria - Hello,  I have: select * from #test_table INSERT INTO #test_table (, , , , , , ) VALUES ('2016-11-01 00:00:00.000', 'voucher', 10, 'up', 22,...

Search with Date Range - Hello, I have create table #test_table ( datetime, nvarchar(255), float, nvarchar(255), float, float, URL nvarchar(255) ) INSERT INTO...


SQL Server 2008 : SQL Server 2008 - General

Updating stats make things worse - We have an older 2008 R2 Standard server that has been migrated to SQL 2012 Enterprise. There was very little...

Cumulative subtraction - Hi, Col1  10 20 30 40 Need output like this  10-0=10 20-10=10 30-10=20 40-20=20 Output: Col1 10 10 20 20

Job Email Notification Failure - Hi, We have successfully configured Database Mail SQL Server 2008 Enterprise Edition and also its working fine. But when I tried...


SQL Server 2008 : Working with Oracle

Tabularize Oracle Results - Hi All, I haven't posted here in years so that means I'm a bit rusted. This time around I have an Oracle...


Data Warehousing : Integration Services

Excel drivers for ssis package - Hi, I am trying to connect to excel source but its throwing connection error. After googling it suggested  my system might...


Data Warehousing : Strategies and Ideas

Good to have Multiple Data Warehouses? - Interesting debate came up on data warehousing. Is it good to have multiple data warehouses or just one? To add some...


SQL Server 2005 : Development

BCP Trigger Hangs up Insert Statement - Hi All, I have an issue where I am trying to create a trigger that will output a single row to...

This email has been sent to [email protected]. To be removed from this list, please click here.
If you have any problems leaving the list, please contact the [email protected].
This newsletter was sent to you because you signed up at SQLServerCentral.com.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2017 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: [email protected]