Skip to main content

Posts

Showing posts with the label SQL Server

What is ETL system testing?

This week let’s talk about what is ETL System testing, and what exactly do we test when we perform this type of test? But as usual let’s start from the very beginning and understand what ETL type of system is. What Is ETL System? ETL – Extract Transfer Load. This type of a system has a special structure that is usually used in case when we want to either load or extract data in big amounts that cannot be contained in a regular API. In other words we are talking about a components that their main purpose is to move around big amounts of data and manipulate it along the way based on specific logic. ETL system implementations are different; involving different data sources on different platforms; each of those systems can be broken down to a set of interfaces that work together to move the data, but despite the differences we can commonly group them based on the direction the data flows at from data source perspective into two groups:         ...

SQL Server - How to search in all Databases for Stored Procedure that uses specific table

My team and I were recently faced with a challenge that required us to search the database for a stored procedure that contains reference for a specific table or another stored procedure. We were able to accomplish that by a simple text search query that uses the system object definition and goes like that: SELECT OBJECT_NAME(object_id) FROM sys.sql_modules (nolock) WHERE definition like '%----SOME TEXT HERE----%' The interesting part begins once we were faced with a more complex system structure that included stored procedures which can be called from different databases and include inserts, updates and selects to yet another set of databases. Of curse executing the same query again and again for each database to perform the required search was not an option so the solution presented itself in an undocumented system stored procedure called sp_MSforeachtable . This stored procedure allows us execute the same query for all the databases on the server with "?" us...