Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Express Edition and Compact Edition (2005)
 SQL Server Express in a lab environment

Author  Topic 

morriscm
Starting Member

2 Posts

Posted - 2005-08-18 : 12:32:55
I'd like to allow students in a lab to use the Express Manager and T-SQL to create their own databases. I think I've figured out just about everything - but the last step. Here's my thinking on how to do this:

1. Students are power users, not local admin
2. Created a login for the builtin\power users group as follows:
create login [BUILTIN\Power Users] from windows with default_database=[master]
go
exec master..sp_addsrvrolemember @loginame = N'BUILTIN\Power Users', @rolename = N'dbcreator'
go
3. Now students can start the Express Manager and connect to:
localhost\sqlexpress using Windows Authentication
4. After they do, they can open and run a script creating a database and populating it with tables and records.
5. All good up to here... but when trying to access the new database using VB Express (file based, not a remote connection) access is denied.

The problem is in the NTFS file permissions being assigned to the new database mdf and ldf files. Local administrators and the builtin Network Service accounts have permissions, but the student who created the database gets nothing... So the student is denied access to the mdf and ldf files when trying to make a connection to them using VB Express.

I can go in with a different account having admin privileges are assign privileges to power users for the mdf/ldf files after they're created but this isn't what I need (students need to work whenever they want without waiting for an admin to fix the file permissions).

Maybe I'm going about this all wrong? If I have to I can insist on students always using VS 2005 instead of VB Express and use connections to a remote database (no problems doing this), but I'm still hoping for an express solution.

I'm new to this forum, so apologies if this is a dumb question (but even if it is - can anyone point me in the right direction?)

Thanks

Mike Morrison

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2005-08-18 : 14:15:56
Duplicate. See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=53981 for answers.

---------------------------
EmeraldCityDomains.com
Go to Top of Page
   

- Advertisement -