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

Daily Coping Tip

Hand-write a note to someone you love and send them a photo of it

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.

Investing in Speed

While most of us might not want to start our own company (or maybe we do), we can learn a few things from those that do. Building something new, being efficient, effective, and quick are skills needed when starting a company. I've read a lot about how companies are built and entrepreneurs work. Lately I ran across some advice from Daniel Gross, the founder of Pioneer, a former partner at Y-Combinator (from David Perell).

Many of us are financially careful. We often are careful with how and where we spend money at home. I find lots of tech professionals frugal at work as well, often being careful with their budgets, or even with the requests they make of managers. That being said, here is a great quote:

"Overbearing frugality prevented me from spending any money, which creates inefficiencies. Spend like a king on speed, like a pauper on everything else. Faster computer? Go. Faster Internet? Go. Better sleep? Go. Expensive dinner? Stop. Expensive dinner to close a candidate? Go. If you can, use your capital to move faster. Your competitor is taking the shorter flight. Book it."

Often I see companies get caught up spending or not spending based on some ideas that don't have anything to do with efficiency. They don't invest in things that improve the business, but invest in things they like, or avoid things they don't like. I see this with choices as well, where a professional or manager may want to change a tool/platform/etc. because they like one over the other. Often without any good fundamental reason.

Spending money isn't bad if you are investing in driving your business forward. Learn to make that distinction and don't be afraid of making good investments. It's fine to indulge in anything, but in moderation. That might be the key to success for many hings in life.

Steve Jones - SSC Editor

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

 
 Featured Contents

Stairway Level 2 : Restore a Backup of a TDE Database to Another Server

VishnuGupthanSQLPowershellDBA from SQLServerCentral

In Level 1 of this Stairway, we discussed how to configure TDE in a user database using a Database Master Key and Certificate. In this level, we explain the steps for backing up and securing this certificate, as well as how to restore the database on another server instance. Backup the Certificate and Private Key […]

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.

From the SQL Server Central Blogs - Query Acceleration for ADLS

James Serra from James Serra's Blog

Just announced is Query Acceleration for Azure Data Lake Storage Gen2 (ADLS) as well as Blob Storage. This is a new capability for ADLS that enables applications and analytics...

From the SQL Server Central Blogs - ASF 031: Paul Andrew interview

KamilN78 from SQL Player Blog

Introduction Paul Andrew. Principal consultant and architect at Altius specialising in big data solutions on the Microsoft Azure cloud platform. Data engineering competencies include Azure Data Factory, Data Lake,...

 

 Question of the Day

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

 

Describe One Column

I have this dataframe in Python:
sales.head()
DateDayMonthYearCustomer_AgeAge_GroupCustomer_GenderCountryStateProduct_CategorySub_CategoryProductOrder_QuantityUnit_CostUnit_PriceProfitCostRevenue
02013-11-2626November201319Youth (<25)MCanadaBritish ColumbiaAccessoriesBike RacksHitch Rack - 4-Bike845120590360950
12015-11-2626November201519Youth (<25)MCanadaBritish ColumbiaAccessoriesBike RacksHitch Rack - 4-Bike845120590360950
22014-03-2323March201449Adults (35-64)MAustraliaNew South WalesAccessoriesBike RacksHitch Rack - 4-Bike2345120136610352401
32016-03-2323March201649Adults (35-64)MAustraliaNew South WalesAccessoriesBike RacksHitch Rack - 4-Bike204512011889002088
42014-05-1515May201447Adults (35-64)FAustraliaNew South WalesAccessoriesBike RacksHitch Rack - 4-Bike445120238180418
I want to get some statistical analysis on just the Unit_Cost column with the count, mean,min, max, etc. How should I do this?

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)

More Binary CASTing

I have a password for Zoom that I want to encode and send to certain users to limit the chance of unauthorized users joining our meeting. The password from Zoom is a number, in this case, I see this in my control panel for the password: 027489

How should I change this to binary encoding?

Answer: CAST('027489' AS VARBINARY(MAX))

Explanation: In order to ensure the leading zero, this "number" must be cast as a string first. This shows the issues using just numbers: cast number v cast string as binary Ref: CAST and CONVERT - https://docs.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-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 - Administration
Support removing a RID lookup | Different execution plan between environments - Hey all, We've made some optimization to this view and the indexing. Actually had it running quite well as of the last several weeks. As of these past couple days, the query is taking far too long to return a full data set. I can do a select * from my local 2017 instance, in […]
SQL Server 2016 - Administration
Always on automatic fail-over SQL 2016 Standard edition supports it ? - quick question? Always on SQL WSFC configuration , automatic fail-over SQL 2016 Standard edition supports it ? I know enterprise supports it.
SQL Server 2016 - Development and T-SQL
Strange Attachment Corruption for Database Mail - I wrote a SPROC to email some data. CSV file, single data string column. Between 100KB and 5MB in size Started with a Query Attachment. Opened attachment from the email and saw that after a few thousand rows, the data corrupted. Next I tried using BCP to create the file, then get Database Mail to […]
Administration - SQL Server 2014
CMEMTHREAD Waits - There seems to be very little information around this wait type, besides the basic description, there's almost nothing about what actually causes it, and what can be done to resolve/reduce it. The server is SQL Server 2014 SP3 CU4, Enterprise Edition, and has 32 cores (possibly hyperthreaded, but I think not) and 265GB RAM, and […]
Number of TempDB Files over 8 - OK, before everyone jumps on me and tells me this is settled... I have a client where the application vendor and SQL System Admin are insisting that having more than 8 TempDB files is recommended. In the DBAs words "Microsoft recommend up to 8 unless you make heavy use of TempDB". Well they have […]
Development - SQL Server 2014
Import a text file into SQL Server table without BULK insert due to special char - We currently have a process to import a text file from a customer that uses BULK insert but it is now crashing due to special characters (Ñ, Ã). , in the file.  Is there another way to get the text file into  a table  without  BULK  insert/BCP  since  this  runs  in  a nightly  batch  process?  […]
SQL 2012 - General
T-sql Syntax help needed - Question: I want to create a sequential rank. Run the code and you will understand what I mean. I need baby5 and baby6 get a 2  and so on. The idea is  if we have 8 people with 1oo score all of them get a 1 Then the 2 folks with 98 get a 2 […]
SQL Server 2019 - Administration
Table, Stored Proc, DB Last Used Date? - Has it become any easier in recent releases to see when a table, stored procedure, database was last used ? I have been working on the IMBi recently, and each object has a Last Used date in the description, so it's just a couple of clicks to get the information. We have SQL 2019 on […]
Looking for the cmd to Recompile ALL procs across ALL DBs on a single SQL Server - This command will update ALL stats on ALL DBs on a single SQL Server: exec sp_MSForEachDB 'use ?; if DB_ID(''?'') > 4 exec sp_updatestats;' I'm looking for a similar, powerful command to RECOMPILE ALL procs across ALL DB's on a single SQL Server.  I know this cmd recompiles ALL procs for 1 DB: USE [myDatabase]; […]
SQL Server 2019 - Development
2 questions - Hi Eeveryone. I have a pretty simple test to do, just want to make sure i got it right! Attaching the test with my results, please confirm that i have it correctly! THANK YOU!     Given you have 2 tables Students: contain the details for the student in the University StudentID StudentName StudentStatus Registrations: […]
SQL Server 2008 - General
OVER() and NULL values - The column [hrsfacil] contains many NULL values, still the sum of [hrsfacil] is correct using the OVER clause. Why don't I need to use ISNULL(hrsfacil,0) ? Cheers, Julian SUM([hrsfacil]) OVER() AS Facil
Powershell
Cleanup Sysmail -items from msdb - I took over a SQL instance that never did a cleanup of MSDB. The SysmailItems has close to 25gig of space used storing old email attachments. I know there is a system SP that does a cleanup using begin date \end date. I was looking for a wrapper using PS that would delete 10,000 records […]
Security and Auditing
Audit who (account) stopped or started SQL services (Agent/MSSQL) - Dears, The only way I've found up until today is to audit this externally on Windows level. But I'd like to do this within SQL. I cannot find anything in the default trace that explains who did it, nor in the sql errorlog. So I'm a bit stuck here; Anybody ever set this up? Thanks, […]
SQLServerCentral.com Website Issues
Lack Of User Options - If there are any settings or options a user can make to the forums I can't find them. If there are and I'm just not seeing them please point out how to access them. I'm looking for options that allow those with visual issues to change things like color and contrast to make it easier […]
COVID-19 Pandemic
Daily Coping 13 May 2020 - Today’s tip is to be grateful for the little things, even in difficult times. My thoughts: http://voiceofthedba.com/2020/05/13/daily-coping-13-may-2020/
 

 

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

 

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