Skip to content

Contributors ~ Automated Tests

ebruchez edited this page Aug 26, 2014 · 6 revisions

Wiki ▸ 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