Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Attach DBs from a restored file on a disk Expand / Collapse
Author
Message
Posted Wednesday, July 30, 2014 6:35 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 11:42 PM
Points: 1,310, Visits: 1,786
Try this, open powershell,

cd databasefilelocation
$Acl = Get-Acl "workingdatafile.mdf"
Set-Acl "nonworkingdatafile.mdf" $Acl

Post #1598053
Posted Thursday, July 31, 2014 10:03 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 2, 2014 3:02 PM
Points: 171, Visits: 462
I have windows 2008 R2 and I don't see powershell anywhere and can't find it to install it on my OS. It is 32 bit. Is it already installed?


Post #1598357
Posted Thursday, July 31, 2014 11:44 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 2, 2014 3:02 PM
Points: 171, Visits: 462
Found it and installed it. I have to reboot the server, so I will have to wait till end of the day to reboot. I'll try it later. thanks.


Post #1598414
Posted Thursday, July 31, 2014 2:09 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 2, 2014 3:02 PM
Points: 171, Visits: 462
Before I do this, what exactly does this do?



Post #1598471
Posted Thursday, July 31, 2014 7:32 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 11:42 PM
Points: 1,310, Visits: 1,786
It will copy the NTFS permissions (known as an Access Control List or ACL) from a working MDF file (where the permissions are correct and work with SQL) to the non-working MDF (the one reporting read only errors). It's the same as manually copying the permissions from Security tab of the file. It's just a way to rule out permissions as an issue.
Post #1598544
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse