Since a couple of days I am looking for a way to execute some t-sql immediately when my database is attached to the sql-server (2008 Standard) engine. The thing is that this shall not be a server-side event but something that is stored and comes from
inside the database so that the code is executed even when the .mdf/.ldf files get copied to another pc and get attached there. I looked for a DDL trigger or something like that but could not find something that suits. So this shall get a security
solution which protects my intellectual property from unauthorized persons which gain file access to copy and attach the DB on another Sql server instance. There is no chance for me to secure the files by windows accounts or something similar because
the persons from which I want to protect the DB will definetly be Windows-administrators.
It would really be great if someone has an idea how to achieve this!
View Complete Post