• Jeff Moden - Sunday, December 10, 2017 4:19 PM

    Arsh - Saturday, December 9, 2017 4:25 AM

    Dear Experts,
    Please advise how I can script all the tables of a database with ALTER option . It should script the drop and create of the dependencies like Indices, Constraints .Thanks in advance.

    "It Depends".  What is it that you're trying to ALTER on every table?

    Hi Jeff. I suppose I would become an automation project actually. Needs kinda data analytics /machine-learning. The script has to read the contents of the column and analyze basing on the Max / Min / Avg values and how the data is distributed and then suggest a length /Type and generate alter command . for each column where applies. On a smaller scale , similar lines ,I'm building something that projects Index Rebuilds/Reorganize for all  objects based on an algorithm (counting number of table cols , Index cols / Row Count etc ) that determines the fill factor .