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

Planning for a Bad Day

Are you ready to get a new job? I'm not talking about you deciding you want a new job and working towards that goal, but rather getting surprised by a layoff or termination today. If your boss called you into his/her office in the next 10 minutes and told you that you were being terminated today, are you ready for that? Kendra Little wrote a nice post recently asking who might be prepared.

Most of us aren't. In fact, in my branding presentation, one of my slides has a screenshot of a post from LinkedIn. A friend noted that they walked into work and found out his company had been purchased. It wasn't a good day because they were also notified they were being laid off, hence the post on LinkedIn letting others know of their need to find one.

The modern work world, especially for technology workers, isn't stable and certain. While we have lots of positives in our jobs (work environment, low physical needs, remote possibilities, etc.), many of those can be detractions. Outsourcing IT jobs is something many companies do, and whether it's a good idea for the company or not, it's a reality. We also have lots of acquisitions in different spaces, and when sets of IT groups come together, there isn't always the need to keep everyone employed. Even with double the workload, many in management would rather save money and give more responsibility to fewer people.

Side note, this is one reason a good knowledge of DevOps, ITOps, GitOps, etc. is valuable for your career. When a manager is trying to decide who to keep, those with these skills may stand out.

Unless you are ready to retire and merely padding your assets, you ought to have a plan for changing jobs. Even if you like your job, circumstances might force that upon you and when lots of people are scrambling for new jobs, competition can be fierce. Like Kendra, I don't know you need a detailed plan, but documenting some skills growth and keeping your resume or CV up to date is always a good idea. I recommend everyone touch their resume every quarter. At least spend 5 minutes looking over it and thinking about it.

Kendra has other suggestions, and I like them. In fact, I'm looking to think about a few of these. Not that I want another job, but you never know what might happen, and I'm not that close to retirement. Close, but not close enough. Certainly thinking through a few options at a high level is something I want to do with my wife.

And make sure my resume is up to date.

Steve Jones - SSC Editor

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

 
  Featured Contents
SQLServerCentral Article

Unpivot Data Using Python

Sukanya Konatam from SQLServerCentral

This article looks at manipulating data using Python to unpivot data received in a cross tab format.

External Article

Searching Flyway Migration Files using Grep and Regex

Additional Articles from Redgate

This article demonstrates a cross-RDBMS way of searching through a set of SQL migration files, in the right order, to get a narrative summary of what changes were made, or will be made, to one or more of the tables or routines within each migration file. Getting these summary reports, even from a set of SQL migrations, isn't difficult, but having a few examples makes it a lot quicker to get started.

External Article

Understanding Power BI Security Options - Row-Level, Column-Level and Object-Level Security

Additional Articles from MSSQLTips.com

Microsoft Power BI is an interactive data visualization tool primarily designed with business intelligence in mind. Apart from being a visualization tool, it also has some built-in security features that we will discuss in this article.

Blog Post

From the SQL Server Central Blogs - Twenty Years as a Guardian ad Litem

Tracy Boggiano from Database Superhero’s Blog

Twenty years ago, I stood in a courtroom and took an oath for a volunteer job I had no idea I would fall so much
The post Twenty Years as...

Blog Post

From the SQL Server Central Blogs - The New Redgate Office in Cambridge

Steve Jones - SSC Editor from The Voice of the DBA

I’m in Cambridge, UK this week for the internal Global Marketing Week and Level Up Conference. This is my first visit to Cambridge in 2023, and we have a...

Practical Database Auditing for Microsoft SQL Server and Azure SQL

Practical Database Auditing for Microsoft SQL Server and Azure SQL: Troubleshooting, Regulatory Compliance, and Governance

Site Owners from SQLServerCentral

Know how to track changes and key events in your SQL Server databases in support of application troubleshooting, regulatory compliance, and governance. This book shows how to use key features in SQL Server ,such as SQL Server Audit and Extended Events, to track schema changes, permission changes, and changes to your data. You’ll even learn how to track queries run against specific tables in a database. ss

 

  Question of the Day

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

 

Missing Chinese Surnames

I have some code I used for testing some non-Latin data:
CREATE TABLE dbo.CustomerFromChina ( customerid INT NOT NULL CONSTRAINT CustomerFromChinaPK PRIMARY KEY , customersurname nvarchar(100) ) GO INSERT dbo.CustomerFromChina (customerid, customersurname) VALUES (1, '陈'), (2, '杨'), (3, '赵'), (4, '黄') GO
When I query this in SSMS and get text results, I see these results:
customerid customersurname 1 ? 2 ? 3 ? 4 ?
What's wrong?

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)

Changing Context in Procs

I log into a SQL Server 2019 database with my AD account, named 'dkr\Steve'. I then execute this code:

CREATE LOGIN way0utwest WITH PASSWORD = 'horsestakework'; GO CREATE USER way0utwest; GO CREATE OR ALTER PROCEDURE SillyProc AS BEGIN EXECUTE AS LOGIN = 'way0utwest'; END GO EXEC SillyProc; SELECT SYSTEM_USER; REVERT; 

What is returned by the SELECT?

Answer: dkr\Steve

Explanation: The EXECUTE AS works in the procedure, but only in that scope. When control returns to the caller, the original login name is returned, which is 'dkr\Steve' Ref: EXECUTE AS - https://learn.microsoft.com/en-us/sql/t-sql/statements/execute-as-transact-sql?view=sql-server-ver16

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 2012 - General
Can I install SQL failover on a single node WSFC cluster? - For depressing reasons, I'm installing 2012. Don't ask.  For some other reasons I've had to create a single node WSFC cluster (& will add a node later).  I want to install SQL FCI (not standalone) but I'm struggling.  It could be lots of things, group policy, permissions ...  but ... Q 1  - is it […]
SQL Server 2019 - Administration
List SPN for NT Service\MSSQLServer account - Does anyone know how to list the SPN for the NT Service\MSSQLServer account ? I've created the following combinations and nothing is working setspn -L MSSQLSERVER setspn -L NT Service\MSSQLSERVER setspn -L "NT Service\MSSQLSERVER" setspn -L 'NT Service\MSSQLSERVER' When the VM was created via terraform the NT Service\MSSQLSERVER account was used to run the service […]
File extensions errors - Processed: Jun 27 2023 3:02AM, LogDate: Jun 27 2023 3:01AM, Server: [WARNING] === At least 4 extensions for file {XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX} (sql\ntdbms\hekaton\engine\hadr\mtlog.cpp : 6063) What do the above warnings mean? Do they need to be investigated - if yes-how do we troubleshoot them or can they be ignored. Thanks      
SQL Server 2019 - Development
Arithmetic overflow error when using POWER function - Hello, Any help appreciated. This code should perform a internal rate of return (IRR) calculation. It generates correct data based on what was provided to me using Excel's IRR function. It looks like as GETDATE() gets close to my hard coded date the error is generated. Any suggestion to prevent the error would be appreciated. […]
Preventing Arithmetic overflow error when using POWER function - Hello, Any help appreciated. This code should perform a internal rate of return (IRR) calculation. It generates correct data based on what was provided to me using Excel's IRR function. It looks like as GETDATE() gets close to my hard coded date the error is generated. Any suggestion to prevent the error would be appreciated. […]
Update view from dynamic sql - I'm using the code below to change the name of the columns in a view but it doesn't actually update the view. What do I need to do so that the view is updated? Thanks.   DECLARE @code4 VARCHAR(9); SET @code4 = CONVERT(VARCHAR(2),month(DATEADD(MONTH,DATEDIFF(MONTH, 0, GETDATE()) - 4, 0))) + ' - ' +CONVERT(VARCHAR(4),year(DATEADD(MONTH,DATEDIFF(MONTH, 0, GETDATE()) […]
DELETE with SELECT and join in SQL SERVER - I have a select statement below which gives the expected results of duplicate data. I want to convert this statement to a DELETE Statement to delete items leaving a single item but getting error. Below is my query. Sample data SampleOne 2016-10-14 12:44:39.460 SampleOne 2016-10-14 12:44:39.460 SampleTwo 2016-10-14 12:44:39.460 SampleTwo 2016-10-14 12:44:39.460 SELECT t.* FROM […]
Out of 3 same/ similar rows, remove two and keep one - Hello everyone, I would like to ask someone for an advice. I am not even a 100% sure it is doable, but it might be. I have a table that returns the same or almost the same rows of information often times 3 times. Basically there are 3 types of Transactions: 1. GL Posted - […]
SQL Azure - Administration
How to read file metadata from an Azure Blob location? - Anyone recommend the best way to accomplish this? Powershell? Or can you do this via external data sources?   All I need to do is read file metadata from folders in azure blob storage so I can get the filename and date file created for audit purposes.   Thanks in advance!
Reporting Services
SSRS reports URL in database - We would like to include userID in the reportURL, so that later we can see the report execution data for specific users. I know we can query the database using ExecutionLog3, but I don't see a URL field included. Any where store that information, what is the best way to get report execution counts for […]
Integration Services
How to skip Deleted Servers - I have a SQL table with some servers and a package which runs of those servers. 1.Execute task to list the servers from the table. 2.For each loopcontainer inside which I have data flow task which in turn has oledbsource and oledbdestination. The package runs fine when all servers are present.If a server is deleted […]
T-SQL
Use BCP and a format file to export data to a text file - I would like to use BCP and a format file to export data to a text file in a fixed length format. Fields export. The length and starting and ending position. Last Name Length 20 Position 1-20 First Name Length 15 Position 21-36 Social Security Number Length 9 Position 37 46 AddressLine1 Length 30 Position […]
SQL Server 2022 - Administration
SQL Server running on Linux, instance starts almost 2 mins after the service - SQL Server (2022) running on Linux (SuSE 15.4), instance starts almost 2 mins after the service. When the system starts, systemctl status mssql-server.service reports, something like Active: active (running) since Wed 2023-06-28 15:47:57 UTC; 2min 43s ago However, sql server is not available immidately, has to wait almost 2 mins before can be queried. When […]
SQL Server 2022 - Development
how to identify sql scripts not in stored procs w/o using trace - I'm storing off various stats about procs on a daily basis. On e of them stores each sql statement in each proc w/ runtimes and other information.   My issue is there are power bi reports and sql job step that are not using procs but have embedded the sql scripts directly in them . […]
issue with text column in dbo.syscomments - I wrote a process to store off all sql objects daily. There is one that stores off all stored procedures contents daily. The text column in the dbo.syscomments table is being stored locally in another table whose column is a varchar(max). It stores each proc in 4000 char chunks. So there will be one record […]
 

 

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

 

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