SQL Server Express while attaching a database getting error 5120
21
The minimal permissions needed to attach a database file is 'full control'. If you want to attach the database using SQL Server Management Studio, the account running SSMS must have full control on both the database MDF and LDF files
To grant privileges to files:
- Right click the file in Windows Explorer
- Open the Security tab
- Click Edit
- Click Add and add the SSMS account
- Grant Full control
- Go to SSMS and try to attach the file again
You can copy the file to another folder, to avoid C root, you might not have enough permissions there
Related videos on Youtube
Author by
query_weary
Updated on September 18, 2022Comments
-
query_weary over 1 year
Help!
df = df[df.groupby('id')['metric'].transform('max')==df['metric]]
and now my other functions don't work. I tried
df.reset_index(drop = True, inplace=True)...... #nope!
I tried to start from the very beginning - import libraries and re-read csv's and nope!
what happened?
df['d_d_Mean'] = df[df.groupby('id')['drugs'].transform('max')==df['drugs']]
Error:
<ipython-input-607-85fda50bf5a4>:12: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
-
Ash Burlaczenko over 10 years
Access is denied
is quite a self explanatory error. -
Renju Chandran chingath over 10 yearsmove the file to some other folder having a full permission or execute permission for the SQL service account and then try to attach file.
-
-
MaxPayne over 8 yearsWorked for me tooooo. One addition from my end: I have multiple databases inside a folder so I Right clicked on the Folder instead of file and follow the above process. All databases inside that folder are working now.