Real Time SQL Server Scripts

Scripts those can be used by SQL Server DBAs and SQL Server Developers on daily basis.

Data Analysis / Data Validation / Data Cleansing Scripts

  1. How to Search in all Columns for all tables in a database for Date Value in SQL Server
  2. How to Find Percentage of Null Values in every Column of all the Tables in SQL Server Database 
  3. How to Find Percentage of Empty or Blank Values in every Column of all the Tables in SQL Server Database
  4. How to Get Row Count Of All The Tables In SQL Server Database
  5. How to search for a String in all Columns in all tables in SQL Server Database
  6. How to find and Replace Text in all the columns in all the tables in SQL server Database
  7. How to find values with Leading or Trailing Spaces in SQL Server Table 
  8. How to Trim Leading and Trailing spaces for all the values in all the Columns in all the Tables in a SQL Server Database
  9. How to Find Duplicate Records in All the Tables in SQL Server Database
  10. How to Find & Delete Duplicate Records on All Tables in SQL Server Database
  11. How to Generate Select all Columns with or Without Top X Rows From All Tables Query Dynamically in SQL Server
  12. Concatenate SQL Server Columns for each Table Query Dynamically in SQL Server 
  13. How to List all Missing Identity Values for all Tables in SQL Server Database
  14. How to Find Max and Min Values for all the columns for all the tables in SQL Server Database
  15. How to get Record Count for all the tables in SQL Server Instance in SQL Server - SQL Server Tutorial
  16. How to get Maximum and Minimum Length for each Column Values for all the tables in SQL Server Database
  17. How to check if table exists in all databases in SQL Server

Server Level


Databases

  1. Changes to the state or options of database '' cannot be made at this time. The database is in single-user mode, and a user is currently connected to it.-Resolved
  2. How to put All User Databases to Single User Mode in SQL Server
  3. How to Set databases from SINGLE USER mode to MULTI USER Mode in SQL Server
  4. Generate Script To Detach All User Databases on SQL Server
  5. Get List of All Databases from SQL Server Instance
  6. Generate Script To Bring All User Databases Online in SQL Server
  7. Generate Script To Bring All User Databases Offline in SQL Server
  8. Generate Full Backup Scripts for all User Database in SQL Server
  9. How to backup all the databases from SQL Server Instance
  10. How to drop database in Single User Mode in SQL Server
  11. How to rename all the databases in SQL Server Instance
  12. How to remove String from Database Name in SQL Server ( Rename Database) 
  13. How To Get The Size of All Databases on SQL Server
  14. How To Change Recovery Mode To Simple For All Databases on SQL Server
  15. How to save result set of RESTORE FILELISTONLY in temp table in SQL Server
  16. How To Change Recovery Mode To Simple For All Databases on SQL Server
  17. How to take Transaction Log Backups for All SQL Server Databases in SQL Server
  18. How to take Differential backup of all the Databases on SQL Server Instance
  19. How to Drop or delete all User Databases on SQL Server Instance
  20. How to get Information about your Backups and Save into SQL Server Table
  21. How to Restore Databases from full backup files from a folder to SQL Server Instance
  22. How to recover databases which are in Restore status on SQL Server Instance
  23. How to Create 100's of Sample Databases by Script in SQL Server
  24. How to Change Recovery Model of Databases to Bulk_Logged in SQL Server
  25. How to Change Recovery Model to Full for all User Databases in SQL Server
  26. Backup Multiple Databases from Local and Linked Server (Compression Enabled) and Send Email Notification with time taken for each backup


SQL Server Agent Jobs

  1. Generate Scripts for Stored Procedures for Slowly Changing Dimensions Type 1 (TSQL Merge Statement Load SCD1)
  2. How to Load Slowly Changing Dimension Type 2 ( SCD2) By Using TSQL Merge Statement
  3.  Remove Database Name Or Some Text From Stored Procedures [ Cursor Example ]
  4. Alter Table Add Multiple Columns SQL Server
  5. How To Check When Object ( Table, Stored Procedure, Trigger etc) was Modified Last Time
  6. How To Check If Column Exists for SQL Table/ View in Database
  7. How to Find duplicate records in a SQL Server Table
  8. How To Delete All Duplicate Records From a SQL Server Table
  9. How To Keep One Record From Duplicate Records and Remove All Of Others From a SQL Server Table
  10. How To Find The Size Of a SQL Server Table
  11. How to Execute Large SQL Script File In SQL Server
  12. What is @@RowCount in SQL Server
  13. How To Execute Stored Procedure In View in SQL Server
  14. How to Get Row Count Of All The Tables In SQL Server Database
  15. How To Find Version of SQL Server
  16. How To Loop Through Users From a SQL Server Table And Send Email
  17. How To Change Recovery Mode To Simple For All Databases on SQL Server
  18. How To Send Email From SQL Server In HTML Format
  19. Truncate all the tables in a Database in SQL Server
  20. How to Get List of All Databases from SQL Server
  21. How to Disable/Enable DDL and DML Triggers in SQL Server
  22. How to Refresh View Definition by using sp_refreshview in SQL Server
  23. How to Disable/Enable All SQL Server Agent Jobs in SQL Server
  24. How to find if Table/View is used in Stored Procedure in SQL Server
  25. Get SQL Server Agent Jobs List with Schedule in SQL Server
  26. How to Get all Triggers with Table Names in SQL Server
  27. How to Drop or Delete all Triggers from a Database in SQL Server
  28. How to Create Trigger on Temp Tables and System Tables in SQL Server
  29. How to get list of All Disabled/Enabled Triggers in SQL Server Database
  30. How to Disable All the Triggers in SQL Server Database
  31. How to Enable Multiple Triggers in SQL Server Database
  32. How to get Decimal/Float Output from Integers Division in SQL Server
  33. Get all Tables with Column Names and Data types from SQL Server Database
  34. How to find String in All Stored Procedures in SQL Server Database
  35. How to get Table Names with Record Count in SQL Server Database
  36. How to Search Text in Steps of SQL Server Agent Jobs
  37. What are the different ways to set value of a Variable in TSQL
  38. How to Delete huge data from a SQL Server Table in batches
  39. How to Change Database Name inside Stored Procedure in SQL Server
  40. How to Determine if value is Numeric by using ISNumeric and Try_Convert Function
  41. How to Concatenate String and Integer Values in SQL Server
  42. How to Import Image File from File System to SQL Server Table
  43. How to Read Uncommitted Rows from SQL Server Table by using WITH (NOLOCK) Hint
  44. How to Add a Column with Values to Existing SQL Server Table
  45. How to Find Object ( Table.View,Stored Procedure,Function etc.) in All the Database in SQL Server 
  46. Generate Full Backup Scripts for all User Database in SQL Server
  47. Generate Scripts for Transactional Log Backups for All the User Databases on SQL Server
  48. How To Check If Column Exists for SQL Table/ View in Database
  49. How To Find Objects ( Stored Procedures, Views etc) In SQL Server Which Are Using Cross Database or Cross Server Queries
  50. How to find SQL Server Port number using T-SQL
  51. The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)
  52. How to copy Some Tables or all Tables to Destination Database in SQL Server
  53. How to Compare two tables for Column Names in SQL Server
  54. How to Import or load Multiple XML files to SQL Server Table
  55. How to Import or load all the picture/image files from a folder to SQL Server Table by using TSQL
  56. How to Run Stored Procedure Against Multiple Databases in SQL Server


24 comments:

  1. Techbrothers, thank you so much for all these valuable scripts plus all your Youtube videos. You are truly giving back to the Tech world :). God bless you!

    ReplyDelete
  2. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. koszalin biura nieruchomosci

    ReplyDelete
  3. A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. expired listing leads

    ReplyDelete
  4. I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... Marketing for Property Management in Houston

    ReplyDelete
  5. The legitimate issues and dangers in a business land exchange are surprisingly unique in relation to the lawful issues and dangers in a private land exchange. Most are not even distantly comparative.Check This Out

    ReplyDelete
  6. I think this is one of the most significant information for me. And i’m glad reading your article. But should remark on some general things, The web site style is perfect, the articles is really great : D. Good job, cheers cash buyer real estate

    ReplyDelete
  7. I have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks! Pittsburgh rental property buyer

    ReplyDelete
  8. Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. best house buyers

    ReplyDelete
  9. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here keep up the good work sowparnika ashiyana

    ReplyDelete
  10. I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... vaughan real estate

    ReplyDelete
  11. This is my first time visit to your blog and I am very interested in the articles that you serve. Provide enough knowledge for me. Thank you for sharing useful and don't forget, keep sharing useful info: Apartment Locator

    ReplyDelete
  12. Hi there! Nice stuff, do keep me posted when you post again something like this! watches

    ReplyDelete
  13. Wow! Such an amazing and helpful post this is. I really really love it. It's so good and so awesome. I am just amazed. I hope that you continue to do your work like this in the future also پیش فروش پدافند ارتش

    ReplyDelete
  14. This was really an interesting topic and I kinda agree with what you have mentioned here! سهام 50 متری

    ReplyDelete
  15. This is an exclusive post about PostgreSQL and the use of foreign data wrapper actually overcomes and helps people solve the most complex problems and errors.

    SSIS postgresql read

    ReplyDelete
  16. Just admiring your work and wondering how you managed this blog so well. It’s so remarkable that I can't afford to not go through this valuable information whenever I surf the internet! 1900arch

    ReplyDelete
  17. Thank you for some other informative blog. Where else could I get that type of information written in such an ideal means? I have a mission that I’m just now working on, and I have been at the look out for such information. chen zhi prince holding group

    ReplyDelete
  18. Property Digger is a search engine for property listings throughout the Arab Emirates. apartments in dubai silicon oasis

    ReplyDelete
  19. There are particular dissertation websites that are online via the internet once you reach evidently published as part of your world wide web page. gibraltar property

    ReplyDelete
  20. Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. muabannhadat

    ReplyDelete
  21. Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. prince group cambodia

    ReplyDelete
  22. Really I enjoy your site with effective and useful information. It is included very nice post with a lot of our resources.thanks for share. i enjoy this post. Batdongsan.in

    ReplyDelete
  23. Since customs, such as holding yearly gatherings of investors and keeping up with yearly minutes, are not needed on account of restricted associations and LLCs, they are frequently liked over companies. Tree Cutting Folsom

    ReplyDelete