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.
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 admin2. Created a login for the builtin\power users group as follows:create login [BUILTIN\Power Users] from windows with default_database=[master]goexec master..sp_addsrvrolemember @loginame = N'BUILTIN\Power Users', @rolename = N'dbcreator'go3. Now students can start the Express Manager and connect to:localhost\sqlexpress using Windows Authentication4. 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?)ThanksMike Morrison |
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
|
|
|
|