Showing posts from December, 2018

List of Questions I have been asked in Interviews

Note: If you are an interviewer and I have a interview scheduled with you in upcoming days or hours, please ask things which are not listed below so that I can have a opportunity to learn few more new things thanks ;) This Page will be updated from time to time as I face new questions: Do you know about System Pages GAM SGAM DCM ? Different modes available in Always on? Whats the difference between Synchronous and Asynchronous modes available? Which technology and version facilitates automatic page repairs in SQL Server? Difference between 2016 and 2012 version of SQL Server (New things that are available or absent). If latency is being observed in secondary replicas and transaction log on primary replica is full and not releasing space even after taking backup and shrinking and there is no open transactions what could be the possible reason and its resolution? What is the need of Bulk log recovery model apart from its minimally logged benefit for bulk operations? How did y

T-Sql Script for Automating Replication Generation for all Stored Procedures in a SQL Server Database

This involves following steps: Creating stored procedure named Create_Replication_SP using the code provided in this post. Please find the T-sql script below that can be used to create,configure and run replication for all stored procedures in a database automatically.  Once stored procedure is in place all you have to do is provide the name of the database as the parameter as shown in example below: Use NameOfDatabasewhereSpIsCreated GO EXEC [Create_Replication_SP] @Database_Name='NameOfDatabaseHere' This will generate and Print a script in return in messages tab in SSMS.  Copy the generated script and paste it in new query window and execute it and wait for its completion, progress gets tracked in Messages tab in Output window.  What script does: This creates Publication with nomenclature DatabaseName_SP or if you want a custom name you can pass the parameter @Publication_Name along with @DatabaseName (should be under 20 characters).  Creates a snapshot agent