Sign up ×
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:

share|improve this answer

Have a look at Microsoft's PowerShell. I suspect it is what you're after.

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 for the administration objects.

share|improve this answer
TomTom, look here: – 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.