dbTalk Databases Forums  

Delete Analysis Services DB from command line

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Delete Analysis Services DB from command line in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Matt
 
Posts: n/a

Default Delete Analysis Services DB from command line - 01-23-2006 , 08:15 AM






I would like to delete an Analysis Services db from the command line instead
of going through the GUI. How can I do this?

Reply With Quote
  #2  
Old   
Edward Melomed [MSFT]
 
Posts: n/a

Default Re: Delete Analysis Services DB from command line - 01-24-2006 , 02:56 AM






This is really simple.

Build a console C# application.
Add a reference to AMO (Microsoft.AnalysisServices ) to it.
All the code need in your application is something like:

Server ASserver = new Server();

ASserver.Connect("DataSource = MyServer;");

ASserver.Execute("<Delete
xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">
<Object><DatabaseID>MyDB</DatabaseID></Object></Delete>");

-----
This posting is provided "AS IS" with no warranties, and confers no rights



"Matt" <Matt (AT) discussions (DOT) microsoft.com> wrote

Quote:
I would like to delete an Analysis Services db from the command line
instead
of going through the GUI. How can I do this?



Reply With Quote
  #3  
Old   
Matt
 
Posts: n/a

Default Re: Delete Analysis Services DB from command line - 01-24-2006 , 06:40 AM



I'm not really much of a programmer, and I've never used C# before. Is there
any other way of doing this?

"Edward Melomed [MSFT]" wrote:

Quote:
This is really simple.

Build a console C# application.
Add a reference to AMO (Microsoft.AnalysisServices ) to it.
All the code need in your application is something like:

Server ASserver = new Server();

ASserver.Connect("DataSource = MyServer;");

ASserver.Execute("<Delete
xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\"
Object><DatabaseID>MyDB</DatabaseID></Object></Delete>");

-----
This posting is provided "AS IS" with no warranties, and confers no rights



"Matt" <Matt (AT) discussions (DOT) microsoft.com> wrote in message
news:34882A99-B832-4BC8-A0EF-165AB68B6905 (AT) microsoft (DOT) com...
I would like to delete an Analysis Services db from the command line
instead
of going through the GUI. How can I do this?




Reply With Quote
  #4  
Old   
Akshai Mirchandani [MS]
 
Posts: n/a

Default Re: Delete Analysis Services DB from command line - 01-24-2006 , 02:55 PM



You can use SSIS to build a task that executes DDL against an AS connection
and use the <Delete> statement below. You can run the SSIS package on the
command line...

HTH,
Akshai
--
This posting is provided "AS IS" with no warranties, and confers no rights
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

"Matt" <Matt (AT) discussions (DOT) microsoft.com> wrote

Quote:
I'm not really much of a programmer, and I've never used C# before. Is
there
any other way of doing this?

"Edward Melomed [MSFT]" wrote:

This is really simple.

Build a console C# application.
Add a reference to AMO (Microsoft.AnalysisServices ) to it.
All the code need in your application is something like:

Server ASserver = new Server();

ASserver.Connect("DataSource = MyServer;");

ASserver.Execute("<Delete
xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\"
Object><DatabaseID>MyDB</DatabaseID></Object></Delete>");

-----
This posting is provided "AS IS" with no warranties, and confers no
rights



"Matt" <Matt (AT) discussions (DOT) microsoft.com> wrote in message
news:34882A99-B832-4BC8-A0EF-165AB68B6905 (AT) microsoft (DOT) com...
I would like to delete an Analysis Services db from the command line
instead
of going through the GUI. How can I do this?






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.