It's been a while since I've posted. Things have been going well for my project, but I'm coming back to the issue of setting up a SQL server on my user's computers.

Sknake was kind enough to give me the command line switches to get a MSSQL install set up in a good direction. The problem is that in the 2008 express version the sa user is disabled by default. If I assign it a password at install does it automatically enable the account? If not, I can't log in with it because it is disabled.

I would like to include with my software a user control panel interface for admins that allows server and network admins the ability to create, delete and modify user permissions on the SQL server. But I cannot do that without the sa account enabled. I know I can use windows authentication, but I'd prefer not to. I don't know enough about it to feel confident enough to use it.

My question is: is it possible to enable the sa user on install? If not, how can it be enabled using C# code or will the user have to enable it manually?

Recommended Answers

All 2 Replies

Take a look at - http://www.symantec.com/connect/articles/install-and-configure-sql-server-2008-express

That works, but it requires user interaction and instruction for the end user. Which means support calls and troubleshooting for people that really don't need it. I'd like to have it automated. I plan on distributing my solution on a CD or in a compressed file (ie .zip) and will have my own setup package that will copy files and install supporting software.

I will try using sknakes suggestion of using setup.exe /qb ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_Replication,Client_Components,Connectivity,SQL_SSMSEE INSTANCENAME=InstanceName SAVESYSDB=1 SQLBROWSERAUTOSTART=1 SQLAUTOSTART=1 AGTAUTOSTART=1 SECURITYMODE=SQL SAPWD=password DISABLENETWORKPROTOCOLS=0 ERRORREPORTING=1 SQMREPORTING=0 ADDUSERASADMIN=1 INSTALLSQLDIR="%ProgramFiles%\Microsoft SQL Server\" when I run the install for the server. My question I guess is, can I enable the sa account at install or can I do it programatically with C# after it is already installed?

I'd like to have the SQL server installed and configured "quietly."

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.