• Pratibha_Pillai (5/27/2009)


    Hi,

    I came across default trace offered by sql server 2005.

    1)Can it act as a substitute to DDL triggers?What's the difference between them?Also I didn't find any column in the log file where i can get the sql command which was fired last.

    No, the Default Trace cannot be substitute for DDL triggers. The Default Trace only traces very generic events like Object:Created or Object:Altered which do not actually contain the SQL command.

    2) Also can anyone give me a brief idea as to what is the pupose of scripting(wherein we use the wizard to script different objects) is it also a way to track database schema changes?

    Basically scripting is just a way to "backup" the database structure or re-create the structure elsewhere. You can use it to track changes if you put the original scripts in source control, make all changes there and then apply the changes to the database

    Actually I am in a way to find the best way by means if which i can track the schema changes on server db and notify the same to the client(sql ce).

    I would guess that using DDL triggers to get the changes and put in a queue (a table, xml, service broker) then have a process that pushes the changes out to the clients, checking a version # in the clients or something similar.

    3)How can i propagate the schema changes from server to the client(mobile) and are the sql command compatible to sql ce commands?

    I've never really worked with CE/Mobile so I don't know the best way to do this. I thought that most basic commands like Create Table, Alter Table were the same in CE.