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

Daily Coping Tip

Share a happy memory or inspiring thought with a loved one

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 Tech of My Youth

I saw a note recently that Panasonic had a data breach.  There was a time I had a number of Panasonic products, from music players to telephones. My wife had them as a client and got a few swag items in the early 2000s. However, I don't often buy electronic appliances, and I haven't seen the Panasonic brand name in some time.

As I approach the end of one year and the beginning of another, I find myself nostalgic for brands that I used to seek out. I read a biography of Akio Morita, founder of Sony a long time ago and I admired their products. At some point, I had a rack of Sony gear in high school, including the double cassette deck. I bought my first TV, a Sony, in college. I can't remember the last time I picked up or used something from them, having moved on to Apple for most of my music needs and Samsung for TVs.

Nokia and Motorola used to be the phones to buy, and they aren't really in today's conversations. Palm Pilot and Blackberry devices were on belts in purses everywhere. Today I know none in use.

Radio Shack was where I shopped regularly for all sorts of parts to fix things. I grew up with an Atari for games, a Commodore 64 for programming, and lots of floppy disks. I remember learning I could punch a hole in a disk case to make it double-sided. I used to drive to Blockbuster when I wanted to see a movie. I wish they had somehow found a way to transition and compete with Netflix.

I used to covet Sun Workstations, a huge company that no longer exists. I bought and assembled quite a few Compaq servers. One of my early jobs had me helping the boss use Alta Vista to search the burgeoning web on Netscape Navigator. For that matter, ESDI, IDE, and SCSI, and even spinning disks are no longer a part of my world.

As I walk down memory lane, I think about this thing that used to sit on my bedside table. From middle school until about 4 or five years ago, I had an "alarm clock" that woke me up in the morning. First no-name analog ones, then Sharp, Sony, and other digital brands. First for paper routes, then school, then work. Now I use a smart watch with a vibrating alarm.

That alarm clock device is one piece of technology my wife is glad doesn't exist anymore.

Steve Jones - SSC Editor

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

 
  Featured Contents
SQLServerCentral Article

Performance Tuning Using Free Tools

Wingenious from SQLServerCentral

You can do essential performance tuning on your SQL Server databases using a FREE toolkit!

SQLServerCentral Article

Editing API Driver API Profiles

JerodJ from SQLServerCentral

RESTful APIs offer a straightforward way for businesses to work with external data and offer access to their own data. With more than 24,000 public APIs providing access to limitless data and the typical enterprise leveraging more than 200 applications, teams and developers need more efficient ways to query API data. With the CData API […]

External Article

Did you know SQL Monitor supports Azure databases, too?

Additional Articles from Redgate

SQL Monitor allows you to bring your whole estate into a single monitoring landscape that has a consistent interface, whether you have an all-Azure environment, or, more likely, a mixed database environment. Find out more, here!

External Article

Connecting to PostgreSQL: Learning PostgreSQL with Grant

Additional Articles from SimpleTalk

Database professionals often work with more than one database platform. Grant Fritchey explains setting up and connecting to PostgreSQL database.

Blog Post

From the SQL Server Central Blogs - SQL Managed Instances – Failing Over

BLOB EATER from All About SQL

This is our current setup shown below. There is not much to failing over with Managed Instances, from experience it is similar to that of Azure SQL Database. Let’s...

Blog Post

From the SQL Server Central Blogs - SQL Server meta-development (with regular expressions and more)

JenMidnightDBA from SQL Awesomesauce

Yesterday, I had about 30 existing queries (and some multi-query processes) that I needed to turn into individual stored procedures. […]
The post SQL Server meta-development (with regular expressions and...

 

  Question of the Day

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

 

Short String Masking

I have a table with a column defined as CHAR(2). I apply the masking default function to this string with the code:
ALTER TABLE dbo.DDMTest ALTER COLUMN shortstring ADD MASKED WITH (FUNCTION='DEFAULT()');
I insert data into this column with:
INSERT DDMTest (shortstring) values ('A');
What value is returned if a user that does not have the UNMASK permission queries this row?

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)

New PoSh variables

I open a brand new PowerShell command shell with Windows 10 defaults and type this:

write-host "Hello, $NewVar World"

What is returned?

Answer: "Hello, World" (2 spaces)

Explanation: A brand new PowerShell shell has no variables in scope. This new variable is declared in this statement with no value, but in this statement returns nothing. The result is "Hello,  World". Ref: PowerShell Variables and Scope - https://itsalljustelectrons.blogspot.com/2021/11/PowerShell-Variables-And.html

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
Job is empty SQL - Hi guys,   I really do not understand why I still receive empty emails. Please check my code:   EXEC msdb.dbo.sp_send_dbmail @profile_name = '#####' , @recipients = 'a###' , @subject = 'queryresultset' , @body= 'test tes tesl' , @execute_query_database = 'dbo.rates' The mail I get is:      
SQL Server 2016 - Administration
External process holding the log and SQL give 'Unable to cycle error log'... - Hello We have a servers with the following issue Msg 17049, Level 16, State 1, Procedure sp_cycle_errorlog, Line 9 Unable to cycle error log file from 'D:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log\ERRORLOG.98' to 'D:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log\ERRORLOG.99' due to OS error '5(Access is denied.)'. A process outside of SQL Server may be preventing SQL Server from reading […]
Development - SQL Server 2014
T SQL to build complicated time series data - I have a database full of financial time series data like Symbol, Date, Price, Volume AAPL, 05/25/2020,150.10, 546285467 AAPL, 05/26/2020,153.34, 465055454 MSFT, 05/25/2020,100.10, 746285467 MSFT, 05/26/2020,103.34, 865055454 GOLD, 05/25/2020,2000.10, 450285467 GOLD 05/26/2020,20010.50, 350055454 etc Many symbols. Lets say I had an INPUT BOX on a client asp.net form that said this. ((Symbol1 - Symbol2)/1000)*Symbol3 The […]
SQL 2012 - General
Install issue on new machine - Hello I am having an issue install SQL Express 2012 on a new PC. I am getting an error about Cannot use file 'master.mdf' because it was originally formatted with sector size 4096 and is now on a volume with sector size 16384.   Is there a work around for this?
Azure SQL backup policy strategies and best practices? - What are best practices for setting up long term retention for an Azure SQL DB? Are there any common strategies to keep the costs low? How should one go about implementing it for keeping 10 year backups. When I select weekly snapshots for 10 years, the cost is going through the roof (3.5x the cost […]
SQL Server 2012 - T-SQL
Problem understanding SUM function with GROUP BY - I have code I'm trying to write to sum the time in decimal for each user_name: SELECT [user_name], dbo.fnGetDecimalTime([event_sec]) as 'Decimal_Time', SUM(dbo.fnGetDecimalTime([event_sec])) as 'Decimal_Time_SUM' FROM [Charter].[dbo].[ConvoHrs] group by [user_name], [event_sec] order by [user_name], [event_sec] desc But my data comes back looking like this: user_name Decimal_Time Decimal_Time_SUM (b) Alexander Pierson     2.00 2.00 (b) Alexander Pierson  […]
Problem understanding SUM function with GROUP BY - I have code I'm trying to write to sum the time in decimal for each user_name: SELECT [user_name], dbo.fnGetDecimalTime([event_sec]) as 'Decimal_Time', SUM(dbo.fnGetDecimalTime([event_sec])) as 'Decimal_Time_SUM' FROM [Charter].[dbo].[ConvoHrs] group by [user_name], [event_sec] order by [user_name], [event_sec] desc But my data comes back looking like this:
SQL Server 2019 - Development
Split a given number in Percentages and round to integer - Hi ,I would like to split a given number into 3 numbers based on a percentage(98.6% , 1.2%  and 0.2%) and round it to an integer value and the sum of 3 numbers should equal to the given number For example a given number is 300 or 120, for the given number 300,  I would […]
PowerShell Script output - I have a power shell sql script that works as I desire except the top line of the excel (csv file it creates) is not desired. The csv file created is used as a source file for another system - I need to eliminate the Power Shell Dialogue in first row Here's the script: # […]
Issue with Case statement - i have a table where i have mix and match records under statement column. i am trying to filter based on case statement.. but unavailable to figure out how to keep declare logic when condition is met. IINSERT INTO [dbo].[At] [statement]) Select CASE WHEN Statement like '%from%' AND Statement like '%Where%' AND Statement not like […]
Extracting out elements from XML String based on condition in tag - Hi there I am trying to the Channel list from a particular XML file  in lines 868 - 872 (Instrumental Channel List) Now i tried the following DECLARE @DataSheetXML XML -- Extract Datasheet, so that Probe Definition and Channel List can be extractted SELECT @DataSheetXML = DataSheetXML from [#DeviceMasterList] SELECT pd.a.value('let $a := . return […]
General Cloud Computing Questions
Recommended course with lab for Kubernetes CKA cert - Im a DevOps and cloud engineer and want to learn kubernetes because most opportunities that I come across are requiring experience with it. I know linux and have a solid and useful understanding of containers. Moreover, I have experience with Docker, bash, Python and Powershell. That said, I'm more of a hands on learner but […]
Reporting Services
Remove Extra Print Dialog Box 2016? - In SSRS 2016, microsoft added a "feature"  where a dialog creates a printer friendly PDF version of a report; which then sends that version to your normal windows printer.. and on top of that if you have a PDF reader installed it also pops up another window for you to preview it.. I'm not sure […]
Dynamic Parameter-Defaultvalues not working when using custom assemblys - Hi Everyone, My Reports are using Assemblies, for translation and for some Navigation-tasks. I’ve declared them in ‘References’ and create instances of them via Code. For that I’m using a Parameter @Languagecode to set the Target-Language. That all works perfectly, and here is my Code for that: Public Translation As Resources.ResourceProvider Protected Overrides Sub OnInit() […]
Powershell
List file shares from TAR file - How can I list just the directories from a TAR file, then extract just 1 file share from that TAR file. Thanks.
 

 

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

 

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