cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Aaron_Barnett
Level 5

SQLRTDoRollbackAll function wont execute SQL scripts scheduled to run during rollback

Hi

basically my problem is:

SQLRTDoRollbackAll function wont execute a SQL scripts scheduled to run during rollback

I create a database with one script - and try populate it with tables - there is a intentional error in the populate tables (which causes a rollback) - i can trace this in debug mode

i have a script to remove the database on rollback (check box run on rollback is ticked) but it dosnt seem to work???

**rmdatabase** and **rmdatabaseConfig** are replaced with the names of the database that is created,

Use Master
--Remove the Database if rollBack is needed
DROP DATABASE **rmdatabase**

--Remove the Config Database if rollBack is needed
DROP DATABASE **rmdatabaseConfig**



Any ideas what i should try? - i have been googling this error for a while - found nothing!!

Thanks for the Help / advice

A
Labels (1)
0 Kudos
(2) Replies
Aaron_Barnett
Level 5

Any ideas?
0 Kudos
hidenori
Level 17

The problem does not occur on my side. Please follow the steps below and see if it is reproducible:

[LIST=1]
  • Create a new InstallScript project.
  • Go to the SQL Scripts view.
  • Add a connection and two SQL scripts.
  • Write an incorrect T-SQL statement in the first SQL script, and schedule it to run during install.
  • Write a correct T-SQL statement such as creating a new table in the second SQL script, and schedule it to run during rollback.
  • Build and run the setup.
  • On the SQLLogin dialog, provide a valid login information, and then proceed the setup.
  • When you get an error during installation, click the OK on the error dialog.
  • Observe the database using Microsoft SQL Server Management Studio.

    Expected result: the new table should be created by the second SQL script.
  • 0 Kudos