views:

89

answers:

2

I want to manage SQL Server dynamically, that is through code I wan to scan SQL Server for available databases than I want to create new database, access older database, alter it, and insert data into database depending upon table schema what is better approach what should I use?

i heard name of nhibernate, SQL Server Management Object (SMO), Smss (SQL Server Management Studio) but i do not know more than their names

please guide me with pros and cons

+2  A: 

NHibernate is an ORM which has no direct relation to SQL Server. SMSS is a GUI tool for managing SQL Server. SMO is what you need. See this, for example.

Anton Gogolev
thank you for it but where should i start from to learn smo is there any tutorial
abrar
The link Anton gave you *is* a place to get started. Also see http://technet.microsoft.com/en-gb/library/ms162169.aspx.
phoebus
A: 

SMO is the way to go. You have detailed information in MSDN.

Konamiman