System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\TEST.MDF'. (Microsoft.SqlServer.Express.Smo)
1)give a different location to save the mdf and ldf file!
2)C:\Program Files\Microsoft SQL Server\MSSQL.1
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data
For my SQL User Accounts on my machine to allow them to write the MDF and LDF Files to those locations.
3)My solution goto configuration tool-sql server configuration manager-sqlserver2005services-properties
change network sevices to local system
HTH someone
Subscribe to:
Post Comments (Atom)
2 comments:
Thank you....
no problem dattatraya...im glad help you
Post a Comment