Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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