How to analyze SQL Server database dependencies in client code e.g. C#

ApexSQL Clean has, among others, a useful feature that most people are not even aware of. It provides a client SQL code analysis in C#, Delphi, VB.NET, XAML, XML, ASP.NET, HTML, CSS code etc., and detects which SQL objects are actually being used and which ones aren’t in the referenced database. The SQL code analysis is performed by inspecting the code file for objects in the SQL database. This feature helps keeping SQL databases clean and organized

April 16, 2015

How to create a database cleanup report in SQL Server

A SQL Server database can have stored procedures, tables, defaults, views etc. that aren’t being used anymore, and unless you determine which of your objects are truly unreferenced you will be stuck with them, or risk breaking your database if you delete a wrong object. This is where ApexSQL Clean can help. ApexSQL Clean’s main features are already described in SQL code analysis – full body scan of a SQL database, but here we would like to point out and present one more useful feature: creating a sql database cleanup report. In order to have a complete database cleanup report and dependencies analysis procedure, ApexSQL Clean has a reporting mechanism, which allows keeping track of selected objects and their dependencies.

April 3, 2015

How to clean up unused objects from a SQL Server database

It is not a rare case that a DBA inherits SQL Server databases with many unused SQL objects. By using ApexSQL Clean, it is easy to clean a SQL database from these unneeded objects and prevent extra objects from making an impact on development by slowing it down and increasing the maintenance workload (e.g. all unused objects still have to have their permissions set, be conformant with coding standards, etc.)

April 2, 2015

How to remove SQL Server database objects safely

ApexSQL Clean can help determine all dependencies in a SQL database; it also analyzes the impact of potential changes and deletions on SQL database, and determines object interrelationships within the database, between different databases, SQL scripts and even applications

April 2, 2015

SQL database refactoring – Finding external references by analyzing object dependencies

SQL Database refactoring becomes more complicated according to the degree of coupling in the database architecture; the more coupled things are coupled the greater the potential impact of any change. The simplest way to describe the concept of coupling is that if changing one module in one module of code or a program requires changes in another part of the same or external application, then coupling exists

April 4, 2014

How to safely delete SQL database objects

When trying to delete a database object, which has an object that depends on it, no problems can be caused, since it will not allow to be deleted:

Drop failed for Table ‘HumanResources.Employee’. (Microsoft.SqlServer.Smo)
Could not drop object ‘HumanResources.Employee’ because it is referenced by a FOREIGN KEY constraint.

April 4, 2013