Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Script to maintain a version table

Author  Topic 

ranjeetsingh_6
Posting Yak Master

125 Posts

Posted - 2010-08-06 : 13:31:24
Hi,

I need to sql script that use to maintain version of Database means anyone modify into any DataBase object then a row inserted into below table.Column of below table have
same meaning as per written like: majorversion show that any major modification was happen on DataBase(ex- alter any database object),minorversion show that any minor changes was done into dataBase object,modify date is current date and modifyby is user name.

majorversion minorversion modifieddate modifiedby
1 0 11/7/2010 1
1 0 11/7/2010 1
1 0 11/7/2010 1
1 0 11/7/2010 1
1 0 11/7/2010 1
1 0 11/7/2010 1
1 0 11/7/2010 1
1 0 11/7/2010 1
1 1 7/14/2010 1


Ranjeet Kumar Singh

X002548
Not Just a Number

15586 Posts

Posted - 2010-08-06 : 14:01:50
do you mean data, or database object?

For data, create a historey table and create a table trigger

For Objects, create a DDL Trigger and a log table



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

ranjeetsingh_6
Posting Yak Master

125 Posts

Posted - 2010-08-06 : 14:14:31
yes For Objects, create a DDL Trigger and a log table.


Ranjeet Kumar Singh
Go to Top of Page
   

- Advertisement -