• I divide the scripts that I write into 2 categories.
     • Anything that has business data in it, stays strictly within the company.
     • Template-scripts that are often used for the first category *and* that have no business-specific data or fields from user-databases within.

    An example of the second category is a series of scripts used to create transactional replication across 2+ servers. Any business-specific data is to be defined at the beginning in variables, which are left empty in the template. They are the sort of scripts that I should really upload to this site.
    Another is the script I use every morning to check backups, failed jobs etc.

    I have no problem taking these scripts home with me or bringing from one employer to another.
    It is true that they were written on company time. On the other hand, the time I spending learning for my various MCP exams, which helped me write these scripts was done on my own time and I see it as a win-win for both me and the company.