Hai all

  • TITLE: Microsoft SQL Server Management Studio

    ------------------------------

    Restore failed for Server 'RAJESH-PC\NAIDU'. (Microsoft.SqlServer.SmoExtended)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1617.0+((KJ_RTM_GDR).110422-1125+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476

    ------------------------------

    ADDITIONAL INFORMATION:

    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\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\AdventureWorksDW.mdf'. (Microsoft.SqlServer.Smo)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1617.0+((KJ_RTM_GDR).110422-1125+)&LinkId=20476

    ------------------------------

    BUTTONS:

    OK

    ------------------------------

    what i have done so far is, fullbackup and transactional backup to disk 'D' and has given administrative permission to that folder and service account is NT AUTHORITY.

    Can anybody please help me out.

    Thanks in advance

  • You said you made a backup. Ok.

    But what action exactly did raise your error? The backup-operation or something else?

    Please provide your script too.

  • Hai,

    I am explianing what i did

    In my local machine i installed sql 2008r2,one is default and the other is named instance in which i gave the service account as NT AUTHORITY/NETWORK which i believe is not a good practice insteasd of NT AUTHORITY/SYSTEM, so i believe bacause of this is i am getting that error.

    and when i uninstalled and reinstalled with the NT AUTHORITY/SYSTEM, everything seems to be working fine with the restore process which was throwing error earlier.

    can u please suggest me which is good practice like" when we provide NT WITH NETWORK for our local machine will it be restore in the default instance? is it like that? or there are any other issues which are related to this error?

    thanks in advance.

  • It seems ... you dont have permission for creating .mdf and .ldf files in C drive(C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\AdventureWorksDW.mdf').

    So login with administrator or change the mdf and ldf file storage location to other derives(D:\ or E:\...)

  • Hai Ramana,

    here my question is " if we give NT AUTHORITY/NETWORK for both instances that is for default instance and named instance, when we restore database to a named instance, it fails and throwing error which i posted.but when i changed to NT AUTHORITY/SYSTEM restoring to named instance was success.

    Now please help me out is there any relation between this NETWORK AND SYSTEM?

    Thanks in advance.

  • Nothing to do with any relationships between NETWORK and SYSTEM. The service account that SQL Server is running under does not have permission to that folder. Check what account SQL is running under, grant the necessary permissions.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hai Gail,

    What types of permission we need to give to sql server in order to provide permission to that folder? Can u please explain which service accounts is best recommended in production environment in which we need to access remote desktops which are in USA.

    Thanks in advance.

  • When restoring a backup, the default setting will be to place the data- and log-files to the same location as from the database the backup was taken from. So if you are restoring the backup to a named instance on the same (hosting)server, the databasefiles will be using the same path as the database on the default instance is using. Because the database on the default instance is online, these files are locked and cannot be overwritten by the restore action.

    Execute the restore action and specify different path (and/or filenames) for the databasefiles. Use an existing path and non-existing filenames.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • The SQL Server service account (the account that SQL server is running under) needs full control of all folders where databases exist.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply