October 10, 2013 at 1:45 pm
I have some maintenance plans that backup, cleanup, check integrity etc. for all user databases in one maintenance plan. I have since created a database where we want to track each action per database. I have created a stored procedure that takes two parameters: a database name and a comment/action. How would I go about doing this?
Thanks in advance.
October 10, 2013 at 1:56 pm
db_name()
This will give you the current database name. But not really sure how you want to utilize this. You may need to resort to scripting out the maintenance tasks to include posting to your maintenance log database.
Kurt
Kurt W. Zimmerman
SR DBA
Lefrak Organization
New York, NY
http://www.linkedin.com/in/kurtwzimmerman
October 10, 2013 at 2:01 pm
I was hoping I could add a T SQL task to my management plan and pass in db_name() and a comment that would then insert a record into my logging table.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply