unable backup to c drive

  • Hi There,

    Lately I've installed new server with downgraded to windows 2003 server, and I am using Sql Server 2005 Express with custom internal application. I noticed that the backup of sql unble to save into C drive(NTFS), but when my vendor tried manual and schedule backup to D drive, it was sucessful. I'm logging in by using admistrative ID and into SQL using windows authentication mode. Could it due to security setting in C drive or something else ?

    Any idea would be appreciated.

    regards,

    Jimmy

  • jimmy 97469 (5/24/2011)


    Hi There,

    Lately I've installed new server with downgraded to windows 2003 server, and I am using Sql Server 2005 Express with custom internal application. I noticed that the backup of sql unble to save into C drive(NTFS), but when my vendor tried manual and schedule backup to D drive, it was sucessful. I'm logging in by using admistrative ID and into SQL using windows authentication mode. Could it due to security setting in C drive or something else ?

    Any idea would be appreciated.

    regards,

    Jimmy

    Jimmy can you post the errors from error log and application logs too.

    Can you check the sql agent log-on user has access to the C drive .

    Muthukkumaran Kaliyamoorthy
    https://www.sqlserverblogforum.com/

  • Erros as below:

    Store Procedure: usp_Agent_BackupDatabase_Ex

    Error: Cannot open backup device 'C:\RiskGovernance.BAK'. Operating system error 5(Access is denied.).

    BACKUP DATABASE is terminating abnormally.

    Stack Trace:

    at DataAccess.STD.daSTD_CustomProc.Execute(String StoreProcedure)

    at GlobalFnc.GlobalCDOFunction.ExecuteCustomStoreProcedure(String StoreProcedure)

  • another one:

    BackupDiskFile::CreateMedia: Backup device 'C:\RiskGovernance.BAK' failed to create. Operating system error 5(Access is denied.).

  • your id or the group in which your id belongs, doesnt have the permission to modify or copy the file in c drive. Ask windows team for this permission if no alternate available.

    Its always advisable that you place your sql related file in some other drive than C(Primary drive)

    ----------
    Ashish

  • When you tell SQL Server to run a backup, the backup process runs under the context that SQL Server is configured in, not the context in which you are connecting to it. That context does not have access to the C: drive. It doesn't matter whether you do or not. You need to identify which user SQL Server is configured under and change security settings there.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • also, the file path might have something to do with it; even with my windows login, I cannot write to the Root of the C:\ drive without "running as Administrator" privileges, but i can write to a folder on that drive(C:\Data\ for example)

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • The user under which SQL Server Agent runs doesn't seem to have access to write on drive C:. However, unless you really need it, for security reasons you should avoid saving your backups on the system drive.

  • I think there also might be other security issues. Have you tried to backup with SqlBackupAndFTP[/url]?

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

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