locked
Table population script RRS feed

  • Question

  • Hi experts,

    We have a table which is populated from a script that runs every morning....Problem is that the process was set before I joined the company and now it seems that the table population has stopped due to some issues.

    Is there a way from where I can find the script/query that populates a table ???

    Pls help.........
    Thanks a bunch ! Sweta
    Tuesday, September 1, 2009 2:53 PM

Answers

  • Check the SQL Server Jobs also - maybe it's a sql job which is doing it.
    Varsham Papikian, New England SQL Server User Group Executive Board, USA
    New England SQL Server User Group; My LinkedIn page
    Please remember to click the "Mark as Answer" button if a post helps you!
    • Marked as answer by Sweta Dutta Tuesday, September 1, 2009 3:41 PM
    Tuesday, September 1, 2009 3:17 PM

All replies

  • if the table is being populated by stored Procedure and you want to find the stored procedure then following script can help you

    select distinct name from sys.procedures 
    where object_definition(object_id) like  '%insert into table1%'
    where table1 is the name of your table
    Tuesday, September 1, 2009 2:58 PM
  • Thanks Arif,

    But not sure why the stored procedures returned from the above query does not contain the script to populate the table...

    Do you hav any alternate idea to deal with this....

    Thanks a bunch ! Sweta
    Tuesday, September 1, 2009 3:11 PM
  • Check the SQL Server Jobs also - maybe it's a sql job which is doing it.
    Varsham Papikian, New England SQL Server User Group Executive Board, USA
    New England SQL Server User Group; My LinkedIn page
    Please remember to click the "Mark as Answer" button if a post helps you!
    • Marked as answer by Sweta Dutta Tuesday, September 1, 2009 3:41 PM
    Tuesday, September 1, 2009 3:17 PM
  • Found it.........it was in the SQL Server jobs....


    Thanks a bunch ! Sweta
    Tuesday, September 1, 2009 3:20 PM
  • Great. Please use the 'Mark as Answer' button :-)
    Varsham Papikian, New England SQL Server User Group Executive Board, USA
    New England SQL Server User Group; My LinkedIn page
    Please remember to click the "Mark as Answer" button if a post helps you!
    Tuesday, September 1, 2009 3:25 PM