Home
Videos uploaded by user “Bert Wagner”
How to Use Temporal Tables in SQL Server 2016
 
10:18
Have you ever needed to look at what data in a table used to look like? If you have, it probably took a knuckle-cracking filled session of writing group-by statements, nested sub-queries, and window functions to write your time-travelling query. Fortunately for us, SQL Server 2016 introduces a new feature to make our point-in-time analysis queries easy to write: temporal tables. Full blog post: https://bertwagner.com/2017/07/19/how-to-use-sql-temporal-tables-for-easy-point-in-time-analysis/ Want to receive the latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/ Elsewhere on the internet: https://bertwagner.com https://twitter.com/bertwagner
Views: 4855 Bert Wagner
Differences between Clustered vs Nonclustered Indexes in SQL Server
 
11:48
Should you use a clustered or a nonclustered index? When starting out with SQL, you might intuitively know that you should add an index to a table, but you might not be sure what kind of index to add. In this video we go over the basics of clustered and nonclustered indexes to help you get through index choice paralysis. Blog post with example queries: https://bertwagner.com/2017/09/26/clustered-vs-nonclustered-index-fundamentals-you-need-to-know/ Follow me on Twitter: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 7140 Bert Wagner
How to Stop Parameter Sniffing in SQL Server
 
09:07
Are your query parameters being sniffed by SQL Server? Learn how to recognize and solve parameter sniffing performance problems in your SQL queries. Links below. Blog post: https://blog.bertwagner.com/why-parameter-sniffing-isnt-always-a-bad-thing-but-usually-is-ba6a62a97b68 Follow me on Twitter: https://twitter.com/bertwagner Want to receive the latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 2789 Bert Wagner
Pinal Dave's Real World Performance Solutions
 
04:15
Sometimes it's challenging to solve tough SQL Server problems on my own. In those cases, I call up a friend like Pinal Dave for some expert advice and guidance. Thank you Pinal for collaborating on this video - it was a TON of fun to shoot and make. If you are looking to learn some practical real-world performance tuning with Pinal, check out his course: https://www.brentozar.com/go/practical Pinal's blog (this may have been the first SQL Server website I ever visited): https://blog.sqlauthority.com/ Pinal's script for identifying implicit conversions (and a few ways to solve them): https://blog.sqlauthority.com/2018/06/11/sql-server-how-to-fix-convert_implicit-warnings/ Pinal on Twitter: https://twitter.com/pinaldave Bert's behind the scenes blog post on making this video: https://bertwagner.com/2018/07/24/pinal-helps-me-fix-my-performance-tuning-problems/ Bert on Twitter: https://twitter.com/bertwagner
Views: 3895 Bert Wagner
Bert & Pinal Troubleshoot a Slow Performing SQL Server
 
07:38
Everyone has their own techniques for troubleshooting a slow performing SQL Server. In this video I chat with performance tuning expert Pinal Dave about his SQL Server tuning process. Our previous collaboration: https://youtu.be/DfoRSTFUAPc Resources: -- Replacement for DBCC INPUTBUFFER, sys.dm_exec_input_buffer: https://blog.sqlauthority.com/2016/12/04/dmv-replace-dbcc-inputbuffer-command-interview-question-week-100/ -- Finding the longest running queries: https://blog.sqlauthority.com/2016/11/20/find-longest-running-query-execution-plan-interview-question-week-098/ -- Introduction to wait stats: https://blog.sqlauthority.com/2011/02/01/sql-server-introduction-to-wait-stats-and-wait-types-wait-type-day-1-of-28/ Pinal's blog: https://blog.sqlauthority.com/ Pinal on Twitter: https://twitter.com/pinaldave Bert's blog: https://bertwagner.com/ Bert on Twitter: https://twitter.com/bertwagner
Views: 2354 Bert Wagner
Stealing Data with Second Order SQL Injection
 
04:44
Hackers can't always immediately exploit a SQL injection vulnerability. Sometimes they need to inject query fragments into a database column and wait for a different query to fall prey to their SQL injection attack. In this video we look at what a second order SQL injection attack looks like and how it works. Related blog post: https://bertwagner.com/2018/03/20/how-to-steal-data-using-a-second-order-sql-injection-attack/ Twitter: https://twitter.com/bertwagner Instagram: https://twitter.com/bertwagner Facebook: https://www.facebook.com/SQLWithBert Want to receive my latest weekly blog posts and videos in your inbox? Sign up for my weekly newsletter here: http://eepurl.com/cMkYl1
Views: 1767 Bert Wagner
Performance of SARGable queries in SQL Server
 
04:28
Are your queries SARGable? Do you want to find all non-SARGable queries running on your SQL Server? SARGable, or "Search ARGument-able", queries are those that are able to use indexes to efficiently return result sets. Finding non-SARGable queries on your SQL Server and making them SARGable is one of easiest you can do to improve your server's performance. Links below. Blog post with example queries: https://blog.bertwagner.com/how-to-search-and-destroy-non-sargable-queries-on-your-server-ff9f57c7268e Follow me on Twitter: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 664 Bert Wagner
Does SQL table join order matter?
 
14:10
Have you ever wondered if the order of the tables in your FROM clause matter? In today's video, we look at why theoretically table join order *does* make a difference for performance and why SQL Server doesn't use the order you provide. We also look at different techniques for forcing SQL Server to use the join order you specified. Blog post with all demo code and links: https://bertwagner.com/2017/11/21/does-the-join-order-of-my-tables-matter/ Presentation by Adam Machanic on row goals: https://sqlbits.com/Sessions/Event14/Query_Tuning_Mastery_Clash_of_the_Row_Goals Music by Joakim Karud http://youtube.com/joakimkarud Follow me on Twitter: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 2236 Bert Wagner
The GO Command in SQL Server Management Studio
 
03:01
You've probably seen the GO command in SSMS generated scripts - but do you know when to use it and how to fully utilize its functionality? Related blog post with example code: https://bertwagner.com/2018/05/29/what-does-the-go-command-do/ Twitter: https://twitter.com/bertwagner
Views: 1087 Bert Wagner
My Favorite SSMS Shortcut (After Copy/Paste)
 
02:57
I like the process of query writing to be as efficient as possible and I bet you do too. In today's video, I show you my most used SQL Server Management Studio keyboard shortcut (besides copy and paste) that helps me write queries faster and with fewer mistakes. Blog post with all demo code and links: https://bertwagner.com/2017/11/28/multiline-edit-block-selection-alt-highlight-trick/ Music by Joakim Karud http://youtube.com/joakimkarud Follow me on Twitter: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 955 Bert Wagner
Hash Match Join Internals in SQL Server
 
05:37
Hash Match Joins can join almost any data thrown at them. In this video learn about how the hash match join algorithm works and what seeing hash match joins in your execution plans means for performance of your queries. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post about Hash Match Joins: https://bertwagner.com/2019/01/02/visualizing-hash-match-join-internals-and-understanding-their-implications/ Be sure to check out part 1 on nested loops joins: https://youtu.be/0arjvMJihJo And part 2 on merge joins: https://youtu.be/IFUB8iw46RI Going further in-depth with hash match joins: https://sqlserverfast.com/epr/hash-match/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 889 Bert Wagner
Automating Database Maintenance with Jess Pomfret and dbatools
 
03:39
This week Jess Pomfret shows me how to automate my database maintenance using the dbatools PowerShell module. Check out Jess's companion blog post with scripts and more details: https://jesspomfret.com/dbatools-with-bert/ Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Follow Jess on Twitter: https://twitter.com/jpomfret Follow Bert on Twitter: https://twitter.com/bertwagner
Views: 986 Bert Wagner
Power Query vs DAX with Eugene Meidinger
 
04:24
Power BI has two languages to help you manipulate your data. This week we're in the kitchen with Power BI expert Eugene Meidinger to learn when to use Power Query vs DAX in Power BI. Eugene's blog post with more information: http://www.sqlgene.com/2018/04/03/m-vs-dax-chopping-broccoli-vs-planning-a-menu/ Related blog post with code snippets: https://bertwagner.com/2018/03/27/at-time-zone-the-easy-way-to-deal-with-time-zones-and-daylight-savings-time/ Twitter: https://twitter.com/bertwagner Instagram: https://www.instagram.com/codewithbert/ Facebook: https://www.facebook.com/SQLWithBert
Views: 1328 Bert Wagner
SQL Server Cardinality
 
03:12
When building indexes for your queries, the order of your index key columns matters. SQL Server can make the most effective use of an index if the data in that index is stored in the same order as what your query requires for a join, where predicate, grouping, or order by clause. But if your query requires multiple key columns, which should you list first in your index key column definition? Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post with more examples: https://bertwagner.com/2019/01/29/cardinality-isnt-just-for-the-birds/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 379 Bert Wagner
SQL Server In-Memory OLTP Use Case
 
05:27
SQL Server 2014 introduced in-memory features that have improved with every version since then. This week we go through an example use case of converting a staging ETL to using in-memory tables and natively compiled procedures to get huge performance gains. Related blog post with code snippets: https://bertwagner.com/2018/04/17/in-memory-oltp-a-case-study/ Twitter: https://twitter.com/bertwagner Instagram: https://www.instagram.com/bertwagner/ https://www.instagram.com/codewithbert/ Facebook: https://www.facebook.com/SQLWithBert
Views: 674 Bert Wagner
The Importance of Nested Loops Joins in SQL
 
07:37
Nested Loops Joins are one of the primary physical join operators used by SQL Server. In today's episode we discuss how Nested Loops Joins work, as well as how to use that knowledge to troubleshoot a slow performing query's execution plan. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post with code snippets: https://bertwagner.com/2018/12/11/visualizing-nested-loops-joins-and-understanding-their-implications/ Be sure to check out part 2 on merge joins: https://youtu.be/IFUB8iw46RI And part 3 on hash match joins: https://youtu.be/59C8c7p_hII Additional excellent blog posts that go further in-depth: https://blogs.msdn.microsoft.com/craigfr/2006/07/26/nested-loops-join/ https://sqlserverfast.com/epr/nested-loops/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 1042 Bert Wagner
Merge Join Internals in SQL Server
 
07:16
Without additional optimizations, SQL Server's Merge Join algorithm is the fastest physical join operator available. In this episode we dive into the internals to understand how the merge join algorithm works, as well as what it means for our query performance. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post about Merge Joins: https://bertwagner.com/2018/12/18/visualizing-merge-join-internals-and-understanding-their-implications/ Be sure to check out part 1 on nested loops joins: https://youtu.be/0arjvMJihJo And part 3 on hash match joins: https://youtu.be/59C8c7p_hII The pessimistic costing of merge joins: https://dba.stackexchange.com/questions/165974/how-to-force-a-merge-join-without-a-hint/166054#166054 Going further in-depth with merge joins: https://sqlserverfast.com/epr/merge-join/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 932 Bert Wagner
WITH SCHEMABINDING Performance for Scalar Functions in SQL Server
 
04:59
WITH SCHEMABINDING one of those features that will speed up the performance of your queries with almost no cost...if the conditions are right. Watch the video to learn exactly when you can get free performance improvement by using WITH SCHEMABINDING. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post with code snippets: https://bertwagner.com/2018/12/04/two-words-for-faster-scalar-functions/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 616 Bert Wagner
GAPS and ISLANDS in SQL Server
 
04:23
Sometimes you may want to identify continuous sequences of data while skipping over rows of "missing" data. This is known as the Gaps and Islands problem and today we look at one solution for it on a dataset of date ranges using window functions. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Running totals with Window functions: https://www.youtube.com/watch?v=u8arTx98MPs Related blog post with example code: https://bertwagner.com/2019/03/10/gaps-and-islands/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 331 Bert Wagner
4 Ways to Reduce Reads in SQL Server for faster performance
 
08:08
This week we take a look at 4 techniques to improve query performance by reducing IO reads. My SQL Data Partners Podcast episode on SQL Injection: http://sqldatapartners.com/2017/12/06/episode-120-sql-injection/ Last week's blog post about how to understand Statistics IO: https://bertwagner.com/2017/12/05/how-to-use-statistics-io-to-improve-your-query-performance/ This week's related blog post with links: https://bertwagner.com/2017/12/12/reducing-the-number-of-reads-in-your-queries/ Music by Joakim Karud http://youtube.com/joakimkarud Follow me on Twitter: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 921 Bert Wagner
XML vs JSON in SQL Server 2016
 
17:46
Starting with the 2016 release, SQL Server offers native JSON support. We compare JSON versus XML and determine which is better to use in SQL Server. Full blog post: https://bertwagner.com/2017/05/16/xml-vs-json-shootout-which-is-superior-in-sql-server-2016/ Want to receive the latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/ Elsewhere on the internet: https://bertwagner.com https://twitter.com/bertwagner
Views: 5867 Bert Wagner
SQL Server Implicit Conversions Hurt Performance
 
05:07
Ever wonder why your carefully crafted indexes aren't getting used? The problem might be column-side implicit conversions. Links below. Blog post: https://blog.bertwagner.com/are-your-indexes-being-thwarted-by-mismatched-datatypes-d3985375e528 Microsoft's chart of data type conversions: https://docs.microsoft.com/en-us/sql/t-sql/data-types/data-type-conversion-database-engine Jonathan Kehayias's script for finding column side implicit conversions in your plan cache: https://www.sqlskills.com/blogs/jonathan/finding-implicit-column-conversions-in-the-plan-cache/ Follow me on Twitter: https://twitter.com/bertwagner Want to receive the latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 759 Bert Wagner
Should You Enable Optimize For Ad Hoc Workloads?
 
04:13
The execution plan cache is a great feature: after SQL Server goes through the effort of generating a query plan, SQL Servers saves that plan in the plan cache to be reused again at a later date. One downside to SQL Server caching almost all plans by default is that some of those plans won't ever get reused. Those single use plans will exist in the plan cache, inefficiently tying up a piece of the server's memory. Today I want to look at a feature that will keep these one-time use plans out of the plan cache . Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post with example queries: https://bertwagner.com/2019/01/22/optimizing-for-adhoc-workloads/ Link to Brent Ozar's post on the same topic (including forced parameterization): https://www.brentozar.com/archive/2018/03/why-multiple-plans-for-one-query-are-bad/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 337 Bert Wagner
A Better Way To Create Scripts for Multiple SQL Database Objects
 
04:17
Have you ever wanted to generate the CREATE scripts for many database objects at once without having to right click on every single table, index, stored procedure, etc... Today we look at the Generate Scripts Task, the most efficient way to generate CREATE scripts for multiple objects at once in SQL Server Management Studio This week's related blog post with screenshots and details: https://bertwagner.com/2018/01/02/a-better-way-to-script-database-objects/ Music by Joakim Karud http://youtube.com/joakimkarud Follow me on Twitter: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 577 Bert Wagner
Performance Tuning with Statistics IO
 
08:08
There's no on way to performance tune a query. Today, I show you my preferred way to get started using a quick and easy technique that everyone should have in their arsenal. Blog post with all demo code and links: https://bertwagner.com/2017/12/05/how-to-use-statistics-io-to-improve-your-query-performance/ Music by Joakim Karud http://youtube.com/joakimkarud Follow me on Twitter: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 659 Bert Wagner
One SQL Cheat Code For Amazingly Fast JSON Queries - SQL JSON Index performance
 
10:41
How non-persisted computed column indexes make your JSON queries high performance. Did you know that non-persisted columns actually get saved to the index pages? This makes JSON querying incredibly fast in SQL Server. Please like and subscribe if you enjoyed this video! Blog post: https://bertwagner.com/2017/05/09/one-sql-cheat-code-for-amazingly-fast-json-queries/ Want to receive the latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/ Elsewhere on the internet: https://bertwagner.com https://twitter.com/bertwagner
Views: 3244 Bert Wagner
SQL FAILS with Andy Mallon, Erin Stellato, and Mr. Anonymous!
 
06:48
While most of us strive to make as few mistakes as possible when it comes to our servers and data, accidents do occasionally happen. In today's video, watch as Andy Mallon, Erin Stellato, and Mr. Anonymous share some of their most memorable SQL mishaps. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Andy Mallon: https://am2.co https://twitter.com/amtwo Erin Stellato: https://www.sqlskills.com/about/erin-stellato/ https://twitter.com/erinstellato Mr. Anonymous: https://bertwagner.com/reveal-mr-anonymous https://bertwagner.com/reveal-mr-anonymous-twitter Follow me on Twitter: https://twitter.com/bertwagner
Views: 892 Bert Wagner
SQL Server Multiple Recursive Member CTEs
 
06:34
Recursive CTEs are helpful for solving certain types of problems in SQL Server. But did you know that you can write CTEs with MULTIPLE recursive statements? Learn how in this week's episode. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post with full example code goodness: https://bertwagner.com/2018/08/21/fizzbuzz-and-multiple-recursive-member-ctes/ Itzik Ben-Gan's article on multiple recursive member CTEs: https://www.itprotoday.com/software-development/ctes-multiple-recursive-members Follow me on Twitter: https://twitter.com/bertwagner
Views: 525 Bert Wagner
Window Functions vs Group By
 
10:29
One option for improving query performance is to rewrite the query in order to obtain a completely different execution plan. In this episode we look at how it's possible to rewrite queries with Window Functions into more traditional GROUP BY syntax and what causes the difference in performance. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post with example code: https://bertwagner.com/2019/04/16/window-functions-vs-group-bys/ More examples with Window Functions: https://youtu.be/ffNngUTqYBM Download the StackOverflow database for yourself: https://www.brentozar.com/archive/2015/10/how-to-download-the-stack-overflow-database-via-bittorrent/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 240 Bert Wagner
Time zone conversions with SQL Server's AT TIME ZONE
 
02:57
Traditionally converting dates between time zones and accurately handling daylight savings time has been a huge pain. SQL Server 2016's AT TIME ZONE feature makes this a little easier. Related blog post with code snippets: https://bertwagner.com/2018/03/27/at-time-zone-the-easy-way-to-deal-with-time-zones-and-daylight-savings-time/ Twitter: https://twitter.com/bertwagner Facebook: https://www.facebook.com/SQLWithBert
Views: 1071 Bert Wagner
Does The Order Of Index Columns Matter?
 
06:26
Have you ever wanted to create an index to improve SQL query performance but were unsure of what columns to include or what order to put them in? This video will explain everything you need to know to understand how SQL row store indexes work. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post with examples and graphics: https://bertwagner.com/2018/09/04/does-the-order-of-index-columns-matter/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 531 Bert Wagner
How NOLOCK causes blocking
 
07:54
You probably know that SQL queries with NOLOCK hints can return inconsistent data, but did you know your NOLOCK queries can prevent other queries from running? It's a common misconception that a WITH (NOLOCK) query hint will force your SELECT statement to not take out any locks. This is incorrect though because *all* SELECT statments, adorned with NOLOCK or not, take out a schema stability lock. In this video we learn what a schema stability lock does and how it can create problems on your server, including delaying index maintenance jobs and blocking other SELECT queries (even those with NOLOCK!) from running. Blog post with example queries: https://bertwagner.com/2017/10/10/how-nolock-will-block-your-queries/ Follow me on Twitter: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 1799 Bert Wagner
Handling Time Zones and Daylight Saving Time in SQL Server
 
04:13
Working with different time zones and daylight saving time with SQL Server *can* be pretty easy with AT TIME ZONE...if you set your data up correctly. In this video we talk about the time zone of various data types and how to make sure your AT TIME ZONE conversions work as expected. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post with example code: https://bertwagner.com/2019/03/05/datetime2s-time-zone/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 337 Bert Wagner
How To Parameterize SQL Table Names
 
02:48
Do you know how to safely pass in a table name or column name parameter value into your dynamic SQL query? sp_executesql won't allow you to parameterize SQL object names. You have to revert back to building dynamic SQL and appending those parameter values to your SQL string. In this video we examine how to do so safely without opening yourself up to SQL injection attacks. Links below. Blog post with example queries: https://bertwagner.com/2017/09/05/how-to-safely-parameterize-table-names/ Follow me on Twitter: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 1613 Bert Wagner
Rolling Back Temporal Tables
 
08:26
Temporal tables are great because if you make a mistake you can just roll back to the data from your historical table...right? Yes, but it's not that easy. There's no built-in method to "roll-back" data in a temporal table. A roll-back is possible though with some SQL querying; watch the video to see how it's done! Full blog post with demo code: https://bertwagner.com/2017/05/30/how-to-roll-back-data-in-a-temporal-table/ Want to receive the latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/ Elsewhere on the internet: https://blog.bertwagner.com https://twitter.com/bertwagner
Views: 886 Bert Wagner
4 Types of SQL Injection
 
10:27
The best way to protect yourself from SQL injection attacks is to understand how they work. In this video we look at 4 different types of SQL injection as well as how to make your queries injection-safe. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post: https://bertwagner.com/2018/11/20/4-sql-injection-techniques-for-stealing-data/ My group by session on securing against SQL injection: https://www.youtube.com/watch?v=qrOLg3wjjOs Follow me on Twitter: https://twitter.com/bertwagner
Views: 1024 Bert Wagner
How to Use the SSMS Clipboard Ring
 
01:34
Have you ever wanted to paste something from memory that wasn't what you just immediately copied to the clipboard? The SQL Server Management Studio Clipboard Ring lets you do exactly that. Blog post: https://blog.bertwagner.com/one-ssms-trick-that-will-make-you-a-faster-query-builder-57d0b1cdc7b1 Follow me on Twitter: https://twitter.com/bertwagner Want to receive the latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 275 Bert Wagner
COUNT, DISTINCT, and NULLs in SQL Server
 
03:25
NULLs are interesting values. While they fill an important need in the database, it's not always intuitive how different SQL Server statements and functions handle them. This week we examine how COUNTs and DISTINCTs interact with NULLs...and how they may not always be doing what you expect with them. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post with more examples: https://bertwagner.com/2019/02/19/count-distinct-and-nulls/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 370 Bert Wagner
Generating Multi-Object JSON Arrays in SQL Server
 
09:11
Sometimes you want to do as much processing on your SQL Server as possible before returning any data back to your app or report. Today, we take a look at how to return a JSON array from SQL Server that contains DIFFERENT types of objects in it - something that is not as easy as it may sound. This week's related blog post with demo code: https://bertwagner.com/2017/12/22/how-to-create-json-multi-object-arrays-in-sql-server/ Music by Joakim Karud http://youtube.com/joakimkarud Follow me on Twitter: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 1499 Bert Wagner
How do I contribute to dbatools? with Drew Furgiuele
 
03:58
Maybe you are already using the dbatools PowerShell module (psst...if you aren't, you should!) and have ideas on how to make it even better. I caught up with PowerShell expert (and dbatools contributor!) Drew Furgiuele at SQL Saturday Cleveland and learned how to start contributing to the open-source dbatools project, including ways to get involved other than writing code. Getting started with dbatools: https://dbatools.io/getting-started/ dbatools on YouTube: http://dbatools.io/youtube Drew's website and blog: http://port1433.com Bert's blog post with additional information: https://bertwagner.com/2018/02/06/how-to-contribute-to-dbatools-with-drew-furgiuele/ Follow me on Twitter: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: http://eepurl.com/cMkYl1
Views: 995 Bert Wagner
How to Automatically Delete Historical Data From a Temporal Table
 
04:15
Temporal Tables are awesome but they sure do accumulate historical data quickly. Today we discuss how to automatically purge old data out of a temporal table's history table, and some of the caveats that come along with doing so. Blog post with code samples: https://bertwagner.com/2017/07/04/how-to-automatically-purge-historical-data-from-a-temporal-table/ Follow me on Twitter: https://twitter.com/bertwagner Want to receive the latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 1153 Bert Wagner
Split Screen Queries in SSMS
 
02:02
Sometimes it's nice to be able to reference another query by having it open directly next to the current query you are working on. While there are multiple ways of achieving this layout, SQL Server Management Studio's vertical tab groups are the most effective. Related blog post with additional examples: https://bertwagner.com/2018/02/27/splitting-it-up-easy-side-by-side-queries-in-ssms/ Twitter: https://twitter.com/bertwagner Instagram: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for my weekly newsletter here: http://eepurl.com/cMkYl1
Views: 322 Bert Wagner
Is your ORM vulnerable to SQL Injection?
 
04:01
Someone recently told me that they don't need to worry about SQL injection vulnerabilities because they are using an ORM. Oh boy. In this episode I show you a few different ways that ORMs are vulnerable. Want to learn how to protect yourself from SQL injection attacks? Join me at the online GroupBy conference on March 16, 2018 https://groupby.org/ Related blog post: https://bertwagner.com/2018/03/06/2-5-ways-your-orm-will-allow-sql-injection/ Twitter: https://twitter.com/bertwagner Instagram: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for my weekly newsletter here: http://eepurl.com/cMkYl1
Views: 459 Bert Wagner
3 SQL Dev Tools I Can't Live Without
 
03:15
While SQL Server Management Studio is excellent for writing queries and managing databases, it does not do everything that I need when working with SQL Server (nor do I think it should!). Today I want to share with you 3 of my favorite SQL related tools that I use on a regular basis. Related blog post with more demos and links to the tools: https://bertwagner.com/2018/04/10/3-essential-tools-for-the-sql-server-developer/ Twitter: https://twitter.com/bertwagner Facebook: https://www.facebook.com/SQLWithBert
Views: 415 Bert Wagner
The EASIEST Way To Find SQL Query Errors
 
03:29
Did you know that there's a faster way to pinpoint the syntax errors in your SQL queries than relying on SSMS's difficult to interpret error line numbers? Watch today's episode to learn how. Blog post with additional screenshots: https://bertwagner.com/2018/01/30/the-fastest-way-to-locate-errors-in-your-sql-query/ Music by Joakim Karud http://youtube.com/joakimkarud Follow me on Twitter: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: http://eepurl.com/cMkYl1
Views: 1121 Bert Wagner
Joining on NULL values in SQL Server
 
05:18
SQL Server prevents rows from being joined together using the regular join syntax if the column values contain NULLs. In today's episode I show you a couple of different ways to fix that. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post with example code: https://bertwagner.com/2019/03/26/joining-on-nulls/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 351 Bert Wagner
5 Business Problems You Can Solve Using Temporal Tables
 
09:24
In this video we examine five real-world scenarios showing how temporal tables can reduce the amount of time you spend writing analysis queries. Featuring my cat Charlie as the "Heartless Manager." Original blog post: https://bertwagner.com/2017/06/20/5-business-problems-you-can-solve-with-temporal-tables/ Want to receive the latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/ Elsewhere on the internet: https://blog.bertwagner.com https://twitter.com/bertwagner
Views: 760 Bert Wagner
FAKING Temporal Tables with Triggers
 
04:56
For T-SQL Tuesday #106 I share one of the few times I use triggers in my code: to fake temporal table functionality in older versions of SQL Server. Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post with examples and graphics: https://bertwagner.com/2018/09/11/faking-temporal-tables-with-triggers/ And another blog post about how to use ACTUAL temporal tables in SQL Server 2016+: https://bertwagner.com/2017/07/19/how-to-use-sql-temporal-tables-for-easy-point-in-time-analysis/ This month's T-SQL Tuesday #106 invitation post: https://voiceofthedba.com/2018/09/03/t-sql-tuesday-106-trigger-headaches-or-happiness/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 437 Bert Wagner
Techniques to Troubleshoot Your Code
 
03:17
At some point you've probably felt like you've hit a road block when getting working on a programming problem. Here are some techniques to help you troubleshoot and solve your issue. Be sure to subscribe and watch new SQL Server videos every week: https://www.youtube.com/c/bertwagner?sub_confirmation=1 Related blog post: https://bertwagner.com/2018/08/14/6-techniques-for-troubleshooting-problems-in-your-code/ Follow me on Twitter: https://twitter.com/bertwagner
Views: 421 Bert Wagner
Importing GeoJSON Data Into SQL Server
 
07:49
Today we're looking at how to import GeoJSON earthquake data into SQL Server. We'll use SQL Server's JSON functions as well as the geography data type and spatial functions to transform and make the data ready for analysis. Blog post with demo code and example data: https://bertwagner.com/2018/01/16/importing-geojson-earthquake-data-into-sql-server/ Music by Joakim Karud http://youtube.com/joakimkarud Follow me on Twitter: https://twitter.com/bertwagner Want to receive my latest weekly blog posts and videos in your inbox? Sign up for the newsletter here: https://upscri.be/c77fc8/
Views: 778 Bert Wagner

Here!
Here!
Here!
Here!
Here!