简体   繁体   中英

How to determine which tables are used by ASP.NET web solution?

Problem is a bit complex(or not) so I don't know exactly how to ask this question.

My project is hybrid of MVC and WebForms approach. It uses 3rd part software and it is packed with one quite big solution with a lot of little sub-systems. Whole project uses two databases A and B.

I wanna stop using both databases and merge it to single one - lets say it will be A. To achieve this I have to create some deploy script to migrate B tables into A. I am not only sure which tables I really want.

Main problem is I am not able to determine which tables are currently used (because some of them for sure are not - this is really messy). Additionally some table names are same in A and B. Is there any automated way to do this? This project is quite big and we hadn't been supplied with documentation. Manual way for identifying this stuff would be quite horrible.

Any ideas for speed up would be appreciated.

Best Regards.

You can use SQL Profiler to seen what users are accessing your database.

If the two applications have different sql user login's you can quite easy see what queries are being run and which tables are being accessed.

Sql Profiler

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM