Prev: Subtract Month
Next: Min Value Function
From: Martin Knauer on 31 Mar 2010 09:03 Hi, after having some issues with File-Permissions during attach attempts, I played around a bit and found something weird which I'd like someone to confirm: Scenario: - Windows 7 Ultimate 64 bit - SQL Server 2008 Developer Edition (Version 10.0.2531.0) - Database for testing: "Test" - SSMS running under my local user account being sysadmin State #1 - SQL-Server stopped - Database "Test" attached - To see File-Permissions I need to Elevate User-rigths in Explorer - File-Permissions on Test.mdf & Test.ldf: - Owner Rights: Full Control - SQLServerMSSQLUser$... : Full Control - Administrators : Full Control State #2 - SQL-Server started - Database "Test" attached - To see File-Permissions I need to Elevate User-rigths in Explorer - File-Permissions on Test.mdf & Test.ldf: (same as State #1) - Owner Rights: Full Control - SQLServerMSSQLUser$... : Full Control - Administrators : Full Control State #3 - SQL-Server started - Database "Test" detached - To see File-Permissions I need NOT to Elevate User-rigths in Explorer - File-Permissions on Test.mdf & Test.ldf: - my User-Account: Full Control => In order to ATTACH a DB the user trying to start the action needs "Full Control"-Rights on the files (mdf & ldf) ? I always thought it's the account the SQL-Server is running who needs access to the files in order to attach the DB... ? TIA -- Martin Knauer
From: RJ Roberts on 31 Mar 2010 17:07 If the user performing the Attach is different than the service account BOTH need the full control permission to attach files. Otherwise the dreaded Error 5 occurs. HTH -- RJ Roberts DB Architect/Developer "Martin Knauer" wrote: > Hi, > > after having some issues with File-Permissions during attach attempts, I > played around a bit and found something weird which I'd like someone to > confirm: > > > Scenario: > - Windows 7 Ultimate 64 bit > - SQL Server 2008 Developer Edition (Version 10.0.2531.0) > - Database for testing: "Test" > - SSMS running under my local user account being sysadmin > > > State #1 > - SQL-Server stopped > - Database "Test" attached > - To see File-Permissions I need to Elevate User-rigths in Explorer > - File-Permissions on Test.mdf & Test.ldf: > - Owner Rights: Full Control > - SQLServerMSSQLUser$... : Full Control > - Administrators : Full Control > > State #2 > - SQL-Server started > - Database "Test" attached > - To see File-Permissions I need to Elevate User-rigths in Explorer > - File-Permissions on Test.mdf & Test.ldf: (same as State #1) > - Owner Rights: Full Control > - SQLServerMSSQLUser$... : Full Control > - Administrators : Full Control > > State #3 > - SQL-Server started > - Database "Test" detached > - To see File-Permissions I need NOT to Elevate User-rigths in Explorer > - File-Permissions on Test.mdf & Test.ldf: > - my User-Account: Full Control > > > > => In order to ATTACH a DB the user trying to start the action needs > "Full Control"-Rights on the files (mdf & ldf) ? > > I always thought it's the account the SQL-Server is running who needs > access to the files in order to attach the DB... ? > > TIA > > -- > Martin Knauer > . >
|
Pages: 1 Prev: Subtract Month Next: Min Value Function |