Automated Version Management
This is a simple utility which will enable automated version management on any Microsoft Dynamics NAV database on SQL Server 2005.
Whenever a user saves an object in Object Designer (or imports objects from a FOB file), this utility will create a object history entry together with all object information (including BLOB). Using this utility you can see all of the version history for any object, and also choose which of the saved versions is the active version of the object (the one which is available in Object Designer).
The utility consists of a fob file, the text version of the fob file, an SQL Server script file, an instructions file and a disclaimer. Fob file contains two forms and a table. The form 94092 Object Versions is used to give an Object-Designer-Look-And-Feel overview of the changes history of any object modified since the utility was installed. The SQL Server script file contains a trigger which executes against Objects table on insert or update, and maintains the history of objects so that any change ever done to any object is persisted for future reference or use.
Known limitations:
- It doesn't store initial versions of the objects. This will be added later.
- It doesn't work with "native" Microsoft Dynamics NAV Database Server or database files
- It doesn't keep true user name (it just lists either DBO or application role name)
This file is provided AS IS, with no warranties, and confers no rights. You can use it only on your own responsibility.
http://www.mibuso.com/dlinfo.asp?FileID=947
Discuss this download here.
Comments
I haven't loaded this but it does look quite useful =D>
What I did do though, is take a look at the trigger and other bits and thought that a similar thing we've done here for auditing changes may be a useful enhancement to the trigger and logging table.
We also capture both the user name and the machine they were logged in from - this has been quite useful for tracking down the "culprit" when changes are put in that give unexpected behaviour #-o
These two SQL Server functions can be added into the INSERT statement
system_user
host_name()
I'm sure it's pretty obvious what each one returns
Hope this is useful to somebody.
Rob.
But in order to avoid 100 versions of 1 object... couldn't it be possible
to remove versions. With the proper warnings off course.... O:)
Anothe suggestion is to only save entries if the date and time has changed. Since everytime when is just compile an object withour saving. It also adds a version entry with the same time.
It happend to me that i compiled all object in order to find out if all are compilable and it added a version entry for all objects.
For initializing der version management i was first running a report which just did a modify(False) on all objects.
It would be better to find the last version and add 1 to find the next version no.
SELECT TOP(1) @Version = Version + 1 FROM dbo.[Object Version] WHERE [Type] = @Type AND ID = @ID ORDER BY Version DESC
1. It uses SYSTEM_USER, which seems to do a better job of grabbing the real username
2. To create a Version number, it finds the highest version number and adds one. That way, if you delete a version, it'll still be able to generate a new number
i would save the vomplete C/AL Code additional per SQL-Trigger, my idea is the per sql trigger the txt export per handler (com-dll) and import the file per sql trigger too, could your help me??