Creating a database instance in C #

Is it possible to create an sql database instance with C # code. I have no problem adding a database to an existing SQL instance, such as WONEA \ SQLEXPRESS, but to create another SQL instance, such as WONEA \ SQLEXPRESSTEST. I am a little puzzled. Help!

+5
source share
2 answers

Short answer: you cannot do this using C # code.

The SQL server instances are essentially the installation of the SQL server - to create a new instance of the SQL server you need to run the SQL Server installer and ask it to install it (which you can technically do from C # code, but I'm going to not the answer you were looking for).

+3

SQL-, , "". ( !)

0

All Articles