• David (4/24/2009)


    Jack, I won't speak for the OP, but I recently did something along the same lines, where the database name had to be generated dynamically to save me a ton of time.

    The place I'm working for sells an application to specific organizations; each organization gets their own database. About 100 clients, each with their own training database, so 200 user databases. When I started here about two months ago, the first thing I did was to go through a couple of the databases and start looking at their properties, trying to get familiar with the overall setup. What I found was that some of the datbases were in 8.0 compatibility mode, some were in Simple Recovery, that kind of thing.

    So, I wrote a script that used the database name to enforce the same settings across all the databases - recovery mode, etc. - and had it done in about 15 minutes.

    Thanks David, that is definitely a valid reason for doing this. I only asked why because sometimes there is a better way to do what needs to be done, if you know the why.