title: How do I obtain a list of all schemas in a Sql Server database
body: <p>I want to retrieve a list of all schemas in a given Sql Server database. Using the <code>ADO.NET</code> schema retrieval API, I get a list of all collections but there is no collection for 'Schemas'.
  I could traverse the <code>'Tables'</code>, <code>'Procedures'</code> collections (and others if required) and obtain a list of unique schema names but isn't there a easier/shorter way of achieving the same result?</p>
  <p>Example: For the standard <code>'AdventureWorks'</code> database I would like to obtain the following list - <code>dbo,HumanResources,Person,Production,Purchasing,Sales</code> (I've omitted the other standard schem names like <code>db_accessadmin</code>,<code>db_datareader</code> etc)</p>
  <p>Edit: I can get the list of schemas by querying the system view - <code>INFORMATION_SCHEMA.SCHEMATA</code> but would prefer using the schema API as first choice.</p>