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

Daily Coping Tip

Smile and be friendly, even when physical distancing

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.

Fostering Creativity

At Redgate, we build and sell tools that help with database development and administration. We have quite a portfolio, and most products under active development, but we also try to foster creativity. We do this with Down Tools Week, which started out as Coding by the Sea, evolved into DTW, and I even had the chance to participate a few years ago.

Kendra did a podcast recently of her experience with down tools week and her team. She was on a team that was thinking about the future of database development, which was less product focused, but not any less work. The team focused on a few ideas and tried to flesh them out through debate. I followed along and enjoyed their presentation at the end of the week.

Maybe the more interesting thing is that we take a week from work and try to get people excited and interested in some project that might turn into something great, or might just solve some issue we never seem to fix.

Like many of you, we have no shortage of things that are broken or don't work well. We have internal things, processes our teams use, or more that we would like to improve, but we are constantly focused on more commercial tasks. It can be hard to get investment to try something out without some proof there is a good chance it will succeed.

Structuring a week, where teams can self organize (to a point), and ideas are submitted, voted on, and approved, can be exciting for developers. They can start thinking about the problem scope a few weeks ahead, and then in the pressure of a startup atmosphere, they can get to work Monday.

It's a long week, and I don't know that I, or even many of the developers, would like to feel this pressure every week, but the challenge to build something Monday through mid-day Friday is exhilarating. It's a break from the normal routine, and we've had some interesting things come out of the weeks. Including one process that streamlined how teams can get documentation submitted with their code and have it automatically update for customers. Fairly pedestrian, but incredibly helpful. It took more than a week, but a week showed it was work investment.

Even if we don't get code we can use, we do find that everyone has the chance to re-think how we approach problems. A lot of creativity is sparked from taking a week away from normal work. Atlassian did this with FedEx days, which have grown to many companies all over the world. We do this for a week every year, and I think it's a great use of our time and energy.

Steve Jones - SSC Editor

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

 
  Featured Contents

Recover database encrypted modules code with dbatools

Cláudio Silva from SQLServerCentral

If you own a database with encrypted modules but you don't have a decrypted version, this can be a horror story.
Learn how to get back the code of the encrypted modules using dbatools.

Maximize View of SQL Server Query Plans with Full Screen Option

Additional Articles from MSSQLTips.com

In this tip we look at how to save an execution plan for future review as well as using the full screen mode to see more of a query plan at one time.

From the SQL Server Central Blogs - Creating a SQL Clone Agent and a First Image

Steve Jones - SSC Editor from The Voice of the DBA

In a previous post, I set up the SQL Clone server. This is really a metadata store and web front end, but it does no real work. The Agent...

From the SQL Server Central Blogs - Thinking About the 2021 PASS Summit

Andy Warren from SQLAndy

I know that we don’t yet know how the 2020 Summit will turn out, but I’ll make some guesses: A lot of people like it for the lower cost,...

 

  Question of the Day

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

 

Replacing sysaltfiles

I have old code that queries sys.sysaltfiles, which is a holdover from SQL Server 2000. What new DMV replaces this system table?  

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)

Query Some Files

I have a SQL Server 2019 database that has two filegroups, PRIMARY and ARCHIVE. I take one file offline with this code:

ALTER DATABASE FGTest MODIFY FILE (NAME = N'FGArchive1', OFFLINE) GO 

I had created two tables with this code:

CREATE TABLE [dbo].[MyTable]( [myid] [int] NULL, [mychar] [varchar](200) NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[MyTable2]( [myid] [int] NULL, [mychar] [varchar](200) NULL ) ON [Archive] GO 

I then run this code:

SELECT top 10 * FROM dbo.MyTable2 AS mt

What happens?

Answer: I get an error that the query processor cannot produce a plan

Explanation: I get an error that that query processor cannot produce a plan as the filegroup is not online. Ref: ALTER DATABASE - https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup-options?redirectedfrom=MSDN&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 - Administration
How to get drive space using Queries on SQL Server hosted on Linux - Hi, I need to get the free drive space details on SQL Server using queries, this server is hosted on a Linux Server. Require a query to give drive free space details. Thanks
SQL Server 2016 - Administration
Query optimization - Hello..i am running into an issue where below query is requesting large amount of memory grant. I think the problem is at the left join inner query on table dn_t it has to do a full scan because there is no index. Wondering if there is any better way to write this?   SELECT [P2].[c1] […]
Cannot insert duplicate key in object - In table tUSERI primary key was added in the column [Email]. I deleted a user abc@gmail.com from tUSER. When I try to add the same user abc@gmail.com got the following error. What causes the error? Please help clean and update the table tUSER. Violation of PRIMARY KEY constraint 'PK_tuser_2'. Cannot insert duplicate key in object […]
Much lines from soms in audit - I had the requirement to put on auditing. I made the server specifications, put in a file, and read the file info a database only the security officer can read. But now he sees too much. Every action in ssms is put in the database. The activity monitor is one of the worst. Can I […]
Availability groups - licencing considerations - Hi all   I'm trying to my facts in a row before I go to managers with this one.   We have one copy of our production data (from the software vendor) on server A (I know, it's the only copy and I've been shouting about that forever). What we want to do is set […]
Folders in C:\Users - are they really needed? - I have some time on my hands (sadly) and am using some of it to clean up my computer. The computer in question runs Windows 7 (no, 'upgrading' to Windows 10 is not an option) and I have used it for many years. Over time, I have installed at least three versions of MS SQL, […]
SQL Server 2016 - Development and T-SQL
Using Pivot in SQL - I am trying to create a query from this table: above is my table, and below is what I need my query to show. I tried many things: first, I tried using UNIONs, but it did not allow me to sum/average. Then I tried to experiment with the PIVOT function, but again, the issue is […]
Flattening XML - I'm sure this has been asked a 1000 times before, but every example I've seen works great, but doesn't seem to translate well into my XML format - I have no control over the XML I have the following XML: DECLARE @xml XML = '
[…]
Administration - SQL Server 2014
rename sa - i want to  rename the sa login with different name , is the jobs will impacted if we rename the sa login ?
Development - SQL Server 2014
Previous row where condition exists - Hello, I have a table of data in which I've identified some duplicate records.  I need to pull all of the duplicate records for someone to review.  My problem is that I'm only able to pull one of the duplicates and not both.  The sample below just includes those values which are actually matching (duplicates) […]
SQL 2012 - General
Why aren't the backups working? - You've heard of "the accidental DBA", right? Well, I'm the accidental TFS admin. I have a bit more knowledge of TFS, than the average developer, ergo when the former TFS admin left, I got stuck with it. But my question is more about SQL Server, than TFS. Our TFS backups haven't worked in over a […]
SQL Server 2008 Performance Tuning
how to find why the stored procedure took time to execute - Hi, This is one of the incident at our clients side and does not happen regularly. A stored procedure(stp) which usually executes in few seconds took 10 mins to execute. i want to analyse why that stp took time to execute or which other factors were the cause of slow execution of the stp. we […]
SQL Azure - Development
Create a User in Azure SQL Database - I need to create a user in Azure SQL Database and map the user to a specific database. does anyone have the syntax to make this happen? The GUI is restricted and you cant do it as you would in SSMS on-prem as you cant view the properties. Also I am after a decent script […]
Azure Data Factory
Does anyone have experience of using securetrading.net as a data src within ADF? - Hi, Does anyone have experience of using securetrading.net as a data source within Azure Data Factory? If you do, any help would be greatly appreciated. Kind Regards, Kieran.    
Analysis Services
Random excessive CPU consumption - Hi all. I'm in a bit of a quandary with one of our Analysis Services servers, and I'm hoping you may have some suggestions on how to solve our issue. Basically we have 7 Cube servers, all with identical system specs. Startup log: (8/6/2020 11:23:20 AM) Message: Service stopped. (Source: \\?\R:\Analysis\Log\msmdsrv.log, Type: 1, Category: 289, […]
 

 

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

 

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