Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

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

share|improve this answer

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

share|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

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.

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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