the use history from table

  • Hello, I need to know the use history from tables.

    Help me, please

    Thanks a lot

  • Can you provide some more details? Do you mean how to use history tables? Do you mean how to find a history of who accessed a table and what they did?

  • Hi Jack, thanks for your help.

    To be more specific, I need to delete unused tables from my Data Base.

  • There really is not a way to tell which tables have been used. You could set up a server-side trace, but how long would be long enough to run it to know if a table is used or not. Perhaps a table is used only once or twice a year? Unless you have major space issue and can't get more disk space I'd just leave it alone.

  • If the tables on your database do not have a timestamp column that you can evaluate you have a few options. The first is what was already posted - run a trace against the database and find out what tables are being used. The downside is that this can take quite a while, and you still cannot be sure there are tables that are not modified yet still used ocassionally. Another option is to either create a change column on each table or a change table for the database and have triggers run to populate it with information on what table was used. Again the same problem is present though. I would say the only way to find out for sure what tables are not in use is to get with the users who use the program and the engineers who designed the database to determine what tables, if any, are no longer needed.

    Is the purpose of deleting tables just to clcear up space? Because if that is the case, there are better options available, such as partitioning tables, archiving data, and/or deleting only records that are no longer needed.

    Joie Andrew
    "Since 1982"

  • Hi,

    I need to know statistics about the uso from my tables and my store procedura (specialy the stores procedures) becouse I want to update all my SP through a script.

    The old (and unused) SP have same not exists column and this may be will fail my script.

    Then, if the tables or SP are not used I can make decision.

    I don´t need to clear up space, my goal es administration better my Data Base.

    Thanks a lot.

  • Others can correct my thinking if I am wrong, but you may need to get with the engineers/developers who designed and built the system to best determine which stored procedures and/or tables that can be gotten rid of, if any. I would imagine they would know how to determine which ones are in use and which ones can be deleted. It may not be as easy as just seeing which ones have been used last depending on how the database is used.

    Joie Andrew
    "Since 1982"

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply