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

Daily Coping Tip

Start friendly conversations with people you don’t know

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.

The Challenges of Resetting Databases

I was working on a demo recently where we had a database in version control and a development database. This was a team environment, with a few of us making changes and syncing them across our dev systems using git. We had some advanced technology with our dev environments in containers, Flywaydb, and GitHub. Once we had our scenarios working, someone wanted to reset our git repo and capture a new database image.

However, when we reset the repo back, we had some issues with the database. In this case, there were changes in the database that didn't exist in the repo, giving us a mismatch. Not a big problem, but cleaning things out to get the db to match the repo, without putting those changes into the repo, was a challenge.

A developer I was working with got a little frustrated, because when working in C#, there is no state. If we reset the repo and sync our local copy, we have everything ready to go. However, a database repo isn't the same because there is often a database that exists separately.

This is the main challenge when working with databases, relational or otherwise, in a development environment. Experiments, bug fixes, even testing data changes persist over time. Resetting data to repeat tests, or even automating tests, can be hard.

This is one reason I think containerization and subsetting of production datasets will become very important over time as we try to ensure we can react to business requirements and keep our teams coordinated. These technologies ensure we always have a known starting point for our databases.

Hopefully Microsoft, more vendors, and us as developers help advance these technologies, as well as build more skill. I'm grateful to Andrew Pruski, Anthony Nocentino, and others for the information they share about containers and databases. Hopefully we see more people engaging in these areas over time.

Steve Jones - SSC Editor

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

 
 Featured Contents

Database Modeling - Relationships

ukashishgarg from SQLServerCentral

A proper relationship between two people, places or things improves the communication between them. In every real-world based application, this logic holds and a database is no different. This article discusses the different relationship types possible between database objects. The designing of these relationships between them is called modeling, and the three types of relationships […]

So, You Want to Be a DBA…

Additional Articles from SimpleTalk

Many people with tech careers did not follow a straight path to get there. In this article, Pamela Mooney gives some advice for those who would like to be a DBA.

From the SQL Server Central Blogs - Cleanup Pesky SQL Error Logs

gbargsley from GarryBargsley

If you are like me, you inherited variously configured SQL Servers when you took over as the DBA for your company. After almost two years, I have gotten all...

From the SQL Server Central Blogs - A kubectl plugin to decode secrets created by Helm

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

Last week I wrote a blog post about Decoding Helm Secrets. The post goes through deploying a Helm Chart to Kubernetes and then running the following to decode the...

 

 Question of the Day

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

 

Setting Server Memory

I can set the instance memory with an sp_configure command:
EXEC sys.sp_configure
    @configname = 'max server memory'
  , @configvalue =
I enter a value for the configvalue in what format?

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)

What is a Pull Request?

What is a pull request in Git/GitHub?

Answer: A notification to let others know you have made changes in your branch that need to be looked at and merged into another branch

Explanation: From GitHub: Pull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch. Ref: About Pull Requests - https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests

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
Changing values in Partitioned Key - Hi All One interesting scenario here. We have a partitioned table which is partitioned based on a date column. The clustered Primary key is a composite key with ID+ that Date column. The table also has some 25 non clustered indexes. Now the value of partitioned key (i.e. the date column) might change. So that […]
How to create a role and add data_reader and execute permission on 2 databases - Hi Can someone tell me the easiest way to create a new role (report_user_role)  on 2 databases which gives it the data_reader permissions and execute permissions on 2 databases. I then want to create a new user report_user and assign that role to it so it can read all tables in the 2 databases and […]
SQl server 2016 Installation - Hi, I have to install the sql 2016 on new server. I want to copy the same settings and directory structure of an other instance, so maybe for directory structure I need to create folders which I can do in specific drive ( Not C Also, I want to keep the same configuration or […]
SQL Server 2016 - Development and T-SQL
Sum of column from multiplied columns - I would like to get the sum of "Transaction Cost" as created from the multiplication of TxQty and AvgCostOld. Any help would be appreciated. SELECT  Item, TxQty, AvgCostOld,  TxQty*AvgCostOld AS TransactionCost,  TxNumber,  TxDate FROM     tblimInvTxHistory WHERE  TxDate > '2020-08-25' AND         TxCode = 'ADJ'
LEGACY_CARDINALITY_ESTIMATION = ON and COMPATIBILITY_LEVEL - Hi everyone, we migrated from sql 2012 to sql 2016 and since then we have been facing some performance issue. We decided to change the compatibility level to 110 (sql 2012) and set the LEGACY_CARDINALITY_ESTIMATION= ON. It helped but then we were still having performance issues and we switched back to the original configuration. Now, […]
Xpath query with cross apply help - almost got it - The node that is used in the cross apply has multiple instances. The OTimes node has 2 children (OTime) each with its own set of values. I'm trying to extract the PNum and StartDate. My XML N32</AC KLR 780 1000 2020-09-22T08:14:00 4f91926f-9e8a-42cd-9168-1a544b70cdc8 true ABC DEF GHI X4507A 2020-09-19T13:35:00 […]
Administration - SQL Server 2014
FCI - I have two standalone SQL Server instances. Planning to configure SQL Server FCI between those two instances. Is that possible or I need two nodes without SQL Server on it? Please advise? Thanks in Advance!
SQL 2012 - General
NT authority/system - In our environment someone is using nt authority/system account with sysadmin permission I have checked the logs, event viewer but not able to find how/who assigned this and when Is there a way to find this   Thanks Atulyan
SQL Server 2012 - T-SQL
SELECT CASE WHEN to avoid Divide by Zero - Hello: I think I might be close here, but I need to return 0 if there is division by zero. SELECT        JobInfo.JobNo, JobInfo.Product, JobInfo.ItemType, JobInfo.Detail, JobInfo.Started, JobInfo.Completed, JobInfo.Engineer, JobInfo.Designer, JobInfo.EstHrs, JobInfo.ShipTo, JobHrs.ActualHrs, CASE WHEN JobInfo.EstHrs > 0 THEN ((JobInfo.EstHrs / JobHrs.ActualHrs) * 100) AS Efficiency ELSE 0 AS Efficiency FROM            JobInfo INNER JOIN JobHrs ON […]
SQL Server 2019 - Development
find group of time - hi all, i have the follwing table : 10 lines i want to show only row after 30 second (should be paramter :)) between them. ( as summery of previous records) on this record set: 2020-08-26 00:00:00.000  --first line bring 2020-08-26 00:00:20.000 -- 30 second not over avoid this record 2020-08-26 00:00:25.000 -- 30 second […]
Reporting Services
Two Tablix in a report - I have a report that renders two different outputs depending on a parameter(Summary or Detail). I have to add a new column to both reports. When I add a new column, its only adding to the detail report. I can't figure out how to change both. I'm using report manager to do this but could […]
General
GMSA for use on Windows Task Scheduler Job - Hi team, I created a new windows task scheduler job using GMSA. Command was success: $Action = New-ScheduledTaskAction "E:\TEST\DeleteFiles.bat" $Trigger = New-ScheduledTaskTrigger -At 06:00 -Daily $Principal = New-ScheduledTaskPrincipal -UserID DOMAIN\SVCSQL$ -LogonType Password Register-ScheduledTask TestTask –Action $Action –Trigger $Trigger –Principal $Principal The task is just clear any files in a folder, example D:\TEST\ - any files […]
SSDT
How to dynamically create a table in SQL from a Excel file using SSDT - Hi, I am fairly new to SSDT and am looking for some help with loading excel files that I have been provided for a project. The files will all have the consistent file names and consistent tab names but that is where the consistency ends. The tabs can have from 1 to 150 columns  with […]
Integration Services
SSIS Package Slow As Agent Job vs Manual DTexec execution - Hello Folks, I have an SSIS package on a machine(SQL Server 2017, Windows Server 2016) that has user configured variables for table names and exports 3-4 tables from SQL Server database to a flat file and later zip it so essentially it is doing a select * from view (the view in question here is […]
Anything that is NOT about SQL!
Best place to find SQL Server Consultants - Where would be the best place to find really decent SQL Server consultants: I am stuck between those freelancer websites that seem to be filled with really low quality SQL consultants (there are amazing ones there too but a drop in a bucket), and looking at sql consulting shops that have the most amazing talents […]
 

 

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

 

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