0

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

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
abrar
  • 69
  • 1
  • 2
  • 4

2 Answers2

2

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
  • 113,561
  • 39
  • 200
  • 288
  • thank you for it but where should i start from to learn smo is there any tutorial – abrar Dec 23 '09 at 07:09
  • The link Anton gave you *is* a place to get started. Also see http://technet.microsoft.com/en-gb/library/ms162169.aspx. – phoebus Dec 23 '09 at 07:31
0

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

Konamiman
  • 49,681
  • 17
  • 108
  • 138