SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

The Voice of the DBA

The Best Days

I recently asked about the worst days in your career, so today let's turn it around. What are the best days of your career? If you can give us a list of 2 or 3 days, projects, accomplishments, etc., it might be fun to read.

Throughout my career, I have lots of little successes where I accomplish something that a client needs. Those add up, and they're good, but by nature there are so many and the numbers tend to blur the lines in my mind. Unfortunately, the mistakes I've made tend to be more memorable and stick in my mind. I really have to think about what I would consider the best days.

There are a couple software deployments that I consider to be successes, though none overly memorable. Getting my code into production is great, but rarely is a change a huge win. Instead, it takes time for clients to use the code, to understand the impact, and for me to be sure that the code works as expected.

I remember getting our first automated deployment done, almost twenty years ago, when we had moved from a manual process of collecting scripts and trying to ensure they were correctly ordered and contained all the changes we needed. After weeks of working on an automated process to collect, order, and execute scripts, we tested things in QA. Then a day later in production. Overall this was a non-event, with the deployment taking minutes. The change from constantly checking scripts, results, and manually executing code was amazing and the reduction of time spent getting ready was notable.

I also remember a great day as a DBA, when we experienced a server crash and had to rebuild new hardware. I was away with family, but I knew my backup and restore procedures were ready. I walked a manager through restoring a database, using a script to automatically build the log restore scripts, and then executing those scripts. While driving with my family, completely hands off, I helped recover a database.

I hope you have some good memories of your career, and can share one or two today.

Steve Jones from SQLServerCentral.com

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


The Voice of the DBA Podcast

Listen to the MP3 Audio ( 3.0MB) podcast or subscribe to the feed at iTunes and Libsyn. feed

The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music.

ADVERTISEMENT
Webinar

Is HIPAA impacting your data delivery processes?

We are entering a new world of data privacy which has moved from the desks of legislators, into the hands of the people. So how do we protect our customers and still deliver them value?
Register now

SQL Provision

NEW SQL Provision: Create, protect, & manage SQL Server database copies for compliant DevOps

Create and manage database copies effortless and keeps compliance central to the process. With SQL Provisions virtual cloning technology, databases can be created in seconds using just MB of storage, enabling business to move faster. Sensitive data can be anonymized or replaced with realistic data to ensure data is protected as it moves between environments. Download your free trial

Featured Contents

 

Using Code Snippets in SSMS

Luis Cazares from SQLServerCentral.com

Snippets will allow you to code faster by inserting chunks of code with few key strokes. More »


 

How to Check Performance on a New SQL Server

Additional Articles from Brent Ozar Unlimited Blog

Before you go live, test your backup and CHECKDB speeds. More »


 

Forget GDPR. Think HIPAA, SOX, PCI, SHIELD and the CCPA.

Data protection legislation in the USA, however, has been around for a long time, and more is on the way, and for most types of business, the changes will move compliance from a minor issue to a big concern. More »


 

From the SQLServerCentral Blogs - A PowerShell Conference In A Book

Rob Sewell from SQLServerCentral Blogs

A Question Shortly after the European PowerShell Conference and the PowerShell and Devops 2018 summit in the USA Mike Robbins b... More »


 

From the SQLServerCentral Blogs - Azure Cosmos DB – Partition and Throughput

Arjun Sivadasan from SQLServerCentral Blogs

In my previous article Introduction to Azure Cosmos DB, I mentioned Partition and Throughput only briefly. Adopting a good partition scheme... More »

Question of the Day

Today's Question (by Steve Jones):

Where can I use the UPDATE() function?

Think you know the answer? Click here, and find out if you are right.


We keep track of your score to give you bragging rights against your peers.
This question is worth 1 point in this category: UPDATE().

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

Microsoft SQL Server 2017 on Linux

This comprehensive guide shows, step-by-step, how to set up, configure, and administer SQL Server 2017 on Linux for high performance and high availability. Written by a SQL Server expert and respected author, Microsoft SQL Server 2017 on Linux teaches valuable Linux skills to Windows-based SQL Server professionals. You will get clear coverage of both Linux and SQL Server and complete explanations of the latest features, tools, and techniques. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I have this code to create a table and add an index.

 CREATE TABLE dbo.PurchaseOrder ( PurchaseOrderKey INT IDENTITY(1, 1) NOT NULL CONSTRAINT PurchaseOrderPK PRIMARY KEY , PONumber VARCHAR(100) , CustomerName VARCHAR(100) , PODate DATETIME , PODetails XML ); GO CREATE PRIMARY XML INDEX PurchaseOrderXML ON dbo.PurchaseOrder (PODetails); GO 

I now run this:

 ALTER TABLE dbo.PurchaseOrder DROP CONSTRAINT PurchaseOrderPK GO 

What happens?

Answer: There is an error that the PK cannot be dropped

Explanation:

An PK constraint cannot be dropped if there are XML or spatial indexes on the table. This is the actual error:

Msg 3734, Level 16, State 1, Line 18
Could not drop the primary key constraint 'PurchaseOrderPK' because the table has an XML or spatial index.
Msg 3727, Level 16, State 0, Line 18
Could not drop constraint. See previous errors.

Ref: ALTER TABLE (Drop section) - click here


» 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 : SQL Server 2017 - Development

Trying to use column data as a field name for XML code - I would appreciate any assistance I can get with this problem.  Thank you. I have a dataset that contains only the...


SQL Server 2016 : SQL Server 2016 - Administration

SQL Server 2016 - Catching Up Since SQL Server 2008R2 - We are moving from SQL 2008R2 to 2016 and needless to say I'm not up to date with the changes...

SSMS failing to install on windows 10 - Ssms keeps hanging on the isolated VS step and fails with error 80070643


SQL Server 2016 : SQL Server 2016 - Development and T-SQL

create cursor in sql - Hi everyone , I want to create simple update cursor in sql. following sql take almost 1 hour to execute .please help.  UPDATESET='DELIN'FROMAINNERJOIN

SQL Server 2016 syntax error - Hi All, We are in process to upgrade our SQL Server database from SQL Server 2008 to SQL Server 2016. The...

Connection properties save location - Possibly a bit off topic, but does anyone know where the properties are saved when you create a connection to...

Joins clarification - Let's say I have Table A and Table B. Table A can join onto Table B because both tables have a...


SQL Server 2014 : Administration - SQL Server 2014

Find space used by image columns - By default, Image data (and some other types) are written to PRIMARY.  Is there any way to find out how...


SQL Server 2014 : Development - SQL Server 2014

Omit selected fields from the GROUP BY clause - Hello, Is it possible for me to omit fields that are in the select statement from the group by clause at...

large volume test data - PK constraint - Hi I have a table with 4-column composite PK. What is the best way to generate high volume test data without violating...


SQL Server 2012 : SQL 2012 - General

2 identical plans - different performance when query run on different servers - Hi - This is a very odd behaviour and the opposite of what you may expect. I have a stored procedure that...

Split values and compare with another table using Join - I have two tables called Components and PDF_MSDS. This Component table contains f_chem_name,f_component_id and f_chem_name columns and it contains below...


SQL Server 2012 : SQL Server 2012 - T-SQL

average value before and after a point in time **without** using a union all - Hello, I seek a way to show daily data with a 30 days average before an event occurred and the 30...


SQL Server 2008 : SQL Server 2008 - General

Findfirst VBA for SQL table - Hi All, So I am transferring an access BE to SQL.  One of the things I've noticed is that some code...


Reporting Services : Reporting Services

stored procedure not receiving null value from parameter in SSRS 2008 R2 report - I have a question on how to pass a parameter equalling NULL to a stored procedure linked to my SSRS...


Data Warehousing : Integration Services

How to a use a temp table as a destination for a dataflow in SSIS - I need to use data from one server to update a table on another server.  For reasons of GDPR compliance...

Parallel SSIS processing - Hi,  I need advice. I have almost 100 files into Network drive. If I process 100 files through "Foreachloop container" it...

0000 (4 zeros) turn into 0 (1 zero) when exported to .csv file - Database table field is Varchar(4), value is 0000  (4 zeros) exporting it  to .csv file via Flat File Destination/Flat File...


SQL Server 2005 : SQL Server 2005 General Discussion

Help with creation of Trigger to capture failed INSERTS - Hello. I want to create a trigger on a table on INSERT. So when an INSERT attempts to happen on the...


SQL Server 2005 : SQL Server 2005 Integration Services

File System Task Expressions - Okay, I'm stumped and my google-fu does not work so well today. How do you make the Source and Destination...

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.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2018 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com