Thursday, January 22, 2009

Tip #34 – Using the Data Dictionary Differentiator

Advantage Data Architect includes a tool which helps in generating SQL Scripts for modifying database objects in the Data Dictionary called the Data Dictionary Differentiator. You can open this tool by choosing Compare Dictionaries or pressing ctrl-L. When the tool opens you will get a screen which allows you to select the dictionaries you wish to compare.

ARC Differentiator

You can also select items to exclude for the comparison by pressing the Exclude Objects button. This is useful if you only want to include changes for particular objects or if you know you have only changed Views for example.

ARC_DifferentiatorExclude

Once the tool has compared the data dictionaries a treeview displaying the differences will be shown. From this screen you can generate SQL scripts to convert from one version of the dictionary to the other.

ARC Differences

In my example the tool generated the following code to convert HandsOn to SampleDB (two versions of my training database). Notice that the script is not quite complete since the tool cannot get the user password so you must add this to the script.

EXECUTE PROCEDURE sp_CreateUser 
   ( 'chrisf', '' /* YOUR PASSWORD GOES HERE */,
     'My admin account' );
EXECUTE PROCEDURE sp_ModifyUserProperty 
   ( 'chrisf', 'ENABLE_INTERNET', 'TRUE' );
EXECUTE PROCEDURE sp_CreateGroup 
   ( 'Managers','Company managers group' );
EXECUTE PROCEDURE sp_AddUserToGroup 
   ( 'chrisf',   'Managers' );
 
ALTER TABLE MaritalStatus
     ALTER COLUMN Code Code Char( 1 ) POSITION 2
     ALTER COLUMN Status Status CIChar( 50 ) POSITION 1;

3 comments:

Visual Basic .Net said...

How can I use this tool from Visual Basic .Net ?

Evry1falls said...

Are you there ?

Văn Sát said...

Bạn là chủ xe và đang cần tìm hàng vận chuyển? Bạn là người cần tìm xe vận chuyển hàng? Vậy bạn hãy ghé vào sàn vận tải nội địa đây là nơi sẽ giúp bạn tìm thấy thứ bạn đang cần tìm. Hiện nay, chúng tôi tự hào là một trong những đơn vị cung cấp giải pháp vận chuyển hàng đầu hiện nay. Với các dịch vụ vận chuyển hàng hóa nội địa, vận chuyển Bắc Trung Nam, vận chuyển hàng đông lạnh bắc nam,... Đến với chúng tôi bạn sẽ không cần lo lắng tìm hàng hay tìm xe để vận chuyển hàng. Hiện nay thì các tuyến vận chuyển chúng tôi đang có thể kể đến như: vận chuyển hàng đi bạc liêu, vận chuyển hàng đi vũng tàu, vận chuyển hàng đi bắc ninh, vận chuyển hàng đi bến tre,... Để biết thêm thông tin hãy liên hệ với chúng tôi nhé.