title: Delete Analysis Services database using T-SQL
body: <p>Is it possible to modify (delete) SSAS databases using T-SQL?</p>
  
  <p>Background:</p>
  
  <p>We have a Web Application that builds and deploys a SQL Analysis Services database and cube with a structure based on a dynamic query generated by user selections. This works fine, but when these conditions are removed we need to delete the database as well. I can modify the C# dll we've built to do a delete on certain conditions, but we already have a stored procedure that's triggered by the DLL to delete other db content and I'd prefer to add to this stored proc to delete the Analysis Services database. </p>