12.07.2015 Views

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

170 Developing: Databases — Unit Testing the Migrati<strong>on</strong>significantly. You must verify that <strong>on</strong>ly authenticated, authorized users have access <strong>to</strong> theobjects in the database. You must also verify that <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> users and roles have beencorrectly mapped <strong>to</strong> <strong>SQL</strong> <strong>Server</strong> users and roles, and that all objects in the databasehave the appropriate access rights granted <strong>to</strong> them.Validate DataThe existence of indexes and c<strong>on</strong>straints during data migrati<strong>on</strong> adversely affects theper<str<strong>on</strong>g>for</str<strong>on</strong>g>mance of the data migrati<strong>on</strong>. The firing of triggers can corrupt the data and produceundesirable effects. There<str<strong>on</strong>g>for</str<strong>on</strong>g>e, these objects have <strong>to</strong> be disabled or dropped. A negativeaspect of these acti<strong>on</strong>s is that data is not checked <str<strong>on</strong>g>for</str<strong>on</strong>g> correctness or completenessduring the migrati<strong>on</strong> and has <strong>to</strong> be validated after the migrati<strong>on</strong>. No special plans areneeded <str<strong>on</strong>g>for</str<strong>on</strong>g> validating data integrity. The database itself checks the integrity of the datawhen the c<strong>on</strong>straints are enabled using the WITH CHECK clause. For more in<str<strong>on</strong>g>for</str<strong>on</strong>g>mati<strong>on</strong><strong>on</strong> check c<strong>on</strong>straints in <strong>SQL</strong> <strong>Server</strong>, refer <strong>to</strong>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_aa-az_3ied.asp.The two types of tests that have <strong>to</strong> be per<str<strong>on</strong>g>for</str<strong>on</strong>g>med <strong>to</strong> validate the data are discussed in the"Validating the Data Migrati<strong>on</strong>" secti<strong>on</strong> in Chapter 8.Note One of the comm<strong>on</strong> risks involved in data migrati<strong>on</strong> is the lack of a proper orcomplete set of c<strong>on</strong>straints in the database. In many applicati<strong>on</strong>s, the c<strong>on</strong>straints arebuilt in<strong>to</strong> the applicati<strong>on</strong>. In such cases, the development team will have <strong>to</strong> be involvedin c<strong>on</strong>structing <strong>SQL</strong>-based tests <strong>to</strong> verify data integrity by identifying such rules in theapplicati<strong>on</strong>.Validate the Migrati<strong>on</strong>After data migrati<strong>on</strong> is complete, tests have <strong>to</strong> be per<str<strong>on</strong>g>for</str<strong>on</strong>g>med <strong>on</strong> the database as a whole.Testing should cover the database architecture, database objects, data, and users. Inadditi<strong>on</strong>, the database c<strong>on</strong>nectivity, security, and per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance have <strong>to</strong> be tested. Forin<str<strong>on</strong>g>for</str<strong>on</strong>g>mati<strong>on</strong> <strong>on</strong> client c<strong>on</strong>nectivity <strong>to</strong> the database, refer <strong>to</strong>http://msdn.microsoft.com/library/default.asp?url=/library/enus/adminsql/ad_1_client_5er7.asp.A discussi<strong>on</strong> of the security architecture in <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> and<strong>SQL</strong> <strong>Server</strong> is available in Appendix A: "<strong>SQL</strong> <strong>Server</strong> <str<strong>on</strong>g>for</str<strong>on</strong>g> <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> Professi<strong>on</strong>als." AppendixB: "Getting the Best out of <strong>SQL</strong> <strong>Server</strong> 2000 and Windows" c<strong>on</strong>tains several references<strong>on</strong> <strong>SQL</strong> <strong>Server</strong> per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance.While in smaller databases the data migrati<strong>on</strong> validati<strong>on</strong> can be exhaustive, in very largedatabases, some simpler tests (such as counts using various groupings) may be used.The following checks are recommended:● Develop group functi<strong>on</strong>s based <strong>on</strong> type of data.For example, a business-related check can be implemented by calculating the sumof the balances in all accounts.● Develop group functi<strong>on</strong>s based <strong>on</strong> time.● Check <str<strong>on</strong>g>for</str<strong>on</strong>g> record counts.● Use the applicati<strong>on</strong> <strong>to</strong> compare the summary reports.● Check <str<strong>on</strong>g>for</str<strong>on</strong>g> ad-hoc c<strong>on</strong>trol <strong>to</strong>tals.For example, after ledger data of a financial applicati<strong>on</strong> has been migrated, addingup the account numbers in that ledger has no business validity. However, this adhocc<strong>on</strong>trol <strong>to</strong>tal could reveal if all the data in the row has been migratedsuccessfully.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!