Published on

July 8, 2016

Tracking Database Dependencies in SQL Server

When making changes to a SQL Server database, it is crucial to perform an impact assessment to determine which objects will be affected. This is especially important when making changes at the column level. To analyze table column dependencies within a SQL database, you can use a tool like ApexSQL Clean.

ApexSQL Clean is a powerful tool that not only analyzes SQL server database dependencies but also removes unwanted objects. By leveraging dependency analysis algorithms, ApexSQL Clean provides a detailed view of column-level dependencies, unlike SSMS which only displays object-level dependencies.

To get started with analyzing table column dependencies, you need to create a new project in ApexSQL Clean. Simply click the “New” button in the Home tab and choose the desired server and database. Once the project is created, select the “Column dependencies” option to include all visible columns in the results grid.

The results grid in ApexSQL Clean provides a comprehensive view of column dependencies. Each column is displayed with its corresponding column type, such as ROWGUID, Identity type, or a regular column. Additionally, ApexSQL Clean offers additional information in both the “Children” and “Parents” panes for any selected column or object.

One of the main advantages of ApexSQL Clean is its graphical representation of dependencies. The Dependency viewer allows you to visualize all SQL object dependencies in an easy-to-understand, well-organized format. It offers various options for object manipulation, appearance, filtering, and more.

The Dependency viewer supports four types of visual dependencies: Circular, Hierarchical, Force directed, and Orthogonal. You can also apply four dependency filters to focus on specific dependencies, such as children only, descendants, parents and children only, or parents and descendants only.

In addition to visualizing dependencies, ApexSQL Clean also offers customization options for the appearance of dependency diagrams. You can resize nodes and clusters, adjust colors, shapes, and fonts, create custom graphs, and navigate through the diagrams with zooming and scrolling.

Another useful feature of ApexSQL Clean is its ability to analyze dependencies in client code. It can detect which SQL objects are actually used and which ones are not in various programming languages such as Delphi, C#, XML, XAML, VB.NET, ASP.NET, CSS, and HTML. This feature helps keep SQL databases clean and well-organized.

ApexSQL Clean also provides a way to remove unwanted objects from a SQL database. By creating a new project, selecting a database, and checking the referential status of objects in the results grid, you can identify unreferenced objects. These objects can then be selected for removal using the “Create drop script” button in the Actions tab.

The drop script generation menu allows you to choose whether to create a drop script for later use or execute the script immediately to remove the unwanted objects. After executing the drop script, a message dialog will appear with the script execution results.

To create a cleanup report of unreferenced objects, ApexSQL Clean offers an export feature. You can export the report in HTML or XML format, depending on your preference. The exported report contains detailed information about objects and their dependencies, allowing you to keep a record of unreferenced objects or generate documentation for reporting purposes.

With ApexSQL Clean, tracking database dependencies in SQL Server becomes a seamless process. By analyzing column dependencies, visualizing dependencies, analyzing client code, and removing unwanted objects, you can ensure the integrity and efficiency of your SQL Server databases.

Click to rate this post!
[Total: 0 Average: 0]

Let's work together

Send us a message or book free introductory meeting with us using button below.