I and a team-mate are working out an web-based application for our company. SQL Server 2005 is used for data persistence. Since the application keeps evolving, while any latest stable update will be deployed into the production environment. No individual DBA, nor SQL Comparator tools in our company.
My way, for updating the database in the production application to the latest release, is separating the process into:
-
Create a new db according to all
CREATE SCRIPTS -
Data Migration by Replication and/or transformation
-
Testing with the new instance
-
Replacement
My major consideration is that we can’t guarantee the manually created script is error-free. However, I’m being challenged by the colleague that this approach is troublesome.
So, please kindly advise what will be the better? or the best?
p.s. we do not have budget for purchasing license-needed tools.
Thank you!
William
If it is possible i recommend to use SSIS. Main advantage that you can dynamically change database Name to required. In other cases you need to build SQL statement dynamically.
Second question is error handling. If you have error in schema script(structure), you should do not continue. If you have error in data insert script, you should process row by row and roll back only error-contained transactions. You can implement this by using ForEachLoop in SSIS. Only one question to preparing data for row-by-row processing. That`s why i recommend do not use “standard” script from SSMO but use another data container, eg XML.