
必须序列化意义就是不能同时进行,看一下是否有其他数据库的 *** 作还没有完成
The backup is running when user are trying to perform the database shrink Please note that below operations may not be performed at the same time as a backup operation
• File management operations such as the ALTER DATABASE statement with either ADD FILE or REMOVE FILE clauses
• The file truncation phase of shrink database or shrink file
Please note that if backup is running and one of the above operations is attempted, then operation fails immediately When user is trying to add or remove a file and if backups is started then backup will wait for a timeout period, then fail
If user is trying to shrink database or file while a backup is running, the shrink stops without truncating the file If backup started after shrink database operation then backup waits for shrink operation to complete
sql
server
2005
安装与是否安装vsnet
2005无关,安装sql
server
2005
会自动安装一些必备组建,在安装sql
server
2005
时需要把以前的一些sql组建,注册表之类的痕迹删除,如果的确需要安装sql2005不定的话,下载一个sqlserver2005sp2-x86补丁试试。真不行的话下载下面的版本cs_sql_2005_std_x86_cd1
和cs_sql_2005_std_x86_cd2
我用的就是这个sp3环境下每次都能安装成功,自己慢慢试!
你用的是vista文件系统是NTFS确认目标目录有iis_user或者everyone的写入权限
看看你的C:\Users\a\Documents\Visual Studio 2008\WebSites\aspnet/目录有没有everyone的读取/写入/新建 权限,记得要给整个目录附权限
你在catch处
加一个断点,看看错误的具体内容。。。。
我把你的代码试验了一下,是可以正确执行的。
但有2个问题。一是user可能是关键字。所以你备份的时候要backup database [user] to disk 这里改一下
另外,if (cmExecuteNonQuery() > 0) 这里判断其实也不对,因为ExecuteNonQuery方法返回的是命令所影响的行数,而你的backup命令,返值肯定是-1,它本来一行也没影响到。
因此虽然提示备份失败,但实际文件已经备份了,你判断一下,只要不报异常就可以了。
以上就是关于SQL SERVER数据库备份、收缩日志都提示错误,如何解决全部的内容,包括:SQL SERVER数据库备份、收缩日志都提示错误,如何解决、sql 2005 sp3版本,做数据自动备份时总是出错、数据库备份失败.(不打开文件设备.)等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)