Attaching a CDC enabled database on SQL Server 2016

When you detach a database with Change Data Capture enabled on SQL Server 2014 and below and attach it to a SQL Server 2016 instance, you could run into the error mentioned below while execute Change Data Capture (CDC) related procedures.

Error:

Msg 22832, Level 16, State 1, Procedure sp_cdc_enable_table_internal, Line 639 [Batch Start Line 0]

Could not update the metadata that indicates table [<schema name>].[<object name>] is enabled for Change Data Capture. The failure occurred when executing the command ‘insert into [cdc].[captured_columns]’. The error returned was 213: ‘Column name or number of supplied values does not match table definition.’. Use the action and error to determine the cause of the failure and resubmit the request.

This is due to the fact that there is a metadata change in SQL Server 2016 associated with Change Data Capture which does not happen till you manually execute sys.sp_cdc_vupgrade against the newly attached database on the SQL Server 2016 instance.

The “Attach a Database” online documentation has also been updated to reflect this information.

#AskSQLTiger Twitter Chat on June 27

Join the SQL Server Tiger team for a Twitter Chat on Monday, June 27th from 10 -11 AM PST. You can ask anything about Query Performance on SQL Server for our first Twitter chat. 

Log on at the time above, make sure to include #AskSQLTiger in every Tweet you make, and you’ll be part of our discussion. Or, follow this link to see the #AskSQLTiger feed. Tools like TweetdDeck, HootSuite can be helpful in following along in a Twitter Chat. Members of the @mssqltiger will be moderating the discussion.

More details can be found here.

Recent session at PASS HADR VC session

I recently delivered a session for High Availability and DBA Fundamentals on June 14th about the recent High Availability and Disaster Recovery enhancements that were delivered/to be delivered in recent Service Packs of SQL Server. The session recording is available on YouTube, the slide deck is available on Slide Share and the demo scripts along with the Power BI dashboards are available on GitHub

SQL Server 2012 Service Pack 3 and the upcoming SQL Server 2014 Service Pack 2 provide extended events which helps track down two of the most common issues that DBAs have to cope with during an outage situation related to Availability Groups: Latency and Lease Timeouts (which could result in failovers). These new extended events have been shipped based on customer feedback that we heard, acted up and shipped. If you have an Availability Group setup, then come learn about the new enhancements shipped with SQL Server 2012 Service Pack 3 and the upcoming SQL Server 2014 Service Pack 2 and above which allows you to troubleshoot failovers more easily and pin point the latency in your environment more efficiently.

Sessions at SQLNEXUS and SQLBITS

I will be presenting at two different conferences in Europe: SQL Nexus and SQLBITS. Joseph Sirosh, Corporate Vice President of the Data Group, will be delivering the keynotes at both these conferences. There are multiple sessions from Microsoft speakers from Data Group, SQL Server Customer Advisory Team (more famously known as SQLCAT) and other SQL Server community experts which would make this conference worth your time.

My team, MSSQLTIGER, will be presenting other sessions at these events. A full list can be found on the Tiger blog.

SQL Nexus – 2nd – 4th May, 2016

Session Name: Recent SQL Server Enhancements: We heard, We built, We shipped! (Session Link)

Length: Full Day

Date: 2nd May, 2016

Session Abstract:

  • Have you wondered if there was an enhancement which made your job easier in monitoring or troubleshooting a SQL Server issue?
  • Have you ever wished for a change in SQL Server which made your job easier?
  • Did you wonder what SQL Server can do for you in the cloud?

If your answer was YES to any of the questions above, then attend this session to know more about the improvements in SQL Server which would help your current workloads on SQL Server 2012, SQL Server 2014 and SQL Server 2016.  We will discuss enhancements done for high availability and disaster recovery, monitoring, performance, scalability and much more along with demos and scripts that you can take home. We will talk about how we listened, understood and delivered on feedback that we received from customers using SQL Server.  We will also show you ways to leverage data movement capabilities between your on-premise datacenters and Azure which will help you expand your boundaries to Azure SQL DB and Azure Virtualizations.

This is a session for DBAs, Database Developers and anyone who runs a production SQL Server instance on the ground, up in the cloud or anywhere in between!

You can also catch us at SQL Clinic where we you can drop by to say Hi, ask your SQL Server question or provide feedback about the product!

SQL BITS – 4th May – 7th May, 2016

Session Name: Debugging made easier using Extended events (Session Link)

Level: 300

Date: 6th May, 2016

Time: 3:30pm – 4:45pm

Session Objectives:

  1. Understand the diagnostics enhancements available in SQL Server database engine in SQL Server 2012 Service Pack 3 and above
  2. Leverage the diagnostics to troubleshoot and mitigate issues quickly in mission-critical environments
  3. Simplify troubleshooting experience for common SQL Server scenarios

Session Name: Always On Availability Group Troubleshooting Ninja (Session Link)

Level: 400

Date: 6th May, 2016

Time: 12:15pm – 1:15pm

Session Objectives:

  1. Troubleshoot failovers in your Availability Group easily
  2. Determine the reason for connectivity loss and timeouts
  3. Understand which part of your topology is the reason for latency

MSSQLTIGER and April PASS Virtual Conferences

Cross post from http://aka.ms/sqlserverteam

PASS Virtual Chapters (VC) are interest-based forums that unite the SQL Server community through live webcasts with top SQL Server experts, online forums and resources – including an archive of past presentations, and special training events. The MSSQL Tiger team will be presenting at PASS VC sessions on different topics in the coming months. We will keep announcing the upcoming sessions on this blog.

The two sessions that we will be presenting in April are mentioned below. If you are interested in in-memory technologies or leveraging PowerShell for your SQL Server instances, then the two sessions below would be of interest to you.

April 20th at 10am PST (In-memory VC): Real-Time Operational Analytics in SQL Server 2016 [Session Registration Link]

SQL Server 16 enables customers can run analytic queries on in-memory and disk-based OLTP tables with minimal impact on business critical OLTP workloads, requiring no application changes. This session covers various configurations and best practices for achieving significant performance gains with Operational Analytics.

April 20th at 9am PST (PowerShell VC): You, SQL Server and PowerShell [Session Registration Link]

In this session, Microsoft’s SQL Server Tiger Team will talk about how some best practice checks can be automated for SQL Server instances running on your on-premise data centers and on Azure Virtual Machines. Attend this session to learn how you can leverage the POWER of PowerShell to automate health checks, keep your systems healthy and run SQL Server efficiently! As an added bonus, this session will also cover some of the new enhancements available in SQL Server 2016 setup which will allow you to implement these best practices while installing SQL Server!

The PowerShell scripts can be downloaded from https://github.com/amitmsft/SqlOnAzureVM

The session slide deck is available below.

The session recording is available on YouTube.