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

Daily Coping Tip

Tell a loved one about the strengths you see in them

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.

Will GPT Write Our Queries?

The short answer is no.

The longer answer is it depends, and perhaps to be more complete, ChatGPT likely will help us produce the simple, tedious queries with much less effort.

There has been a lot of news about AI and ChatGPT and how well it performs for a computer. That last phrase is important because while it's impressive, I don't know that any of us would consider ChatGPT to be in our list of the Top 5 Dream Dinner Guests. The tool isn't that impressive compared to most people, especially our friends.

I look at Ayende Rahien's blog often, and he recently had some thoughts on this topic, experimenting with ChatGPT and coding. Some things worked; some didn't. In general, to get good code, you still need a subject matter expert, which is also the case with humans. We have plenty of people writing code that aren't great at their jobs. We do see a lot of bad code, but we also have some great coders that help others to learn or just refactor their code later.

So is ChatGPT better than a below-average developer? I don't know. While the tool will get better, one advantage with people is we can complain to them, or send them problem queries, and they'll learn to paste better code in from the SQL Server Central forums or StackOverflow or somewhere else. Perhaps ChatGPT will learn, but will it learn to improve and refactor code? I'm not sure how easy it will be to teach the system to edit something rather than just produce new code.

I do think that the assistance features of AI, suggesting ways to complete sentences or lines of code, can be very valuable. They are a great productivity tool that can enhance your ability to get work done. If they learn to work in your style, suggesting the things you've done in the past, then these tools will help. As with most tools, they aren't a replacement for your knowledge, but merely a lever to make you more efficient.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

How to Forecast Data in Power BI

Daniel Calbimonte from SQLServerCentral

Learn how you can use Power BI to forecase the future trends of data.

External Article

How to create a Sankey Chart in Power BI Desktop

Additional Articles from MSSQLTips.com

Learn how to build and format a Sankey Chart using Power BI along with step-by-step instructions.

External Article

The business value of frequent deployments

Additional Articles from Redgate

The multi-million-dollar question for you and your business is... what is the real business value of frequent deployments? Part one of three in this series on the value of database DevOps.

Blog Post

From the SQL Server Central Blogs - Checking the Microsoft Container Registry for new SQL Server images

dbafromthecold@gmail.com from The DBA Who Came In From The Cold

A while back I wrote a post on how to retrieve the SQL Server images in the Microsoft Container Registry (MCR). It’s pretty simple to check the MCR but...

Blog Post

From the SQL Server Central Blogs - Out of Your SSMS World, Jupyter Notebooks in Azure Data Studio – Louisville Data Technology Group, Feb 2023

DataOnWheels from DataOnWheels

It was a lot of fun to speak at the Louisville Data Technology Group in February. Sheila and I presented on Jupyter notebooks in Azure Data Studio. The session...

SQL Server 2022 Revealed

SQL Server 2022 Revealed: A Hybrid Data Platform Powered by Security, Performance, and Availability

Additional Articles from SQLServerCentral

Know how to use the new capabilities and cloud integrations in SQL Server 2022. This book covers the many innovative integrations with the Azure Cloud that make SQL Server 2022 the most cloud-connected edition ever. The book covers cutting-edge features such as the blockchain-based Ledger for creating a tamper-evident record of changes to data over time that you can rely on to be correct and reliable.

 

 Question of the Day

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

 

The Deleted Table Name

I have built a DDL trigger to capture the drop of a table to prevent dropping a particular table. My trigger looks like this:
CREATE TRIGGER NO_DROP_ImportantTable
ON DATABASE
FOR DROP_TABLE
AS
DECLARE @Table SYSNAME;
SELECT @Table = ???
IF @Table = 'ReallyImportantTable'
  ROLLBACK;
GO
What should I put in the SELECT statement in place of the question marks?

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)

Moving the PVS

What do I need to do if I want to move the Persistent Version Store (PVS) to a new filegroup?

Answer: Turn off ADR, cleanup the PVS, turn on ADR specifying the new filegroup

Explanation: To move the PVS, you need to turn off ADR, cleanup the PVS, and then turn it on with the new filegroup specified. Ref: Managing the PVS - https://learn.microsoft.com/en-us/sql/relational-databases/accelerated-database-recovery-management?view=sql-server-ver16#managing-the-persistent-version-store-filegroup

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
question on parallelism - Hi All, We have 16 CPU's, 256GB RAM Azure VM on which SQL Server 2017 is running. Our workload runs pretty well when MAXDOP = 1 and when we try to set the MAXDOP = 4 or MAXDOP = 8, we start seeing deadlocks all over and application team start complaining about slowness of some […]
Pagesplits question - Hi All, Does a DELETE operation cause PAGE Split? As far as I know we Page splits occur for only INSERT and UPDATE. monitoring for operation : LOP_DELETE_SPLIT Thanks, Sam
SQL Server 2017 - Development
How to query performance baseline - Hi All, We don't have baselines in our env. I mean, no monitoring tool. We use sp_whoisactive every 5 mins. Currently, we are facing some query performance issues. Want to know what are the things to be considered or how to take query performance baselines? like rows counts, indexes, execution plans etc.. Also, suppose I […]
How to stop an XE after 2 hours automatically - Hi All, I want to start extended session via job and want it to stop automatically after 2 hours. How to accomplish it? ALTER EVENT SESSION ON SERVER STATE = START; GO ALTER EVENT SESSION ON SERVER STATE = STOP; GO Thanks, Sam
How to get the transaction mode of a spid. - Hi All, Which DMV will tell me the transaction mode of a SPID? I did check MSDN but couldn't get the answer. https://learn.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-tran-session-transactions-transact-sql?view=sql-server-ver16 - Autocommit transaction - Implicit transaction - Explicit transaction - Batch-scoped transaction - Distributed transaction Regards, Sam
Administration - SQL Server 2014
Can't start SQL Server - I have a system with two disks in the C: drive and four disks in a RAID 5 setup for the D: drive. A few weeks back, one of the D: disks failed. No sweat, ordered another, plugged it in and let the RAID rebuild overnight. All seemed to be fine, I can log in […]
SQL 2012 - General
SQL Server 2012 Standard Media/ISO - Does anyone have a copy of SQL Server 2012 Standard handy? I just need the ISO or DVD contents to install on a new server. I have the key already from the old server, but we don't have the media any longer. I checked online and can't seem to find a good place to download […]
SQL Server 2019 - Administration
Upgrade to 2019 express from 2012 express check failed - Hello, I would like to upgrade my SQL Server 2012 Express instance (10.0.2100) to 2019 Express, but during the verification checks, I receive an error stating that Service Pack 2 is required to proceed. The issue is that I cannot find any SP2 for Express. Do I need to use the standard version instead?   […]
SQL Server 2019 - Development
receiving duplicate key error when adding new records - I administer a database for a local chapter of a national group.   The National group does not provide local chapters access to a database but does give us a csv file which i then used to export to an Excel spreadsheet with all the members listed in it.  I then imported that table into my […]
Find value of next row upon condition - In the following table,   I want to replace the zero in the column idPointsrv by the next row that is not a zero in this case replace all zero by 316770 Thanks in advance for your help
Using A CTE to exclude rows from the main Select statement - I have a cte that in short states SELECT mm.id1 mm.date ,mm.Datecompleted ,mn.number FROM table1 as mm left join table2 as m on mm.type = m.type left join table3 as mn on mm.id1 = mn.id1 where 1=1 and type = 29 and date is null and Completed = 1 I then have a select statement […]
General
Informatica SQL generating basic statement - I'm newbie using Informatica Data Quality Analyst  and am unable to create a basic SQL statement. The Sql query is being created against a mapping specification of a table that was imported as a flat file originally. The statement is as follows: Select ColumnA, ColumnB FROM Table1 WHERE Table1.ColumnA = 'S' That SELECT.... FROM part […]
Anything that is NOT about SQL!
Windows Server Alert When Service Doesn't Start - Not Working - I am trying to send an email when a Windows service doesn't start. What I did: I wrote a batch file that runs a short Powershell script to send an email. It works fine if I run the batch file by itself. I get an email. I have a service on my laptop set to […]
Employers and Employees
Microsoft Sql Server DBA Salary - Full time vs Contract - I have 10 years of experience as regular full time employee as MSSQL DBA - unfortunately, with a small company with some 20+ on premise servers running about 100+ databases with no HA or clustering experience. The earlier roles before the DBA role, I was in tech support and web development. Comparing my salary to […]
SQL Server 2022 - Development
Schedule a PowerBI dataset refresh on the "quarter" hour ??? - Hi all, I know very little about Power BI, but I am hopeful that someone here has enough knowledge to know whether or not it is even possible to schedule a dataset refresh on the quarter-hour instead of merely on the half-hour or top of the hour.   I know that with SSRS, I can use […]
 

 

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

 

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