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

The Best DBA Gifts

It's a few days after Christmas, which many of us celebrate, though there are certainly other holidays that people enjoy. Whatever your beliefs or tradition, this is a time of year when many of you likely received some gifts for the holiday season. Maybe you got something exciting, maybe something highly desired. Maybe you got a big joint gift for you and your partner. My wife and I used to give ourselves something nice that we'd both enjoy. In the past, we'd gotten new furniture for our bedroom or a big TV.

The last few years, as my children have become adults, we've gone to a family Secret Santa. We have a limit ($40 this year), so I wasn't expecting anything special, but I am always interested in seeing how creative others are. In the past I got a kid playing guitar and singing a song for me. I've also had some creative art projects in the last few years.

There's more to the season than gifts, but since many of us are in a slow time over the holidays, I thought I might ask what you wish you would get from work. Today, is there something that would make your job more enjoyable, interesting, exciting, or maybe just bearable in the future.

You might want equipment, different hours, flex time, more considerate co-workers, better code written or something else. Let us know today, and then maybe think about a plan to convince someone else to help implement it at work. You might find you can get what you want if you ask for it the right way.

I've got a great job, lots of benefits, and I can't complain about anything. Perhaps the only thing that might make life a little easier next year is a few more article submissions. Maybe one of you out there wants to help me with that gift? I hope so, and I'm happy to help you in any way I can.

Steve Jones - SSC Editor

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

 
 Featured Contents

OUTPUT Clause Basics (For Inserts and Deletes)

m.richardson.home from SQLServerCentral.com

When INSERTING or DELETING rows from a table, the OUTPUT clause can be used to return a dataset containing the changes made. Mat Richardson explains how.

Do You Have REFERENCES?

Additional Articles from SimpleTalk

The logic for referential integrity can be implemented in application code, but to make sure that it is enforced, include foreign key constraints in the database design instead. In this article, Joe Celko talks about the history of references in SQL and the options available today.

From the SQL Server Central Blogs - Understanding Azure Geo-Redundant Storage

John Morehouse from John Morehouse | Sqlrus.com

While at PASS Summit 2019, I gave a session on designing Azure Disaster Recovery Strategies for the Data Platform.  In that session, I talked about Azure storage and the...

From the SQL Server Central Blogs - T-SQL Tuesday 121 – Gifts received – Summary

Diligentdba 46159 from Mala's Data Blog

I got several responses for the last T-SQL Tuesday of the year that am honored to host. My topic was to blog on whatever you considered to be a...

 

 Question of the Day

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

 

The directory creation time

I have this code in PoSh:
$directory = Get-Item 'C:\Program Files\Microsoft SQL Server'
$message = "SQLDirectory Creation: $directory.CreationTime"
What is stored in $message?

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)

Preparing Encryption with Trace Flags

I need to use the older encryption hash for a symmetric key in SQL Server 2017. The Knowledge Base article says I need to enable trace flag 4631 globally. What do I run to do this?

Answer: DBCC TRACEON( 4631, -1)

Explanation: To enable a trace flag in a session, we use DBCC TRACEON. The global paramter is -1. Ref: DBCC TRACEON - https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceon-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 - Development
Need Correct Query Code Please? Thx. merry Christmas SQL Kids - Compose a SQL query to retrieve all products with its most recent two orders? Products that haven’t been ordered should be listed  also. Use ERD below. Whats Correct Query Code?  
importing text file, bulk insert to populate table - I have to import a text file to build a table and all of the date fields currently are in integer form. It comes in three different ways. The first two are like '20191223' or '0' if there is no date. The third way in the text file is like '2170915', missing the second character. […]
Working with variable length number - please assist I have table 1 and table 2, join them on account number. the problem is that table 1 has extra zeros in the middle and while table 2 does not have extra zeros in the middle, the account number is not always of the same length. see below I need to match the […]
Hadoop for SQL Developers - Hello People I am a newbie in the field of SQL Development and have a silly query. I am doubtful about a thing that if Hadoop is easy to learn for SQL Developers. Is it essential to be aware of Hadoop if I'm totally into the field of SQL Development? How much SQL is required […]
SQL Server 2016 - Administration
Basic Availability Group in Sql Server 2016 Standard edition setup - Hi, I am trying to setup Basic Availability Group in Sql Server 2016 Standard edition SP-2-CU11 and i'm having few issues/questions:My Primary DB is encrypted with Master Key.We have built another Sql server for Always ON but no user DB yet.On Primary Sql server DB, We are taking Transaction Log Backup every hour and FULL DB every […]
Finding Auto Increment value for each table in DB - Hi, I am trying to get the max value of auto identity column with table name and column name. Below is the query I am using which GIVES me table and column name BUT NOT the MAX value. SELECT OBJECT_SCHEMA_NAME(tables.object_id, db_id()) AS SchemaName, tables.name As TableName, columns.name as ColumnName FROM sys.tables tables JOIN sys.columns columns […]
SQL Server 2016 - Development and T-SQL
Truncate or Insert data with conditions - Good day, I have two tables where A is the source and B is the destination, so what needs to be achieved, when A has no data don't truncate B when A has data truncate B and insert data from A. Need help if (select count(*) from [A]) > 0 truncate table B Insert into […]
Administration - SQL Server 2014
Offline vs Online index operation - As I know, while online index rebuilding, SQL Server virtually creates an index and then at the end it swaps the existing old index with the new created one and then finally drops the old index. I would like to know if these operation same for offline index rebuild. Will SQL Server create virtually an […]
Language conversion Japanese to English for MSSQL Server DB - Hi All, I have MSSQL Server Database  installed on windows in Japanese language. Also OS  ( windows  ) installed in Japanese language. I am as English user not able to any administration on MSSQL Server Database. So Can any one please let me know how I can change the MSSQL Server Database console language to […]
High Page File Usage - Page File Usage in one of our production database server is continuously up-to more than 200% of the total available memory. Is it a signal to add more physical memory?
Development - SQL Server 2014
Reusable Variable - hello, I know there's gotta be a way here, but I'm struggling.  Let's say I have a last name parsing sql statement (using the first few letters) but the rules are complex in the event of hyphenated names, Sr's Jr's etc...  Anyway, I have all that sorted out using SELECT CASE.  This works great, but […]
SQL Server 2012 - T-SQL
Migrating databases - error on login 4064 (cannot open default database) - Hello, I am trying to figure out how to create a script to generate Login mappings to databases. I've search a lot, plenty of cases and examples, but none seem to match my problem. Here a brief explanation: I have daily backups of databases I copy to my new server. No Logins, etc. I restore […]
Reporting Services
VS 2019 TargetServerVersions - I am trying to find out which SQL Server versions are supported in VS 2019 /SSDT for Reporting Services. We have  SQL Server 2008 R2. My Infrastructure team is building a new computer with Windows 10 and it will have VS2019 on it. Our Report Server is SQL Server 2008 R2 and I want to […]
Integration Services
Has anyone used BIML to create Memory optimized tables. - I was hoping to experiment with memory optimized tables for my staging layer to speed up the process. Googling "BIML Create Memory Optimized Table MEMORY_OPTIMIZED=ON" is not giving me nay results. This seems like it would be a common setting for a table used in a staging layer. I am using the table.GetDropAndCreateDdl() code to […]
Article Discussions by Author
Performance Tuning Using Extended Events: Part 2 - Comments posted to this topic are about the item Performance Tuning Using Extended Events: Part 2
 

 

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

 

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