Is there an API that has built in functions/methods to manage a SQL Server Host?

You could just connect as sysadmin and execute the sql commands, but i think there is something out-of-the-box for this.

link|improve this question

45% accept rate
feedback

3 Answers

up vote 0 down vote accepted

What you want is SMO (SQL Management Objects). It is the API for managing SQL through managed code. Have a look at this MSDN article: http://msdn.microsoft.com/en-us/library/ms162169.aspx

link|improve this answer
feedback

Have a look at Microsoft's PowerShell. I suspect it is what you're after. http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx

link|improve this answer
Powershell is excellent for this, but even its built in command-lets for SQL Server are really just calling the SMOs. So it is good to have a handle on them as well. – Robert Kaucher Oct 7 '10 at 17:52
feedback

No, SQL Server interface is SQL Language. There are some Object models, but nothng .NET specific.

Check http://msdn.microsoft.com/en-us/library/aa274764(SQL.80).aspx for the administration objects.

link|improve this answer
1  
TomTom, look here: en.wikipedia.org/wiki/SQL_Server_Management_Objects – Robert Kaucher Oct 7 '10 at 17:47
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.