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

Daily Coping Tip

Explore the local area today, seeing something new

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.

The Gift of Asking Dumb Questions

I am a fan of teaching someone to fish, rather than giving them fish. But when teaching someone, we want to allow them to make mistakes and not just dictate how they work. I want them to learn how to solve problems themselves, gain knowledge and improve skills.

I was watching some of the Pluralsight Tech Skills day recently and in the Scott Hanselman interview, I really appreciated his answer on how to approach a problem. He talks about asking bisection questions at scale, asking lots of yes/no or querying questions that lead you towards the solution.

From here, he notes that experienced or senior developers often know the questions to ask because of their past. For junior developers, they need to be encouraged to ask questions and solve problems. However, they need to be able to do this safely, meaning that we encourage and help lead them to answers without berating them for asking questions.

This is one of the things we've tried to do at SQLServerCentral. We have a few guidance articles (etiquette and examples) on how to post a question, but often we ask people what they've tried, what works, what results they get, and try to help them find answers. Not all of us, and I do see too often someone posting code as a solution without explaining or helping someone learn, but it's less often than I see a response trying to help someone learn and think.

I've always disliked the RTFM answers I see on the Internet, but I really hate seeing this inside an organization. I get that some people will take advantage of others and avoid work, but often someone wants to learn. I do think that it's good to allow someone to ask about a topic once or twice, or even about how to learn. Give them ideas, and remind them to put forth some effort, but don't automatically discourage questions.

Like Scott Hanselman, I had the gift of being able to ask stupid and silly questions. While I was sometimes abused for these, most of the time someone helped me increase my knowledge. I haven't always been a good listener for others' questions, but I have been working on being more patient and understanding with others. I've also started to appreciate how hard it can be to search out some answers, so I remember that when I see the same question again and again from different people. They're all trying to learn and I want to give them the gift of being able to ask questions, no matter how simple they might seem to me.

Steve Jones - SSC Editor

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

 
 Featured Contents

SQL Server Integrates Hadoop and Spark out-of-the box: The Why?

Frank A. Banin from SQLServerCentral

Why has Microsoft added new capabilities in SQL Server to connect to other types of data sources? Read on to learn more.

SQL Server T-SQL CASE Statement Examples

Additional Articles from MSSQLTips.com

This tip will teach you when and how you can use CASE in T-SQL statements with several code examples to give you a better understanding.

Data Saturday #8 - SouthWest US

Steve Jones - SSC Editor from SQLServerCentral

This Data Saturday Event is being jointly developed by the Albuquerque Data Platform Users Group, Arizona Data Platform Users Group, and the Santa Fe Data Platform Users Groups. This event will include sessions on many Microsoft Data Platform related topics. Join us on May 15, 2021.

Your Top 10 Ideas for SQL Server

Additional Articles from Brent Ozar Unlimited Blog

You’ve submitted thousands of bug reports and feature requests at feedback.azure.com. Brent Ozar goes through what you’ve voted as the top 10 requests right now.

From the SQL Server Central Blogs - Static Code Analysis Feedback for Operations with SQL Monitor

Steve Jones - SSC Editor from The Voice of the DBA

One of the challenges with managing a production database is that the code that gets deployed sometimes causes lots of problems. Often a production DBA or sysadmin gets called...

From the SQL Server Central Blogs - Query Store on Azure SQL Database

Grant Fritchey from The Scary DBA

Under the covers, Azure SQL Database is just good old fashioned SQL Server and this includes Query Store on Azure. While many things can be different when working with...

 

 Question of the Day

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

 

Container Logs

I ran a Docker container for SQL Server 2017, but it stopped quickly after the command completed. How can I get the logs of what happened during the container startup?  

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)

A Scope Question

If I have this code, what is printed out?

temp = 10

def func():
    global temp
    temp = 20

func()  
print(temp)

 

Answer: 20

Explanation: The global keyword defining the variable inside the function links this variable to the one declared in the outer program. Ref: What are the rules for local and global variables in Python? - https://docs.python.org/3/faq/programming.html#what-are-the-rules-for-local-and-global-variables-in-python

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 - Development and T-SQL
Comma separated value string and compare against other values - Hey all I have been trying to wrap my head around how to go about doing this for a while now and I'm not really coming up with anything. Here is my query: DECLARE @ATID AS VARCHAR(3) = 12 DECLARE @AssetID AS VARCHAR(7) = 306 SELECT tblXDataA.AssetID AS 'LID', tblA.AssetID AS 'AID', tblEM.[Custom] AS 'ABC/S […]
Development - SQL Server 2014
Between dates SQL help needed - Hi, I required duplicate values in the below table For e.g  staff date 10192 first record To date is between the second record's From date and To Date
SQL 2012 - General
SQL 2012 Standard - Index highly fragmented - Hi there, Complete newb.  Need some guidance. Running SQL 2012, running INFOR ERP.  Indexes are constantly fragmented... it's like whack a mole.  Server is set to index nightly but sometimes, queries run slow and we have to re-index on the spot.  Once re-index, back SQL queries are back to normal.  Can anyone provide me with […]
SQL Server 2019 - Administration
Azure SQL Database and SQL Managed Instance Security Best Practices - Hello, I have 7 different SQL Managed Instances which were newly migrated over from SQL VM. I also have 7 different Azure SQL Databases which were also newly created. I want to make sure that I completely secure all my SQL MI and Azure SQL to eliminate any security vulnerabilities and also avoid any SQL […]
Export encryption keys to SQL 2019 from MySQL - Hi My customer is migrating from MySQL to SQL 2019 using SSMA, thier current MySQL uses PHP and encrypts columns within a few tables, is there a way to get this decrypted or the key copied over to SQL Server. I have not done an MySQL to SQL migration before the reason for the question. […]
Retrieve Encrypted data from SQL in MS Excel - Hi I have a customer who has an SQL database and would like to encrypt columns i.e bank details. but they want to retrieve the data using Excel. Is this possible? I cannot find any articles to support this. Thanks in Advance Regards Raxs01
sql login schema instead of dbo schema - Hello, In SQL server, when running select into statement for creating an object, the object is being creating with schema with my sql login ([Domain_Name]\[Sql_Login]) instead of dbo schema. When I use select * into dbo.table_name, the object is being creating with dbo schema, but it is a bit annoying to have to use dbo […]
SQL Server 2019 container kubernetes - Hi everyone, can anyone tell me, if the sql server 2019 is ready for container and is there an official image for kubernetes? My colleague told me, he was not able to find an image for 2019, only for 2017. thanks a lot, stay healthy, Andreas
SQL Server 2019 - Development
Removing prefix and suffix from a column - Hi I have a table with a could that has over 3000 rows for employees name, in some of the rows there is names 'ZZZ Atkin (left)' How can I remove prefix starting with ZZZ and suffix with (left)? Regards Raxso
Reporting Services
SSRS - exporting to csv issue - I have an SSRS report and have a field called "Ticket". "Ticket" is a VARCHAR(20) field and in my clients DB, they have a "Ticket" value of "00000000007" for example. I created an expression as such for this field in my report: =CStr(Fields!Ticket.Value) I preview my report and it previews the value as I want. […]
ssrs function code to get value from dataset - Hello, hopefully this makes sense, but i am a little familiar using SSRS function code to grab build in variables like date or page number and use them from header to body, BUT, now i want to be able to use something that is from the body, into the header... but not sure how to […]
General
Linux data and index files - Hi Does anyone know where the data and index files are stored on a Linux server? I want to extract the data from a linux database and store it in sql server. Thanks in advance
Integration Services
Failed Because Truncation Occurred - Dear Group: I am getting the following error on my SSIS import process. "Workbook.Outputs[Excel Source Output].Columns[XYZ]" failed because truncation occurred, and the truncation row disposition on "Workbook.Outputs[Excel Source Output].Columns[XYZ]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component." I understand the issue relates to the column XYZ being […]
Manual tasks in SSIS design - Hi, I am getting CSV files with hundreds of columns many of which have irregular characters in the column names, such as |, " ",  -, /, etc.  I've created table by manually importing the file, which renamed those columns in the table nicely by removing the character and replacing some of them with underscore.  […]
Loading a csv file into sql server table - Hi, I've created a simple dataflow with flat file source and sql server destination. I am getting the following error messages: [MyDB MyTable table [2]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80040E14 Description: […]
 

 

RSS FeedTwitter

This email has been sent to {email}. 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

 

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