Jiadong's profileGuiding StarPhotosBlogListsMore Tools Help

Blog


    BACKUP DATABASE :: 出现操作系统错误 5(拒绝访问)

     
    整了个傻瓜型的批处理数据库备份,一个劲地报拒绝访问
    sqlcmd -S ServerName\InstanceName -i sqlfile
     
    sql:
    BACKUP database BTSys to disk="D:\BAK\btsysdb.bak"
     
    拒绝访问?难道俺没有权限写D:\BAK\,检查了下没问题。
    打开SqlServer,用里面自带的备份方法尝试备份,备份文件默认保存在类似C:\Program Files\Microsoft Sql Server\MSSQL.1\MSSQL\Backup下。
    修改备份目录至D:\BAK,同样是拒绝访问。
    这样问题清楚了,我一瞅C:\Program Files\Microsoft Sql Server\MSSQL.1\MSSQL\Backup的权限,果然有个SQLServer2005MSSQLUser的帐户,权限是完全控制
    同样给D:\BAK加了这个帐户的权限后,俺的BAT就能顺利运行了。Disappointed
     
     

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://huangjiadong.spaces.live.com/blog/cns!7B658974E4EE6957!1528.trak
    Weblogs that reference this entry
    • None