Scripting objects log

  • Hi,

    I need to log every "Script object as ..." attempt on a database from a group of users, all of them using SSMS.

    I assume SSMS is using the SMO .Script method of various objects being scripted, is there any way to log all this kind of activity?

    (I need something simple: HostName / Date / Object(s) scripted)

    Thank you so much for any idea on this...

  • please try DDL Triggers if you having SQL Server 2005 or Higher

    Ram
    MSSQL DBA

  • Ramdas Baghel (6/2/2011)


    please try DDL Triggers if you having SQL Server 2005 or Higher

    that won't work...scripting is a DML operation, where it goes out and selects the details for a specific table from the tables like sys.columns, sys.constrants, etc. scripting doesn't execute a DDL operation.

    you'll need to use a DML trace, but you should be able to filter it, i would think...

    start a profiler trace, and script a few objects.

    stop the profiler, and look at the results of the trace...i'm not sure what SSMS does when it hits a trace, but i certainly know where the data is accessible...you might need analyze that to use in a trace to filter the textdata for whatever that action is doing.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply