Monthly Archives: November 2019

Cursor Dynamic SQL

Today was working on SQL Server cursor standard cursor deification would be like this: sqlcursor from (Azure Data Studio) ———————————————————————————————————————– — Declare a cursor for a Table or a View ‘TableOrViewName’ in schema ‘dbo’ DECLARE @ColumnName1 NVARCHAR(50), @ColumnName2 NVARCHAR(50) DECLARE db_cursor CURSOR FOR SELECT name FROM dbo.TableOrViewName OPEN db_cursor FETCH NEXT FROM db_cursor INTO @ColumnName1, @ColumnName2 WHILE @@FETCH_STATUS = 0 BEGIN     — add instructions to be executed for every rows SELECT @db_nm     FETCH NEXT FROM db_cursor INTO Sys.Databases END CLOSE db_cursor DEALLOCATE db_cursor GO   … Continue reading

Posted in Others, Troubleshooting, What I learned today | Tagged | Leave a comment

Transaction log Information gathering

Here are the different ways to know the tlog file related information sys.dm_db_log_stats – Provide summary of tlog information SELECT * FROM sys.dm_db_log_stats(db_id()) sys.dm_db_log_info -DMV function for VLF information same as dbcc loginfo which is non documented by Microsoft. SELECT … Continue reading

Posted in Others, Transaction Log | Tagged | Leave a comment

Azure Data Studeo- Nov 2019 Release

SQL Server Management studio is now can be installed separately not part of SQL Server package. with this enhancement SSMS has several features and version is getting updated and new versions getting release which we can install separately. in addition … Continue reading

Posted in Azure, Future DBA, Others, SQL Server 2017, Tool | Tagged , , , | Leave a comment

AG without WSFC SQL 2017 and more…

Starting Sql Server 2017 Microsoft can allow you to enable the configuration manager for “Always ON” feature for standalone system without WSFC and linux without Pacemaker . it has a limitation as : It cannot have listener configuration This would … Continue reading

Posted in Disaster Recovery, High Avaliability, Others, SQL Server 2017, SQL Server 2019, Webcast, What I learned today, Whats New | Tagged , , , , , | Leave a comment

MAXDOP and Tempdb – SQL 2016

Starting SQL Server 2016 Max Degree of Parallellism (Max DOP) Macrosoft has made hanges on this and now we can set it at database level. This helps for replication and AlwaysOn for better performance. ALTER DATABASE SCOPED CONFIGURATION SET MAXDOP … Continue reading

Posted in Others, Performance Tuning, sql 2016, What I learned today, Whats New | Tagged , , | Leave a comment

SQL Server 2019 GA

Yes, Finally SQL Server 2019 is Generally Available yesterday Nov 4th 2019. It has many great features great videos:    

Posted in Others, SQL Server 2019, Webcast, What I learned today, Whats New | Tagged , , , , | Leave a comment

Smart Tlog Bkp

another great new feature for SQL Server 2017 is a smart backup with dmv sys.dm_db_log_space_usage this DMV provide log usage information using this we can plan to initiate the tlog backup and ensure to have tlog backup consistency and same … Continue reading

Posted in Backup and Restore, Others, SQL Server 2017, Transaction Log, Troubleshooting, Whats New | Tagged , , , | Leave a comment

Resumable online index rebuild

continue on whats new SQL Server 2017 their is a great feature call resumable online index, means online index now has an option to PAUSE and RESUME or ABORT RESUMABLE = {ON | OF } MAX_DURATION — can specify the … Continue reading

Posted in Others, Performance Tuning, SQL Server 2017, Whats New | Tagged , , | Leave a comment

Back to school

Hey, I realize that future we need to know Database system, No SQL and Big Data. with that as things are moving to machine learning and AI system which requires you to have your hands dirty on some programming language, … Continue reading

Posted in AI, Python | Leave a comment