主题:  关于数据库备份的问题

有饭

职务:普通成员
等级:2
金币:10.0
发贴:669
注册:2002/3/25 12:50:19
#12002/4/23 21:54:34
操作如下:
1。建立一个备份设备,语句如下:
EXEC sp_addumpdevice 'DISK','storage_backup','c:\program files\mssql7\backup\storage_backup.bak'
2。判断备份设备是否存在,如果存在,则删除该备份设备,语句如下:
use master
if exists(select name from sysdevices
where name='storage_backup')
delete sysdevices where name='storage_backup'
执行操作时,出现在错误,错误提示如下:
Server: Msg 259, Level 16, State 2, Line 1
Ad hoc updates to system catalogs are not enabled. The system administrator must reconfigure SQL Server to allow this.



=ridincal=

职务:管理员
等级:7
金币:20.0
发贴:5886
注册:2004/1/13 11:47:04
#22002/4/23 23:47:57
你不应直接对sys开头的表直接进行操作。
问题可能是没有得到系统管理员的授权。用SA登录。
另外,你也不应该直接对他们进行写入操作,你的问题可以使用
sp_dropdevice 存储过程进行操作

编辑历史:[这消息被ridincal编辑过(编辑时间2002-04-23 23:54:40)]


=ridincal=

职务:管理员
等级:7
金币:20.0
发贴:5886
注册:2004/1/13 11:47:04
#32002/4/23 23:51:30
请参阅master表中的sp_dropdevice 存储过程