The schema change history report tells me when the schema of a DB was last changed.

I would have run an x.sql file on that same DB for those changes to have happened. Does SQL Server log that I ran x.sql on 3/01/2016 at 3:15?

  • Check the table in which you inserted the data, if it is there you did it. If you have trigger on table that would fire upon this insert operation and can collect information for you but this would definitely have some performance impact. – Shanky Jul 6 '16 at 8:27
  • Are you asking to check that your code is the latest version (e.g. you've installed the latest revision of a stored proc)? Or is this to do with whether you've inserted data into the database? – Rich Benner Jul 6 '16 at 8:31

No it doesn't. SQL Server doesn't really have any concept of script files, it just processes commands that are run against it.

You could potentially set up some kind of automated process and/or tracing to track this, maybe setting the application name to the name of the script and tracing that but there's nothing in the box that I'm aware of which will do this automatically.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.