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

Daily Coping Tip

Plan a fun or relaxing activity this weekend

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.

Remote Work Benefits

It seems as though many of us that have been remote working will continue to do so. I see some offices opening, but not many. I had one friend that had everyone go back to their office in Denver, but they tend to all close their office doors so they don't have to wear masks and they do their meetings over Zoom. Seems crazy to go into the office for that.

The weight of this type of work continuing for the next six or more months has been a little tough for me at times. That sounds crazy, for someone that's been a remote worker for over a decade, but I used to regularly go to offices, visit people, or even go work in Starbucks. Those types of things aren't happening for me now. I am going to try and see if I can get a few more lunches with friends, especially when the weather changes a bit.

If we are going to continue to work from home, some things likely need to change for some of us. On a call recently a friend asked about my Secret Lab chair, since this individual had an old chair and knew their organization wasn't bringing them back until sometime in Q1 2021 at the earliest. They needed to get better set up at home to work.

I saw an article that some companies are thinking about this new setup, how they might save money on office space and infrastructure, but also perhaps invest some of this in employees. There are companies that pay for phones, broadband, and some necessities, but some are thinking about doing more.

They may not only invest in computer equipment, but might do a stipend to allow employees to better set up their home office, which may just be their new office. Perhaps some allowance for furniture or other equipment. I know some are considering monthly allowances for the additional expenses employees have, such as more electricity for equipment or heating/cooling. I know Redgate has offered some of this to our staff.

Ultimately, we need to ensure we have an ergonomic, long term place to work, which is challenging for some. I continue to see people working from dining tables, sofas, and more, which are fine for some ad hoc typing, but not good for sustained periods of concentration. If your company isn't planning on going back to an office, perhaps you want to ask about some benefits. At least a chair, as I think having a nice chair has made a big difference to my comfort across the last six months.

I do think it's important to get a good ergonomic setup if you are going to be here for a long time. Especially if there are others in your house and you all need to be sure you can work effectively and concentrate on what your employer expects you to do.

Steve Jones - SSC Editor

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

Redgate SQL Prompt
 
 Featured Contents

When SQL Server Performance Goes Bad: Implicit Conversions

Additional Articles from Redgate

When you're developing a database, the pressure is on to get something that works, using an efficient algorithm. When you are getting close to a release candidate, however, there are some programming habits that must be removed from the code, because they can cause unexpected performance problems. In this article, you'll learn how to detect and remove one such problem: reliance on implicit datatype conversions in your queries. We'll use a combination of plan cache queries, extended events, and SQL Monitor.

Delete Duplicate Rows with No Primary Key on a SQL Server Table

Additional Articles from MSSQLTips.com

Every once in awhile a table gets created without a primary key and duplicate records get entered. The problem gets even worse when you have two identical rows in the table and there is no way to distinguish between the two rows. So how do you delete the duplicate record?

From the SQL Server Central Blogs - Where is your Awesome?

Arjun Sivadasan from SQL Roadie

Everyone of us is in a perpetual pursuit of awesomeness - some actively looking for it, while others passively. Either way, it is inherent in our making to reach...

From the SQL Server Central Blogs - All triggers have to be able to handle multiple row operations.

Kenneth.Fisher from SQLStudies

Quick post today. Recently I was helping a co-worker write a trigger. Basically there is a table of servers that’s ... Continue reading

 

 Question of the Day

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

 

Finding the Git Remote Name

In Git, how do I determine the name (shortname handle) of the remote repository that is linked to my local repository? Usually this is origin, but how can I check?

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)

The New Database Owner

I create a new login in SQL Server 2019, without any roles. I then grant this login the CREATE ANY DATABASE permission. When this login creates a database, who is the database owner?

Answer: the login

Explanation: The owner of the database is the login that created it by default. Ref: CREATE DATABASE - https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-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 2016 - Administration
SQL Server Compatibility Mode 130 - Hello, When one of our sql servers was migrated from SQL2k12 to SQL2k16, some of the user database compatibility levels were set to 110. Developers wanted that way at that time. Now, if we change it to 130, I do not think, we need to enable (or turn them ON) any of these trace flags? […]
Retrieving the total number of records in a SQL instance - Hello, Is anyone aware of a good approach for retrieving the total number of records across all tables and all databases within a SQL instance?  I've attempted to write a query for it, but it isn't working as expected. SET NOCOUNT ON DECLARE @Counter INT, @MaxId INT, @DbName VARCHAR(100), @Sql VARCHAR(100) SELECT @Counter = min(database_id) […]
Monitoring SQL Server performance. SQL Server, Disks baselining - Hey everyone, hope you all are doing great. I got a couple of questions regarding OS/SQL Server information capture and its regarding how you guys capture data and baseline everything in your SQL Server/OS Performance. Here it goes, this might not make perfect sense at the beginning so I hope you guys could cut some […]
SQL Server 2016 - Development and T-SQL
Complex Join - I have to tables T1 and T2 that are related by two columns C1 and C2.  Both columns are null-able so it's not as simple as: T1 join T2 on T1.C1 = T2.C1 and T1.C2 = T2.C2 So I've come up with this: T1 join T2 on ( T2.C1 = T1.C1 and T1.C2 is null […]
Administration - SQL Server 2014
Distribution DB increasing in size - We have a transaction replication running. We then decided that on a certain application, they would enable a module that would increase data in one of the tables. Prior to this, the Distribution was only 10GB, after 3 days, it is now 27 GB and constantly increasing. I see on the autogrow event that it […]
SQL 2012 - General
High parallel processes - Hi, I have a SQL server 2012 instance (Ver-11.0.5058). We execute a stored procedure which fetches more than 24 million records after joining data from 3 different CTEs (each of which has 3 to 7 tables in join). The MAXDOP for the instance is set to 8 and server has 16 logical processors. When we […]
SQL Server 2019 - Administration
backup database in alwayson - Hello everyone I need to transfer a database configured on alwayson from one datacenter to another What would be the best practice to back up this database in other words, should I remove my database from alwayson before doing l save operation? Thank you
SQL Server 2019 - Development
Export to text file for specific row inserted - I am looking for a solution to export the sql rows to a text file in a path when the database insert meets particular condition. I need one text file for each row. I don't need a text file for all the rows. Need text file output only when the database insert happens for my […]
SQL query question - I'm trying to create a "smart agent" feature in my website. A user can search for ads by some criteria, and then save his search as a "smart agent". When a new ad is added that matches his criteria he will get an email.   For example, I have 3 tables: 'Ads' table: columns: recordID(int), […]
Silly SQL Question - I'm sure there's a simple way to do this, but I can't seem to figure it out.  I have data something like this: ID, RESULT 1, Y 1, Y 1, Y 2, N 2, N 3, Y 3, N 4, Y 4, N I only want to pull records where the ID has both a […]
Issues with SQL Trigger - I have created a SQL Trigger as below. create trigger testtrigger on testdb for insert as declare @sql varchar(8000) SELECT @sql = 'bcp "select * from testdb" queryout c:/test.txt -c -t -T -S localhost' exec xp_cmdshell @sql go But when a row inserted in the testdb, the text file is created, but there is no […]
SQL Azure - Development
Real time sync from One SQL server to another - Hi All, Please forgive me if this is a simple query but im pretty new to all of this. I am working with a company who are developing an app for us. My manager would like to explore the idea of being able to live sync the data from their database to our database so […]
Reporting Services
Access to Field!xxxx.value - I have not come across where I needed to do this, I have a report that uses multiple datsets, " I have done this before, but I need to take the value from one dataset field and subtract it from another, as you know when you bind the table to ds1 you get scope errors, […]
Connecting
Connecting to SQL server 2019 from python/Jupyter Notebooks - Does anybody have an example of connecting to a local instance of SQL Server from Jupyter notebooks? Do I really have to create a DSN to do this? ## define some variables so this stuff is easier to modify server = 'DESKTOP-D19S9C8/NONALAND' database_name = 'AdventureWorks2017' query = 'SELECT TOP 10 BusinessEntityID,FirstName,LastName,ModifiedDate FROM Person.Person WHERE PersonType […]
Suggestions
Spam removal from https://www.sqlservercentral.com/forums/ page - Firstly I like the fact that as soon as a post is marked as spam it's hidden. Perhaps they could be hidden from the https://www.sqlservercentral.com/forums/ overview page as well?
 

 

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

 

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