Installing SQL Server Express instance so common users can access I need to install a SQL Server Express instance (as an admin) which can be later on read and modified by regular users.

I run into http://msdn.microsoft.com/en-us/library/ms254504.aspx, and I'm trying to make it work like it says there, with this connection string:

Provider=sqloledb;Data Source=.\\DUBOCALC;Integrated Security=true;User Instance=true;AttachDBFilename=|DataDirectory|\\" + HelperClasses.DuboCalcSettings.dbname + ".mdf;Initial Catalog=DUBOCALC;Trusted_Connection=yes;


The problem I have is that the instance is created under C:\Program Files\Microsoft SQL Server\MSSQL10.INSTANCENAME, but all this under the Administrator's folder, so regular users can't have access there, where the .mdf files are.

In my bootstrapper file, I have the following line to install SQL Express:

&lt;Command PackageFile="SQLEXPR32_x86_ENU.EXE"
         Arguments='/q /hideconsole /action=Install /features=SQL /instancename=DUBOCALC /enableranu=1 /sqlsvcaccount="NT Authority\Network Service" /SQLSYSADMINACCOUNTS="Builtin\Users" /skiprules=RebootRequiredCheck'
         EstimatedInstalledBytes="225000000"
         EstimatedInstallSeconds="420"&gt;`


How could I do that, please? 

I think it's a very common use, to install a SQL Server Express instance as admin, then running it as a user, but I can't find any useful information which will help me get this working.

thanks a lot everybody in advance,
Manuel.
/SQLSYSADMINACCOUNTS adds users and groups to the SQL Servers sys admin group (all powerful).  That sys admin group is a sql server level security concept.

SQL Server and SQL Server Express runs as a service (and what it runs as does not dictate end user security).  Therefore, permissions on data directory (and the .mdf files) does not control how end users connect.

Your connection string should look something like:

Data Source=computerName\SQLExpress;Initial Catalog=myDataBase;Integrated Security=SSPI;


By default SQL Express is installed under a named instance called "SQLExpress" so the data source is the machine name where the service is running and then \ instance name.  Integrated security tells the client to connect with it's current credentials.  If that user is in the group that has sys admin role membership, it will be powerful.

Here's a link with more connection string samples:

http://www.connectionstrings.com/sql-server-2005

You can also use sql accounts (not integrated) and then embed those in the connection string:  https://stackoverflow.com/questions/997169/c-sharp-2008-sql-server-express-connection-string