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

Building Bonds with Entertainment

Over the years I've had the chance to work in a lot of companies, and I've seen a lot of different team-building attempts take place. In restaurants, these were often nights out with too many adult beverages. At a power station, we had some large outdoor BBQs, where again, sometimes there were too many adult drinks consumed.

When I came to Denver, I worked in a company that had a small fund they used for team outings once a quarter. A movie, bowling, maybe a meal, usually during an extended lunch hour or an early end to the day. At Redgate, we have a Feel-Good-Fund in each office and teams can make use of this for an activity periodically where they engage in something together. I rarely get to participate because I'm so remote and it makes me a little sad, since I see pictures on Slack of escape rooms, punting (boating), visiting museums, archery competitions, and more. However, we have taken the time to do a few things when Grant, Ryan, and I get together. Most recently, we went to a science museum in Cambridge one afternoon.

The Data Community Summit has been a part of my life for over 20 years, and I've often gone with the goal of spending more time with people than in sessions. The bonds I've built there have been amazing, whether in the convention center, over a meal, or out at some event. This year is no different, as I look forward to meeting new friends and greeting old ones.

Building a bond with others is something that takes time, but it can grow more quickly when everyone involved is enjoying themselves. Years ago Andy Warren and I were discussing how to get more people to network. There were lots of parties thrown by vendors, but not everyone was invited, and a lot of people don't want to go out drinking in a loud atmosphere. We came up with Game Night and convinced PASS to give us a room. It was a wild success, and it's continued many of the years since.

This year Game Night is back. It's a little more formally organized, but it's on the community page as an event Wednesday night, after the exhibition reception. The staff is looking to bring some games, and they've asked what others think or what they want to play. Knowing many of you will want to bring your own games, I'm not worried, but I do hope that everyone going spreads the word and the night is a rousing success. I stopped by the Game Night at That Conference this summer and it was a good time. Lots of people having fun, in big and small groups, playing all sorts of games. Some short, some long, some easy, some very complex.

Engaging with someone over a game of some sort is a good way to get to know them, and enjoy their company during an activity that is more engaging than watching a movie or going to a loud concert. Those things are fun as well, but part of professional events is getting to know others and building your network. Hopefully to take advantage of those opportunities at user groups, SQL Saturdays, or large conferences.

And if you're coming to the Summit, consider bringing a game to share with others or coming to Game Night and learning a new one.

Steve Jones - SSC Editor

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

 
 Featured Contents
Stairway to Exploring Database Metadata

Idempotent DDL Scripts That Always Achieve The Same Result - Making Changes Only Once: Stairway to Exploring Database Metadata Level 6

Phil Factor from SQLServerCentral.com

Idempotence is the property of certain operations in mathematics and computer science, that can be applied multiple times without changing the result beyond the first time they are run. When you are making changes to a database to deploy a new version, you need to be sure that certain changes aren’t made twice, or in the wrong order.

External Article

Analyze and Tune SQL Server Statistics

Additional Articles from SimpleTalk

Over the years, SQL Server Statistics have been discussed in countless blog posts, articles, and presentations, and I believe that they will remain a core topic for a while when speaking about performance. Why is that?

External Article

New Amazon X2iedn High-Memory Instances

Additional Articles from Brent Ozar Unlimited Blog

Amazon just announced new X2iedn instance types for Amazon RDS SQL Server. They’re a sweet deal for people who want a high-performance managed database, with really fast cores and more memory per core than you can get in Azure’s managed SQL offerings.

Blog Post

From the SQL Server Central Blogs - Making Extended Events a bit more usable : T-SQL Tuesday #166

Kenneth.Fisher from SQLStudies

Running a bit late this month for T-SQL Tuesday (it’s not exactly Tuesday is it!) but that’s Grant Fritchey’s (blog|twitter) ... Continue reading

Blog Post

From the SQL Server Central Blogs - About 5 Minutes with Microsoft Fabric

DataOnWheels from DataOnWheels

Introducing the Fabric 5 from Data on Wheels Microsoft Fabric went to public preview this past summer. There has been content created around using the various cool features that...

Microsoft Power BI Quickstart Guide cover

Microsoft Power BI Quick Start Guide: The ultimate beginner's guide to data modeling, visualization, digital storytelling, and more, 3rd Edition

Steve Jones - SSC Editor from SQLServerCentral

Bring your data to life with this accessible yet fast-paced introduction to Power BI, now in color.

 

 Question of the Day

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

 

Closing a Symmetric Key

If I open a symmetric key with this code:
OPEN SYMMETRIC KEY PIIKey DECRYPTION BY PASSWORD =  'MyS3cr#tP@ssword'
When is it closed?  

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 Reuseable Window

I have this sample code from the MS Docs:

SELECT
  ROW_NUMBER () OVER win AS "Row Number"
, SUM (s.TerritoryID) OVER win AS TerritoryCount
, p.LastName
, s.SalesYTD
, a.PostalCode
FROM
  Sales.SalesPerson AS s
  INNER JOIN Person.Person AS p
    ON s.BusinessEntityID = p.BusinessEntityID
  INNER JOIN Person.Address AS a
    ON a.AddressID        = p.BusinessEntityID
WHERE
  TerritoryID IS NOT NULL
  AND SalesYTD <> 0 WINDOW win AS(PARTITION BY PostalCode
ORDER BY SalesYTD DESC)
ORDER BY PostalCode;
GO

When I run this on a SQL Server 2022 database, what happens?

 

Answer: This works, returning two window aggregates

Explanation: This works fine. One of the enhancements in SQL Server 2022 is the ability to define window clause parameters once and reuse those with multiple aggregates. Ref: SELECT - WINDOW - https://learn.microsoft.com/en-us/sql/t-sql/queries/select-window-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 Server 2017 - Administration
Central Management Server (CMS) on AlwaysOn for Failover Process - Good afternoon! Is there any type of documentation or process for failing over a CMS server? Do I have to remove them from Primary and add them to secondary (new primary)? This is cumbersome work. Let's assume it's HA and failed over every 2 weeks. Or assume a DR failed over for over a month. […]
cost threshold for parallelism value to be set - Hi Everyone, Why and when should be set 'cost threshold for parallelism'? We are on SQL 2017 Enterprise Edition. What should be the value set for cost threshold for parallelism instead of default value 5 and why ? what benefit do we get if we set a high value and what should be the starting […]
SQL Server 2016 - Administration
Alwyason availability group can set primary role permanently? - Hi. Two node windows clusters Node1 and Node2 and configured alwayson availability group. Will it possible to Alwyason availability group can set primary role permanently any one of the node? Thanks  
Does multi-subnet with standardeditionofsqlserver supports DB Mirror Or AG group - Does multi subnet failover with standard edition of sqlserver supports DB Mirror or AG groups 1. can db mirror configured in different multi subnet with standard edition 2. can db always on configured in different multi subnet with standard edition
SQL Server 2016 - Development and T-SQL
get week number of month - I want to query a table that has a datetime column ([CreateDateTime])  and get the week number for that specific month. 2023-03-01 09:30:00 2023-03-12 11:15:22 2023-03-22 14:22:18 2023-04-02 15:12:30 I want to get these results from the above dates: 1 3 4 1  
SQL Server 2019 - Administration
Changing Database page Verify on a Database in an AG - I have a database on SQL 2019 in an Availability Group (AG) and I want to change the Page Verify attribute from NONE to CHECKSUM on all of the nodes in the AG for this database. The Page Verify attribute is the same on the database on all nodes of the AG. I do not […]
High tempdb usage alternatives - Hi We have an stored procedure which runs frequently and  it contain logic in which data are first dumped in temproray table and then moved to physical table .due to large data and frequent run of sp .tempdb database get filled up quickly .We cannot take server restart everytime so whats alternative to temp variables […]
high latency in sql server transactional replication - Hi I am new to replication and we have database of size around 2TB and its has been set up for replication .there are 4 subscriber to it. Tables(articles) of database has been divided into 14 publishers. Issue sometime we face high latency on server with lakhs of undistributed command so what should i check. […]
upgrade evalution editon reporting services to Stanadard - Hi All, I installed reporting services evaluation edition for testing purpose, but now 180 day trial period is expired and I am unable to generate reports. Is it possible to upgrade it with SQL server 2019 standard edition, without disturbing the existing configuration. I Installed SQL server 2019 database engine on same machine, but while […]
SQL Server 2019 - Development
Need to output table data into multiple CSV files - Hello, I created the below script to output 999 rows from SQL Server table into multiple CSV files. The SQL table has about 45,000 rows. We can only output max of 999 rows into the CSV files. I installed powershell sql server module. Since this is a powershell script, I may need to modify the […]
need some help with spilt raw data - Hello,   I am trying to split data, looks like there is some special character or white space that is not letting me to split. i try to split with space as delimiter even though there is space between two A2339 MC it will not split. -- test date DECLARE @TEST_STR TABLE ( TEST_STRING NVARCHAR(255) […]
Convert Binary or Hex field to show text information - Hi all, I have an SQL database table with events, and within it a field of binary (32) datatype. I want to convert the info in binary field and show me the information that refers to the event. The info is of this type: 0x0000000000000000000000000000000000000000000000000000000000002000. Can someone help? Thanks!!  
Convert columns result into rows with comma and single quotes - Hi All, Hi All, I want to convert columns result into rows with comma. Ex: Result should be - 'SQL1','ABCD100','XYZ123' #code: create table #tbl_db (name varchar(100)) insert into #tbl_db values ('SQL1') insert into #tbl_db values ('ABCD100') insert into #tbl_db values ('XYZ123') select * from #tbl_db Result needed: 'SQL1','ABCD100','XYZ123'  
Powershell
Write https request to azure blobstorage - Hi All, I have been trying to download a csv file which is produced by calling an api and then to store the csv file directly in azure blob storage. I am able to download the file on my local machine and then copy it to azure blob storage. But I would like to copy […]
Employers and Employees
Master Data - Relational or Dimensional modeling? - Dears, In my company, we have certain master data domains like customer; Vendor; Product; Materials; Bill of Materials. So far we have been doing our modeling using relational modeling in the cloud. It consists of entire tables that we push from SAP ECC and SAP MDG like MARA; MVKT, etc... then we have views on […]
 

 

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

 

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