Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / July 2008

Tip: Looking for answers? Try searching our database.

Table schema change

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mecn - 08 Jul 2008 20:06 GMT
Hi, I need to monitor sql db table schema change.
is there any system tables taht I could use to see any schema changes?

Thanks,
Tom Moreau - 08 Jul 2008 20:23 GMT
You could create a DDL trigger for all table changes:

http://msdn.microsoft.com/en-us/library/ms189799.aspx

Signature

  Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON   Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau

Hi, I need to monitor sql db table schema change.
is there any system tables taht I could use to see any schema changes?

Thanks,
Mecn - 08 Jul 2008 20:56 GMT
Thanks for the respose. It means that I have to create triggers for all
tables in the DB?

> You could create a DDL trigger for all table changes:
>
[quoted text clipped - 4 lines]
>
> Thanks,
Aaron Bertrand [SQL Server MVP] - 08 Jul 2008 21:06 GMT
> Thanks for the respose. It means that I have to create triggers for all
> tables in the DB?

No, a DDL trigger is not table-specific.  You should be able to create a
single trigger at the database level to capture all or specific DDL events
(e.g. ALTER TABLE).
Mecn - 08 Jul 2008 21:46 GMT
got it, thanks a lot

>> Thanks for the respose. It means that I have to create triggers for all
>> tables in the DB?
>
> No, a DDL trigger is not table-specific.  You should be able to create a
> single trigger at the database level to capture all or specific DDL events
> (e.g. ALTER TABLE).
Mecn - 08 Jul 2008 23:02 GMT
Sorry, I just noticed that DDL triggers are only support sql2005. We are
using sql2000.

>> Thanks for the respose. It means that I have to create triggers for all
>> tables in the DB?
>
> No, a DDL trigger is not table-specific.  You should be able to create a
> single trigger at the database level to capture all or specific DDL events
> (e.g. ALTER TABLE).
Tom Moreau - 09 Jul 2008 03:49 GMT
In future, please state which version you are using, particularly if it is
not the current version.  In SQL 2000, there is no way of capturing DDL
events, other than running the profiler.

Signature

  Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON   Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau

Sorry, I just noticed that DDL triggers are only support sql2005. We are
using sql2000.

>> Thanks for the respose. It means that I have to create triggers for all
>> tables in the DB?
>
> No, a DDL trigger is not table-specific.  You should be able to create a
> single trigger at the database level to capture all or specific DDL events
> (e.g. ALTER TABLE).
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.