Adriaan - you're spot on. Will steer clear of INFORMATION_SCHEMA for now. Madhivanan, I'm afriad I disagree - run the following script! db_name...
Try this to prove my point - that INFORMATION_SCHEMA.TABLES always runs in the master db context when run from stored procedure which sits in the...
I'm writing a stored procedure which will sit in master and can be called from any database. (So sp_MyProc in master then). So I want to check is a...
Oh well thanks everyone for your help.. Looks like it can't be done! Rupert
Frank, Tried the following - not sure if this is what you were getting at. This allows me to add the trigger - but it doesn't fire ;-( Any more...
Frank, I now believe that this is impossible (see article below). http://www.sql-server-performance.com/q&a129.asp What ever I do I get the...
Frank, Thank you for taking the time out to reply. This is a development server, so this was just away of ensuring that the developers follow...
As per subject - I want to run a stored procedure when a new database is created (using SQL2K).<br /><br />Why:<br />This sp creates a default...
Separate names with a comma.