Skip to content

Contributors ~ Automated Tests

ebruchez edited this page Oct 16, 2014 · 6 revisions

Home ▸ Contributors

Removing leftover databases

BEGIN
    DECLARE @qry nvarchar(max);
    SELECT @qry = 
        (SELECT 'DROP DATABASE ' + name + '; ' 
         FROM sys.databases 
         WHERE name LIKE 'orbeon_%_tomcat'
         FOR XML PATH(''));
    EXEC sp_executesql @qry;
END;  
Clone this wiki locally