Click here to Skip to main content
15,884,838 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have developed a desktop application in Visual Studio 2010 and used MS Sql Server Express 2005 at back end. Now i am creating a setup for my project. I want that a named instance of Sql Server be installed on the machine and database files attached to it when i install the software. I have checked some articles but could not find a complete solution.

Please if some one can help me in this regard.

Thanks in advance.

bye
Posted
Comments
Kornfeld Eliyahu Peter 16-Sep-14 6:21am    
If you create a Visual Studio setup project you can set the prerequisites - http://msdn.microsoft.com/en-us/library/vstudio/7tx0bw8y(v=vs.110).aspx

1 solution

I would not suggest to installation of SQL Server and attaching databases using C#.

These are more sys preparation / administrative tasks. My suggestion would be first talk with the Tech. Admins about the policies, guidelines etc. regarding installation of SQL Server etc.

I am sure they would have an opinion on it.

And as far as scripting and automation is concerned, I would suggest to use PowerShell for that.

Look on Google on how to use PowerShell for installing named instance of SQL Server and you should find many hints.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900