I have attached a patch (to rev 169) for this problem if you're interested.
What it does is to allow you to name scripts with the "timeout"
or "time-out" keyword followed by the number of seconds and it will execute
the query with the correct
http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.common.serverconnection.statementtimeout.aspx
property value.
A timeout of 0 = infinite.
Examples:
1_my_migration_with_timeout_of_3600_seconds.sql
001_my_migration_with_timeout_3600.sql
001_my_migration_with_time-out-3600.sql
001_my_migration_with_infinite_timeout_of_0.sql
001 - my migration with timeout of 3600 seconds.sql
Unit tests are included with the code.
To test, use a migration with the following statement:
-- wait for 30 minutes
WAITFOR DELAY '00:30'
And name the file: 1-my_test_with_timeout_of_60_seconds.sql
Hint: you just need to recompile Tarantino.DatabaseManager.Core - actually
I never managed to rebuild the solution properly!
-- Dinh Doan Van Bien
Attachments:
tanrantino_statement_timeout_dvb_2001-08-12.patch 10.7 KB
Nice one. Thanks Dinh for this patch.