New: tsqlAll contenthive-129948hive-196917krhive-150122steemhive-180932zzanhive-185836hive-144064hive-183959hive-188619hive-101145hive-183397hive-145157uncommonlabhive-139150hive-166405photophotographyhive-180301hive-103599hive-109690bitcoincryptidhuntersteem-atlasTrendingNewHotLikerssqlinsix (55)in data • 4 years agosteemCreated with Sketch.Transaction Log Becoming Full Due To ReplicationReview the solution and discussion in the video The transaction log for database 'DB' is full due to 'REPLICATION'. We do not want to develop the habit of micro-managing transaction logs, so we…sqlinsix (55)in hive-109160 • 4 years agosteemCreated with Sketch.Transaction Log Becoming Full Due To ReplicationReview the solution and discussion in the video The transaction log for database 'DB' is full due to 'REPLICATION'. We do not want to develop the habit of micro-managing transaction logs, so we…sqlinsix (55)in sqlserver • 4 years agoARITHABORT Settings, Query Speed and Applications Running QueriesCheck out the demo and discussion in the video TSQL: ARITHABORT ON and Query Speed. While it may seem like a harmless setting, this setting may affect our queries. We should be aware of how the…sqlinsix (55)in data • 4 years agoUsing IF Statements With T-SQLIn the video T-SQL: How To Use If Statements, we look at how to use IF statements with T-SQL. These can be an alternative to CASE WHEN statements in some situations (see video T-SQL: How To Use…sqlinsix (55)in data • 4 years agoEasily Getting the Number of VLFs For A DatabaseAs we can see in the video TSQL: Get Number of VLFs, we can obtain the number of VLFs easily but this practice can quickly devolve into busy-work that generates little to no results. Most log…sqlinsix (55)in data • 5 years agoTransaction Log Becoming Full Due To ReplicationReview the solution and discussion in the video The transaction log for database 'DB' is full due to 'REPLICATION'. We do not want to develop the habit of micro-managing transaction logs, so we…sqlinsix (55)in data • 5 years agoShrinking A File In SQL ServerCheck out the solution in the video TSQL: DBCC SHRINKFILE Part I. Depending on the environment and setup, we may be required to shrink a file in SQL Server (such as a log file). Lower environments…sqlinsix (55)in data • 5 years agoUsing IF Statements With T-SQLIn the video T-SQL: How To Use If Statements, we look at how to use IF statements with T-SQL. These can be an alternative to CASE WHEN statements in some situations (see video T-SQL: How To Use…sqlinsix (55)in data • 5 years agosteemCreated with Sketch.Finding Values In One Table That Aren't In Another TableCheck out the solution in the video TSQL: Find Values In One Table Not In Another Table. In the example, we see how to identify data in one table that does not exist in another table. This may be…sqlinsix (55)in data • 5 years agoGetting Open Transactions With DBCC OPENTRANCheck out the solution in the video TSQL: DBCC OPENTRAN. In honor of one of my favorite DBAs, we look at using the DBCC OPENTRAN. We simulate an example with this technique and show what we see…sqlinsix (55)in data • 5 years agoViolation of Primary Key (SQL Server)Check out the solution in the video (ETL) Violation of PRIMARY KEY constraint 'PK_Constraint' - Different Source and Destination Keys. One pattern I've seen quite often is developers changing…sqlinsix (55)in data • 5 years agoObject Doesn't Exist Or You Lack Permissions In SQL Server (Naming)Check out the solution in the video Cannot find the object sp_Name because it does not exist or you do not have permission (naming). While this error should rarely appear, it serves as a reminder…sqlinsix (55)in data • 5 years agoShould We Use the NOLOCK Hint?Check out the discussion in the video . A colleague once shared a story of a company that dismissed a developer because the developer had run a query counting records without using NOLOCK. The…sqlinsix (55)in data • 5 years agoGetting the Median In T-SQL and WhyWe look at median overall and with T-SQL in What Is Median? Why Use Median?. As you can see, we see one way in which we can obtain the median using T-SQL. We also notice a comparison of average…sqlinsix (55)in data • 5 years agoQuickly Obtain Log Space Used In SQL ServerCheck out the solution in the video TSQL: Quickly Obtain Log Space Used (DBCC SQLPERF). Prevention beats cure, but this is a great command for those situations we haven't had time to look at and…sqlinsix (55)in data • 5 years agoInvestigating the SOS_SCHEDULER_YIELD Wait TypeCheck out the solution in the video Wait Types Part IX: SOS_SCHEDULER_YIELD. Before you dive into the system, make sure you understand the architecture, as we expect to see some wait types such as…sqlinsix (55)in data • 5 years agoGetting Maximum Column Lengths In SQL ServerCheck out the solution in the video TSQL: Get Maximum Length of Every Column On A Table. This can be helpful if we require strict limits in downstream tables, assuming that we have a data flow…sqlinsix (55)in data • 5 years agoGetting the Last Restore Date In SQL ServerCheck out the solution in the video TSQL: Get Last Restore Date. I've faced situations where backups were failing, but we didn't have any warnings, so running this query and organizing the output…sqlinsix (55)in data • 5 years agoUsing Table Locks HintsCheck out the discussion about table lock hints in the video TSQL: TABLOCK vs. TABLOCKX (vs. Normal Process). We look at the actual results of using the different hints and consider whether we'd…sqlinsix (55)in data • 5 years agoViolation of PRIMARY KEY Constraint - When Source And Destination Keys DifferCheck out the solution in the video (ETL) Violation of PRIMARY KEY constraint 'PK_Constraint' - Different Source and Destination Keys. While it's rare to see, from time to time, I do see a design…